restructure module config to objects with enable + extra options

This commit is contained in:
Damocles 2026-04-12 17:36:38 +02:00
parent 4109078a91
commit 55ab5bc4e7
9 changed files with 123 additions and 117 deletions

View file

@ -5,7 +5,7 @@ import "." as M
M.BarSection {
id: root
spacing: M.Theme.moduleSpacing
opacity: M.Modules.backlight && percent > 0 ? 1 : 0
opacity: M.Modules.backlight.enable && percent > 0 ? 1 : 0
visible: opacity > 0
tooltip: "Brightness: " + root.percent + "%"
@ -22,7 +22,8 @@ M.BarSection {
}
function adjust(delta) {
adjProc.cmd = delta > 0 ? "light -A 5" : "light -U 5";
const step = M.Modules.backlight.step || 5;
adjProc.cmd = delta > 0 ? "light -A " + step : "light -U " + step;
adjProc.running = true;
}