.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "waybar-menu" "5" "2024-09-15" .PP .SH NAME .PP waybar - menu property .PP .SH OVERVIEW .PP .PP Some modules support a '\&menu'\&, which allows to have a popup menu whan a defined click is done over the module.\& .PP .SH PROPERTIES .PP A module that implements a '\&menu'\& needs 3 properties defined in its config : .PP \fBmenu\fR: .br typeof: string .br Action that popups the menu.\& The possibles actions are : .PP .TS allbox;c c l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx l lx. T{ \fBOption\fR T} T{ \fBDescription\fR T} T{ \fBon-click\fR T} T{ When you left-click on the module T} T{ \fBon-click-release\fR T} T{ When you release left button on the module T} T{ \fBon-double-click\fR T} T{ When you double left click on the module T} T{ \fBon-triple-click\fR T} T{ When you triple left click on the module T} T{ \fBon-click-middle\fR T} T{ When you middle click on the module using mousewheel T} T{ \fBon-click-middle-release\fR T} T{ When you release mousewheel button on the module T} T{ \fBon-double-click-middle\fR T} T{ When you double middle click on the module T} T{ \fBon-triple-click-middle\fR T} T{ When you triple middle click on the module T} T{ \fBon-click-right\fR T} T{ When you right click on the module using T} T{ \fBon-click-right-release\fR T} T{ When you release right button on the module T} T{ \fBon-double-click-right\fR T} T{ When you double right click on the module T} T{ \fBon-triple-click-right\fR T} T{ When you triple middle click on the module T} T{ \fBon-click-backward\fR T} T{ When you click on the module using mouse backward button T} T{ \fBon-click-backward-release\fR T} T{ When you release mouse backward button on the module T} T{ \fBon-double-click-backward\fR T} T{ When you double click on the module using mouse backward button T} T{ \fBon-triple-click-backward\fR T} T{ When you triple click on the module using mouse backawrd button T} T{ \fBon-click-forward\fR T} T{ When you click on the module using mouse forward button T} T{ \fBon-click-forward-release\fR T} T{ When you release mouse forward button on the module T} T{ \fBon-double-click-forward\fR T} T{ When you double click on the module using mouse forward button T} T{ \fBon-triple-click-forward\fR T} T{ When you triple click on the module using mouse forward button T} .TE .sp 1 \fBmenu-file\fR: .br typeof: string .br Location of the menu descriptor file.\& There need to be an element of type .RS 4 GtkMenu with id \fBmenu\fR.\& .PP .RE \fBmenu-actions\fR: .br typeof: array .br The actions corresponding to the buttons of the menu.\& The identifiers of .RS 4 each actions needs to exists as an id in the '\&menu-file'\& for it to be linked properly.\& .PP .RE .SH MENU-FILE .PP The menu-file is an `.\&xml` file representing a GtkBuilder.\& Documentation for it can be found here : https://docs.\>k.\&org/gtk4/class.\&Builder.\&html .PP Here, it needs to have an element of type GtkMenu with id "menu".\& Eeach actions in \fBmenu-actions\fR are linked to elements in the \fBmenu-file\fR file by the id of the elements.\& .PP .SH EXAMPLE .PP Module config : .nf .RS 4 "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", }, }, .fi .RE .PP ~/.\&config/waybar/power_menu.\&xml : .nf .RS 4 Suspend Hibernate Shutdown Reboot .fi .RE .PP .SH STYLING MENUS .PP .PD 0 .IP \(bu 4 \fBmenu\fR Style for the menu .PD .PP .PD 0 .IP \(bu 4 \fBmenuitem\fR Style for items in the menu .PD .PP .SH EXAMPLE: .PP .nf .RS 4 menu { border-radius: 15px; background: #161320; color: #B5E8E0; } menuitem { border-radius: 15px; } .fi .RE