GetSeats implemented

This commit is contained in:
milarin 2024-02-14 16:51:23 +01:00
parent 2dbdc93ac1
commit d617a7dde7
2 changed files with 17 additions and 0 deletions

5
get_seats.go Normal file
View File

@ -0,0 +1,5 @@
package sway
func (c *Client) GetSeats() ([]Seat, error) {
return sendMessage[[]Seat](c, 101, "")
}

View File

@ -379,3 +379,15 @@ type LibInput struct {
Dwtp string `json:"dwtp"` Dwtp string `json:"dwtp"`
CalibrationMatrix [6]float64 `json:"calibration_matrix"` 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)
}