From acd7444d4dd3fb23f0e8158350a1c0384788fa0c Mon Sep 17 00:00:00 2001 From: EmmChriss Date: Tue, 29 Sep 2020 14:16:43 +0300 Subject: [PATCH] filter xrandr output for no VIRTUAL output --- mons.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mons.sh b/mons.sh index b86ce5c..343475e 100755 --- a/mons.sh +++ b/mons.sh @@ -286,7 +286,7 @@ main() { # List all outputs (except primary one) xrandr_out="$("$XRANDR")" - enabled_out="$(echo "$xrandr_out" | grep 'connect')" + enabled_out="$(echo "$xrandr_out" | grep 'connect' | grep -v 'VIRTUAL[1-9]')" [ -z "$enabled_out" ] && { echo 'No monitor output detected.'; exit; } mons="$(echo "$enabled_out" | cut -d' ' -f1)"