File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,20 @@ func setupSysTrayReal() {
124
124
125
125
configs := getConfigs ()
126
126
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 )
134
137
}
135
- entry .SetTitle (gliph + config .Name )
138
+ } else {
139
+ // apply env setting from first config immediately
140
+ // applyEnvironment(configs[0].Localtion)
136
141
}
137
142
//mQuit := systray.AddMenuItem("Quit Plugin", "")
138
143
You can’t perform that action at this time.
0 commit comments