package main import ( "go.wit.com/lib/gadgets" "go.wit.com/log" ) var tabWin *gadgets.BasicWindow func tabResets() { if tabWin != nil { tabWin.Toggle() return } tabWin = gadgets.NewBasicWindow(myGui, "resets window") ///////////////////////////////////////////////////////////////////////////// g1 := tabWin.Box().NewGroup("") g1.NewLabel("Working Stuff") g1.NewButton("Configure resolv.conf", func() { log.Println("supposed to make the resolv.conf window") resolvWindow() }) g1.NewButton("Generic SSH Window", func() { sshGenericWindow() }) g1.NewButton("Configure xterm", func() { xtermSettings(nil) }) g1.NewButton("update DNS (IPv6)", func() { updateDNS(nil) }) aptGroup(tabWin.Box()) // 'stretchy' doesn't work here. this is because it was set on the hbox(?) // TODO: tear down all the gui elements and recreate them from the node tree // tabWin.Box().MakeBasicControlsPage("testing stuff") ///////////////////////////////////////////////////////////////////////////// gn := tabWin.Box().NewGroup("GO") gn.NewButton("go install golang.org/x/tools/gopls@latest", func() { xterm("go install golang.org/x/tools/gopls@latest") }) g := tabWin.Box().NewGroup("VIM") g.NewButton("vim-go clone", func() { xterm("git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go") }) g.NewButton("vim-go vimrc settings", func() { log.Println("echo", "let g:go_def_mode='gopls'\nlet g:go_info_mode='gopls'") // xterm("echo", "let g:go_def_mode='gopls'\nlet g:go_info_mode='gopls'") }) return }