scripts/external-monitor.sh
2024-12-25 21:14:35 +01:00

14 lines
366 B
Bash
Executable File

#!/bin/sh
if xrandr | grep 'HDMI-A-0' | grep disconnected >/dev/null; then
# Just enable tearfree
xrandr --output eDP --set TearFree on
else
# Turn off laptop monitor
xrandr --output eDP --off
# Make sure it's running at 144hz
xrandr --output HDMI-A-0 --mode 1920x1080 --rate 144
# Enable tear free
xrandr --output HDMI-A-0 --set TearFree on
fi