diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-16 08:24:54 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-16 08:24:54 +0200 |
| commit | 4f98392c9a062e9d4dd8363a2ede9a919ad14006 (patch) | |
| tree | 6adc4058f1bdc8108c645ef1cbf952f824e1f6be /gui/cmd | |
| parent | 69e942371823638fbe24a94202189729f2f17ebc (diff) | |
| download | krino-4f98392c9a062e9d4dd8363a2ede9a919ad14006.tar.gz krino-4f98392c9a062e9d4dd8363a2ede9a919ad14006.zip | |
gui module: the plan tab's model, with tests
Diffstat (limited to 'gui/cmd')
| -rw-r--r-- | gui/cmd/krino-gui/main.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gui/cmd/krino-gui/main.go b/gui/cmd/krino-gui/main.go new file mode 100644 index 0000000..4142e8c --- /dev/null +++ b/gui/cmd/krino-gui/main.go @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +// krino-gui is a GTK4 window for krino: review a directory's plan and apply +// the files you choose, look back over runs and undo them, and write rules. +// Every decision is the engine's; see docs/gui-design.md. +package main + +import ( + "fmt" + "os" + + "github.com/diamondburned/gotk4/pkg/gtk/v4" +) + +// version is stamped at build time, as krino's is. +var version = "dev" + +func main() { + if len(os.Args) > 1 && os.Args[1] == "--version" { + fmt.Println("krino-gui " + version) + return + } + app := gtk.NewApplication("xyz.labunix.krino", 0) + app.ConnectActivate(func() { + win := gtk.NewApplicationWindow(app) + win.SetTitle("krino") + win.SetDefaultSize(900, 600) + win.SetChild(gtk.NewLabel("krino-gui")) + win.Show() + }) + if code := app.Run(os.Args); code != 0 { + os.Exit(code) + } +} |
