added safety to newga and sleep delay to distro script

This commit is contained in:
shockrah
2019-08-25 21:03:36 -07:00
parent 8142d4bd4d
commit dc5cd96f97
2 changed files with 8 additions and 1 deletions

7
newbga
View File

@@ -29,6 +29,13 @@ 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
# Quick check if we even have a second monitor at all
c=`xrandr | grep ' connected' | wc -l`
if $c = "1"
then
exit
fi
# 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