Skip to content

Open the image when Open or Edit is clicked on a screenshot toast - #18807

Closed
ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/cafe7d55-d0d1-4222-a5b8-c5f22df6f00b
Closed

ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/cafe7d55-d0d1-4222-a5b8-c5f22df6f00b

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Clicking Open or Edit on the "Screenshot saved" toast just dismisses it: no viewer or editor opens. bin/omarchy-capture-screenshot and bin/omarchy-clipboard-open leave the toast to omasnap --notify, whose buttons call back to an omasnap process that has already exited.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Run omarchy screenshot fullscreen save.
  3. Click Edit on the "Screenshot saved" toast at the top right.
  4. The toast disappears and no editor opens; only the terminal is left.

More cases

Clicking Open

Before After
before after

Related

Screenshot and clipboard-image notifications previously relied on omasnap's libnotify Open/Edit actions, but omasnap exits after sending them so clicking dismissed the toast without opening anything. Both entry points now run omasnap without --notify and send their own notification via omarchy-notification-send with --action exec buttons (Open via imv, Edit via omasnap), which the shell runs after the sender exits. The screenshot wrapper discovers the new file in the screenshot directory after a successful capture and only toasts when a file was saved, preserving copy-only and cancel behavior. The previous drive showed this working in Case 1 (editor overlay opened, MON-DONE visible) and stalled only because the walker waited for the terminal prompt behind that overlay, which the revised test now handles with Esc, so no code change is needed.
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous performance issue is fixed.

Summary

The PR moves screenshot notifications to omarchy-notification-send, so Open and Edit can launch the saved image after omasnap exits.

  • Screenshot toast buttons now open the image they refer to.
  • Clipboard image history opens images directly in Omasnap.

Reviews (3) · Last reviewed commit: "Find the new screenshot without a grep p..." · Reviewed by Greptile

Comment thread bin/omarchy-capture-screenshot Resolved
Comment thread bin/omarchy-capture-screenshot Resolved
Comment thread bin/omarchy-capture-screenshot Resolved
…opening

The tests still expected omasnap to get --notify, and dropping it from
the clipboard helper had replaced opening an image entry with a
"Screenshot saved" toast for a file nobody saved. Opening an image
entry runs omasnap on it again, without --notify, and both tests now
expect the arguments without it.

A native --save, as in "omarchy capture screenshot scroll --save",
was announced as "Screenshot saved and copied", since only the bare
words copy and save were counted. Both spellings count now.

The toast took the newest new name in the screenshot directory, so a
file another program wrote during the capture got the thumbnail and
the Open and Edit buttons. Omasnap does not report the path it saves,
so the toast now appears only when the capture added exactly one
image; when more appeared, nothing is announced rather than the
wrong file.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread bin/omarchy-capture-screenshot Resolved
Telling which image a capture added ran grep once for every PNG in
the screenshot directory, so a folder of thousands of shots delayed
the toast by as many process starts. The names present before the
capture are now kept in one lookup and each file is checked against
it in the shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Closing: the shell runs omasnap's Open and Edit buttons itself, so nothing calls back into the exited omasnap. Rebuilding the toast in the shell by watching ~/Pictures/Screenshots shows two toasts, drops Edit's --recent, misses omasnap's own save locations, and bypasses Do Not Disturb. The dead Open button needs its real cause found.

Reviewed by Claude Opus 5.5 with Codex Medium as a second opinion; its independence is not guaranteed.

@omarchybot omarchybot closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants