blob: 31d9c3acef337e1771d5b195490252aa43e7e0d4 (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/sh
if [[ $(xrandr --query | grep "eDP-1-1" ) ]]; then
if [[ $(cat /proc/acpi/button/lid/LID/state | awk '{print $2}') = "closed" ]]; then
xrandr --output HDMI-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output eDP-1-1 --off
else
xrandr --output HDMI-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output eDP-1-1 --mode 1920x1080 --pos 0x489 --rotate normal # monitor front, laptop left
fi
fi
|