wit-debian-gui/window-resets.go

64 lines
1.9 KiB
Go

package main
import ( "log"
"git.wit.org/wit/gui"
)
func tabResets(w *gui.Node) *gui.Node {
if (w == nil) {
gui.Config.Title = "resets window"
gui.Config.Width = 240
gui.Config.Height = 280
gui.Config.Exit = customExit
w = gui.NewWindow()
}
newTab := w.AddTab("tabResets()", nil)
/////////////////////////////////////////////////////////////////////////////
gNode2 := newTab.AddGroup("reset windows")
gNode2.NewLabel("Working Stuff")
gNode2.AddButton("resolv.conf", func (*gui.Node) {
log.Println("supposed to make the resolv.conf window")
resolvWindow(nil)
})
gNode2.AddButton("Set xterm Font Size", func (*gui.Node) {
// gui.CreateWindow("Set xterm Font Size", "vars", 200, 200, makeWindowXresources)
xtermSettings(w)
})
/////////////////////////////////////////////////////////////////////////////
resetsNode := newTab.AddGroup("apt Resets")
resetsNode.AddButton("apt sources", func (*gui.Node) {
xterm("apt -y install apt-file; apt-file update")
})
resetsNode.AddButton("purge rc-only", func (*gui.Node) {
xterm("dpkg -l |grep ^rc | awk '{print $2}' |xargs apt remove --purge -y")
})
resetsNode.AddButton("install defaults", func (*gui.Node) {
xterm("./resources/bin/setup-packages-default")
})
resetsNode.AddButton("install kvm", func (*gui.Node) {
xterm("./resources/bin/setup-packages-kvm")
})
/////////////////////////////////////////////////////////////////////////////
gn := newTab.AddGroup("GO")
gn.AddButton("go install golang.org/x/tools/gopls@latest", func (*gui.Node) {
xterm("go install golang.org/x/tools/gopls@latest")
})
gn.AddButton("vim-go clone", func (*gui.Node) {
xterm("git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go")
})
gn.AddButton("vim-go vimrc settings", func (*gui.Node) {
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 newTab
}