pass-fuzzel
This commit is contained in:
parent
e1a580e7dc
commit
001bf7c3db
1 changed files with 18 additions and 0 deletions
18
.local/bin/pass-fuzzel
Executable file
18
.local/bin/pass-fuzzel
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copied in https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu
|
||||
|
||||
set -e
|
||||
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[@]}" | fuzzel-run -d)
|
||||
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
pass show -c "$password" 2>/dev/null
|
||||
|
||||
notify-send pass-fuzzel "Copied $password into the clipboard."
|
Loading…
Reference in a new issue