summaryrefslogtreecommitdiff
path: root/bin/.bin/disp
blob: 618f93f61b3ef4515f20fd2cb1c013b9f98a9e7c (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

status=$(cat /sys/class/drm/card0/*HDMI*/status)
if [ $status == "connected" ]; then
    xrandr --output eDP-1 --mode 1920x1080 --pos 0x768 --scale 1 --output HDMI-1 --primary --mode 1366x768 --pos 318x0 --scale 1
    bspc wm -r
else
    xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-1 --off --output DisplayPort-0 --off
    bspc wm -r
fi