cleanup: reformat scripts and variables

This commit is contained in:
David JULIEN 2021-02-13 20:11:23 +01:00
parent 5cc2a59e8e
commit 312ed19a7e
2 changed files with 4 additions and 4 deletions

View File

@ -19,8 +19,8 @@ else
case "$level" in
[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]) criticity="low" ;;
6[0-9]|7[0-9]) criticity="normal" ;;
8[0-9]|9[0-9]|10[0-9]) criticity="critical" ;;
*) criticity="critical" ;;
esac
dunstify -r 100002 -u "$criticity" "Current pamixer value :" "$level%"
dunstify -r 100002 -u "$criticity" "Current volume :" "$level%"
fi

View File

@ -14,8 +14,8 @@ if [ "$1" = "stop" ]; then
mpc $1
dunstify -r 10010 -u "normal" "MPD" "Music stopped"
else
export MPC_FORMAT="Artist: <b>%artist%</b> \nTitle: %title% \nAlbum: %album%"
out="$(mpc $1 | head -n-1)"
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 }')"
dunstify -r 10010 -u "normal" -i "$HOME/$path" "MPD" "$out"