[pass] xdotool dmenu
Brian Mattern
brian.mattern at gmail.com
Fri Jun 27 23:28:59 CEST 2014
Great idea!
Is the echo necessary?
Brian
On Jun 27, 2014 12:47 PM, "Christoph Egger" <christoph at christoph-egger.org>
wrote:
> Ahoi!
>
> I've built a NIH version of the dmenu script with one -- in my opinion
> quite important -- difference: Instead of using the clipboard it just
> use `xdotool` to actually type the password. I've attached the script if
> someone's interested.
>
> Christoph
>
>
> #!/bin/bash
>
> list_passwords() {
> basedir=~/.password-store/
> passwords=( ~/.password-store/**/*.gpg ~/.password-store/*.gpg )
> for password in "${passwords[@]}"
> do
> filename="${password#$basedir}"
> filename="${filename%.gpg}"
> echo $filename
> done
> }
>
> xdotool_command() {
> echo -n "type "
> pass "$1"
> }
>
> selected_password="$(list_passwords 2>/dev/null| dmenu)"
>
> echo $selected_password
> if [ -n "$selected_password" ]
> then
> xdotool_command "$selected_password" | xdotool -
> fi
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140627/0b760dab/attachment.html>
More information about the Password-Store
mailing list