diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2016-02-28 22:06:25 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-02-28 22:06:25 +0100 |
commit | 7b9a197cd1197ab1df930a05dcf19f82ff080f4a (patch) | |
tree | d4fb6bd7a0d1a5780bc15b1062c6e7a725fefea2 /packages/scripts/resources/bin/dmenu-pass.sh | |
parent | a307e0474e78c51590aeac95dbc5587a87ef6501 (diff) | |
download | debian-packages-7b9a197cd1197ab1df930a05dcf19f82ff080f4a.tar.gz debian-packages-7b9a197cd1197ab1df930a05dcf19f82ff080f4a.zip |
add dmenu-pass
Diffstat (limited to 'packages/scripts/resources/bin/dmenu-pass.sh')
-rwxr-xr-x | packages/scripts/resources/bin/dmenu-pass.sh | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/packages/scripts/resources/bin/dmenu-pass.sh b/packages/scripts/resources/bin/dmenu-pass.sh deleted file mode 100755 index bb3be7a..0000000 --- a/packages/scripts/resources/bin/dmenu-pass.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -shopt -s nullglob globstar - -prefix=${PASSWORD_STORE_DIR-~/.password-store} -password_files=( "$prefix"/**/*.gpg ) -password_files=( "${password_files[@]#"$prefix"/}" ) -password_files=( "${password_files[@]%.gpg}" ) - -password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") - -[[ -n $password ]] || exit - -while true; do - pass show "$password" 2>&1 \ - | sed -e 's/^pass:.*/pass: XXXX/' \ - | xmessage -file - \ - -buttons "Done:1,Copy 'login':2,Copy 'pass':3,Copy all:4" \ - -default "Done" \ - -nearmouse -timeout 10 - case "$?" in - 2) - pass show "$password" 2>&1 \ - | sed -ne 's/^login: \(.*\)/\1/p' \ - | xclip -i -verbose -l 1 2>/dev/null - ;; - 3) - pass show "$password" 2>&1 \ - | sed -ne 's/^pass: \(.*\)/\1/p' \ - | xclip -i -verbose -l 1 2>/dev/null - ;; - 4) - pass show "$password" 2>&1 \ - | xclip -i -verbose -l 1 2>/dev/null - ;; - *) - break - ;; - esac -done |