summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-04 02:53:09 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-04 02:53:09 +0200
commitc7266e37ae575fad362890aa90d553df7b7dd827 (patch)
treeab778e8032470d45eaa7f6cad071a0cdd3673787 /bin
parent98ab77c554907e92637dc33a5a671fd03d6a987f (diff)
added fillpass
Diffstat (limited to 'bin')
-rwxr-xr-xbin/guiscripts/fillpass13
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 -