Files
omarchycn/bin/omarchy-menu-emoji-insert
T
David Heinemeier Hansson 6f0d9d53cd 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.
2026-05-29 15:25:21 +02:00

21 lines
398 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Insert an emoji into the focused application
# omarchy:group=menu
# omarchy:args=<emoji>
# omarchy:hidden=true
emoji="${1:-}"
copy_pid=""
[[ -n $emoji ]] || exit
printf '%s' "$emoji" | wl-copy --type text/plain --sensitive --foreground &
copy_pid=$!
sleep 0.15
wtype -M shift -k Insert -m shift 2>/dev/null || true
sleep 0.2
kill "$copy_pid" 2>/dev/null || true