17 lines
470 B
Bash
Executable file
17 lines
470 B
Bash
Executable file
#!/bin/bash
|
|
|
|
export MPD_HOST="$HOME/.mpd/socket"
|
|
|
|
while true
|
|
do
|
|
systemctl --user is-active mpd.service || exit 1
|
|
infos=$(mpc -w -f '[[%artist%\n]%title%[\n%album%]]|[%file%]' current)
|
|
mpc -f '[[%artist%§]%title%|[%file%]' current > /dev/shm/mpd
|
|
echo "$(</dev/shm/mpd) " > /dev/shm/mpd-scroll
|
|
if [[ -z "$infos" ]]
|
|
then
|
|
infos="<i>Arrêt</i>"
|
|
fi
|
|
notify-send "MPD" "$infos"
|
|
# pidof cava && sleep 1 && pkill -USR1 cava
|
|
done
|