GetSeats implemented
This commit is contained in:
parent
2dbdc93ac1
commit
d617a7dde7
5
get_seats.go
Normal file
5
get_seats.go
Normal file
@ -0,0 +1,5 @@
|
||||
package sway
|
||||
|
||||
func (c *Client) GetSeats() ([]Seat, error) {
|
||||
return sendMessage[[]Seat](c, 101, "")
|
||||
}
|
12
types.go
12
types.go
@ -379,3 +379,15 @@ type LibInput struct {
|
||||
Dwtp string `json:"dwtp"`
|
||||
CalibrationMatrix [6]float64 `json:"calibration_matrix"`
|
||||
}
|
||||
|
||||
type Seat struct {
|
||||
Name string `json:"name"`
|
||||
Capabilities int `json:"capabilities"`
|
||||
Focus NodeID `json:"focus"`
|
||||
Devices []InputDevice `json:"devices"`
|
||||
}
|
||||
|
||||
func (s Seat) String() string {
|
||||
data, _ := json.MarshalIndent(s, "", "\t")
|
||||
return string(data)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user