diff options
author | katherine <ageha@airen-no-jikken.icu> | 2019-12-08 09:43:44 -0700 |
---|---|---|
committer | katherine <ageha@airen-no-jikken.icu> | 2019-12-08 09:43:44 -0700 |
commit | bc06b8ae7e83c2901dff2bc7a2947b3e870be168 (patch) | |
tree | e9fc5116b42e7f8672c90a4baf2312562ad80ced /.config/herbstluftwm/mpc-status.sh | |
parent | 965f07eb383810da6c2233d324d427eb147e40f4 (diff) | |
download | dotfiles-bc06b8ae7e83c2901dff2bc7a2947b3e870be168.tar.gz |
use tmpdir in vars
Diffstat (limited to '.config/herbstluftwm/mpc-status.sh')
-rwxr-xr-x | .config/herbstluftwm/mpc-status.sh | 6 |
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" |