blob: d3f5be9342ec91aad33d0dfdb9a4cae1002fad3e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/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=$(tail -1 $XFILE)
fi
if [ -f "$HOME"/today ]; then
until pgrep $WM>/dev/null
do
:
done
sleep 0.5
notif "DO TODAY:" "$(tr '\n' '\t'<"$HOME"/today)"
fi
|