1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Fix fully charged indicator

pmset shows `0:00` when charged. Nothing when charging/discharging
Handle this edge case
This commit is contained in:
Sean Smith 2019-08-20 22:33:49 -04:00
parent c832db9ddb
commit 81a7fc52a8

View File

@ -95,7 +95,7 @@ func (battery *Battery) formatRemaining(data string) string {
r, _ := regexp.Compile(TimeRegExp)
result := r.FindString(data)
if result == "" {
if result == "" || result == "0:00" {
result = "∞"
}