feat: strip down player script
This commit is contained in:
parent
f566ff7d8f
commit
87e453c7a8
@ -10,15 +10,13 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" = "stop" ]; then
|
MPC_FORMAT="Artist: <b>%artist%</b> \nTitle: %title% \nAlbum: %album%"
|
||||||
mpc $1
|
out="$(mpc --format "$MPC_FORMAT" $1 | head -n-1)"
|
||||||
dunstify -r 10010 -u "normal" "MPD" "Music stopped"
|
if [ -z "$out" ]; then
|
||||||
|
out="No music"
|
||||||
else
|
else
|
||||||
MPC_FORMAT="Artist: <b>%artist%</b> \nTitle: %title% \nAlbum: %album%"
|
|
||||||
out="$(mpc --format "$MPC_FORMAT" $1 | head -n-1)"
|
|
||||||
path="$(mpc --format %file% | head -n1 | awk -F '/' '{ printf "music/%s/%s/cover.png\n", $1,$2 }')"
|
path="$(mpc --format %file% | head -n1 | awk -F '/' '{ printf "music/%s/%s/cover.png\n", $1,$2 }')"
|
||||||
|
|
||||||
dunstify -r 10010 -u "normal" -i "$HOME/$path" "MPD" "$out"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dunstify -r 10010 -u "normal" -i "$HOME/$path" "MPD" "$out"
|
||||||
kill -39 $(pidof dwmblocks)
|
kill -39 $(pidof dwmblocks)
|
||||||
|
Reference in New Issue
Block a user