update to module changes

This commit is contained in:
2026-08-22 17:46:26 +02:00
parent f95d156509
commit 9e558e1f3c
15 changed files with 19 additions and 19 deletions

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"log"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -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)

View File

@@ -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)
}
}

View File

@@ -9,7 +9,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"fmt"
"log"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -4,7 +4,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -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)

View File

@@ -9,7 +9,7 @@ import (
"log"
"github.com/alecthomas/repr"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {

View File

@@ -12,7 +12,7 @@ import (
"log"
"os"
"codeberg.org/scip/swayipc/v1"
"codeberg.org/scip/swayipc/v2"
)
func main() {