mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-14 06:54:05 -08:00
20 lines
310 B
Go
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
|
|
}
|