Closed wh1tevs closed 3 years ago
Hi, welcome back!
This was not possible so far. I just pushed a commit that adds CLI options that mirror the ones from the native bemenu tools. (Not part of a proper release yet)
I don't know if you can make bemenu display multiline prompts. The current state is fine for me. If you can make the native bemenu show multiline prompts then please let me know and I'll add the same to pinentry-bemenu.
BEMENU_OPTS
is also not supported (yet)
Okay, thanks. How pass options after update, in gpg-agent.conf?
For the moment you would have to create a wrapper script to pass the options.
BEMENU_OPTS
should now also work.
~It's dont work if called by gpg, but works if called directly by /usr/local/bin/pinentry-bemenu
. And if -p
dont specified prompt is empty (it's meant be?).~
UPD: sorry miss this
For the moment you would have to create a wrapper script to pass the options.
Thanks.
gpg-agent actively filters the environment passed to pinentry, so the script is necessary.
Maybe I should move the option parsing into libbemenu so it can be reused, you wouldn't have to keep up with the options in bemenu and bemenu-run then either?
@Cloudef Sure, that would be great!
@t-8ch Pushed some wip code:
https://github.com/Cloudef/bemenu/blob/wip-argument-parsing-in-library/lib/options.c
https://github.com/Cloudef/bemenu/blob/wip-argument-parsing-in-library/lib/bemenu.h#L1051-L1086
Does the interface look all right? I won't be using getopt in the library, as it isn't dmenu compatible.
Not in the public header right now, but bm_menu_apply_option
will be public too, in case you want to control the argument parsing fully.
@Cloudef The interface looks fine. At the moment I have one option that is not taken from bemenu, namely --debug
.
I'd like to keep it but am not sure if it would be better for bemenu to expose its argument parsing library or to provide some callback mechanism for unknown arguments.
You can have your own parsing in top of the bemenu's, as the parser will not be fatal for unknown arguments. Also since the bemenu's options are described, you can even skip bemenu's parsing completely if you want. I can make the parser callback for unknown arguments 🤔 Might be good feature to avoid writing your own parser.
Bemenu get_available_options will let you generate --help or manpage.
You can have your own parsing in top of the bemenu's, as the parser will not be fatal for unknown arguments.
I'm not sure how this would mix with custom options taking or not taking parameters.
Hello, it's me again) How can i pass args to
bemenu
? I tried to use~/.config/environment.d/.conf
, but this has no effect. Also triedEnvironment="BEMENU_OPTS=\"-H 30...\""
direct in systemd unit, but this doesn't works to.And i have no line breaks, it is okay without opts or no?