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:
parent
c832db9ddb
commit
81a7fc52a8
@ -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 = "∞"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user