On Wed, May 4, 2011 at 8:23 PM, David L wrote: <snip> > One thing > I do is query the screensaver in a cron job to log > my consulting hours. So I figured I'd attempt to use > a portable way of doing that, so I tried: > > xdg-screensaver status > FWIW, this seems to work to query screensaver status in KDE: qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.GetActive That can be combined with this wmctrl command: wmctrl -d | awk '($2=="*"){print}' |awk '{for (x=10;x<=NF;x++){printf("%s ",$x)}}' to get the name of the active desktop, which can be used to log what you were doing at any given time. I find this very useful for logging hours if I name my desktops by the projects I'm working on. David -- test mailing list test@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe: https://admin.fedoraproject.org/mailman/listinfo/test