pass-fuzzel

This commit is contained in:
Cat /dev/Nulo 2022-02-06 23:53:50 -03:00
parent e1a580e7dc
commit 001bf7c3db

18
.local/bin/pass-fuzzel Executable file
View 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."