mirror of
https://github.com/Alexays/Waybar.git
synced 2026-06-10 07:51:39 +00:00
Page:
Module: Custom: Menu
Pages
Abrar's Waybar
Add a custom plugin.
Anik's waybar config (super waybar)
Ariacna Æsama
Arkboi
Chocolate & Cream
Configuration
Dynamic wallust powered waybar
ERS’ waybar
Examples
FAQ
Home
Installation
JohanChane's waybar
Module: Backlight Slider
Module: Backlight
Module: Battery
Module: Bluetooth
Module: CFFI
Module: CPU
Module: Cava
Module: Cava: GLSL
Module: Cava: Raw
Module: Clock
Module: Custom
Module: Custom: Examples
Module: Custom: Menu
Module: Disk
Module: Dwl
Module: Gamemode
Module: Group
Module: Hyprland
Module: Idle Inhibitor
Module: Image
Module: JACK
Module: Keyboard State
Module: Language
Module: Load
Module: MPD
Module: MPRIS
Module: Memory
Module: Network
Module: Niri
Module: PowerProfilesDaemon
Module: Privacy
Module: PulseAudio Slider
Module: PulseAudio
Module: River
Module: Sndio
Module: Sway
Module: Systemd failed units
Module: Taskbar
Module: Temperature
Module: Tray
Module: UPower
Module: User
Module: Wayfire
Module: WirePlumber
Module: Workspaces
Modules
Simple and Attractive
States
Styling
That's all bitches
Themes
Thos' config based on pywal
Tray Applets
Writing Modules
apachaiz's waybar
d00m1k's configuration
lingllqs's simple dark style configuration
mechabar
mudi4's waybar
new waylyrics
nitrobigchill's waybar
rdk‐codes configuration
waybar config
No results
5
Module: Custom: Menu
bokicoder edited this page 2026-03-12 00:30:44 +08:00
Some modules support a menu, which allows to have a popup menu when a defined click is done over the module.
Config
A module that implements a menu needs 3 properties defined in its config :
| option | typeof | default | description |
|---|---|---|---|
menu |
string | Action that popups the menu. i.e: on-click |
|
menu-file |
string | Location of the menu descriptor file. There need to be an element of type GtkMenu with id menu. | |
menu-actions |
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. |
menu-file
The menu-file is an .xml file representing a GtkBuilder. Documentation for it can be found here :
https://docs.gtk.org/gtk3/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>
Style
menuStyle for the menumenuitemStyle for items in the menu
Example:
menu {
border-radius: 15px;
background: #161320;
color: #B5E8E0;
}
menuitem {
border-radius: 15px;
}
- Home
- Installation
- Configuration
- Styling
- Examples
- FAQ
- Modules:
- Backlight/Slider
- Backlight
- Battery
- Bluetooth
- CPU
- Cava
- CFFI
- Clock
- Custom
- DWL
- Disk
- Gamemode
- Group
- Hyprland
- Idle Inhibitor
- Image
- JACK
- Keyboard State
- Language
- Load
- MPD
- MPRIS
- Memory
- Network
- Niri
- Power Profiles Daemon
- Privacy
- PulseAudio/Slider
- PulseAudio
- River
- Sndio
- Sway
- Systemd failed units
- Taskbar
- Temperature
- Tray
- UPower
- User
- Wayfire
- WirePlumber
- Workspaces
- Writing Modules
License
Waybar is licensed under the MIT license. See LICENSE for more information.