You are not logged in.
Pages: 1
I searched and searched, but could not find a simple MPD notification script that worked for me. So I whipped up my own, and here it is, as simple as you like.
#!/usr/bin/bash
dir="/home/ramo/Music/"
while :
do
output=$(mpc -f "%title%\n%artist%\n%album%\n%file%" current --wait)
if [ $? -eq 1 ]
then
sleep 5
else
i=1
while read -r line; do
array[$i]="$line"
(( i++ ))
done <<< "$output"
file=$(ls -t "$(dirname "$dir${array[4]}")"/*.{jpg,png} 2> /dev/null | head -n 1)
notify-send "${array[1]}" "${array[2]} - ${array[3]}" -t 5000 -i "$file"
fi
done
Offline
There are many out there. For example: https://github.com/vehk/mpdnotify
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
There are many out there. For example: https://github.com/vehk/mpdnotify
I'm sure there's heaps.
Offline
Pages: 1