keyring no longer copies plaintext passwords to cliphist database, can now escape from cliphist window back to the toolbelt menu

This commit is contained in:
pagedmov
2024-10-31 18:20:09 -04:00
parent 07b19b2cdb
commit c6d381fc58
2 changed files with 15 additions and 2 deletions

View File

@@ -15,8 +15,20 @@ pkgs.writeShellScriptBin "keyring" ''
[ $? = 0 ] || { [ -f /tmp/keyringfile ] && /run/current-system/sw/bin/rm /tmp/keyringfile; exit 1; }
# pass it through fmt for soft word wrapping
pass -c "$pass_string" | fmt -w 45
# prevents cliphist from writing passwords to the clipboard history
pkill -STOP wl-paste
# copy password
pass -c "$pass_string" > /dev/null
echo "Password copied. Clearing clipboard in 10 seconds."
# start a timer for 10 seconds, clear clipboard, resume cliphist tracking
nohup bash <<- EOF &
sleep 10
wl-copy -c
pkill -CONT wl-paste
EOF
/run/current-system/sw/bin/rm /tmp/keyringfile
sleep 0.5
exit 0