diff --git a/musicbg b/musicbg index ea5aca3..1db4e04 100755 --- a/musicbg +++ b/musicbg @@ -1,7 +1,8 @@ #!/bin/sh -pkill -9 xwinwrap -cacheFile="${HOME}/.cache/mpvbg.pid" +# for some reason this still kills all xwinwrap processes +proc=`pgrep xwinwrap | head -1` +kill -9 $proc # pick out the music video we want to play in the background base="$HOME/Videos/Music/" @@ -13,5 +14,3 @@ mpv="mpv --wid WID --no-config --keepaspect=no --loop \ --x11-name=mpvbg" xwinwrap -g 1920x1080 -ni -fdt -sh rectangle -un -b -nf -ov -- $mpv "$base/$pape" & > /dev/null 2>&1 & -echo $! > ${HOME}/.cache/mpvmusic.pid -