You are not logged in.
I'm wondering if I can open 2 GUI applications from one openbox menu entry.
Normally they look like this:
<item label="New Item">
<action name="Execute">
<execute>command 1</execute>
</action>
</item>
I'd like to add an extra <action> like this:
<item label="New Item">
<action name="Execute">
<execute>command 1</execute>
</action>
<action name="Execute">
<execute>command 2</execute>
</action>
</item>
More specifically this:
<item label="FoxPad">
<action name="Execute">
<execute>mousepad /path/to/text1.txt /path/to/text2.txt</execute>
</action>
<action name="Execute">
<execute>firefox https://url.to.site</execute>
</action>
</item>
POSSIBLE?
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Try it!
I've seen things like that so it ought to be possible.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
This might work:
<item label="FoxPad">
<action name="Execute">
<execute>mousepad /path/to/text1.txt /path/to/text2.txt</execute>
<execute>firefox https://url.to.site</execute>
</action>
</item>
The "</action>" terminates the action spawned by the keybind so you only want one.
The other option might be be to string the actions together (or write a script)
<execute>mousepad file1 file2 && firefox</execute>
You must unlearn what you have learned.
-- yoda
Offline
@PackRat
I saw that 2 action thing in a page talking about "keubinds" in the rc.zml that's why I was wondering it it would work in "menu.xml" as I didn't want start a shell.
<execute>mousepad file1 file2 && firefox</execute>
Could not find an example of that working but will try
Thank you
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
You can probably accomplish this with a openbox pipe menu.
Do a search for pipe menu scripts and you may find one you can adapt.
quick hack -
#!/bin/sh
# example script (hack) to lunch two
# actions from openbox menu
EDITOR=`sublime_text ~/.xinitrc`
BROWSER=`firefox www.mlb.com`
while :; do
$EDITOR
$BROWSER
done
adjust EDITOR and BOWSER to your specific use case and launch the script from menu or key bind. It works from the terminal. Don't have openbox installed on this particular laptop so can't test window manager specifics.
You must unlearn what you have learned.
-- yoda
Offline