aboutsummaryrefslogtreecommitdiffstats
path: root/mpdnotify
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2024-03-29 21:28:38 -0400
committerSquibid <me@zacharyscheiman.com>2024-03-29 22:48:14 -0400
commit67914d44e2cdcf75db4c6ea4139ad9b3f1abe501 (patch)
treec428f5f7e700b9f946041b14623014e70eccfd44 /mpdnotify
parent2b3387af9c2837a5dae09ae2aacba627c3c6dcd3 (diff)
downloadrunit-services-67914d44e2cdcf75db4c6ea4139ad9b3f1abe501.tar.gz
runit-services-67914d44e2cdcf75db4c6ea4139ad9b3f1abe501.tar.bz2
runit-services-67914d44e2cdcf75db4c6ea4139ad9b3f1abe501.zip
add mpd notification daemon
Diffstat (limited to 'mpdnotify')
-rwxr-xr-xmpdnotify/run10
1 files changed, 10 insertions, 0 deletions
diff --git a/mpdnotify/run b/mpdnotify/run
new file mode 100755
index 0000000..c8eca40
--- /dev/null
+++ b/mpdnotify/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+# make sure mpd is running
+sv check "$HOME/.local/share/service/mpd" > /dev/null || exit 1
+
+# set DISPLAY environment variable so notify send doesn't complain
+export DISPLAY=:0
+
+while
+ notify-send -r 18 "Now playing" "$(mpc current --wait)"
+do :; done