X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=desktop-20-autostart.sh;h=03be1c58356cb5c0d063977214a6b8bc2c871560;hb=63acc2d602eb316a1c0abb7ec842e4789c8beaec;hp=842dab48bc37a4450f7a7c94a7ce0fef289ecce5;hpb=f0a35267f28e274ef3c2f63ffc20a26ca864e37c;p=distro-setup diff --git a/desktop-20-autostart.sh b/desktop-20-autostart.sh index 842dab4..03be1c5 100755 --- a/desktop-20-autostart.sh +++ b/desktop-20-autostart.sh @@ -24,7 +24,7 @@ fi xout="$(xrandr)" xe() { echo "$xout"; } -x=$(xe | grep -E '^(DisplayPort-[0123]|DVI-0|DP-[1234]|DVI-I-1) connected' | wc -l) +x=$(xe | grep -Ec '^(DisplayPort-[0123]|DVI-0|DP-[1234]|DVI-I-1) connected') if (( x > 2 )); then left=$(xe | sed -rn 's/^(DVI[^ ]+) connected .*/\1/p') dps=( $(xe | sed -rn 's/^(DP-[01234]|DisplayPort-[01234]) connected .*/\1/p') )