2022-01-26 06:54:36 -08:00
|
|
|
package segments
|
2019-03-13 04:14:30 -07:00
|
|
|
|
2022-01-26 04:53:35 -08:00
|
|
|
import (
|
2023-01-05 12:57:38 -08:00
|
|
|
"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 04:53:35 -08:00
|
|
|
)
|
2022-01-26 01:23:18 -08:00
|
|
|
|
2022-01-26 05:10:18 -08:00
|
|
|
type Root struct {
|
2022-01-26 04:53:35 -08:00
|
|
|
props properties.Properties
|
2024-07-02 03:02:57 -07:00
|
|
|
env runtime.Environment
|
2019-03-13 04:14:30 -07:00
|
|
|
}
|
|
|
|
|
2022-01-26 05:26:56 -08:00
|
|
|
func (rt *Root) Template() string {
|
2022-02-01 05:07:58 -08:00
|
|
|
return " \uF0E7 "
|
2019-03-13 04:14:30 -07:00
|
|
|
}
|
|
|
|
|
2022-01-26 05:26:56 -08:00
|
|
|
func (rt *Root) Enabled() bool {
|
2022-01-23 12:37:51 -08:00
|
|
|
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
|
|
|
|
}
|