dmenu_bw: Add dmenu front-end for bwpass

`dmenu_bw` works like `passmenu`: it uses `dmenu` to provide a picker,
and then copies the password for the selected item to the clipboard.
master
Dustin 2019-04-25 10:36:27 -05:00
parent 785be5424f
commit 4fa8b96606
1 changed files with 12 additions and 0 deletions

12
dmenu_bw Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -e
key="$(bwpass | dmenu)"
[ -n "${key}" ] || exit 0
password="$(bwpass show "${key}")"
[ -n "${password}" ] || exit 1
printf '%s' "${password}" | xclip -quiet -rmlastnl -sel clip 2> /dev/null &
sleep 12
kill $!