fix: rename battery group to avoid CSS ID conflict, clean up waybar styles
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 3s

group/battery shared its CSS ID (#battery) with the battery module,
causing padding overrides to affect the group box instead of just the
module. Renamed to group/bat. Moved cpugov into indicators group.
Reorganized style.css sections for clarity.
This commit is contained in:
nevaforget 2026-04-08 10:45:34 +02:00
parent 579a948449
commit e1e80ca414
2 changed files with 50 additions and 42 deletions

View File

@ -17,16 +17,16 @@
"modules-right": [ "modules-right": [
"tray", "tray",
"mpris", "mpris",
"custom/cpugov",
"bluetooth", "bluetooth",
"group/sound", "group/sound",
"backlight", "backlight",
"group/battery", "group/bat",
"group/indicators" "group/indicators"
], ],
"group/indicators": { "group/indicators": {
"orientation": "inherit", "orientation": "inherit",
"modules": [ "modules": [
"custom/cpugov",
"gamemode", "gamemode",
//"custom/updates", //"custom/updates",
"idle_inhibitor", "idle_inhibitor",
@ -58,7 +58,7 @@
"transition-left-to-right": true "transition-left-to-right": true
} }
}, },
"group/battery": { "group/bat": {
"orientation": "inherit", "orientation": "inherit",
"modules": [ "modules": [
"battery", "battery",

View File

@ -12,7 +12,7 @@ window#waybar {
background: alpha(@theme_selected_fg_color, 0.2); background: alpha(@theme_selected_fg_color, 0.2);
} }
/* --- Main groups --- */ /* --- Module areas --- */
.modules-left { .modules-left {
margin: 0; margin: 0;
@ -32,7 +32,7 @@ window#waybar {
border-radius: 0; border-radius: 0;
} }
/* --- Default module box (top-level modules and groups) --- */ /* --- Module boxes --- */
.modules-left>widget>*, .modules-left>widget>*,
.modules-center>widget>*, .modules-center>widget>*,
@ -43,7 +43,6 @@ window#waybar {
background-color: alpha(@theme_selected_bg_color, 0.05); background-color: alpha(@theme_selected_bg_color, 0.05);
} }
/* Exceptions: no box styling */
#workspaces, #workspaces,
#taskbar, #taskbar,
#window { #window {
@ -53,7 +52,8 @@ window#waybar {
background-color: transparent; background-color: transparent;
} }
/* Group children: compact inside group box */ /* --- Group children --- */
widget widget>* { widget widget>* {
padding: 0 6px; padding: 0 6px;
margin: 0; margin: 0;
@ -110,12 +110,30 @@ widget widget > * {
background-color: alpha(@theme_selected_bg_color, 0.5); background-color: alpha(@theme_selected_bg_color, 0.5);
} }
/* --- Misc --- */ #pulseaudio.muted {
color: #cc3436;
}
#mpris { /* --- Battery --- */
border-radius: 0;
margin: 8px 10px 8px 0px; #battery {
padding: 0 10px; padding: 0;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#custom-batsaver {
font-size: 10px;
} }
/* --- Workspaces --- */ /* --- Workspaces --- */
@ -147,32 +165,6 @@ widget widget > * {
text-shadow: inherit; text-shadow: inherit;
} }
/* --- Indicators --- */
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}
#idle_inhibitor.activated {
color: alpha(@theme_selected_bg_color, 0.9);
}
/* --- Taskbar --- */ /* --- Taskbar --- */
#taskbar { #taskbar {
@ -203,6 +195,22 @@ widget widget > * {
opacity: 1; opacity: 1;
} }
/* --- Misc --- */
#mpris {
border-radius: 0;
margin: 8px 10px 8px 0px;
padding: 0 10px;
}
#temperature.critical {
color: #cc3436;
}
#idle_inhibitor.activated {
color: alpha(@theme_selected_bg_color, 0.9);
}
menu { menu {
border-radius: 4px; border-radius: 4px;
} }