oh-my-posh/src/platform/shell_windows_nix.go
2023-01-17 10:56:12 +01:00

20 lines
310 B
Go

//go:build !darwin
package platform
import (
"time"
"github.com/jandedobbeleer/oh-my-posh/src/platform/battery"
)
func (env *Shell) BatteryState() (*battery.Info, error) {
defer env.Trace(time.Now())
info, err := battery.Get()
if err != nil {
env.Error(err)
return nil, err
}
return info, nil
}