pass-zenity: simple gtk extension

morus morus at missing.bike
Thu Feb 29 23:14:51 UTC 2024


Hi list.
I hacked together a GUI script and wanted to share. Links at the bottom.

It's mostly trivial, modeled after the venerable `passmenu`, the dmenu
script you can find bundled with the source code of pass. You'd run it,
probably with a keybind, pick a password name with a fuzzy search, and
it'd copy it to clipboard (same as `pass -c`) or autotype it for you
(with xdotool). That probably still works fine - I wouldn't know, I
don't use dmenu. I've been using a similar fzf(1) based solution.

So pass-zenity is just that, but it uses a zenity dialog (so simple GTK
popup) instead of dmenu, and it's a pass extension instead of a script.
The motivations were as follows:

1. Have something that looks mostly native between GNOME, Phosh, and
whatever other setups out of the box: zenity is GTK and a GNOME project,
so that does it.

2. Have something usable on mobile (got myself a pinephone): I bundle a
.desktop file to this end.

3. Have OTP support: internals outsourced to the pass-otp extension,
trivial to implement `--otp` option works as expected.

4. pass extension over a standalone script, to dodge
some $PATH pollution and play nicely with multiple pass
executables / implementations (made up use case). Fits nicely in
~/.password-store/.extensions for git syncing too.

5. Still be lightweight: just bash, pass, zenity. Autotyping with
xdotool, ydotool, or wtype; improved logic for inferring one of these to
use.

So I've been using it over the past two months and sporadically whipping
it into something hopefully anyone can use, with error messages and
documentation (manpage). I'm somewhat confident in it by now, but I'd
like some real scrutiny before I call it a stable release.
If it seems like something you'd enjoy, please take a look and send
feedback - or code. I'd like some tests, but I don't know how to write
them. For documentation, I run the manpage through aspell(1) and compare
with that one table in man-pages(7), but that's it, so feel free to step
in there too.

Git repo on codeberg:
https://codeberg.org/morus/pass-zenity/
and on my website (stagit):
https://menhera.hair/git/pass-zenity/

-- 
A24D 338A 80EA 7222 E06F
AED9 365E E44F 7671 1D9B


More information about the Password-Store mailing list