aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AGENTS.md2
-rw-r--r--desktop/modules/monitors/README.md36
2 files changed, 37 insertions, 1 deletions
diff --git a/AGENTS.md b/AGENTS.md
index ebe8313..f7f62a8 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -16,7 +16,7 @@ modules.
window for pages set once: wallpaper, theme, theme status, icons,
sunset, idle (the former appearance shell), notifications, autostart, shells,
the assistant's daemon and presets, qtmaildir, git,
- Hyprland's keyboard shortcuts and options, fonts
+ Hyprland's keyboard shortcuts, options and monitors, fonts
island/ top-centre pills on DP-1: clock, volume, tray, layout, privacy,
calendar, OBS
assistant/ the assistant canvas on SUPER+Home, a view over desktop-assistant
diff --git a/desktop/modules/monitors/README.md b/desktop/modules/monitors/README.md
new file mode 100644
index 0000000..3716110
--- /dev/null
+++ b/desktop/modules/monitors/README.md
@@ -0,0 +1,36 @@
+# monitors
+
+Settings > Hyprland > Monitors: the connected monitors, from `hyprctl
+monitors -j`.
+
+The layout draws each monitor at its logical size (rotated a quarter turn
+swaps width and height, scale divides both). Drag one to move it; on release
+it snaps to the other monitor's edges when within 64 logical pixels, and its
+position becomes exact; a click without movement does not snap. Each card sets the mode, from the monitor's own list
+with duplicates dropped, the scale, rotation and flip, VRR, and the position,
+exact or one of Hyprland's `auto-*` values.
+
+Apply runs each monitor's `hl.monitor({ ... })` through `hyprctl eval`, one
+call per monitor because eval wraps its argument in a `return`. A refused
+line (exit 7) changes nothing and shows its error; a reload follows, since an
+earlier monitor may have gone through. Accepted, the change is live and a bar
+asks to keep it. Keep writes `~/.config/hypr/sections/monitors.lua`, which
+this page owns and rewrites whole. Revert, leaving the page, or 15 seconds
+with no answer runs `hyprctl reload`, which reapplies the untouched file. A
+setting that blanks a screen never reaches the file. The cards and the layout
+are locked while the bar waits, since Keep writes the draft as it stands.
+
+hyprctl only reports where a monitor ended up, so a monitor set to an `auto-*`
+position in the file reads back as exact. VRR is assumed to read the same
+way, as the active state rather than the configured one, so a `vrr = 2`
+(fullscreen only) would read off and be dropped by Keep; not checked, as the
+config sets no VRR.
+
+Not handled: disabling an output, mirroring, bit depth and colour management,
+outputs that are not connected (an unplugged monitor drops out of the file on
+Keep), renaming outputs. The island and the window switcher are tied to DP-1
+by name.
+
+## Check
+
+ node desktop/modules/monitors/test_mon.js