You are not logged in.
Pages: 1
I just want to throw this in at the last minute - a tiny script to launch jgmenu or <whatever launches the labwc menu> depending on if the session is using X11 or wayland:
#!/bin/sh
# small wrapper to launch right menu for x11 or wayland
x11_menu=jgmenu_run
wayland_menu=''
# BUNSEN_SESSION_TYPE is exported by bunsenlabs-session
case $BUNSEN_SESSION_TYPE in
x11)
menucmd=$x11_menu
;;
wayland)
menucmd=$wayland_menu
;;
*)
echo "$0: unexpected session type: $BUNSEN_SESSION_TYPE" >&2
exit 1
;;
esac
[ -z "$menucmd" ] && {
echo "$0: no $menucmd is set for session type: $BUNSEN_SESSION_TYPE" >&2
exit 1
}
exec "$menucmd"If the xfce4-panel flame-icon launcher is set to execute 'bl-menu' then it will work regardless of the session type.
Might be nice to be able to use the same xfce4-panel config for both X11 and wayland sessions.
Users won't see any difference, so I'd like to put it in bunsen-configs before the final Carbon build.
Does that seem reasonable?
---
PS I've had a quick look at labwc and it doesn't seem as if there is any command to launch the menu, only keybinds. ![]()
So for Wayland we'd be reduced to using something clunky like xdotool to simulate keybinds. A pity, because it's very useful for scripts to be able to put up custom pipemenus on demand.
Last edited by johnraff (2026-01-08 07:19:31)
...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 )
Online
Does that seem reasonable?
^absolutely!
Great work, big thank you. ![]()
PS I've had a quick look at labwc and it doesn't seem as if there is any command to launch the menu, only keybinds. neutral
So for Wayland we'd be reduced to using something clunky like xdotool to simulate keybinds. A pity, because it's very useful for scripts to be able to put up custom pipemenus on demand.
Unfortunately, I don't have a proper understanding of this. That's why I had years ago in labwc/siduction
I created this right/left click menu, which is still enough for me today.
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu>
<!-- Note: for localization support of menu items "client-menu" has to be removed here -->
<menu id="client-menu">
<item label="Minimize">
<action name="Iconify" />
</item>
<item label="Maximize">
<action name="ToggleMaximize" />
</item>
<item label="Fullscreen">
<action name="ToggleFullscreen" />
</item>
<item label="Decorations">
<action name="ToggleDecorations" />
</item>
<item label="Always on Top">
<action name="ToggleAlwaysOnTop" />
</item>
<!--
Any menu with the id "workspaces" will be hidden
if there is only a single workspace available.
-->
<menu id="workspaces" label="Workspace">
<item label="Move left">
<action name="SendToDesktop" to="left" />
</item>
<item label="Move right">
<action name="SendToDesktop" to="right" />
</item>
<separator />
<item label="Always on Visible Workspace">
<action name="ToggleOmnipresent" />
</item>
</menu>
<item label="Close">
<action name="Close" />
</item>
</menu>
<menu id="root-menu">
<item label="Screenshot">
<action name="Execute">
<command>bash -c "sleep 5; grim"</command>
</action>
</item>
<item label="screenclip">
<action name="Execute">
<command>bash -c "slurp | grim -g -"</command>
</action>
</item>
<item label="Web browser">
<action name="Execute" command="firefox-esr" />
</item>
<item label="Terminal">
<action name="Execute" command="foot" />
</item>
<item label="Thunar">
<action name="Execute" command="thunar" />
</item>
<item label="Conky">
<action name="Execute" command="conky -c ~/.conky/rcmus_conkyrc10" />
</item>
<item label="killConky">
<action name="Execute" command="killall conky" />
</item>
<item label="Reconfigure">
<action name="Reconfigure" />
</item>
<item label="Logout">
<action name="Exit" />
</item>
<item label="Suspend">
<action name="Execute" command="systemctl -i suspend" />
</item>
<item label="Reboot">
<action name="Execute" command="systemctl -i reboot" />
</item>
<item label="Poweroff">
<action name="Execute" command="systemctl -i poweroff" />
</item>
</menu>
<menu id="some-custom-menu">
<item label="Reconfigure">
<action name="Reconfigure" />
</item>
<item label="Exit">
<action name="Exit" />
</item>
</menu>
</openbox_menu>and, I'll do the rest via fuzzel. I know that doesn't help you either... ![]()
Last edited by unklar (2026-01-08 09:50:07)
Offline
PS I've had a quick look at labwc and it doesn't seem as if there is any command to launch the menu, only keybinds.
Yes. That is the case. It's not trivial to implement in a non-hacky way. Same for Openbox I think.
So for Wayland we'd be reduced to using something clunky like xdotool to simulate keybinds. A pity, because it's very useful for scripts to be able to put up custom pipemenus on demand.
Happy to brainstorm requirements/needs/ideas.
Offline
^Hi @malm!
Programatically launched menus is one of the benefits of jgmenu, at least for me, but if it's hard to do nicely with a compositor then it's not the end of the world. With openbox we had xdotool which will emulate keypresses, and there's now ydotool, and yesterday I learned about wtype, both of which look usable on Wayland.
But if you know of any user activity in that direction in the labwc world, then links would be welcome! ![]()
EDIT just found this: https://github.com/labwc/labwc/issues/2726
(Did a search on the labwc issues yesterday but must have used the wrong keywords because nothing came up.)
Last edited by johnraff (2026-01-09 00:53:13)
...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 )
Online
Pages: 1