diff --git a/config b/config index 9e48ed1..b8e2508 100644 --- a/config +++ b/config @@ -23,6 +23,12 @@ SHCLIP_FILTER_ENABLED="" # default: yes SHCLIP_SYNC_CLIPBOARD="1" +# enable caching password manager clips, currently only KDE's password +# manager is affected by this. idk any other ones with custom mime types +# blank for no, anything for yes +# default: no +SHCLIP_CACHE_PASSWORDS="" + ### SHCLIP-MENU OPTIONS ### # text editor for editing clips diff --git a/shclip-daemon b/shclip-daemon index 4f0d85f..d45eaac 100755 --- a/shclip-daemon +++ b/shclip-daemon @@ -16,6 +16,7 @@ SHCLIP_MEMORY_LIMIT="${SHCLIP_MEMORY_LIMIT:-4100}" # memory limit in kb SHCLIP_ENABLED="${SHCLIP_ENABLED-1}" SHCLIP_FILTER_ENABLED="${SHCLIP_FILTER_ENABLED-}" SHCLIP_SYNC_CLIPBOARD="${SHCLIP_SYNC_CLIPBOARD-1}" +SHCLIP_CACHE_PASSWORDS="${SHCLIP_CACHE_PASSWORDS-}" SHCLIP_TEMP_DIR="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/shclip-$USER-$DISPLAY" @@ -111,6 +112,12 @@ updateclip() { case "$targets" in *gnome-copied-files*) return 0 ;; *image/png*) xclip -sel clipboard -t image/png -o > "$BUFFER" ;; + *x-kde-passwordManagerHint*) + if [ -n "$SHCLIP_CACHE_PASSWORDS" ]; then + xclip -sel clipboard -t x-kde-passwordManagerHint -o > "$BUFFER" + else return 0 + fi + ;; *) xclip -sel clipboard -o > "$BUFFER" ;; esac