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

@ -6,7 +6,7 @@ import "." as M
M.BarSection {
id: root
spacing: M.Theme.moduleSpacing
opacity: M.Modules.battery && (UPower.displayDevice?.isLaptopBattery ?? false) ? 1 : 0
opacity: M.Modules.battery.enable && (UPower.displayDevice?.isLaptopBattery ?? false) ? 1 : 0
visible: opacity > 0
tooltip: {
const state = root.charging ? "Charging" : "Discharging";