oh-my-posh/src/platform/shell_windows_nix.go

19 lines
311 B
Go
Raw Normal View History

//go:build !darwin
2022-11-09 11:27:54 -08:00
package platform
import (
2022-11-09 11:27:54 -08:00
"oh-my-posh/platform/battery"
"time"
)
2022-11-09 11:27:54 -08:00
func (env *Shell) BatteryState() (*battery.Info, error) {
defer env.Trace(time.Now(), "BatteryState")
info, err := battery.Get()
if err != nil {
env.Error("BatteryState", err)
return nil, err
}
return info, nil
}