From dba4eb1c2fce358c29d1db050b8e7b374fc391a5 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 7 Nov 2011 10:48:11 -0500 Subject: [PATCH 1/2] cron-rest-eyes: proper grep order to exclude grep results --- cron-rest-eyes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cron-rest-eyes b/cron-rest-eyes index 378d0e2..dd51d37 100755 --- a/cron-rest-eyes +++ b/cron-rest-eyes @@ -3,11 +3,11 @@ export DISPLAY=:0 # no message if one is displayed already -if [[ "$(ps -efww | grep -v grep | grep gxmessage)" != "" ]]; then +if [[ "$(ps -efww | grep gxmessage | grep -v grep)" != "" ]]; then exit fi # no message if xscreensaver active -if [ "$(ps -efww | grep -v grep | grep xscreensaver)" != "" ]; then +if [ "$(ps -efww | grep xscreensaver | grep -v grep)" != "" ]; then exit fi # no message if gnome-screensaver active From 714d672fdb825293e1baba2af0643bb2332ddaa5 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 8 Nov 2011 14:59:53 -0500 Subject: [PATCH 2/2] bash_aliases: prepend to $PROMPT_COMMAND instead of appending --- bash_aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_aliases b/bash_aliases index 28dc2d9..66980ea 100755 --- a/bash_aliases +++ b/bash_aliases @@ -22,7 +22,7 @@ alias backgammon='backgammon -r -pb' # put 'cattodo' in $PROMPT_COMMAND to use alias cattodo='if [[ $CATTODO_LAST_WD != $PWD ]]; then if [[ -r .todo ]]; then cat .todo; fi; CATTODO_LAST_WD=$PWD; fi' alias cdshowgitstatus='if [[ $CDSHOWGITSTATUS_LAST_WD != $PWD ]]; then if [[ -d .git ]]; then git status; fi; CDSHOWGITSTATUS_LAST_WD=$PWD; fi' -#PROMPT_COMMAND="$PROMPT_COMMAND;cdshowgitstatus" +#PROMPT_COMMAND="cdshowgitstatus;$PROMPT_COMMAND" function prompt_ps1_git_branch() { if [[ -e /usr/bin/git && "$PCGB_LAST_WD" != "$PWD" ]]; then