~ntgg/dotfiles

ref: 6b3f8ede23bb2bbaec16140b7a95b34a91621eeb dotfiles/.local/bin/passmenu -rwxr-xr-x 341 bytes View raw
6b3f8edeNoah Graff added new bookmarks 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env sh

# not really sure what this does in bash FIXME
# shopt -s nullglob globstar

prefix=${PASSWORD_STORE_DIR-~/.password-store}
password=$(
    echo "$prefix"/**/*.gpg |
    tr ' ' '\n' |
    sed "s#$prefix"'/##g' |
    sed 's/[.]gpg//g' |
    wofi -Sdmenu
)

[ -n "$password" ] || exit

pass show -c "$password" 2>/dev/null