From d2e125bc54cfba9396efc7e42ed5d5506fbc9c62 Mon Sep 17 00:00:00 2001 From: ds6 Date: Mon, 19 Feb 2018 06:00:18 -0600 Subject: [PATCH 1/1] add mpc-notify --- base/.xinitrc | 1 + bin/mpc-notify | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100755 bin/mpc-notify diff --git a/base/.xinitrc b/base/.xinitrc index 12a9dc0..cd5b9cc 100755 --- a/base/.xinitrc +++ b/base/.xinitrc @@ -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 index 0000000..370b6fe --- /dev/null +++ b/bin/mpc-notify @@ -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": }' 3000)" : '(uint32 \([0-9]*\),)') +done -- 2.47.0