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

View File

@@ -0,0 +1,26 @@
package main
import (
"fmt"
"log"
"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)
}
workspace := tree.FindCurrentWorkspace()
fmt.Printf("current workspace: %s\n", workspace)
}