commit - 5f6069a6a74ca230a6a981d3fcfc65fe3bfd77a3
commit + 659f0db2353ddc43ebf8ff7ba2c88393f3287767
blob - ef7cdc45bc67b6dbd11778e5fcb95fb834804fd8
blob + 4bd80a178e915c01febc67785360f3c13b2f9a72
--- mpc-notify
+++ mpc-notify
# 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"
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)"
# 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"