From 798aff79d41ca995ea455a6102037340384ef0d2 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Sun, 18 Jul 2010 18:30:00 -0700 Subject: [PATCH] Add xlock2 command --- .bashrc | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) 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 -- 1.6.6.rc1.39.g9a42