bemenu icon indicating copy to clipboard operation
bemenu copied to clipboard

Multiline prompt

Open Eragonfr opened this issue 3 years ago • 4 comments

This is a feature request.

Can bemenu support multi line prompts please ? For me that's the only missing option to replace rofi on my computer.

For now bemenu displays \n or return icon in place of trully returning to a new line.

This can be hidden behind a --line-feed option or something like that

Eragonfr avatar Feb 10 '22 18:02 Eragonfr

Is this an option assuming you're in vertical list mode? Either way, could we get more of an explanation?

merrittlj avatar Dec 25 '22 00:12 merrittlj

Is this an option assuming you're in vertical list mode? Either way, could we get more of an explanation?

bemenu -x -p 'Please enter the passphrase to unlock the OpenPGP secret key:\n"Foo Bar <[email protected]>"\n4096-bit RSA key, ID whatever\ncreated 2022-05-06:'

In vertical list mode, the prompt could occupy multiple lines and the list start in the next one, left aligned to the vertical line at the maximum witdh of the prompt's lines.

In horizontal list mode, it could just start after the end of the last line in the prompt.

In the example above, where option -x is used, or if there is no list, it doesn't really matter.


Is this a good-looking solution? No. But letting a long line trail off beyond the end of the screen is worse (I'd say). Besides, it's up to the user to ensure the prompt looks good for their application.

juanmeleiro avatar Dec 25 '22 20:12 juanmeleiro

My idea was to get it working in a similar way to rofi, mainly because I use this as my pinentry program and ssh/gpg/whatever expect to be able to use multi-lines prompts using \n or CR/LF. @juanmeleiro seems to use bemenu in a similar way, and the proposed way of displaying things is not bad.

Eragonfr avatar Dec 30 '22 21:12 Eragonfr