aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/xblank/active8
-rwxr-xr-x.config/xblank/idle_1509
2 files changed, 16 insertions, 1 deletions
diff --git a/.config/xblank/active b/.config/xblank/active
index 8600831..f66f41a 100755
--- a/.config/xblank/active
+++ b/.config/xblank/active
@@ -1,3 +1,11 @@
#!/bin/sh
+# Resume mpd if it was paused through an xblank script
+if [ -f "$XBLANK_STATESD/mpd" ]
+then
+ rm -f -- "$XBLANK_STATESD/mpd"
+
+ mpc play
+fi
+
xset dpms force on
diff --git a/.config/xblank/idle_150 b/.config/xblank/idle_150
index 0e250bb..0994761 100755
--- a/.config/xblank/idle_150
+++ b/.config/xblank/idle_150
@@ -1,3 +1,10 @@
#!/bin/sh
-physlock
+# Pause mpd if its playing
+if mpc | head -n 2 | tail -n 1 | grep -Fq '[playing]'
+then
+ mpc pause
+ touch "$XBLANK_STATESD/mpd"
+fi
+
+xset dpms force off