mirror of
https://codeberg.org/scip/swayipc.git
synced 2025-12-16 20:20:56 +01:00
30 lines
355 B
Go
30 lines
355 B
Go
package main
|
|
|
|
/*
|
|
Retrieve a list of current set marks
|
|
*/
|
|
|
|
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()
|
|
|
|
marks, err := ipc.GetMarks()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
repr.Println(marks)
|
|
}
|