Fixing drawer.

This commit is contained in:
ediblerope 2026-05-13 12:49:39 +01:00
parent 93c35015e4
commit 0f9755800e

View file

@ -298,7 +298,7 @@
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [ "pulseaudio" "tray" "custom/power" ];
modules-right = [ "group/tray-drawer" "custom/power" ];
"hyprland/workspaces" = {
format = "{name}";
@ -311,6 +311,20 @@
tooltip-format = "<big>{:%A, %d %B %Y}</big>\n<tt><small>{calendar}</small></tt>";
};
"group/tray-drawer" = {
orientation = "horizontal";
drawer = {
transition-duration = 500;
transition-left-to-right = false;
};
modules = [ "custom/tray-handle" "pulseaudio" "tray" ];
};
"custom/tray-handle" = {
format = ""; # Nerd Font arrow
tooltip = false;
};
# Pulseaudio module, now conditionally visible
pulseaudio = {
format = "{icon} {volume}%";
@ -322,14 +336,12 @@
};
on-click = "pavucontrol";
scroll-step = 5;
exec-if = "test -f /tmp/waybar-tray-drawer-state"; # Only show if drawer is "open"
};
# Tray module, now conditionally visible
tray = {
icon-size = 16;
spacing = 8;
exec-if = "test -f /tmp/waybar-tray-drawer-state"; # Only show if drawer is "open"
};
"custom/power" = {