Commit Graph
29 Commits
Author SHA1 Message Date
David Heinemeier HanssonandGitHub 238021cd67 Decode mixed UTF-16 clipboard text (#7466)
* Decode mixed UTF-16 clipboard text

* Harden UTF-16 clipboard detection

* Finish UTF-16 decoder hardening
2026-08-19 11:56:51 +02:00
David Heinemeier HanssonandGitHub 006460ad57 Decode UTF-16 clipboard text (#7249) 2026-08-17 06:09:51 -04:00
c4dda58ba2 Stop the clipboard picker freezing on huge pastes (#6568)
Every keystroke in the search box scanned, lowercased, and split the
full text of every history entry, and the preview pane laid out the
entire selection with WrapAnywhere. A single 1.6MB paste (or a large
file selection) turned that into hundreds of megabytes of work on the
shell thread and stalled the render thread — freezing the whole
desktop.

Cap each entry once as it enters the display, so searching, previewing,
and rendering all work on a bounded prefix. Pasting reads the full entry
back from history by index, so nothing is actually lost. The cut lands
on a line break, keeping a file:// URI from truncating into a bogus path.

Co-authored-by: markbusking <marcosbustos.dev@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 14:01:37 +02:00
David Heinemeier HanssonandClaude Opus 5 234ac7b3b6 Bring back clipboard watchers that die
Clipboard history is fed by two wl-paste --watch processes started once
when the shell loads. When one dies, nothing notices: copying still
works, the picker still opens, and the old entries are all still there,
so history just silently stops recording until the next shell reload.

Respawn them on exit instead. The one-shot timer both coalesces the case
where both watchers die together and keeps a wl-paste that cannot start
at all from spinning as fast as fork allows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 08:19:57 -07:00
7721228319 shell: handle CTRL+BACKSPACE to clear filter (#6307)
* emoji panel: handle CTRL+BACKSPACE to clear filter

* shell: handle CTRL+BACKSPACE to clear filter in all search overlays

* Indentation fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* menu filters: align keyboard editing with Qt standard shortcuts

* menu filters: extract shared filter-editing helpers

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* potential fix for pull request findings

* Only treat filter edit keys as edits when they change the text

Backspace/Ctrl+U on an empty filter no longer calls setFilter(""),
which was resetting the list selection back to the top. This also lets
the menu's empty-filter Backspace fall through to goBack() with any
modifier held, as it did before the Util extraction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 17:49:16 -07:00
David Heinemeier HanssonandClaude Fable 5 60e0a2a0cd Simplify clipboard watcher lifecycle with pdeathsig
Replace the three-layer process management (trap cleanup, PPID-polling
watchdog subshell, /proc-scanning reaper) with kernel-level lifetime
binding: each wl-paste watcher is spawned under setpriv --pdeathsig TERM,
so it dies with the shell no matter how the shell exits.

- Delete watch.sh: the shell now spawns both watchers directly as
  declarative Process commands instead of a wrapper script with traps
  and a 1s polling loop
- Delete init.sh: reaping stale watchers from a crashed pre-pdeathsig
  shell is a single pkill at startup
- Collapse capture.sh's dual stream/snapshot modes: wl-paste forwards
  arguments to its watch command, so the mime rides along as $1 instead
  of an env var, letting both modes share one emit_image function
- Turn the six-branch image mime chain into a loop

Net: two fewer files, three fewer runtime processes, and the watch-mode
capture tests now exercise the same argument protocol the shell uses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:32:30 -07:00
David Heinemeier Hansson 738821c3ab Fix clipboard watcher lifecycle 2026-07-02 11:09:42 -07:00
David Heinemeier Hansson b9f2d41e86 Add clipboard history Home End navigation 2026-06-29 12:58:04 -05:00
David Heinemeier Hansson 472b5cd557 Share pointer movement gate across menus 2026-06-29 11:56:21 -05:00
David Heinemeier Hansson a3f8c494e3 Ignore stationary pointer hover in clipboard 2026-06-29 11:44:31 -05:00
David Heinemeier Hansson 4884f8c64a Persist watched clipboard text 2026-06-04 10:09:38 +02:00
Ryan Hughes 98ba4a9697 Bring on gradient borders 2026-06-02 11:17:13 -04:00
David Heinemeier Hansson 6f0d9d53cd Keep sensitive clipboard contents out of history
Restore the clipboard watcher behavior that drops CLIPBOARD_STATE=sensitive events, which password managers use for copied secrets.

Use the same sensitive foreground clipboard path for emoji insertion instead of a custom history marker, and keep the password-manager MIME hint ignored as a fallback.
2026-05-29 15:25:21 +02:00
David Heinemeier Hansson cd2be9da25 Insert emojis without persisting clipboard entries
Keep the first emoji result selected whenever results exist, including after search filtering, so Enter inserts immediately.

Route emoji insertion through a hidden helper that serves a transient sensitive clipboard entry long enough for Shift+Insert, then stops that clipboard owner.

Mark transient emoji inserts so clipboard history skips only that event while continuing to record normal terminal copies.
2026-05-29 14:54:49 +02:00
David Heinemeier Hansson a0cf4b07b2 Show clipboard file entries without inline video playback 2026-05-29 14:14:40 +02:00
David Heinemeier Hansson f60c038050 Open clipboard entries from history 2026-05-29 13:54:55 +02:00
David Heinemeier Hansson 766c3b9a3f Polish clipboard history display 2026-05-29 13:35:28 +02:00
David Heinemeier Hansson 4b003d2e39 Simplify clipboard preview divider 2026-05-29 13:15:11 +02:00
David Heinemeier Hansson bb0d9dd2e3 Copy clipboard history selection with Shift Return 2026-05-29 13:15:00 +02:00
David Heinemeier Hansson cf3a481224 Confirm clearing clipboard history 2026-05-29 12:57:46 +02:00
David Heinemeier Hansson 5bdd264ce0 Delete selected clipboard history entries 2026-05-29 12:23:53 +02:00
David Heinemeier Hansson e79013adbe Fix large clipboard history pastes
Clipboard history selections passed the full selected text as a process argument to omarchy-clipboard-paste-text. Large entries can exceed Linux's per-argument exec limit, so the helper never starts reliably for big copied blocks.

Pass the original history index instead and have the helper read that entry from clipboard-history.json before wl-copy and Shift+Insert. Also focus the first row when opening the manager, keep filtered rows mapped to their original history indexes, and drop whitespace-only text entries.
2026-05-29 12:21:28 +02:00
David Heinemeier Hansson 953616dd62 Remove borders from menu highlights 2026-05-26 00:11:03 +02:00
David Heinemeier Hansson 37e4da524b Move shell scripts into plugin directories 2026-05-25 14:53:21 +02:00
David Heinemeier Hansson 829c1fa4f7 Add shell plugin model tests 2026-05-25 14:18:39 +02:00
David Heinemeier Hansson 336e7a790f Track image clipboard history 2026-05-22 10:10:33 +02:00
David Heinemeier Hansson 4cd23d9584 Extract stats and clipboard helpers 2026-05-21 11:58:43 +02:00
David Heinemeier Hansson 783cccac3c Consolidate OMARCHY_MENU_FONT lookups onto Style.font.menuFamily
Five plugins (menu, launcher, clipboard, emojis, polkit) each looked up
OMARCHY_MENU_FONT with the same env-or-monospace fallback. Hoist the
resolution into Style so plugins read one source of truth, and so the
fallback follows the real fontconfig family Style already tracks instead
of the literal string "monospace".
2026-05-20 20:31:04 +02:00
David Heinemeier Hansson b7c0e10288 Just clipboard 2026-05-20 14:09:09 +02:00