about summary refs log blame commit diff stats
path: root/bin/bother
blob: d63d899369856bef3b1d41b22c302d81bbf4b02e (plain) (tree)
1
2
3
4
5
6
7

                                                                                              

                               
                             
                                
                            








                                                  
                             
                                 





                                                                  
#!/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
fi
fi
if grep -q "dwm" $XFILE; then
	WM=dwm
elif grep -q 'exec' $XFILE; then
	WM=$(grep 'exec' $XFILE|cut -f 2 -d ' ' -)
else
	WM=$(last -1 $XFILE)
fi
if [ -f "$HOME"/today ]; then
	until pgrep $WM>/dev/null
	do
		true
	done
	sleep 0.5
	notify-send -u critical "DO TODAY:" "$(cat "$HOME"/today)"
fi