mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
fixed regex to determine time remaining on linux for battery segment
This commit is contained in:
parent
b81084100f
commit
6d2681d36a
1 changed files with 1 additions and 1 deletions
|
@ -391,7 +391,7 @@ prompt_battery() {
|
|||
local time_remaining=$(acpi | awk '{ print $5 }')
|
||||
if [[ $time_remaining =~ rate ]]; then
|
||||
local tstring="..."
|
||||
elif [[ $time_remaining =~ "[:digit:]+" ]]; then
|
||||
elif [[ $time_remaining =~ "[[:digit:]]+" ]]; then
|
||||
local tstring=${(f)$(date -u -d "$(echo $time_remaining)" +%k:%M)}
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue