blob: f266484e87b775415137221bb19ecc850dae3144 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
echocmd="/bin/echo -n"
ctlfile="$HOME/.config/pianobar/ctl"
# pianobar running? echo would block otherwise
ps -C 'pianobar' > /dev/null
if [ $? -ne 0 ]; then
echo 'naughty.notify({title = "pianobar", text = "Not running"})' | awesome-client -
exit 1;
fi
case "$1" in
pp)
$echocmd p > $ctlfile
;;
next)
$echocmd n > $ctlfile
;;
love)
$echocmd + > $ctlfile
;;
ban)
$echocmd - > $ctlfile
;;
esac
|