mirror of
https://codeberg.org/scip/swayipc.git
synced 2025-12-16 20:20:56 +01:00
29 lines
342 B
Go
29 lines
342 B
Go
package main
|
|
|
|
/*
|
|
Retrieve a list of current available outputs
|
|
*/
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/alecthomas/repr"
|
|
"github.com/tlinden/i3ipc"
|
|
)
|
|
|
|
func main() {
|
|
ipc := i3ipc.NewI3ipc()
|
|
|
|
err := ipc.Connect()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
outputs, err := ipc.GetOutputs()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
repr.Println(outputs)
|
|
}
|