Fix spacing when battery percentage isn't available
This commit is contained in:
parent
ba6412a5b9
commit
2607300beb
1 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,8 @@ battery_percent()
|
||||||
# Check OS
|
# Check OS
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Linux)
|
Linux)
|
||||||
linux_acpi percent
|
percent=$(linux_acpi percent)
|
||||||
|
[ -n "$percent" ] && echo " $percent"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Darwin)
|
Darwin)
|
||||||
|
@ -74,7 +75,7 @@ battery_status()
|
||||||
if [ $status = 'discharging' ] || [ $status = 'Discharging' ]; then
|
if [ $status = 'discharging' ] || [ $status = 'Discharging' ]; then
|
||||||
echo ''
|
echo ''
|
||||||
else
|
else
|
||||||
echo 'AC '
|
echo 'AC'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue