You are not logged in.
Pages: 1
I have a custom script that uses notify-send to show mpd song changes with notify-osd. The problem is that when I
change songs quickly it queues the notifications so it kind of lags behind really bad. I've read
here (https://wiki.edubuntu.org/NotifyOSD) and it seems like a solution would be to use confirmation bubbles
instead of regular ones. Only thing is I don't know how to actually achieve that with notify-send.
Thanks
Offline
Try adding this to your notify-send string:
-h string:synchronous:mpd
So here's my mpd script:
#!/bin/sh
usage="usage: $0 -c {play|stop|next|prev|info}"
command=
shift $(($OPTIND - 1))
command=$1
STATUS=""
if [ "$command" = "" ]; then
echo "usage: $0 {play|stop|next|prev|info}"
exit 0;
fi
if [ "$command" = "play" ]; then
mpc toggle
ARTIST=$(mpc -f "%artist%" current)
ALBUM=$(mpc -f "%album%" current)
TITLE=$(mpc -f "%title%" current)
fi
if [ "$command" = "next" ]; then
mpc next
ARTIST=$(mpc -f "%artist%" current)
ALBUM=$(mpc -f "%album%" current)
TITLE=$(mpc -f "%title%" current)
fi
if [ "$command" = "prev" ]; then
mpc prev
ARTIST=$(mpc -f "%artist%" current)
ALBUM=$(mpc -f "%album%" current)
TITLE=$(mpc -f "%title%" current)
fi
if [ "$command" = "info" ]; then
ARTIST=$(mpc -f "%artist%" current)
ALBUM=$(mpc -f "%album%" current)
TITLE=$(mpc -f "%title%" current)
fi
if [ "$command" = "stop" ]; then
mpc stop
STATUS="stop"
fi
if [ "$STATUS" != "stop" ]; then
notify-send "$TITLE" "$ARTIST" -i "/media/MyBook/Music/$ARTIST/$ALBUM/$ALBUM.jpg" -h string:synchronous:mpd
fi
Offline
I think the post kind of 4 month old but I'm interested in this solution
Do you run your script at startup ? Same time as MPD ?
English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Dell Vostro
Offline
Pages: 1