Repository navigation
Persist monitor scaling onto named per-output rules - #8145
chessing234 wants to merge 1 commit into
Conversation
set_scale already applied the new scale live, but only wrote
omarchy_monitor_scale or the wildcard catch-all. Dual-monitor configs
with explicit hl.monitor({ output = "eDP-1", ... }) rules were left
stale, so the clamshell poller re-applied the old file scale every ~2s.
There was a problem hiding this comment.
Pull request overview
Persists focused-monitor scaling in explicit per-output Hyprland rules to prevent clamshell polling from restoring stale values.
Changes:
- Updates named single-line and multi-line monitor rules.
- Appends a focused-output rule when none matches.
- Adds regression tests for persistence behavior.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/omarchy-hyprland-monitor-scaling |
Persists scaling in focused-output rules. |
test/shell.d/monitor-scaling-test.sh |
Tests named, multiline, and appended rules. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@dhh @ryanrhughes ready for review |
|
Test results for commit A local test with simulated Hyprland responses passed for the explicit, single-line monitor rules below. Starting configuration: local omarchy_gdk_scale = 2
hl.env("GDK_SCALE", tostring(omarchy_gdk_scale))
hl.monitor({ output = "eDP-1", mode = "2560x1600@144", position = "0x0", scale = 1.25 })
hl.monitor({ output = "DP-1", mode = "3840x2160@60", position = "auto-right", scale = 1 })With
With the installed scaling script, the same test did not change the saved scale of These results cover only the rules shown above. I did not test multiline rules, physical dock or lid events, or the full repository test suite. The live reproduction and configuration workaround results are in this issue comment. Codex ran the local tests and helped prepare this comment. |
|
folded into #12263 for easier review. |
omarchy-hyprland-monitor-scalingapplied the scale live viahyprctl evalbut only wrotemonitors.luafor the genericomarchy_monitor_scalelocal or the wildcardoutput = ""rule. Explicit per-output rules (what nwg-displays writes) were left stale, and the clamshell poller re-applied the old file scale every ~2s.It now updates the focused output's own
hl.monitorrule (single-line and multi-line). Unrelated outputs keep their scales. If no rule matches, an explicit named rule is appended so the live change cannot be reverted.monitor-scaling-test.shcovers the generic catch-all, eDP-1-only, HDMI left alone, live eval, multi-line form, and append-when-missing.Fixes #8103