diff options
Diffstat (limited to 'plugins/battery/battery.plugin.zsh')
-rw-r--r-- | plugins/battery/battery.plugin.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 0bb9e77f0..8f398cfb3 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -64,7 +64,7 @@ if [[ "$OSTYPE" = darwin* ]] ; then [[ $(ioreg -rc "AppleSmartBattery"| grep '^.*"IsCharging"\ =\ ' | sed -e 's/^.*"IsCharging"\ =\ //') == "Yes" ]] } -elif [[ $(uname) == "Linux" ]] ; then +elif [[ "$OSTYPE" = linux* ]] ; then function battery_is_charging() { ! [[ $(acpi 2>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] @@ -100,7 +100,7 @@ elif [[ $(uname) == "Linux" ]] ; then else color='red' fi - echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}" + echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}" else echo "∞" fi |