File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,20 @@ func setupSysTrayReal() {
124124
125125 configs := getConfigs ()
126126
127- for _ , config := range configs {
128- entry := systray .AddMenuItem (config .Name , "" )
129- mConfigCheckbox = append (mConfigCheckbox , entry )
130- // decorate configs
131- gliph := " ☐ "
132- if * configIni == config .Localtion {
133- gliph = " 🗹 "
127+ if len (configs ) > 1 {
128+ for _ , config := range configs {
129+ entry := systray .AddMenuItem (config .Name , "" )
130+ mConfigCheckbox = append (mConfigCheckbox , entry )
131+ // decorate configs
132+ gliph := " ☐ "
133+ if * configIni == config .Localtion {
134+ gliph = " 🗹 "
135+ }
136+ entry .SetTitle (gliph + config .Name )
134137 }
135- entry .SetTitle (gliph + config .Name )
138+ } else {
139+ // apply env setting from first config immediately
140+ // applyEnvironment(configs[0].Localtion)
136141 }
137142 //mQuit := systray.AddMenuItem("Quit Plugin", "")
138143
You can’t perform that action at this time.
0 commit comments