add logout option to waybar

This commit is contained in:
2026-01-25 17:45:08 +01:00
parent 6013417cd5
commit c3e6cd99a0
4 changed files with 12 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ x = 0
y = 0 y = 0
[window] [window]
opacity = 0.9 opacity = 0.95
[general] [general]
import = ["~/.cache/wal/colors-alacritty.toml"] import = ["~/.cache/wal/colors-alacritty.toml"]

View File

@@ -233,13 +233,14 @@
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
}, },
"custom/power": { "custom/power": {
"format": "⏻ ", "format": "⏻",
"tooltip": false, "tooltip": false,
"menu": "on-click", "menu": "on-click",
"menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
"menu-actions": { "menu-actions": {
"shutdown": "shutdown", "shutdown": "shutdown",
"reboot": "reboot", "reboot": "reboot",
"logout": "loginctl terminate-session \"$XDG_SESSION_ID\"",
"suspend": "systemctl suspend", "suspend": "systemctl suspend",
"hibernate": "systemctl hibernate" "hibernate": "systemctl hibernate"
} }

View File

@@ -14,6 +14,11 @@
<child> <child>
<object class="GtkSeparatorMenuItem" id="delimiter1"/> <object class="GtkSeparatorMenuItem" id="delimiter1"/>
</child> </child>
<child>
<object class="GtkMenuItem" id="logout">
<property name="label">Logout</property>
</object>
</child>
<child> <child>
<object class="GtkMenuItem" id="suspend"> <object class="GtkMenuItem" id="suspend">
<property name="label">Suspend</property> <property name="label">Suspend</property>

View File

@@ -350,3 +350,7 @@ label:focus {
#privacy-item.audio-out { #privacy-item.audio-out {
background-color: #0069d4; background-color: #0069d4;
} }
#custom-power {
padding: 0px 8px;
}