Move to a hardware check for external monitors instead to deal with recover timing

This commit is contained in:
David Heinemeier Hansson
2026-04-23 11:14:14 +02:00
parent 6953ea9af8
commit 96afc68461
4 changed files with 12 additions and 12 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
# Returns true when an external monitor is physically connected.
# Uses kernel DRM state so the result is independent of Hyprland's startup timing.
for status in /sys/class/drm/card*-*/status; do
[[ "$status" == *-eDP-*/status ]] && continue
[[ "$(<"$status")" == "connected" ]] && exit 0
done
exit 1