From 81e7474846523f70e9972dfcff9da4794d99f6df Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Fri, 19 Dec 2025 08:37:48 +0100 Subject: [PATCH] add version flag -v and give it a version --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index 3151429..c33557c 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,16 @@ import ( "github.com/alecthomas/repr" ) +const VERSION = `v0.0.3` + func main() { + if len(os.Args) > 1 { + if os.Args[1] == "-v" { + fmt.Printf("This is sway-descratch version %s\n", VERSION) + os.Exit(0) + } + } + // we need a session to sway via IPC ipc := swayipc.NewSwayIPC()