1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-16 22:31:03 +02:00

fix(upower): round battery percent to whole number (#1058)

This commit is contained in:
Preston Corless 2025-06-20 13:20:27 -04:00 committed by GitHub
parent f125058e79
commit 81ce2c169f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -216,7 +216,7 @@ impl Module<Button> for UpowerModule {
.unwrap_or_default();
let format = format
.replace("{percentage}", &properties.percentage.to_string())
.replace("{percentage}", &properties.percentage.round().to_string())
.replace("{time_remaining}", &time_remaining)
.replace("{state}", battery_state_to_string(state));