add pass menu for wofi
This commit is contained in:
parent
50e9a9c168
commit
f820d95db8
1 changed files with 15 additions and 0 deletions
15
scripts/.scripts/passwmenu
Executable file
15
scripts/.scripts/passwmenu
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/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[@]}" | wofi --dmenu "$@")
|
||||
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
pass show "$password" -c
|
||||
|
Loading…
Reference in a new issue