Introduction

From the Conky FAQ: Conky is a program which can display arbitrary information (such as the date, CPU temperature from i2c, MPD info, and anything else you desire) to the root window in X11. Conky normally does this by drawing to the root window, however Conky can also be run in windowed mode (though this is not how conky was meant to be used).

Adding Portage Information

NOTE: The following scripts require read permission on /var/log/emerge.log, and other portage-specific files. It may be best
to add your user (or the user running these scripts) into the portage group with something like:

gpasswd -a <user> portage

Simply changing /var/log/emerge.log to 644 won't work, as portage appears to change the permissions of this log file back to 660 after it logs anything into it (as of 2006.1).

Be aware that users in the portage group can write to PORTDIR (where the package files are stored), PKGDIR (where binary packages are stored), DISTDIR (where source files are stored) and the location where packages currently being compiled are stored. You must trust anyone you add to the portage group completely.

Last sync

You can check the timestamp of your last sync by adding this to the TEXT section of ~/.conkyrc:

Or the time that you last sync'd according to emerge.log using this python script:

File: ~/lastsync.py

#!/usr/bin/python
#
# prints the last time portage was updated (locatime)
# prints something like "Monday at 6:52pm (Sep 12)"
# man strftime for more varibles in time display
import time
for line in file('/var/log/emerge.log'):
if 'Sync completed' in line:
lastline = line
print time.strftime("%A at %l:%M%P (%b %d)", time.localtime(int(lastline[:10])))