Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Fixes #124
Browse files Browse the repository at this point in the history
  • Loading branch information
matchai committed Dec 28, 2018
1 parent ab7a2de commit 2e2aa99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/__sf_section_battery.fish
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ function __sf_section_battery -d "Displays battery symbol and charge"
set battery_data (upower -i $battery)
set battery_percent (echo $battery_data | grep percentage | awk '{print $2}')
set battery_status (echo $battery_data | grep state | awk '{print $2}')

# Windows machines.
else if type -q acpi
set -l battery_data (acpi -b ^ /dev/null) # Redirect stderr to /dev/null fixes issue #110.
set -l battery_data (acpi -b ^ /dev/null | head -1)

# Return if no battery
[ -z $battery_data ]; and return
Expand Down

0 comments on commit 2e2aa99

Please sign in to comment.