~tardypad/dotfiles

ref: 00c0c349a1b8960152233f11caa9ea1a40e395a3 dotfiles/files/scripts/shell/copy-password -rwxr-xr-x 339 bytes
00c0c349 — Damien Tardy-Panis Add presentation mode to mako to hide notifications 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

PASSWORD_STORE_DIR="${PASSWORD_STORE_DIR:-$HOME/.password-store}"

NAME=$(
  find -L "${PASSWORD_STORE_DIR}" \
    -type f -name '*.gpg' \
    | sed -e "s#${PASSWORD_STORE_DIR}/##" \
          -e 's/\.gpg//' \
    | sort \
    | bemenu -p 'Copy password'
)

[ -n "${NAME}" ] || exit

pass show -c "${NAME}" \
  > /dev/null 2>&1