greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.86k stars 471 forks source link

Revert empty battery state to charging when plugged in #2059

Closed atreyasha closed 3 months ago

atreyasha commented 4 months ago

Hi, I recently migrated to i3status-rust. Thanks for this awesome tool!

Issue

Running i3status-rust on a laptop with the upower driver, I mistakenly left my laptop on overnight and noted that the battery level was around 5% the next day. This showed a critical color and empty icon/status for the battery module. After plugging in power, I expected to see the plugged-in icon. However, because the battery level was below the empty_threshold, the plugged in icon did not show despite the battery being charged, up until the battery level surpassed the empty_threshold.

Feature request

It would be really good to override the empty battery state once power is plugged in. IMO, the state should change from empty to charging, regardless of the current battery level.

Workaround

In the meantime, I am disabling the empty state altogether by setting empty_threshold = -1.

Specs

i3status-rs 0.33.1 on Arch Linux