|
thunderkeys.net
Sun, Jan 28 2007
I've cut over to a new server today. Everything seems to be working, but let me know if you discover any issues with the site. Fri, Jan 26 2007
So today we had a suspicious package show up at work and it ended up having the Fairfax County Fire/Police and Bomb Squad show up. They even had the bomb robot. We ended up getting evacuated from the building around noon and sent home. Quite the productivity killer, these suspicious packages... Wed, Jan 24 2007
I setup things at work to auto-pause amarok when I lock the screen using kdesktop_lock. There were some example scripts that worked by checking the screen blank status using dcop in a never-ending while loop and sleeping, but I didn't want that many dcop calls constantly being spawned. These steps need to be done as root, unless you have some custom setup. First, create the following shell script as /usr/bin/kdesktop_lock.sh:
#!/bin/sh
amarok_status=`dcop amarok player status`
amarok_is_playing=`dcop amarok player isPlaying`
if [ "x$amarok_is_playing" = "xtrue" -a $amarok_status -ne 1 ]; then
dcop amarok player pause
fi
/usr/bin/kdesktop_lock.real $*
if [ "x$amarok_is_playing" = "xtrue" ]; then
dcop amarok player play
fi
This dpkg-divert stuff is just so debian package upgrades won't clobber the setup. /usr/sbin/dpkg-divert --divert /usr/bin/kdesktop_lock.real --rename /usr/bin/kdesktop_lock Then setup a symlink from kdesktop_lock.sh to kdesktop_lock, and fix modes on the shell script: ln -s /usr/bin/kdesktop_lock.sh /usr/bin/kdesktop_lock chmod a+x /usr/bin/kdesktop_lock.sh Now when you lock your screen an amarok is playing, it should pause your music. When you unlock the screen, it will automatically resume.
Tue, Jan 16 2007
So Richard was wishing that my blog had comments. Since Haloscan took all of a minute to setup, now it does... you're welcome :-) Sat, Jan 13 2007
Mon, Jan 01 2007
And what better way to start it off with some delicious Indian food that I haven't had in months. We took a gamble that the food would still be hot after the 35 minute journey from Centreville to our house. Absence does indeed make the heart (and belly) grow fonder.
|
||