Repository navigation
Share QR, presentation mode, multi-monitor screensaver - #12730
chessing234 wants to merge 9 commits into
Conversation
Folded from omacom#8512 and omacom#8513.
150a4c9 to
d524068
Compare
|
Reviewed at What ran, and where: everything executed on a disposable Omarchy 4.0.4 VM, never on a machine holding credentials.
Smaller: three unrelated features in one pull request makes each harder to land than it needs to be, and the test plan in the description is an unticked box. A second opinion came from DeepSeek V4.1 Flash, run through pi with thinking set to high, reading the branch with read-only tools. It reached findings 1, 2 and 4 on its own, which is agreement and worth no more than that since its independence is not guaranteed. Finding 3 and the exact router mechanism behind finding 1 are its contributions, and both check out against the source. Waiting on the author. |
Rename the helper off omarchy-share-* and make qr an argument of menu-share so bare omarchy share still shows LocalSend usage.
Matches the enable guard so a stray off does not restore defaults over existing bar/dnd/idle settings.
|
fixed share qr routing (qr is now a share arg, helper renamed off omarchy-share-*) and presentation off no-op when never enabled |
|
share qr no longer steals the share group; presentation off is a no-op when never enabled |
Touch the enabled flag before mutating UI, keep an existing restore baseline, and dismiss after a few empty activewindow polls so vacant workspaces still exit the screensaver.
|
presentation restore baseline is written/kept before ui changes, and the screensaver loop now dismisses after a few empty activewindow polls so vacant workspaces still exit. |
|
Thanks for working through the earlier review. Two things to sort out before this is easy to land:
The test plan checkbox ("spot-check each folded PR's test plan") is also still unchecked. A short note on what you ran after the 09-26 fixes would help. |
[Medium impact] The PR adds two opt-in workflows within a person's desktop session. Fix presentation retries and overlapping calls before merging. Findings
SummaryAdds clipboard QR sharing and a presentation toggle.
Reviews (4) · Last reviewed commit: "Merge upstream quattro into the QR and p..." · Reviewed by Greptile |
| dnd=$(awk -F= '$1 == "dnd" { print $2 }' "$RESTORE_FILE") | ||
| stay=$(awk -F= '$1 == "stay_awake" { print $2 }' "$RESTORE_FILE") | ||
| fi | ||
| rm -f "$STATE_FILE" "$RESTORE_FILE" |
There was a problem hiding this comment.
Interrupted shutdown loses saved settings
disable_presentation deletes both state files before restoring the settings. If the command is interrupted after that deletion, the bar can remain hidden, notifications silenced, or stay-awake enabled. Another off immediately returns because the marker is gone, and the saved settings are lost.
Keep the files until restoration finishes so an interrupted off can be retried.
| if enabled; then | ||
| return 0 | ||
| fi |
There was a problem hiding this comment.
Presentation retries skip unfinished settings
enable_presentation marks presentation on before applying its settings, but every later on returns immediately. If the command stops after writing that marker, another on never finishes the work. A presenter can still receive notifications or have the machine lock while presentation reports on.
omarchy-shell -q also reports success when the shell cannot answer, so a shell restart during setDnd on can leave notifications enabled. Keep the saved baseline, but let another on finish applying the settings instead of returning early.
| for mode in on off; do | ||
| grep -F "\"trigger.toggle.presentation-$mode\"" "$ROOT/default/omarchy/omarchy-menu.jsonc" | | ||
| grep -Fq "\"action\":\"omarchy-toggle-presentation\"" || | ||
| fail "presentation $mode is on the Toggle menu" | ||
| done |
There was a problem hiding this comment.
Menu checks only match strings
These assertions only search for the menu entries added by this PR. AGENTS.md explicitly says not to test changes by grepping source or config for the added strings. These checks add maintenance work without checking whether either menu action works.
Remove them before merging to meet the repository requirement. The same pattern appears in share-qr-test.sh at lines 72–74. Keep the existing tests that run the commands and check their behavior.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
merged quattro, kept the qr share help text and the region strings. |
| touch "$STATE_FILE" | ||
| omarchy-toggle-bar on | ||
| omarchy-shell -q notifications setDnd on | ||
| omarchy-toggle-idle stay-awake >/dev/null |
There was a problem hiding this comment.
Presentation calls undo each other
Menu actions run detached, so two quick toggles can overlap. After the first call creates STATE_FILE, the second can restore settings and remove both state files before the first finishes enabling presentation. The first then turns DND and stay-awake back on while status reports off, leaving automatic locking disabled.
Lock the whole operation, including the toggle decision, so one call finishes before another starts.
Summary
Test plan