waybar-menu(5)
π waybar-menu β the menu property, but make it group chat π
hii bestie π«Ά you just opened waybar-menu(5) from the File Formats Manual, and honestly it's a whole vibe: it's the page all about the menu property in waybar. It's short, it's sweet, and by the end you're gonna be popping menus like a main character π
πΈ OVERVIEW πΈ
okay so listen β¨ some modules support a menu, which is literally the thing that lets you have a popup menu when a defined click is done over the module. that's it. that's the whole premise. cute right? π
β¨ PROPERTIES β¨
so a module that implements a menu needs 3 properties defined in its config. three. that's the whole checklist π
π menu:
- typeof:
string
Action that popups the menu. The possibles actions are:
on-clickβ when you left-click on the module π±οΈon-click-releaseβ when you release left button on the moduleon-double-clickβ when you double left click on the moduleon-triple-clickβ when you triple left click on the moduleon-click-middleβ when you middle click on the module using mousewheelon-click-middle-releaseβ when you release mousewheel button on the moduleon-double-click-middleβ when you double middle click on the moduleon-triple-click-middleβ when you triple middle click on the moduleon-click-rightβ when you right click on the module usingon-click-right-releaseβ when you release right button on the moduleon-double-click-rightβ when you double right click on the moduleon-triple-click-rightβ when you triple middle click on the moduleon-click-backwardβ when you click on the module using mouse backward buttonon-click-backward-releaseβ when you release mouse backward button on the moduleon-double-click-backwardβ when you double click on the module using mouse backward buttonon-triple-click-backwardβ when you triple click on the module using mouse backward buttonon-click-forwardβ when you click on the module using mouse forward buttonon-click-forward-releaseβ when you release mouse forward button on the moduleon-double-click-forwardβ when you double click on the module using mouse forward buttonon-triple-click-forwardβ when you triple click on the module using mouse forward button
ngl that's a lot of click flavors. left, middle, right, backward, forward β single, double, triple, and the whole *-release family too. pick your fighter π₯
π¦ menu-file:
- typeof:
string
Location of the menu descriptor file. There need to be an element of type GtkMenu with id menu. π
π menu-actions:
- typeof:
array
The actions corresponding to the buttons of the menu. The identifiers of each actions needs to exists as an id in the menu-file for it to be linked properly. (iykyk β if the ids don't match up, nothing links, and you'll be sitting there like π)
π§ MENU-FILE π§
The menu-file is an .xml file representing a GtkBuilder. Documentation for it can be found here: https://docs.gtk.org/gtk4/class.Builder.html
Here, it needs to have an element of type GtkMenu with id "menu". Each actions in menu-actions are linked to elements in the menu-file file by the id of the elements. π
π EXAMPLE π
Module config:
"custom/power": {
"format" : "β» ",
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/power_menu.xml",
"menu-actions": {
"shutdown": "shutdown",
"reboot": "reboot",
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate",
},
},
~/.config/waybar/power_menu.xml:
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label">Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="hibernate">
<property name="label">Hibernate</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label">Shutdown</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="delimiter1"/>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot</property>
</object>
</child>
</object>
</interface>
okay a whole power menu, no cap π₯ shutdown, reboot, suspend, hibernate, plus a lil GtkSeparatorMenuItem divider to keep it organized. periodt.
π STYLING MENUS π
menuβ Style for the menumenuitemβ Style for items in the menu
β EXAMPLE: β
menu {
border-radius: 15px;
background: #161320;
color: #B5E8E0;
}
menuitem {
border-radius: 15px;
}
slay π
rounded corners on everything, #161320 background, #B5E8E0 text β it's giving cozy little floating bubble π«§
and that's the whole page bestie!! π that was waybar-menu(5) from the File Formats Manual, dated 2026-02-08 β go forth and pop your menus, you absolute icon ππβ¨
π¦ where this page comes from
- ubuntu resolute: waybar 0.15.0-1 Β· MIT
- ubuntu stonking: waybar 0.15.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms