some initial examples

This commit is contained in:
2025-08-14 14:16:17 +02:00
parent 3221777622
commit a09b04ab7a
5 changed files with 771 additions and 0 deletions

24
_examples/tree/main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/i3ipc"
)
func main() {
ipc := i3ipc.NewI3ipc("SWAYSOCK")
err := ipc.Connect()
if err != nil {
log.Fatal(err)
}
tree, err := ipc.GetTree()
if err != nil {
log.Fatal(err)
}
repr.Println(tree)
}