TUI IDE multiplexer?!
golang
tui
ide
1package main
2
3import (
4 "log"
5
6 "github.com/gookit/config/v2"
7)
8
9type Config struct {
10 FileManager string `default:"treefiddy"`
11 Editor string `default:"hx"`
12 Shell string `default:"sh"`
13 UI struct {
14 FocusFollowsMouse bool `default:"false"`
15 }
16}
17
18func loadConfig() (*Config, error) {
19 c := &Config{}
20 config.WithOptions(config.ParseDefault)
21 err := config.BindStruct("", c)
22 config.LoadOSEnvs(map[string]string{"FILEMANAGER": "FileManager", "EDITOR": "Editor", "SHELL": "Shell"})
23
24 log.Println(c)
25
26 return c, err
27}