From 0f08d04698c814955116b6bae50752e64b774d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 23 Dec 2021 18:28:03 +0000 Subject: Thu Dec 23 06:28:03 PM UTC 2021 --- .bin/ag-autorandr | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .bin/ag-autorandr (limited to '.bin/ag-autorandr') diff --git a/.bin/ag-autorandr b/.bin/ag-autorandr new file mode 100755 index 0000000..0a75819 --- /dev/null +++ b/.bin/ag-autorandr @@ -0,0 +1,14 @@ +#!/bin/sh + +screens=$(xrandr --listmonitors | tail -n +2 | rev | cut -d " " -f 1 | rev) +screen_master=$(echo "${screens}" | cut -d " " -f 1) + +logger -s reset xrandr size +xrandr -s 0 +xrandr --output "${screen_master}" --auto + +for screen in $(echo ${screens} | cut -d " " -f 2); do + xrandr --output "${screen}" --auto --right-of "${screen_master}" + echo --output "${screen}" --auto --right-of "${screen_master}" + screen_master=${screen} +done -- cgit v1.2.3