obmenu-generator
obmenu-generator copied to clipboard
Feature request: support prompts for actions
Openbox actions can have a prompt specified, which brings up a dialog box displaying the message with a Yes/No button. I use prompts for shutdown, restart, and suspend actions, for example. Currently, I have to add these prompts in manually after generating the menu. It would be nice if prompts could be put in schema.pl instead as an optional 4th argument for an item. The syntax for the prompt in menu.xml is:
<item ...><action ...><command>...</command><prompt>Message text</prompt></action><item>
For now, items with actions can be added by using the raw
entry:
our $SCHEMA = [
# ...
{raw => q(<item ...><action ...><command>...</command><prompt>Message text</prompt></action<item>)},
# ...
]
Thanks for the suggestion. I didn't know about the raw entry. It's a decent workaround, except that if you use icons, with this method you have to hardcode the icon path and manually update it if you change the icon theme. (Unless I'm missing something.)