Omahub
← All plugins
S

Clipboard with OCR

by Simon Späti

A clipboard manager to view and paste history with OCR, Image only search, and paste to clipboard only (no direct paste)

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
b787a81
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

Low
AI risk level
Low
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
b787a81
Reviewed
1 month ago

This clipboard manager plugin is a transparent fork of the built-in Omarchy clipboard with added OCR functionality. It reads clipboard content, runs tesseract for OCR, stores history locally, and manages image files. The code is well-structured, uses standard system tools, and includes safeguards like skipping sensitive clipboard types and capping OCR text length. No malicious or obfuscated behavior was found.

  • Clipboard content (including OCR text) is stored locally in plain text, which could be a privacy consideration if the system is shared.
  • The plugin executes external commands (tesseract, wl-paste, jq) and writes/deletes files in the user's state directory, but all operations are scoped and documented.
How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/sspaeti/omarchy-clipboard-plugin --enable
Productivity #quickshell

omarchy-clipboard-plugin

Fork of the built-in Omarchy clipboard manager plugin (omarchy.clipboard), deployed as the cloned plugin sspaeti.clipboard.

Changes vs. upstream

  • OCR search: every captured image is run through tesseract; the recognized text is stored as ocrText in the history entry and matched by the picker's search. Typing in the picker finds text inside screenshots.
  • Ctrl+I images-only mode: toggles a filter that shows only image entries (header shows [images]). Typing then searches the OCR text. Esc or Ctrl+I leaves the mode.
  • No accidental paste (walker-style): Enter / mouse click only copies the entry to the clipboard — paste yourself with Ctrl+V (Ctrl+Shift+V in terminals). Shift+Enter keeps the old copy-and-auto-paste behavior. Alt+Enter still opens the entry.
  • History limit raised from 300 to 500 entries (can be configured in shell.json)
  • The plugin uses its own capture.sh instead of the stock one under $OMARCHY_PATH (needed so OCR actually runs).
  • Security hardening: clipboard content renders as Text.PlainText (copied HTML markup can't trigger rich-text rendering or remote image loads), and gc.sh deletes captured image files once their history entries are deleted, evicted, or cleared.

Install

# OCR engine (skip if you don't want OCR search)
omarchy pkg add tesseract tesseract-data-eng

# clone straight into ~/.config/omarchy/plugins/ and enable
omarchy plugin add https://github.com/sspaeti/omarchy-clipboard-plugin.git --enable

This replaces the built-in clipboard manager — the stock keybinding and omarchy menu clipboard route to this plugin automatically (via clonedFrom in the manifest). Optionally OCR images already in your history:

~/.config/omarchy/plugins/sspaeti.clipboard/scripts/backfill-ocr.sh

Update later with omarchy plugin update sspaeti.clipboard, uninstall with omarchy plugin remove sspaeti.clipboard (the built-in comes back).

Customization

All settings live on this plugin's entry in the plugins array of ~/.config/omarchy/shell.json. The file hot-reloads on save — no shell restart needed. Every key is optional; leave one out and its default applies.

After install the entry only has an id. Add settings next to it:

{
  "version": 1,
  "plugins": [
    {
      "id": "sspaeti.clipboard",
      "historyLimit": 1000,
      "maxRows": 50,
      "ocr": true
    }
  ]
}
Key Default Meaning
historyLimit 500 max entries kept in the clipboard history (upstream keeps 300)
maxRows 50 max rows the picker shows per search
ocr true run tesseract on newly captured images; false disables OCR (existing ocrText stays searchable)
ocrLang "eng" tesseract language(s), e.g. "deu" or "eng+deu" — install packs with omarchy pkg add tesseract-data-deu
autoPaste false true restores stock omarchy behavior: Enter/click copies and auto-pastes, Shift+Enter only copies. false swaps them (walker-style, no accidental paste)

Examples:

{ "id": "sspaeti.clipboard", "ocr": false }          // no OCR, everything else default
{ "id": "sspaeti.clipboard", "historyLimit": 2000 }  // bigger history

Notes:

  • OCR text is capped at 4000 characters per image (OCR_MAX_CHARS in capture.sh).
  • History is stored in ~/.local/state/omarchy/clipboard-history.json, images in ~/.local/state/omarchy/clipboard-images/.

Requirements

  • Omarchy with the Quickshell-based shell (clipboard plugin era)
  • tesseract + language data: omarchy pkg add tesseract tesseract-data-eng

Development

For hacking on the plugin from a working-copy checkout (instead of the omarchy plugin add install above):

make deploy        # copies plugin files to ~/.config/omarchy/plugins/sspaeti.clipboard/
make backfill-ocr  # one-shot: OCR images already in your history
make test          # unit tests for the history/search logic (node)

The shell hot-reloads the plugin on deploy. First-time setup on a fresh machine: run omarchy plugin clone omarchy.clipboard once (registers and enables the clone), then make deploy over it.

Keys

Key Action
type search (matches text, filenames, and OCR text of images)
Ctrl+I toggle images-only mode
Enter / click copy to clipboard (with "autoPaste": true: copy and auto-paste)
Shift+Enter copy and auto-paste (with "autoPaste": true: copy only)
Alt+Enter open entry
Del / Shift+Del delete entry / clear history