feat: audo notifications format improvements
This commit is contained in:
@@ -9,6 +9,7 @@ notify() {
|
||||
mpc readpicture "$(mpc current -f %file%)" > $icon_file
|
||||
song_title=$(mpc current -f %Title%)
|
||||
song_artist=$(mpc current -f %albumartist%)
|
||||
song_duration=$(mpc current -f %time%)
|
||||
|
||||
# check image
|
||||
is_image=$(cat $icon_file | grep volume | grep repeat)
|
||||
@@ -20,10 +21,10 @@ notify() {
|
||||
|
||||
case $1 in
|
||||
"playing")
|
||||
notify-send -i $final_icon_route -t 6000 -r $id "Currently playing $song_artist" "$song_title"
|
||||
notify-send -i $final_icon_route -t 6000 -r $id "'$song_artist' is playing" " $song_title ($song_duration)"
|
||||
;;
|
||||
"paused")
|
||||
notify-send -i $final_icon_route -t 6000 -r $id "Player paused" "$song_title"
|
||||
notify-send -i $final_icon_route -t 6000 -r $id "'$song_artist' is paused" " $song_title ($song_duration)"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user