summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Jones <neuralsandwich@gmail.com>2012-12-02 20:39:01 +0000
committerSean Jones <neuralsandwich@gmail.com>2012-12-02 20:39:01 +0000
commit5991bf3ac1865819fd43cbf38681c71c3d5c9ecb (patch)
treed090519211960e5d9c8c74f7596016bc409872cf
parent5f62d2c183f93ef02b79675c6a51950cb530dfcb (diff)
downloadzsh-5991bf3ac1865819fd43cbf38681c71c3d5c9ecb.tar.gz
zsh-5991bf3ac1865819fd43cbf38681c71c3d5c9ecb.tar.bz2
zsh-5991bf3ac1865819fd43cbf38681c71c3d5c9ecb.zip
Fixed Kernel Detection in battery plugin
-rw-r--r--plugins/battery/battery.plugin.zsh4
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:]')" }