itd/cmd/itgui/main.go

29 lines
621 B
Go
Raw Normal View History

2021-08-26 04:18:24 +00:00
package main
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
)
var SockPath = "/tmp/itd/socket"
func main() {
2021-08-26 15:47:17 +00:00
// Create new app
2021-08-26 04:18:24 +00:00
a := app.New()
2021-08-26 15:47:17 +00:00
// Create new window with title "itgui"
2021-08-26 04:18:24 +00:00
window := a.NewWindow("itgui")
2021-08-26 15:47:17 +00:00
// Create new app tabs container
2021-08-26 04:18:24 +00:00
tabs := container.NewAppTabs(
container.NewTabItem("Info", infoTab(window)),
container.NewTabItem("Notify", notifyTab(window)),
container.NewTabItem("Set Time", timeTab(window)),
container.NewTabItem("Upgrade", upgradeTab(window)),
)
2021-08-26 15:47:17 +00:00
// Set tabs as window content
2021-08-26 04:18:24 +00:00
window.SetContent(tabs)
2021-08-26 15:47:17 +00:00
// Show window and run app
2021-08-26 04:18:24 +00:00
window.ShowAndRun()
}