mirror of
https://codeberg.org/scip/swayipc.git
synced 2026-08-24 06:44:19 +02:00
renovate the code, update to go 1.26 and satisfy linter (#3)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user