Permalink
Browse files

Merge pull request #212 from FredDeschenes/battery-info-unavailable

Don't display battery info if not available
  • Loading branch information...
denysdovhan committed Jan 11, 2018
2 parents 2b26e79 + 7cfe264 commit e04b9cc7307885c157fd78bfe1fce527df86bddf
Showing with 2 additions and 0 deletions.
  1. +2 −0 spaceship.zsh
View
@@ -1086,6 +1086,8 @@ spaceship_battery() {
[[ -z $battery_data ]] && return
battery_percent="$( echo $battery_data | awk '{print $4}' )"
battery_status="$( echo $battery_data | awk '{print tolower($3)}' )"
else
return
fi
# Remove trailing % and symbols for comparison

0 comments on commit e04b9cc

Please sign in to comment.