cleanup: reformat scripts and variables
This commit is contained in:
parent
5cc2a59e8e
commit
312ed19a7e
@ -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
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user