hypr/monitor.go

32 lines
1.1 KiB
Go
Raw Normal View History

2024-01-05 18:20:29 +01:00
package hypr
import "encoding/json"
type Monitor struct {
2024-01-05 18:42:16 +01:00
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Make string `json:"make"`
Model string `json:"model"`
Serial string `json:"serial"`
Width int `json:"width"`
Height int `json:"height"`
RefreshRate float64 `json:"refreshRate"`
X int `json:"x"`
Y int `json:"y"`
ActiveWorkspace WorkspaceIdent `json:"activeWorkspace"`
SpecialWorkspace WorkspaceIdent `json:"specialWorkspace"`
Reserved [4]int `json:"reserved"`
Scale float64 `json:"scale"`
Transform int `json:"transform"`
Focused bool `json:"focused"`
DPMSStatus bool `json:"dpmsStatus"`
VRR bool `json:"vrr"`
ActivelyTearing bool `json:"activelyTearing"`
2024-01-05 18:20:29 +01:00
}
func (m Monitor) String() string {
data, _ := json.MarshalIndent(m, "", "\t")
return string(data)
}