oh-my-posh/src/segments/root.go

25 lines
442 B
Go
Raw Normal View History

2022-01-26 06:54:36 -08:00
package segments
2019-03-13 04:14:30 -07:00
import (
"github.com/jandedobbeleer/oh-my-posh/src/properties"
2024-07-02 03:02:57 -07:00
"github.com/jandedobbeleer/oh-my-posh/src/runtime"
)
2022-01-26 05:10:18 -08:00
type Root struct {
props properties.Properties
2024-07-02 03:02:57 -07:00
env runtime.Environment
2019-03-13 04:14:30 -07:00
}
func (rt *Root) Template() string {
2022-02-01 05:07:58 -08:00
return " \uF0E7 "
2019-03-13 04:14:30 -07:00
}
func (rt *Root) Enabled() bool {
return rt.env.Root()
2019-03-13 04:14:30 -07:00
}
2024-07-02 03:02:57 -07:00
func (rt *Root) Init(props properties.Properties, env runtime.Environment) {
2019-03-13 04:14:30 -07:00
rt.props = props
rt.env = env
}