Great idea!
Is the echo necessary?
Brian
On Jun 27, 2014 12:47 PM, "Christoph Egger" <[email protected]>
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
> [email protected]
> http://lists.zx2c4.com/mailman/listinfo/password-store
>
>
_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store