ce5ab3672002f3e438c50c18b284fa864f20a42a
[distro-setup] / laptop-xrandr
1 #!/bin/bash
2 set -e; . /usr/local/lib/err; set +e
3
4
5 output=HDMI2
6 output=DP1
7
8 if xrandr | grep -q "^$output disconnected" &>/dev/null; then
9 xrandr --auto
10 else
11 xrandr --output $output --right-of eDP1 --mode 3840x2160
12
13 for i in 1 2 4 5 6 7 8 9 10; do
14 # if the workspace is already there, this will fail
15 i3-msg '[workspace="'$i'"]' move workspace to output $output ||:
16 done
17 fi