mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 18:42:59 +01:00
fix i3status appening comma to battery charge
This commit is contained in:
parent
c2d9695ec7
commit
dc8de7e3a8
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ pub(crate) async fn battery(bar: Arc<RwLock<Bar>>) {
|
||||||
let txt;
|
let txt;
|
||||||
if let Some(s) = out {
|
if let Some(s) = out {
|
||||||
if let Some(bat) = s.lines().next() {
|
if let Some(bat) = s.lines().next() {
|
||||||
let percent = bat.split(' ').find(|s| s.contains('%')).unwrap_or("0%");
|
let percent = bat.split(&[' ', ','][..]).find(|s| s.contains('%')).unwrap_or("0%");
|
||||||
let state = if bat.contains("Charging") {
|
let state = if bat.contains("Charging") {
|
||||||
BatteryState::Charging
|
BatteryState::Charging
|
||||||
} else if bat.contains("Discharging") {
|
} else if bat.contains("Discharging") {
|
||||||
|
|
Loading…
Reference in a new issue