diff --git a/newbga b/newbga index 3eabe9a..d84ab5a 100755 --- a/newbga +++ b/newbga @@ -11,7 +11,7 @@ base="/home/shockrah/Pictures/VPapes" pape1=`ls "${HOME}/Pictures/VPapes" | shuf | head -n 1` pape2=`ls "${HOME}/Pictures/VPapes" | shuf | head -n 1` echo -while "$pape1" = "$pape2" +while [ "$pape1" = "$pape2" ] do pape2=`ls "${HOME}/Pictures/VPapes" | shuf | head -n 1` done @@ -29,8 +29,8 @@ mpv="mpv --wid WID --no-config --keepaspect=no --loop \ # First monitor xwinwrap -g 1920x1080 -ni -fdt -sh rectangle -un -b -nf -ov -- $mpv "$base/$pape1" & > /dev/null 2>&1 & -echo $! > ${HOME}/.cache/mpvbg.pid -echo "$pape1" > $HOME/.cache/newbga_img +#echo $! > ${HOME}/.cache/mpvbg.pid +#echo "$pape1" > $HOME/.cache/newbga_img # Quick check if we even have a second monitor at all c=`xrandr | grep ' connected' | wc -l` @@ -38,6 +38,8 @@ if [ $c = "1" ] then exit else + echo second monitor; + exit # Second monitor xwinwrap -g 1920x1080+1920+0 -ni -fdt -sh rectangle -un -b -nf -ov -- $mpv "$base/$pape2" & > /dev/null 2>&1 & echo $! >> ${HOME}/.cache/mpvbg.pid