diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 7c5bf6f82..d1adcd0b6 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -117,7 +117,7 @@ elif [[ "$OSTYPE" = linux* ]]; then function battery_pct() { if (( $+commands[acpi] )); then - acpi 2>/dev/null | cut -f2 -d ',' | tr -cd '[:digit:]' + acpi 2>/dev/null | command grep -E '^Battery.*(Disc|C)harging' | cut -f2 -d ',' | tr -cd '[:digit:]' fi }