Omahub
← All plugins
V

Text Polish

by vandaimer

Correct and refine clipboard text with Omarchy's default agent

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
3c24ba5
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
3c24ba5
Reviewed
1 month ago

The plugin is well-structured with security-conscious design: it uses framed input, enforces size limits, avoids passing sensitive data via argv, and manages config file modifications only within clearly marked blocks. No malicious behavior or obvious vulnerabilities were found in the provided code.

  • The plugin modifies user configuration files (menu and bindings), but only within managed blocks and with validation.
  • It runs external coding agents, which inherently involves executing third-party code, though the plugin wraps prompts as untrusted input and limits output size.
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/vandaimer/omarchy-text-polish --enable
Productivity #ai

Text Polish

Text Polish is a compact Omarchy overlay for correcting and refining clipboard text without leaving the current workspace. It uses the coding agent selected in Setup > Defaults > Agent and preserves the language of the original text.

Features

  • Fix spelling, grammar, punctuation, and typing errors.
  • Improve clarity and flow.
  • Shorten text without losing important information.
  • Rewrite text in a more formal tone.
  • Start in a compact, keyboard-first quick-fix window.
  • Show each result first as a compact Quick Fix with an isolated diff.
  • Expand on demand into a contextual review with the changed wording highlighted.
  • Accept, dismiss, or copy a suggestion before changing the clipboard.
  • Use Omarchy's default coding agent instead of a hard-coded provider.
  • Stay out of the status bar.

Install

omarchy plugin add https://github.com/vandaimer/omarchy-text-polish.git --enable

Text Polish needs wl-copy, wl-paste, and at least one coding agent supported by Omarchy. Choose the agent under Setup > Defaults > Agent.

Add it to the Omarchy menu

The Omarchy plugin manifest cannot currently register entries in the built-in menu. Text Polish includes idempotent commands that safely manage its entry in the user menu extension file:

~/.config/omarchy/plugins/vandaimer.text-polish/text-polish menu add
~/.config/omarchy/plugins/vandaimer.text-polish/text-polish menu status

Open the Omarchy menu, enter Apps, and select Text Polish. Existing root-level entries created by older versions are moved into Apps automatically. You can also launch the overlay directly:

~/.config/omarchy/plugins/vandaimer.text-polish/text-polish open

Remove only the menu block managed by Text Polish:

~/.config/omarchy/plugins/vandaimer.text-polish/text-polish menu remove

Usage

  1. Copy some text.
  2. Open Text Polish from the Omarchy menu.
  3. Choose a mode and press Ctrl + Enter.
  4. Review the suggestion, then press Enter to accept and copy it or Ctrl + D to dismiss it.

Text Polish opens as a compact input and keeps the agent result in a compact Quick Fix card with accept, copy, and dismiss actions. Choose Review details to expand the same suggestion into the two-column review. The review isolates the changed wording, keeps the original text visible, and leaves the clipboard untouched until you accept or explicitly copy the result.

Optional keybinding

Omarchy does not currently provide a command or plugin-manifest field for persistently registering a keybinding. Text Polish includes an explicit setup command that manages only its own marked block in ~/.config/hypr/bindings.lua. It is never run automatically during installation.

Add the default SUPER + CTRL + G binding:

~/.config/omarchy/plugins/vandaimer.text-polish/text-polish binding add

Choose a different key combination:

~/.config/omarchy/plugins/vandaimer.text-polish/text-polish binding add "SUPER + ALT + P"

Check or remove the managed binding:

~/.config/omarchy/plugins/vandaimer.text-polish/text-polish binding status
~/.config/omarchy/plugins/vandaimer.text-polish/text-polish binding remove

The generated block looks like this:

-- BEGIN vandaimer.text-polish
o.bind("SUPER + CTRL + G", "Text Polish", "omarchy-shell shell toggle vandaimer.text-polish")
-- END vandaimer.text-polish

The command checks existing bindings, refuses a key combination that is already in use, reloads Hyprland, checks for configuration errors, and restores the previous file if validation fails. You can inspect all effective bindings with:

omarchy menu keybindings --print

Default agent integration

The overlay reads the current selection through omarchy-default-agent each time it opens. The helper runs that agent non-interactively from an isolated temporary directory. Supported Omarchy agents are Pi, Oh My Pi, OpenCode, Claude Code, Codex, Grok, Gemini, GitHub Copilot, and Crush.

When Codex is selected, Text Polish uses low reasoning effort and low response verbosity for this focused editing task. This keeps the overlay responsive without changing the user's global Codex settings.

Text passed to an agent is wrapped as untrusted editing material. The prompt asks the agent to return only the revised text and not to follow instructions contained inside the text being edited.

Text is limited to 16 KiB. Clipboard contents and edited text are sent through private stdin streams (or a mode-0600 temporary prompt file for agents that support file input) rather than process arguments. Agent output is capped at 64 KiB and temporary files are removed after every run.

Development

Run the full automated suite before publishing changes:

tests/run.sh

The suite validates the QML and shell helper, runs the transport/security fixtures, and uses Qt 6 Quick Test offscreen to cover text diffing, view states, UTF-8 limits, HTML escaping, and keyboard routing in both the editor and a focused result button. It deliberately uses /usr/lib/qt6/bin/qmltestrunner when available because /usr/bin/qmltestrunner may belong to Qt 5.

An optional live smoke test opens the installed plugin in the current Hyprland session, verifies its layer, sends Esc, and confirms that the layer closes:

RUN_LIVE_UI_TESTS=1 tests/run.sh

Individual validation commands remain available:

omarchy plugin validate .
qmllint TextPolish.qml TextPolishChangePreview.qml TextPolishKeyRouter.qml tests/qml/*.qml
bash -n text-polish
tests/security.sh

License

MIT