1
- from .model import Rect
1
+ from .model import Rect , OutputMode
2
2
3
3
4
4
class _BaseReply :
@@ -89,6 +89,28 @@ class OutputReply(_BaseReply):
89
89
:ivar rect: The rectangle of this output (equals the rect of the output it
90
90
is on).
91
91
:vartype rect: :class:`Rect`
92
+ :ivar make: (sway only)
93
+ :vartype make: str
94
+ :ivar model: (sway only)
95
+ :vartype model: str
96
+ :ivar serial: (sway only)
97
+ :vartype serial: str
98
+ :ivar scale: (sway only)
99
+ :vartype scale: float
100
+ :ivar transform: (sway only)
101
+ :vartype transform: str
102
+ :ivar max_render_time: (sway only)
103
+ :vartype max_render_time: int
104
+ :ivar focused: (sway only)
105
+ :vartype focused: bool
106
+ :ivar dpms: (sway only)
107
+ :vartype dpms: bool
108
+ :ivar subpixel_hinting: (sway only)
109
+ :vartype subpixel_hinting: str
110
+ :ivar modes: (sway only)
111
+ :vartype modes: list(:class:`OutputMode`)
112
+ :ivar current_mode: (sway only)
113
+ :vartype current_mode: :class:`OutputMode`
92
114
:ivar ipc_data: The raw data from the i3 ipc.
93
115
:vartype ipc_data: dict
94
116
"""
@@ -108,11 +130,30 @@ class OutputReply(_BaseReply):
108
130
('focused' , bool ),
109
131
('dpms' , bool ),
110
132
('subpixel_hinting' , str ),
111
- ('modes' , list ),
112
- ('current_mode' , dict ),
133
+ ('modes' , OutputMode . _parse_list ),
134
+ ('current_mode' , OutputMode ),
113
135
]
114
136
115
137
138
+ class BarConfigGaps :
139
+ """(sway only) The useless gaps for the bar.
140
+
141
+ :ivar left: The gap to the left.
142
+ :vartype left: int
143
+ :ivar right: The gap to the right.
144
+ :vartype right: int
145
+ :ivar top: The gap on the top.
146
+ :vartype top: int
147
+ :ivar bottom: The gap on the bottom.
148
+ :vartype bottom: int
149
+ """
150
+ def __init__ (self , data ):
151
+ self .left = data ['left' ]
152
+ self .right = data ['right' ]
153
+ self .top = data ['top' ]
154
+ self .bottom = data ['bottom' ]
155
+
156
+
116
157
class BarConfigReply (_BaseReply ):
117
158
"""A reply to the ``GET_BAR_CONFIG`` message with a specified bar id.
118
159
@@ -138,19 +179,49 @@ class BarConfigReply(_BaseReply):
138
179
:ivar colors: Contains key/value pairs of colors. Each value is a color
139
180
code in hex, formatted #rrggbb (like in HTML).
140
181
:vartype colors: dict
182
+ :ivar tray_padding:
183
+ :vartype tray_padding: int
184
+ :ivar hidden_state:
185
+ :vartype hidden_state: str
186
+ :ivar modifier:
187
+ :vartype modifier: int
188
+ :ivar workspace_min_width:
189
+ :vartype workspace_min_width: int
190
+ :ivar strip_workspace_numbers:
191
+ :vartype strip_workspace_numbers: bool
192
+ :ivar strip_workspace_name:
193
+ :vartype strip_workspace_name: bool
194
+ :ivar gaps: (sway only)
195
+ :vartype gaps: :class:`BarConfigGaps`
196
+ :ivar bar_height: (sway only)
197
+ :vartype bar_height: int
198
+ :ivar status_padding: (sway only)
199
+ :vartype status_padding: int
200
+ :ivar status_edge_padding: (sway only)
201
+ :vartype status_edge_padding: int
141
202
:ivar ipc_data: The raw data from the i3 ipc.
142
203
:vartype ipc_data: dict
143
204
"""
144
205
_members = [
145
206
('id' , str ),
207
+ ('tray_padding' , int ),
208
+ ('hidden_state' , str ),
146
209
('mode' , str ),
210
+ ('modifier' , int ),
147
211
('position' , str ),
148
212
('status_command' , str ),
149
213
('font' , str ),
150
214
('workspace_buttons' , bool ),
215
+ ('workspace_min_width' , int ),
216
+ ('strip_workspace_numbers' , bool ),
217
+ ('strip_workspace_name' , bool ),
151
218
('binding_mode_indicator' , bool ),
152
219
('verbose' , bool ),
153
220
('colors' , dict ),
221
+ ('gaps' , BarConfigGaps ),
222
+ ('bar_height' , int ),
223
+ ('status_padding' , int ),
224
+ ('status_edge_padding' , int ),
154
225
]
155
226
156
227
0 commit comments