Never open Vim for text clipboard entries
This commit is contained in:
@@ -84,7 +84,7 @@ Updating: `omarchy plugin update alanfortlink.clipboard` · Uninstall: `omarchy
|
||||
| `Ctrl+N` / `Ctrl+P` (or arrows) | navigate results |
|
||||
| `Enter` | copy to clipboard and paste into the focused window |
|
||||
| `Shift+Enter` | copy only |
|
||||
| `Ctrl+O` | open (link → browser, image → editor, file → xdg-open, text → editor). QR images open their **decoded link** in the browser; the preview pane also has clickable "Open link" chips for links and QR payloads |
|
||||
| `Ctrl+O` | open a pure link in the browser, an image in the editor, or a file externally. Text entries stay in the picker; use `Return` to paste them. QR images open their **decoded link** in the browser; the preview pane also has clickable "Open link" chips for links and QR payloads |
|
||||
| `Tab` | pin/unpin |
|
||||
| `Ctrl+=` | pause/resume recording |
|
||||
| `Delete` | remove entry · `Shift+Delete` clear all (with confirm) |
|
||||
|
||||
+3
-8
@@ -30,14 +30,9 @@ open_text() {
|
||||
exec omarchy-launch-browser "$url"
|
||||
fi
|
||||
fi
|
||||
local dir file
|
||||
dir="${XDG_STATE_HOME:-$HOME/.local/state}/omarchy/clipboard-open"
|
||||
mkdir -p "$dir"
|
||||
# Prune temp copies older than a week; nothing else reclaims them.
|
||||
find "$dir" -type f -name 'clipboard.*.txt' -mtime +7 -delete 2>/dev/null || true
|
||||
file=$(mktemp --tmpdir="$dir" clipboard.XXXXXX.txt)
|
||||
printf '%s' "$text" >"$file"
|
||||
exec omarchy-launch-editor "$file"
|
||||
# Text entries are clipboard data, not editor documents. Return pastes them;
|
||||
# Ctrl+O/Alt+Enter must not unexpectedly open Vim for shell commands or prose.
|
||||
exit 0
|
||||
}
|
||||
|
||||
case $(jq -r '.type' <<<"$entry") in
|
||||
|
||||
Reference in New Issue
Block a user