aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/awesome-xrandr
blob: 6ce8abf3562c06ab191af2b3a36c903f67bfeb5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

DEFAULT_SCREEN="HDMI-0"

fallback() {
    xrandr --output "$DEFAULT_SCREEN" --primary --auto --pos 0x0 --rotate normal
    xrandr --output "$DEFAULT_SCREEN" --panning 0x0
}

for SCREEN in $(xrandr | grep "connected" | awk '{ print$1 }' | grep -v "$DEFAULT_SCREEN"); do
    xrandr --output "$SCREEN" --off
done

autorandr || fallback