summaryrefslogtreecommitdiffstats
path: root/.bin/ag-autorandr
diff options
context:
space:
mode:
Diffstat (limited to '.bin/ag-autorandr')
-rwxr-xr-x.bin/ag-autorandr14
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
remember that computers suck.