diff --git a/.config/waybar/config b/.config/waybar/config index a0164e4..99fda57 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -2,7 +2,7 @@ "height": 27, // Waybar height (to be removed for auto height) "modules-left": ["sway/workspaces", "sway/mode", "custom/media"], "modules-center": ["sway/window"], - "modules-right": ["backlight", "pulseaudio", "memory", "cpu", "network", "battery", "temperature", "clock", "tray"], + "modules-right": ["backlight", "pulseaudio", "memory", "cpu", "network", "battery", "temperature", "clock", "custom/power", "tray"], // Modules configuration "sway/workspaces": { "disable-scroll": true, @@ -97,5 +97,9 @@ "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": " ", + "on-click": "swaynag -t warning -m 'Menu gestion alimentation' -b 'Déconnexion' 'swaymsg exit' -b 'Veille' 'swaymsg exec systemctl suspend' -b 'Arrêter' 'shutdown now'" } } diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 39b7d28..3591b12 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -190,6 +190,11 @@ label:focus { background-color: #ffa000; } +#custom-power { + margin: 0 10px; + color: red; +} + #temperature { background-color: inherit; border-bottom: 3px solid #f50a4d;