From c5ab97079a745c32514ef4482e9e93bd8bd83efb Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Tue, 21 Nov 2023 07:53:29 +0000
Subject: [PATCH] fix(scripts): make monitor ID configurable

---
 bin/switch-to-laptop-screen | 4 +++-
 bin/switch-to-monitor       | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/switch-to-laptop-screen b/bin/switch-to-laptop-screen
index 7de579f6..b19a1318 100755
--- a/bin/switch-to-laptop-screen
+++ b/bin/switch-to-laptop-screen
@@ -2,6 +2,8 @@
 
 set -ueo pipefail
 
+MONITOR_ID="${MONITOR_ID:-HDMI-1}"
+
 xrandr \
   --output eDP-1 --mode 1920x1200 \
-  --output DP-3 --off
+  --output "${MONITOR_ID}" --off
diff --git a/bin/switch-to-monitor b/bin/switch-to-monitor
index b6784fff..dea81a6a 100755
--- a/bin/switch-to-monitor
+++ b/bin/switch-to-monitor
@@ -2,6 +2,8 @@
 
 set -ueo pipefail
 
+MONITOR_ID="${MONITOR_ID:-HDMI-1}"
+
 xrandr \
-  --output DP-3 --mode 2560x1440 \
+  --output "${MONITOR_ID}" --mode 2560x1440 \
   --output eDP-1 --off