diff options
Diffstat (limited to 'bin/bother')
| -rwxr-xr-x | bin/bother | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -1,24 +1,27 @@ #!/bin/sh # puts up a critical notification if $HOME/today exists, containing the contents of that file. if [ -z "$XFILE" ]; then -if [ -f $HOME/.xsession ]; then - XFILE=$HOME/.xsession -elif [ -f $HOME/.xinitrc ]; then - XFILE=$HOME/.xinitrc +if [ -f "$HOME"/.xsession ]; then + XFILE="$HOME"/.xsession +elif [ -f "$HOME"/.xinitrc ]; then + XFILE="$HOME"/.xinitrc fi fi -if grep -q "dwm" $XFILE; then +if grep -q "dwm" "$XFILE"; then WM=dwm -elif grep -q 'exec' $XFILE; then - WM=$(grep 'exec' $XFILE|cut -f 2 -d ' ' -) +elif grep -q 'exec' "$XFILE"; then + WM=$(grep 'exec' "$XFILE"|cut -f 2 -d ' ') +elif grep -q wm "$XFILE"; then + WM=$(grep wm "$XFILE"|cut -f 2 -d ' ') else - WM=$(tail -1 $XFILE) + WM=$(tail -1 "$XFILE") fi if [ -f "$HOME"/today ]; then - until pgrep $WM>/dev/null + until pgrep "$WM">/dev/null do : done sleep 0.5 - notif "DO TODAY:" "$(tr '\n' '\t'<"$HOME"/today)" + notif -s 0 "DO TODAY:" "$(tr '\n' '\t'<"$HOME"/today)" +# notify-send -t 0 "DO TODAY:" "$(cat<"$HOME"/today)" fi |