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:
5
_examples/run_command/Makefile
Normal file
5
_examples/run_command/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
all:
|
||||
go build .
|
||||
|
||||
clean:
|
||||
rm -f run_command
|
||||
9
_examples/run_command/go.mod
Normal file
9
_examples/run_command/go.mod
Normal file
@@ -0,0 +1,9 @@
|
||||
module send_tick
|
||||
|
||||
go 1.26
|
||||
|
||||
require github.com/alecthomas/repr v0.5.4 // indirect
|
||||
|
||||
replace codeberg.org/scip/swayipc/v2 => ../..
|
||||
|
||||
require codeberg.org/scip/swayipc/v2 v2.1.0
|
||||
2
_examples/run_command/go.sum
Normal file
2
_examples/run_command/go.sum
Normal file
@@ -0,0 +1,2 @@
|
||||
github.com/alecthomas/repr v0.5.4 h1:OVP7JEcuzU9CCDsT6STCr3rg17oQfWILtPWd2EG0uN4=
|
||||
github.com/alecthomas/repr v0.5.4/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user