From 81a7fc52a8b7f69745805a63a786dc7f7f4782cf Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Tue, 20 Aug 2019 22:33:49 -0400 Subject: [PATCH] Fix fully charged indicator pmset shows `0:00` when charged. Nothing when charging/discharging Handle this edge case --- modules/power/battery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/power/battery.go b/modules/power/battery.go index f0ea53ba..5df33242 100644 --- a/modules/power/battery.go +++ b/modules/power/battery.go @@ -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 = "∞" }