i3status-rust
i3status-rust copied to clipboard
Battery block: always highlighted with bg color even on 100%/Full
battery block always shows a bg color highlight even on full charge, I presume the widget still thinks it's a good state not idle yet.
i3status version: 0.20.4 theme: space-villain
i3status-rust config:
...
[[block]]
allow_missing = true
block = "battery"
hide_missing = true
...
[icons]
name = "material-nf"
...
[theme]
name = "space-villain"
[theme.overrides]
separator = ""
cat /sys/class/power_supply/*/status --plain
Full
acpi
Battery 0: Full, 100%
i did fixed it for myself defining a good state bg color as idle one.
[[block]]
allow_missing = true
block = "battery"
hide_missing = true
[block.theme_overrides]
good_bg = "#06060f"
This seems like something that would occur regardless of the theme being used. @GladOSkar is that right (sorry I don't use the battery block on my main machine)?
Yes, battery
just always sets itself as good
when the battery is full (or near full). But i've heard before that some people prefer their bar to be neutral in that case, so it might be worth an option
The block documentation and the code don't match:
good | Minimum battery level, where state is set to good. | No | 60
-- | -- | -- | --
info | Minimum battery level, where state is set to info. | No | 60
warning | Minimum battery level, where state is set to warning. | No | 30
critical | Minimum battery level, where state is set to critical. | No | 15
Yet:
Ok(capacity) => { ‣capacity: u64
if capacity <= self.critical {
State::Critical
} else if capacity <= self.warning {
State::Warning
} else if capacity <= self.info {
State::Info
} else if capacity > self.good {
State::Good
} else {
State::Idle
}
}
So here self.info goes from self.warning - to self.info, i.e. info is the maximum, not the minimum.
BTW a solution could be also have Good mean a maximum. Default to 100 but if say to say, 95%, anything up of that could be Idle.