aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/superpowers/specs/2026-10-30-monitors-page-design.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/superpowers/specs/2026-10-30-monitors-page-design.md b/docs/superpowers/specs/2026-10-30-monitors-page-design.md
index 3d06740..c227ba9 100644
--- a/docs/superpowers/specs/2026-10-30-monitors-page-design.md
+++ b/docs/superpowers/specs/2026-10-30-monitors-page-design.md
@@ -35,8 +35,9 @@ not kept.
## Draft
-Read from `hyprctl monitors -j` each time the page opens and after every
-`configreloaded` raw event, unless an Apply is pending. Per monitor:
+Read from `hyprctl monitors -j` each time the settings window opens and after
+every `configreloaded` raw event, unless an Apply is pending or the draft has
+unsaved edits (another page's save reloads too). Per monitor:
- `mode`: `WxH@R` from `availableModes`, duplicates removed (the ASUS lists
`1920x1080@120.00Hz` twice). Shown with refresh to two decimals. The
@@ -67,15 +68,17 @@ it to exact.
## Apply, keep, revert
-1. Apply runs `hyprctl eval` with every monitor's `hl.monitor` line in one
- call. Exit 7 is a refusal: nothing changed, the error text shows in
- SaveBar's `error`, the draft stays dirty.
+1. Apply runs `hyprctl eval` once per monitor, since eval wraps its argument
+ in a `return` and takes one expression. Exit 7 is a refusal: the error
+ text shows in SaveBar's `error`, the draft stays dirty, and a `hyprctl
+ reload` undoes any earlier monitor that went through.
2. On success the change is live. A bar shows "Keep these settings?
Reverting in 15s", counting down, with Keep and Revert.
3. Keep writes `monitors.lua` through `FileView.setText`; Hyprland's
autoreload rereads it, which is now the same settings.
4. Revert, or the countdown reaching zero, runs `hyprctl reload`, which
- reapplies the untouched file. The draft is reread from hyprctl.
+ reapplies the untouched file. The draft returns to what was read before
+ Apply, and is then reread from hyprctl.
Closing the settings window while pending counts as Revert. If the shell dies
while pending, the file is still the old one and the next reload restores it.