🌱 update default config with a menu example
This commit is contained in:
parent
c3581fb66b
commit
f3ed5ca5af
|
@ -30,7 +30,8 @@
|
|||
"battery",
|
||||
"battery#bat2",
|
||||
"clock",
|
||||
"tray"
|
||||
"tray",
|
||||
"custom/power"
|
||||
],
|
||||
// Modules configuration
|
||||
// "sway/workspaces": {
|
||||
|
@ -198,5 +199,17 @@
|
|||
"escape": true,
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
||||
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
|
||||
},
|
||||
"custom/power": {
|
||||
"format" : "⏻ ",
|
||||
"tooltip": false,
|
||||
"menu": "on-click",
|
||||
"menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
|
||||
"menu-actions": {
|
||||
"shutdown": "shutdown",
|
||||
"reboot": "reboot",
|
||||
"suspend": "systemctl suspend",
|
||||
"hibernate": "systemctl hibernate"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?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>
|
Loading…
Reference in New Issue