From 9e558e1f3caeeb622f2113c357b5488d5d5cf6a4 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Sat, 22 Aug 2026 17:46:26 +0200 Subject: [PATCH] update to module changes --- _examples/current_workspace/main.go | 2 +- _examples/events/main.go | 6 +++--- _examples/find_focused_window/main.go | 4 ++-- _examples/get_bars/main.go | 2 +- _examples/get_config/main.go | 2 +- _examples/get_inputs/main.go | 2 +- _examples/get_marks/main.go | 2 +- _examples/get_outputs/main.go | 2 +- _examples/get_seats/main.go | 2 +- _examples/get_tree/main.go | 2 +- _examples/get_version/main.go | 2 +- _examples/get_workspaces/main.go | 2 +- _examples/run_command/main.go | 4 ++-- _examples/run_global_command/main.go | 2 +- _examples/send_tick/main.go | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/_examples/current_workspace/main.go b/_examples/current_workspace/main.go index 940648a..e5822fb 100644 --- a/_examples/current_workspace/main.go +++ b/_examples/current_workspace/main.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/events/main.go b/_examples/events/main.go index 12d9f6d..353c87d 100644 --- a/_examples/events/main.go +++ b/_examples/events/main.go @@ -9,8 +9,8 @@ import ( "fmt" "log" + "codeberg.org/scip/swayipc/v2" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" ) // Event callback function, needs to implement each subscribed events, @@ -18,11 +18,11 @@ import ( func ProcessTick(event *swayipc.RawResponse) error { var err error switch event.PayloadType { - case swayipc.EV_Tick: + case swayipc.EvTick: ev := &swayipc.EventTick{} err = json.Unmarshal(event.Payload, &ev) repr.Println(ev) - case swayipc.EV_Window: + case swayipc.EvWindow: ev := &swayipc.EventWindow{} err = json.Unmarshal(event.Payload, &ev) repr.Println(ev) diff --git a/_examples/find_focused_window/main.go b/_examples/find_focused_window/main.go index 0c14077..7a77302 100644 --- a/_examples/find_focused_window/main.go +++ b/_examples/find_focused_window/main.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { @@ -25,6 +25,6 @@ func main() { if focused != nil { fmt.Printf("focused node: %s\n id: %d\n Geometry: %dx%d\n", - focused.Name, focused.Id, focused.Geometry.Width, focused.Geometry.Height) + focused.Name, focused.ID, focused.Geometry.Width, focused.Geometry.Height) } } diff --git a/_examples/get_bars/main.go b/_examples/get_bars/main.go index 500b651..7a1e217 100644 --- a/_examples/get_bars/main.go +++ b/_examples/get_bars/main.go @@ -9,7 +9,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_config/main.go b/_examples/get_config/main.go index 06e2a51..7df5fe9 100644 --- a/_examples/get_config/main.go +++ b/_examples/get_config/main.go @@ -8,7 +8,7 @@ import ( "fmt" "log" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_inputs/main.go b/_examples/get_inputs/main.go index c07335e..6fb021e 100644 --- a/_examples/get_inputs/main.go +++ b/_examples/get_inputs/main.go @@ -8,7 +8,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_marks/main.go b/_examples/get_marks/main.go index f31abb3..b74d8ec 100644 --- a/_examples/get_marks/main.go +++ b/_examples/get_marks/main.go @@ -8,7 +8,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_outputs/main.go b/_examples/get_outputs/main.go index 1dec1dc..c0497f0 100644 --- a/_examples/get_outputs/main.go +++ b/_examples/get_outputs/main.go @@ -8,7 +8,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_seats/main.go b/_examples/get_seats/main.go index 5454c86..0582f8b 100644 --- a/_examples/get_seats/main.go +++ b/_examples/get_seats/main.go @@ -8,7 +8,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_tree/main.go b/_examples/get_tree/main.go index 425d808..3451dc8 100644 --- a/_examples/get_tree/main.go +++ b/_examples/get_tree/main.go @@ -4,7 +4,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_version/main.go b/_examples/get_version/main.go index df344b8..67699be 100644 --- a/_examples/get_version/main.go +++ b/_examples/get_version/main.go @@ -8,7 +8,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/get_workspaces/main.go b/_examples/get_workspaces/main.go index 4fa102f..2983c73 100644 --- a/_examples/get_workspaces/main.go +++ b/_examples/get_workspaces/main.go @@ -8,7 +8,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/run_command/main.go b/_examples/run_command/main.go index a0f2324..df1f81f 100644 --- a/_examples/run_command/main.go +++ b/_examples/run_command/main.go @@ -9,8 +9,8 @@ package main import ( "log" + "codeberg.org/scip/swayipc/v2" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" ) func main() { @@ -37,7 +37,7 @@ func main() { // finally execute the given commands on it, you can use any run // command, see sway(5) - responses, err := ipc.RunContainerCommand(focused.Id, "floating toggle", "border toggle") + responses, err := ipc.RunContainerCommand(focused.ID, "floating toggle", "border toggle") if err != nil { repr.Println(responses) log.Fatal(err) diff --git a/_examples/run_global_command/main.go b/_examples/run_global_command/main.go index 55e1c62..f9b1573 100644 --- a/_examples/run_global_command/main.go +++ b/_examples/run_global_command/main.go @@ -9,7 +9,7 @@ import ( "log" "github.com/alecthomas/repr" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() { diff --git a/_examples/send_tick/main.go b/_examples/send_tick/main.go index c1ded20..5d1a7d0 100644 --- a/_examples/send_tick/main.go +++ b/_examples/send_tick/main.go @@ -12,7 +12,7 @@ import ( "log" "os" - "codeberg.org/scip/swayipc/v1" + "codeberg.org/scip/swayipc/v2" ) func main() {