dotwryn/bin/butterfree/hdmidock
2022-08-24 12:03:48 -06:00

19 lines
412 B
Bash
Executable File

#!/bin/zsh
source ${0:a:h}/xorg.zsh
[ ! $EXTERNAL_MONITOR ] && {
NOTIFY 'No external monitor connected!'
return
}
xrandr \
--output $EXTERNAL_MONITOR \
--primary \
--mode 1920x1080 \
--rotate normal \
--pos 0x0 \
&& DISCONNECT_OTHER login \
|| NOTIFY "Unable to connect '$EXTERNAL_MONITOR' to 1920x1080"
xset dpms 0 0 0 && xset s noblank && xset s off \
&& notify-send 'DPMS' 'disabled screen blank'