From: Phillip Berndt Date: Sat, 13 Dec 2014 14:59:41 +0000 (+0100) Subject: Enable outputs in pairs of two (Follow-up to commit f4cce4d) X-Git-Tag: 1.0~126 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=8429886318b0788c4e18022b03b1c68319c900c7;p=deb_pkgs%2Fautorandr.git Enable outputs in pairs of two (Follow-up to commit f4cce4d) --- diff --git a/autorandr b/autorandr index 5937f8a..fa575b1 100755 --- a/autorandr +++ b/autorandr @@ -282,6 +282,7 @@ load_cfg_xrandr() { # * Remaining outputs are appended as they appear # * Keep everything in hold buffer until the last line # sed 4: Remove empty lines caused by G and H on empty hold buffer + # sed 5: Join lines enabling screens in pairs of two (See https://github.com/phillipberndt/autorandr/pull/6) sed 's/^/--/' "$1" | sed -e ' :START /\n--output/{P;D} @@ -304,7 +305,9 @@ load_cfg_xrandr() { H $!d x' | sed -e ' - /./ !d' | xargs -L 1 $XRANDR + /./ !d' | sed -e ' + /--mode/{ N; s/\n/ /; } + ' | xargs -L 1 $XRANDR } load_cfg_disper() {