summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoodle <shawtynoodle@gmail.com>2023-07-02 00:35:18 +0300
committernoodle <shawtynoodle@gmail.com>2023-07-02 00:35:18 +0300
commit659f0db2353ddc43ebf8ff7ba2c88393f3287767 (patch)
tree9f58de491df80164c5dd13a67a1684dcdd74ee76
parent5f6069a6a74ca230a6a981d3fcfc65fe3bfd77a3 (diff)
mpc-notify: cleanup
-rwxr-xr-xmpc-notify8
1 files changed, 4 insertions, 4 deletions
diff --git a/mpc-notify b/mpc-notify
index ef7cdc4..4bd80a1 100755
--- a/mpc-notify
+++ b/mpc-notify
@@ -25,7 +25,7 @@ mpc_config_dir="$xdg_config_home/mpc"
# issue an mpc command based on arguments and assemble notification message
use_preview=0
-case "$1" in
+case "$command" in
"")
# use defaults
song_head="Now Playing"
@@ -80,10 +80,10 @@ case "$1" in
song_icon="media-playlist-repeat"
;;
*)
- mpc -q "$1"
+ mpc -q "$command"
# Don't notify if mpc changed song because ncmpcpp would notify on
# song change.
- [ "$1" = "next" ] || [ "$1" = "prev" ] && exit
+ [ "$command" = "next" ] || [ "$command" = "prev" ] && exit
;;
esac
song_body="$(mpc --format '[%title%[ \n%artist% - %album%]]|[%file%]' current)"
@@ -101,7 +101,7 @@ if [ "$use_preview" -eq 1 ]; then
# fallback to default for empty album name
song_icon="$default_song_icon"
else
- preview_path="$preview_dir/$(echo "$song_album" | base64).png"
+ preview_path="${preview_dir}/$(echo "$song_album" | base64).png"
if [ -f "$preview_path" ]; then
# use cached preview
song_icon="$preview_path"