voidrice/.local/bin/statusbar/mpdupdate
2019-05-18 00:07:32 -04:00

8 lines
235 B
Bash
Executable file

#!/bin/sh
# Whenever the mpd state changes, update the mpd i3 module.
kill -0 "$(cat /tmp/mpdupdate)" 2>/dev/null && exit || echo $$ > /tmp/mpdupdate
sleep 5 && while : ; do
pkill -RTMIN+11 i3blocks
mpc idle >/dev/null || exit
done