diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-21 02:02:13 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-21 02:12:53 +1200 |
commit | ec401dcd28815aed5da3d5fbf53f247ed003b03e (patch) | |
tree | 62d4260ee332e8fc97db5e412695ddc583c59f14 /bin/dmenu_pass.sh | |
parent | Don't copy PRIMARY to CLIPBOARD from urxvt anymore (diff) | |
download | dotfiles-ec401dcd28815aed5da3d5fbf53f247ed003b03e.tar.gz dotfiles-ec401dcd28815aed5da3d5fbf53f247ed003b03e.zip |
Rewrite dmp(1df) as dmenu_pass(1df)
Diffstat (limited to 'bin/dmenu_pass.sh')
-rw-r--r-- | bin/dmenu_pass.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/dmenu_pass.sh b/bin/dmenu_pass.sh new file mode 100644 index 00000000..bfb687b1 --- /dev/null +++ b/bin/dmenu_pass.sh @@ -0,0 +1,14 @@ +# Pick a pass(1) password with dmenu(1) +self=dmenu_pass +cd -- "${PASSWORD_STORE_DIR:-"$HOME"/.password-store}" || exit +# shellcheck disable=SC2016 +name=$( + find . -name \*.gpg ! -type d | + sed -e 's_^\./__' -e 's_\.gpg$__' | + LC_ALL=C sort -f | + dmenu +) +pass show --clip -- "$name" || exit +notify-send --app-name="$self" -- \ + "Password saved to CLIPBOARD" \ + "$name" |