Skip to content

Share QR, presentation mode, multi-monitor screensaver - #12730

Open
chessing234 wants to merge 9 commits into
omacom:quattrofrom
chessing234:fold/share-qr-presentation
Open

chessing234 wants to merge 9 commits into
omacom:quattrofrom
chessing234:fold/share-qr-presentation

Conversation

@chessing234

@chessing234 chessing234 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Spot-check each folded PR's test plan still applies

@chessing234 chessing234 changed the title Share clipboard QR and stay-awake presentation mode Share QR, presentation mode, multi-monitor screensaver Sep 21, 2026
chessing234 added a commit to chessing234/omarchy that referenced this pull request Sep 21, 2026
@chessing234
chessing234 force-pushed the fold/share-qr-presentation branch from 150a4c9 to d524068 Compare September 21, 2026 09:38
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at d524068c against quattro. Not ready: it turns the CLI suite red, and two of the three features misbehave in ways their tests do not catch.

What ran, and where: everything executed on a disposable Omarchy 4.0.4 VM, never on a machine holding credentials. ./test/cli on quattro and on this branch side by side, the three new test files, and presentation mode and the QR command by hand against a live Hyprland session running this branch's shell. The screensaver change was checked with a live hyprctl query rather than by running the screensaver.

  1. omarchy share is already a route, and this takes it. bin/omarchy-menu-share owns omarchy share <clipboard|file|folder> (# omarchy:group=share with an empty name). Adding omarchy-share-qr to a group called share makes the router treat share as a group with children, so bare omarchy share now prints a "Share commands" list containing only qr, and the LocalSend usage is gone from it. ./test/cli goes from 0 failures on quattro to 1 here: bare required-arg alias renders CLI help. omarchy share clipboard still routes. The remedy is a naming decision rather than mine to make: a qr argument to the existing share command would fit the route that is already there. GROUP_DESCRIPTIONS has no share entry either, which AGENTS.md asks for when a browsable group is added.
  2. omarchy-toggle-presentation off clobbers settings when presentation was never on. enable_presentation returns early if already enabled; disable_presentation has no matching guard, so with no restore file it "restores" to defaults. Seen live: with the bar hidden, stay-awake on and notifications silenced by hand, a stray off showed the bar, cleared stay-awake and un-silenced notifications. toggle cannot reach this, off can, and off is what a script or keybinding would call. A four-line guard and a regression test fix it; the test fails against d524068c and passes with the guard. The commit is ready to push to this branch and will follow once the maintainer clears pushing to it.
  3. There is a window where the restore baseline is lost for good. enable_presentation writes the restore file, changes the bar, DND and idle, and only then touches the state file. Killed in between, the next on sees "not enabled" and rewrites the restore file from the already-changed state, so the following off restores nothing and the bar stays hidden. Touching the state file first, or refusing to overwrite an existing restore file, closes it.
  4. The screensaver can no longer be dismissed by switching to an empty workspace. The loop exits on a keypress or when focus leaves the screensaver. On an empty workspace Hyprland reports activewindow as {} (checked live), which quattro treats as "focus left" and this branch treats as "stay up". A compositor binding such as Super + 2 never reaches the terminal as a keypress, so ttfx keeps rendering at 120 fps on a workspace nobody is looking at, with the cursor still hidden, until the user finds their way back. screensaver-test.sh asserts {} means "stay", so it locks this in. Tolerating an empty class for a bounded number of polls after a monitor hop would keep what this was written for.

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.
@chessing234

Copy link
Copy Markdown
Contributor Author

fixed share qr routing (qr is now a share arg, helper renamed off omarchy-share-*) and presentation off no-op when never enabled

@chessing234

Copy link
Copy Markdown
Contributor Author

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.
@chessing234

Copy link
Copy Markdown
Contributor Author

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.

@jandrusk

jandrusk commented Oct 8, 2026

Copy link
Copy Markdown

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.

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[Medium impact] The PR adds two opt-in workflows within a person's desktop session.

Fix presentation retries and overlapping calls before merging.

Findings

  1. P1 Presentation calls undo each other ▶
  2. P1 Presentation retries skip unfinished settings ▶
  3. P2 Interrupted shutdown loses saved settings ▶
  4. P2 Menu checks only match strings ▶

Summary

Adds clipboard QR sharing and a presentation toggle.

  • Clipboard text or a supplied string can now appear as a QR in a terminal.
  • Presentation mode hides the bar, silences notifications, and keeps the computer awake.

Reviews (4) · Last reviewed commit: "Merge upstream quattro into the QR and p..." · Reviewed by Greptile

Comment thread test/shell.d/presentation-mode-test.sh Resolved
Comment thread default/omarchy/omarchy-menu.jsonc Resolved
Comment thread test/shell.d/screensaver-test.sh Resolved
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +40 to +42
if enabled; then
return 0
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +139 to +143
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

@chessing234

Copy link
Copy Markdown
Contributor Author

merged quattro, kept the qr share help text and the region strings.

Comment on lines +50 to +53
touch "$STATE_FILE"
omarchy-toggle-bar on
omarchy-shell -q notifications setDnd on
omarchy-toggle-idle stay-awake >/dev/null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

@omarchybot omarchybot added enhancement New feature or request and removed enhancement New feature or request labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants