From: Colin Patrick McCabe Date: Mon, 19 Jul 2010 01:30:00 +0000 (-0700) Subject: Add xlock2 command X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=798aff79d41ca995ea455a6102037340384ef0d2;p=cmccabe-etc Add xlock2 command --- diff --git a/.bashrc b/.bashrc index c3c0e18..0f1c4e7 100644 --- a/.bashrc +++ b/.bashrc @@ -9,6 +9,15 @@ if [ -f ~/.bashrc-local ]; then . ~/.bashrc-local fi +xlock2() { + ps aux | grep -v grep | grep xscreensaver > /dev/null + if [ $? -ne 0 ]; then + echo "starting xscreensaver..." + xscreensaver & + fi + xscreensaver-command -lock +} + case $- in *i*) # interactive shell