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.
This commit is contained in:
David Heinemeier Hansson
2026-05-29 15:25:21 +02:00
parent cd2be9da25
commit 6f0d9d53cd
4 changed files with 17 additions and 37 deletions
-3
View File
@@ -6,13 +6,10 @@
# omarchy:hidden=true
emoji="${1:-}"
emoji_ignore_file="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/omarchy-emoji-insert-ignore"
copy_pid=""
[[ -n $emoji ]] || exit
mkdir -p "${emoji_ignore_file%/*}"
printf '%s' "$emoji" >"$emoji_ignore_file"
printf '%s' "$emoji" | wl-copy --type text/plain --sensitive --foreground &
copy_pid=$!