X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=desktop-20-autostart.sh;h=03be1c58356cb5c0d063977214a6b8bc2c871560;hp=842dab48bc37a4450f7a7c94a7ce0fef289ecce5;hb=343a048be4b32d18540c6531048d2b9a006774ae;hpb=50e3ebaf4941651899a3b52b5245052c3f4ed725 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') )