diff options
author | rjorgenson <rjorgenson@gmail.com> | 2016-11-21 19:51:27 +0300 |
---|---|---|
committer | rjorgenson <rjorgenson@gmail.com> | 2016-11-21 19:51:27 +0300 |
commit | 6d2681d36a5ea0bcd9db889182e7ca1ba72d27ed (patch) | |
tree | fbb94055e9aae188ef72bbc727f7870121566990 /powerlevel9k.zsh-theme | |
parent | b81084100f99f6b79b772a46a6d5a561e82d8743 (diff) |
fixed regex to determine time remaining on linux for battery segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d573f6f9..321c262d 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -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 |