aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-01-17 12:12:15 +0100
committerPatrick Spek <p.spek@tyil.nl>2020-01-17 12:12:15 +0100
commit7191a1a9c48bf31ca3a0d9de60baf6931ff7cb54 (patch)
tree1779c81e8101b5f0aceb824226f6be5622c90183 /.local
parent6f736b919a4da2fa8aecef046f8785bc110bd6f4 (diff)
Include ipass util
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/ipass19
1 files changed, 19 insertions, 0 deletions
diff --git a/.local/bin/ipass b/.local/bin/ipass
new file mode 100755
index 0000000..63ec46a
--- /dev/null
+++ b/.local/bin/ipass
@@ -0,0 +1,19 @@
+#! /usr/bin/env sh
+
+main()
+{
+ cd "${HOME}/.password-store" || exit 1
+
+ file=$(find ./* -type f | sed 's-^\./--' | sed 's-\.gpg$--' | dmenu)
+ dmenu_exit=$?
+
+ if [ "${dmenu_exit}" -ne 0 ]
+ then
+ exit 2
+ fi
+
+ pass show "$file" | perl -pe 'chomp' | xdotool type --file -
+ notify-send -i "dialog-password" "ipass" "${file}"
+}
+
+main "$@"