diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-01-17 12:12:15 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-01-17 12:12:15 +0100 |
commit | 7191a1a9c48bf31ca3a0d9de60baf6931ff7cb54 (patch) | |
tree | 1779c81e8101b5f0aceb824226f6be5622c90183 /.local/bin | |
parent | 6f736b919a4da2fa8aecef046f8785bc110bd6f4 (diff) |
Include ipass util
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/ipass | 19 |
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 "$@" |