summaryrefslogtreecommitdiff
path: root/scripts/st-dbus-mon
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/st-dbus-mon')
-rwxr-xr-xscripts/st-dbus-mon9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/st-dbus-mon b/scripts/st-dbus-mon
new file mode 100755
index 0000000..5d325c7
--- /dev/null
+++ b/scripts/st-dbus-mon
@@ -0,0 +1,9 @@
+#!/bin/sh
+dbus-monitor --session "member='PropertiesChanged'" |
+while read X; do
+ if [[ $X == *"Metadata"* ]]; then
+ TITLE=$(playerctl metadata title)
+ ARTIST=$(playerctl metadata artist)
+ notify-send "Now playing" "$TITLE - $ARTIST" -i :
+ fi
+done