mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 21:40:08 +00:00
revise mac battery error when mac default date use linux's
This commit is contained in:
parent
20b4d2b43e
commit
d7c449be34
1 changed files with 2 additions and 1 deletions
|
@ -360,7 +360,7 @@ prompt_battery() {
|
||||||
local time_remaining=$(echo $raw_data | grep TimeRemaining | awk '{ print $5 }')
|
local time_remaining=$(echo $raw_data | grep TimeRemaining | awk '{ print $5 }')
|
||||||
if [[ -n $time_remaining ]]; then
|
if [[ -n $time_remaining ]]; then
|
||||||
# this value is set to a very high number when the system is calculating
|
# this value is set to a very high number when the system is calculating
|
||||||
[[ $time_remaining -gt 10000 ]] && local tstring="..." || local tstring=${(f)$(date -u -r $(($time_remaining * 60)) +%k:%M)}
|
[[ $time_remaining -gt 10000 ]] && local tstring="..." || local tstring=${(f)$(/bin/date -u -r $(($time_remaining * 60)) +%k:%M)}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get charge values
|
# Get charge values
|
||||||
|
@ -1088,3 +1088,4 @@ powerlevel9k_init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
powerlevel9k_init "$@"
|
powerlevel9k_init "$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue