From bc06b8ae7e83c2901dff2bc7a2947b3e870be168 Mon Sep 17 00:00:00 2001 From: katherine Date: Sun, 8 Dec 2019 09:43:44 -0700 Subject: use tmpdir in vars --- .config/herbstluftwm/mpc-status.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.config/herbstluftwm') diff --git a/.config/herbstluftwm/mpc-status.sh b/.config/herbstluftwm/mpc-status.sh index 2c1a662..6f3f699 100755 --- a/.config/herbstluftwm/mpc-status.sh +++ b/.config/herbstluftwm/mpc-status.sh @@ -1,5 +1,7 @@ #!/bin/bash +source $HOME/.config/init/vars + case "$1" in next) mpc next @@ -25,11 +27,11 @@ fi cd ~/music/ dir=$(dirname "$(mpc current -f %file%)") # linking is necessary because notify-send can't into icon paths containing commas -cd /tmp/ +cd $tmpdir ln -sf "$HOME/music/$dir/cover-small.png" mpd-icon.png message="$(mpc current -f '##%track% %title% (%date%)\n%artist% - %album%') $(mpc status | tail -n -2 | sed -re 's/volume.*repeat/\nrepeat/' -e 's/( ){3,4}/\n/g' -e '/volume: /d')" -notify-send -t 4000 -a closeme --icon=/tmp/mpd-icon.png "$message" +notify-send -t 4000 -a closeme --icon=$tmpdir/mpd-icon.png "$message" -- cgit v1.2.3