4 Commits

Author SHA1 Message Date
1ed268ab63 don't use 386_sse 2025-12-19 09:22:08 +01:00
705fbb03c4 use stable swayipc version 2025-12-19 08:41:32 +01:00
81e7474846 add version flag -v and give it a version 2025-12-19 08:37:48 +01:00
T. von Dein
2d2ebc51ea move to codeberg (#1) 2025-12-05 21:12:33 +01:00
4 changed files with 15 additions and 3 deletions

View File

@@ -16,6 +16,9 @@ builds:
goos: goos:
- linux - linux
- freebsd - freebsd
goarch:
- amd64
- arm64
archives: archives:
- formats: [tar.gz] - formats: [tar.gz]

2
go.mod
View File

@@ -3,6 +3,6 @@ module sway-descratch
go 1.23.5 go 1.23.5
require ( require (
codeberg.org/scip/swayipc/v2 v2.0.0-test1 codeberg.org/scip/swayipc/v2 v2.0.0
github.com/alecthomas/repr v0.5.2 github.com/alecthomas/repr v0.5.2
) )

4
go.sum
View File

@@ -1,4 +1,4 @@
codeberg.org/scip/swayipc/v2 v2.0.0-test1 h1:F4tOtE0gvxoh4mWQbV2+rG55cVJsCtkD5YME/6qxjqw= codeberg.org/scip/swayipc/v2 v2.0.0 h1:uHiETbutVJAUQVSzC5/PPFo2S+gEoCnzydhErYiQYNM=
codeberg.org/scip/swayipc/v2 v2.0.0-test1/go.mod h1:F+rmNQ+NjLDr8fU7HW/jSjiUIXeYfQ1cSyBiGByhoWI= codeberg.org/scip/swayipc/v2 v2.0.0/go.mod h1:F+rmNQ+NjLDr8fU7HW/jSjiUIXeYfQ1cSyBiGByhoWI=
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=

View File

@@ -28,7 +28,16 @@ import (
"github.com/alecthomas/repr" "github.com/alecthomas/repr"
) )
const VERSION = `v0.0.3`
func main() { 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 // we need a session to sway via IPC
ipc := swayipc.NewSwayIPC() ipc := swayipc.NewSwayIPC()