aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-12-08 09:43:44 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-12-08 09:43:44 -0700
commitbc06b8ae7e83c2901dff2bc7a2947b3e870be168 (patch)
treee9fc5116b42e7f8672c90a4baf2312562ad80ced /.config/herbstluftwm
parent965f07eb383810da6c2233d324d427eb147e40f4 (diff)
downloaddotfiles-bc06b8ae7e83c2901dff2bc7a2947b3e870be168.tar.gz
use tmpdir in vars
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/mpc-status.sh6
1 files changed, 4 insertions, 2 deletions
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"