Merge pull request #29 from dracula/fix_ac

fixed #25
This commit is contained in:
Dane Williams 2020-05-26 15:33:25 -07:00 committed by GitHub
commit efe6ff2220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1 +1 @@
☁ 57° Pleasanton, CA
☀ 100° Pleasanton, CA

View file

@ -1,4 +1,5 @@
#!/usr/bin/env bash
linux_acpi() {
arg=$1
BAT=$(ls -d /sys/class/power_supply/BAT* | head -1)
@ -28,6 +29,7 @@ linux_acpi() {
esac
fi
}
battery_percent()
{
# Check OS
@ -69,7 +71,7 @@ battery_status()
;;
esac
if [[ "$status" = 'discharging' ]] || [[ "$status" = 'Discharging' ]]; then
if [ $status = 'discharging' ] || [ $status = 'Discharging' ]; then
echo ''
else
echo 'AC '