Add xlock2 command
[cmccabe-etc] / .bashrc
diff --git a/.bashrc b/.bashrc
index 9abe74b..0f1c4e7 100644 (file)
--- 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
@@ -16,7 +25,6 @@ case $- in
        alias mv='mv -i'
        alias vi='vim'
        alias wget='wget --user-agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"'
-       alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
        alias grep='grep --color=tty -d skip'
        export PATH="${PATH}:${HOME}/cmccabe-bin"
        export EDITOR="/usr/bin/vim"