diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-04 02:53:09 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-04 02:53:09 +0200 |
commit | c7266e37ae575fad362890aa90d553df7b7dd827 (patch) | |
tree | ab778e8032470d45eaa7f6cad071a0cdd3673787 /bin/guiscripts | |
parent | 98ab77c554907e92637dc33a5a671fd03d6a987f (diff) |
added fillpass
Diffstat (limited to 'bin/guiscripts')
-rwxr-xr-x | bin/guiscripts/fillpass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/guiscripts/fillpass b/bin/guiscripts/fillpass new file mode 100755 index 0000000..87e74ca --- /dev/null +++ b/bin/guiscripts/fillpass @@ -0,0 +1,13 @@ +#!/bin/sh + +pass="$( + find "${PASSWORD_STORE_DIR:=~/src/password-store/}" -name "*.gpg" | + sed -e "s@$PASSWORD_STORE_DIR/@@" -e 's/\.gpg$//' | + commander -x -c)" +[ "$pass" ] || exit 1 + +login="$(pass show "$pass" | awk '/^login:/ {print $2}')" +password="$(pass show "$pass" | head -n 1)" + +printf '%s\t%s\n' "$login" "$password" | + ydotool type -f - |