diff options
author | katherine <shmibs@shmibbles.me> | 2017-03-01 00:54:06 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2017-03-01 00:54:06 -0700 |
commit | 5aba9de367932be46aa471c71076d9e623d5abce (patch) | |
tree | f4284a126603af874de9731b357041df1f2fd1d0 /.config/herbstluftwm/mpc-status.sh | |
parent | ce4b99960f11ee9371ea4468247643d42ac05f9b (diff) | |
download | dotfiles-5aba9de367932be46aa471c71076d9e623d5abce.tar.gz |
snapshot
various smöl changes
Diffstat (limited to '.config/herbstluftwm/mpc-status.sh')
-rwxr-xr-x | .config/herbstluftwm/mpc-status.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/.config/herbstluftwm/mpc-status.sh b/.config/herbstluftwm/mpc-status.sh index 1c44eee..a9a1fd9 100755 --- a/.config/herbstluftwm/mpc-status.sh +++ b/.config/herbstluftwm/mpc-status.sh @@ -1,5 +1,9 @@ #!/bin/bash +# i patched dunst to clear all on SIGUSR1 +killall -SIGUSR1 dunst +# race condition, obvs, but this should be plenty time + case "$1" in next) mpc next @@ -13,13 +17,11 @@ esac mpc status >/dev/null 2>&1 if [[ $? -ne 0 ]]; then - killall -SIGUSR1 dunst notify-send "mpd disconnected" exit fi if [[ -z "$(mpc status | grep -E '\[(playing|paused)\]')" ]]; then - killall -SIGUSR1 dunst notify-send "mpd stopped" exit fi @@ -34,7 +36,4 @@ message="$(mpc current -f '##%track% %title% (%date%)\n%artist% - %album%') $(mpc status | tail -n -2 | sed -re 's/volume.*repeat/\nrepeat/' -e 's/( ){3,4}/\n/g' -e '/volume: /d')" -# i patched dunst to clear all on SIGUSR1 -killall -SIGUSR1 dunst - notify-send --icon=/tmp/mpd-icon.png "$message" |