diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-23 18:28:03 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-23 18:28:03 +0000 |
commit | 0f08d04698c814955116b6bae50752e64b774d8f (patch) | |
tree | 8cf9a33557093eebfd25aab2872e97639c7e2f62 /.bin/ag-autorandr | |
download | dots-0f08d04698c814955116b6bae50752e64b774d8f.tar.gz |
Thu Dec 23 06:28:03 PM UTC 2021
Diffstat (limited to '.bin/ag-autorandr')
-rwxr-xr-x | .bin/ag-autorandr | 14 |
1 files changed, 14 insertions, 0 deletions
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 |