Files
2025-11-10 20:59:46 +01:00

30 lines
457 B
Go

package main
/*
This example toggles borders globally for all windows, execute
multiple time to see the toggling.
*/
import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
)
func main() {
ipc := swayipc.NewSwayIPC()
err := ipc.Connect()
if err != nil {
log.Fatal(err)
}
defer ipc.Close()
responses, err := ipc.RunGlobalCommand("border toggle")
if err != nil {
repr.Println(responses)
log.Fatal(err)
}
}