summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 1 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 7ce82e0a..c1d1abf0 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -240,10 +240,8 @@ prompt_battery() {
local current_capacity=$(echo $raw_data | grep CurrentCapacity | awk '{ print $5 }')
if [[ -n "$max_capacity" && -n "$current_capacity" ]]; then
- typeset -F 2 current_capacity
- current_capacity="$current_capacity"+0.00001
typeset -i 10 bat_percent
- bat_percent=$(( (current_capacity / max_capacity) * 100 ))
+ bat_percent=$(( (current_capacity * 100) / max_capacity ))
fi
# logic for string output