f8343b0fd92bb8ebaa9e1a4e78540e27cd4622d3
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #1457 from NeuralSandwich/master
Battery plugin: Fixed Kernel type detection
Diff
1diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh
2index 9f404088a0bf66a8cedc4b0b49f0a67f9d1ebb4f..95f8906321a948c4d0228c6ba0f580cd67556d73 100644
3--- a/plugins/battery/battery.plugin.zsh
4+++ b/plugins/battery/battery.plugin.zsh
5@@ -8,7 +8,7 @@
6 # Modified to add support for Apple Mac #
7 ###########################################
8
9-if [[ $(uname) -eq "Darwin" ]] ; then
10+if [[ $(uname) == "Darwin" ]] ; then
11
12 function battery_pct_remaining() {
13 if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
14@@ -46,7 +46,7 @@ if [[ $(uname) -eq "Darwin" ]] ; then
15 fi
16 }
17
18-elif [[ $(uname) -eq "Linux" ]] ; then
19+elif [[ $(uname) == "Linux" ]] ; then
20
21 if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
22 function battery_pct_remaining() { echo "$(acpi | cut -f2 -d ',' | tr -cd '[:digit:]')" }