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

25 lines
392 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 (
"oh-my-posh/environment"
"oh-my-posh/properties"
)
2022-01-26 05:10:18 -08:00
type Root struct {
props properties.Properties
env environment.Environment
2019-03-13 04:14:30 -07:00
}
func (rt *Root) Template() string {
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
}
func (rt *Root) Init(props properties.Properties, env environment.Environment) {
2019-03-13 04:14:30 -07:00
rt.props = props
rt.env = env
}