summaryrefslogtreecommitdiffstats
path: root/.bin/ag-autorandr
blob: 0a75819f539a357f81bd8b09bcf036f1b5f09e18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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.