From 621ec9a7223da1b3e461b039fad11df63caaef48 Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Thu, 8 Feb 2024 18:08:12 +0100 Subject: [PATCH] Add script for setting up my external monitor --- external-monitor.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 external-monitor.sh diff --git a/external-monitor.sh b/external-monitor.sh new file mode 100755 index 0000000..f725aec --- /dev/null +++ b/external-monitor.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if xrandr | grep 'HDMI-A-0' | grep connected >/dev/null; then + # 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 +else + # Just enable tearfree + xrandr --output eDP --set TearFree on +fi