blob: 3ed6eb4816a69463deb3e41f46f41a4504bbdac9 (
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
28
29
30
31
|
#!/bin/sh
wrap_before() {
if command -v mpc > /dev/null && mpc status | awk 'NR==2 { print }' | grep -iq playing
then
wrap_log "> mpc pause"
mpc pause > /dev/null
WRAPPER_X_MPD_PAUSED="yes"
fi
if [ "$(cat "$XDG_RUNTIME_DIR/xblank/paused")" = "0" ]
then
wrap_log "> xblank-toggle"
xblank-toggle
WRAPPER_X_XBLANK_PAUSED="yes"
fi
}
wrap_after() {
if [ "$WRAPPER_X_MPD_PAUSED" ]
then
wrap_log "> mpc play"
mpc play > /dev/null
fi
if [ "$WRAPPER_X_XBLANK_PAUSED" ]
then
wrap_log "> xblank-toggle"
xblank-toggle
fi
}
|