feat: add brightness slider to Waybar backlight module
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s

Wrap backlight in a drawer group with backlight/slider, mirroring the
existing sound group pattern. Slider appears on hover/click.
This commit is contained in:
nevaforget 2026-04-09 11:43:36 +02:00
parent b6beabe500
commit 48b0de071e
2 changed files with 43 additions and 1 deletions

View File

@ -19,7 +19,7 @@
"mpris",
"bluetooth",
"group/sound",
"backlight",
"group/brightness",
"group/bat",
"group/indicators"
],
@ -58,6 +58,17 @@
"transition-left-to-right": true
}
},
"group/brightness": {
"orientation": "inherit",
"modules": [
"backlight",
"backlight/slider"
],
"drawer": {
"transition-duration": 500,
"transition-left-to-right": true
}
},
"group/bat": {
"orientation": "inherit",
"modules": [

View File

@ -66,6 +66,7 @@ widget widget>* {
#sys,
#stats,
#sound,
#brightness,
#indicators {
padding: 0 4px;
color: alpha(@theme_text_color, 0.5);
@ -114,6 +115,36 @@ widget widget>* {
color: #cc3436;
}
/* --- Brightness --- */
#backlight-slider {
padding-left: 10px;
padding-right: 10px;
}
#backlight-slider slider {
min-height: 0px;
min-width: 0px;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
background-color: @insensitive_bg_color;
}
#backlight-slider trough {
min-height: 4px;
min-width: 80px;
border-radius: 5px;
background-color: alpha(@theme_selected_bg_color, 0.3);
}
#backlight-slider highlight {
min-width: 5px;
border-radius: 5px;
background-color: alpha(@theme_selected_bg_color, 0.5);
}
/* --- Battery group (hidden when empty, requires Waybar PR #4941) --- */
#bat.empty,