-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathipc_type.go
executable file
·163 lines (150 loc) · 5.03 KB
/
ipc_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package client
type IPC interface {
Receive() ([]ReceivedData, error)
Dispatch(args *ByteQueue) ([]byte, error)
Workspaces() ([]Workspace, error)
ActiveWorkspace() (Workspace, error)
Monitors() ([]Monitor, error)
Clients() ([]Client, error)
ActiveWindow() (Window, error)
Layers() (Layers, error)
Devices() (Devices, error)
Keyword(args *ByteQueue) error
Version() (Version, error)
Kill() error
Splash() (string, error)
Reload() error
SetCursor(theme, size string) error
GetOption(name string) (string, error)
CursorPos() (CursorPos, error)
Binds() ([]Bind, error)
}
type Workspace struct {
WorkspaceType
Monitor string `json:"monitor"`
Windows int `json:"windows"`
HasFullScreen bool `json:"hasfullscreen"`
LastWindow string `json:"lastwindow"`
LastWindowTitle string `json:"lastwindowtitle"`
}
type WorkspaceType struct {
Id int `json:"id"`
Name string `json:"name"`
}
type Monitor struct {
Id int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Width int `json:"width"`
Height int `json:"height"`
RefreshRate float64 `json:"refreshRate"`
X int `json:"x"`
Y int `json:"y"`
ActiveWorkspace WorkspaceType `json:"activeWorkspace"`
Reserved []int `json:"reserved"`
Scale float64 `json:"scale"`
Transform int `json:"transform"`
Focused bool `json:"focused"`
DpmsStatus bool `json:"dpmsStatus"`
}
type Client struct {
Address string `json:"address"`
At []int `json:"at"`
Size []int `json:"size"`
Workspace Workspace `json:"workspace"`
Floating bool `json:"floating"`
Monitor int `json:"monitor"`
Class string `json:"class"`
Title string `json:"title"`
Pid int `json:"pid"`
Xwayland bool `json:"xwayland"`
Pinned bool `json:"pinned"`
Fullscreen bool `json:"fullscreen"`
FullscreenMode int `json:"fullscreenMode"`
}
type Window struct {
Address string `json:"address"`
Mapped bool `json:"mapped"`
Hidden bool `json:"hidden"`
Pinned bool `json:"pinned"`
FullscreenMode int `json:"fullscreenMode"`
FakeFullscreen bool `json:"fakeFullscreen"`
At []int `json:"at"`
Size []int `json:"size"`
Workspace WorkspaceType `json:"workspace"`
Floating bool `json:"floating"`
Monitor int `json:"monitor"`
Class string `json:"class"`
InitialClass string `json:"initialClass"`
Title string `json:"title"`
InitialTitle string `json:"initialTitle"`
Pid int `json:"pid"`
Xwayland bool `json:"xwayland"`
Grouped []string `json:"grouped"`
Tags []string `json:"tags"`
Swallowing string `json:"swallowing"`
FocusHistoryId int `json:"focusHistoryID"`
}
type Layers map[string]Layer
type Layer struct {
Levels map[int][]LayerField `json:"levels"`
}
type LayerField struct {
Address string `json:"address"`
X int `json:"x"`
Y int `json:"y"`
W int `json:"w"`
H int `json:"h"`
Namespace string `json:"namespace"`
}
type Devices struct {
Mice []struct {
Address string `json:"address"`
Name string `json:"name"`
DefaultSpeed float64 `json:"defaultSpeed"`
} `json:"mice"`
Keyboards []struct {
Address string `json:"address"`
Name string `json:"name"`
Rules string `json:"rules"`
Model string `json:"model"`
Layout string `json:"layout"`
Variant string `json:"variant"`
Options string `json:"options"`
ActiveKeymap string `json:"active_keymap"`
Main bool `json:"main"`
} `json:"keyboards"`
Tablets []interface{} `json:"tablets"`
Touch []interface{} `json:"touch"`
Switches []struct {
Address string `json:"address"`
Name string `json:"name"`
} `json:"switches"`
}
type Version struct {
Branch string `json:"branch"`
Commit string `json:"commit"`
Dirty bool `json:"dirty"`
CommitMessage string `json:"commit_message"`
CommitDate string `json:"commit_date"`
Tag string `json:"tag"`
Commits string `json:"commits"`
Flags []string `json:"flags"`
}
type CursorPos struct {
X int `json:"x"`
Y int `json:"y"`
}
type Bind struct {
Locked bool `json:"locked"`
Mouse bool `json:"mouse"`
Release bool `json:"release"`
Repeat bool `json:"repeat"`
NoConsuming bool `json:"non_consuming"`
ModMask int `json:"modmask"`
SubMap string `json:"submap"`
Key string `json:"key"`
KeyCode int `json:"keycode"`
Dispatcher string `json:"dispatcher"`
Arg string `json:"arg"`
}