diff options
author | Robby Russell <robby@planetargon.com> | 2012-12-02 13:08:30 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2012-12-02 13:08:30 -0800 |
commit | f8343b0fd92bb8ebaa9e1a4e78540e27cd4622d3 (patch) | |
tree | 185c9f7fc4f93a2103c5a339462b32d04b010b58 /plugins/battery | |
parent | fcc8b19253136e0f8d18d8e830c60ec64c6cc3e0 (diff) | |
parent | 5991bf3ac1865819fd43cbf38681c71c3d5c9ecb (diff) | |
download | zsh-f8343b0fd92bb8ebaa9e1a4e78540e27cd4622d3.tar.gz zsh-f8343b0fd92bb8ebaa9e1a4e78540e27cd4622d3.tar.bz2 zsh-f8343b0fd92bb8ebaa9e1a4e78540e27cd4622d3.zip |
Merge pull request #1457 from NeuralSandwich/master
Battery plugin: Fixed Kernel type detection
Diffstat (limited to 'plugins/battery')
-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 9f404088a..95f890632 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -8,7 +8,7 @@ # Modified to add support for Apple Mac # ########################################### -if [[ $(uname) -eq "Darwin" ]] ; then +if [[ $(uname) == "Darwin" ]] ; then function battery_pct_remaining() { if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then @@ -46,7 +46,7 @@ if [[ $(uname) -eq "Darwin" ]] ; then fi } -elif [[ $(uname) -eq "Linux" ]] ; then +elif [[ $(uname) == "Linux" ]] ; then if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then function battery_pct_remaining() { echo "$(acpi | cut -f2 -d ',' | tr -cd '[:digit:]')" } |