From 56caae7b0316eab26392090a62eb2bf4cd4887d5 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:53:06 +0200 Subject: [PATCH] Revert changes to displayselect (already best performance) --- .local/bin/displayselect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/displayselect b/.local/bin/displayselect index 0b33f7b..f9e8062 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -14,9 +14,9 @@ twoscreen() { # If multi-monitor is selected and there are two screens. internal=$(echo "$screens" | grep -v "$external") res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ - awk 'END {print $1}') + tail -n 1 | awk '{print $1}') res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ - awk 'END {print $1}') + tail -n 1 | awk '{print $1}') res_ext_x=$(echo "$res_external" | sed 's/x.*//') res_ext_y=$(echo "$res_external" | sed 's/.*x//')