Skip to content

Add Clipboard History and Switch Theme - #85

Open
nchudleigh wants to merge 4 commits into
typecraft-dev:mainfrom
nchudleigh:feat/switch-theme
Open

nchudleigh wants to merge 4 commits into
typecraft-dev:mainfrom
nchudleigh:feat/switch-theme

Conversation

@nchudleigh

Copy link
Copy Markdown

Adds two list/detail commands: Clipboard History (Raycast style) and Switch Theme for Omarchy themes. Switch Theme is built on Clipboard History's detail pane, so they come together.

Clipboard History (builtin:clipboard-history, global shortcut omacast:clipboard):

  • One wl-paste --watch records each copy as a JSON line. It skips password-manager copies and prefers an image offer.
  • Images and long text are stored under ~/.local/share/omacast/clipboard/. Entries are deduplicated by hash and pruned by clipboardHistoryDuration (default one week; pins are kept). Apps listed in clipboardDisabledApplications are ignored.
  • The list sits beside a preview pane, with sections for Pinned, Today, Yesterday and Earlier, and a type dropdown on Ctrl+P.
  • Actions: ↵ paste, Ctrl+↵ copy, Ctrl+O open a link or file, Ctrl+Shift+P pin, Ctrl+D delete, Ctrl+Shift+D delete all (it asks first).
  • ClipboardWriter gains copy/paste(text, mime) and copyFile, so images and long text paste back intact. The scripts only receive a MIME type and a path inside our own clipboard directory, never user text.

Switch Theme (builtin:switch-theme, global shortcut omacast:theme):

  • Lists Omarchy's own picker rows (omarchy-theme-switcher --print-rows) with the current theme checked and its preview beside the list.
  • ↵ runs omarchy-theme-set.
  • It replaces Omarchy's theme picker in the results (supersedes: ["omarchy:appearance.theme"]).

The preview double-buffers its image: the next one decodes hidden and is swapped in once ready, so moving through the list doesn't flash an empty pane.

These commits come from my fork, where they also touched the emoji picker, script commands and Superwhisper (#73, #74). That code is left out here, and the parts Clipboard History needed are recreated: splitView, the supersedes filter, the iconless row flag.

Checked:

  • Live on Omarchy dev / Hyprland 0.56: both views open and render, "theme" ranks Switch Theme first, and there are no QML errors.
  • On the fork build, moving through Switch Theme swaps previews with no blank frame.
  • node --test tests/*.test.js (including new clipboard-history and themes tests) and omarchy plugin validate . pass.

Not checked:

  • Pasting into terminals: ↵ pastes with Shift+Insert like the calculator does, which Alacritty, Kitty and Ghostty read as the primary selection. Paste with Ctrl+Shift+V in terminals and Herdr #72 fixes that.
  • Omarchy 4.0.x, where the theme menu id is style.theme, so Omarchy's own entry still shows there.

🤖 Generated with Claude Code

superduck00 and others added 4 commits November 7, 2026 13:26
A wl-paste watcher records text, links, colours, files and images with
their source app, copy count and first/last copied times. A list/detail
view with a type dropdown pastes, copies, opens, pins and deletes entries.
Retention defaults to a week (pins kept); password managers' copies are
skipped. omacast:emoji and the new omacast:clipboard shortcuts close their
view on a second press.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lists the themes Omarchy's own picker lists, with the current one checked
and selected and a preview beside the list, and applies the chosen one
with omarchy-theme-set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Omarchy's Theme entry gives way to Switch Theme in results, a new
omacast:theme shortcut toggles it, and theme rows drop their icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The detail pane's preview Image is asynchronous, so changing its source
blanked the pane until the next image decoded, and moving through Switch
Theme or Clipboard History flashed an empty pane on every step. Two
Images now take turns: the new source decodes in the hidden one, and it
comes to the front once ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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