]> git.sev.monster Git - dotfiles.git/commitdiff
add mpc-notify
authords6 <git@ds6.pw>
Mon, 19 Feb 2018 12:00:18 +0000 (06:00 -0600)
committersev <git@sev.monster>
Fri, 5 Apr 2024 20:44:51 +0000 (15:44 -0500)
base/.xinitrc
bin/mpc-notify [new file with mode: 0755]

index 12a9dc0a24f850e57185a3312ae19843a3c07d89..cd5b9cc9d0e9c31166a96d35759623bda5612baf 100755 (executable)
@@ -39,6 +39,7 @@ volumeicon &
 
 # daemons
 dunst &
+mpc-notify &
 xautolock -time 10 -locker "$HOME/bin/l" &
 xbanish &
 eval `ssh-agent`
diff --git a/bin/mpc-notify b/bin/mpc-notify
new file mode 100755 (executable)
index 0000000..370b6fe
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+replaces_id=0
+mpc idleloop player | while read -r x; do
+       #notify-send -u low -t 3000 -a mpc "`mpc current`"
+       replaces_id=$(expr "$(gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify mpc $replaces_id 'audio-volume-high' "`mpc current`" '' '[]' '{"urgency": <byte 0>}' 3000)" : '(uint32 \([0-9]*\),)')
+done
This page took 0.031488 seconds and 4 git commands to generate.