1- from .model import Rect
1+ from .model import Rect , OutputMode
22
33
44class _BaseReply :
@@ -89,6 +89,28 @@ class OutputReply(_BaseReply):
8989 :ivar rect: The rectangle of this output (equals the rect of the output it
9090 is on).
9191 :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`
92114 :ivar ipc_data: The raw data from the i3 ipc.
93115 :vartype ipc_data: dict
94116 """
@@ -108,11 +130,30 @@ class OutputReply(_BaseReply):
108130 ('focused' , bool ),
109131 ('dpms' , bool ),
110132 ('subpixel_hinting' , str ),
111- ('modes' , list ),
112- ('current_mode' , dict ),
133+ ('modes' , OutputMode . _parse_list ),
134+ ('current_mode' , OutputMode ),
113135 ]
114136
115137
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+
116157class BarConfigReply (_BaseReply ):
117158 """A reply to the ``GET_BAR_CONFIG`` message with a specified bar id.
118159
@@ -138,19 +179,49 @@ class BarConfigReply(_BaseReply):
138179 :ivar colors: Contains key/value pairs of colors. Each value is a color
139180 code in hex, formatted #rrggbb (like in HTML).
140181 :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
141202 :ivar ipc_data: The raw data from the i3 ipc.
142203 :vartype ipc_data: dict
143204 """
144205 _members = [
145206 ('id' , str ),
207+ ('tray_padding' , int ),
208+ ('hidden_state' , str ),
146209 ('mode' , str ),
210+ ('modifier' , int ),
147211 ('position' , str ),
148212 ('status_command' , str ),
149213 ('font' , str ),
150214 ('workspace_buttons' , bool ),
215+ ('workspace_min_width' , int ),
216+ ('strip_workspace_numbers' , bool ),
217+ ('strip_workspace_name' , bool ),
151218 ('binding_mode_indicator' , bool ),
152219 ('verbose' , bool ),
153220 ('colors' , dict ),
221+ ('gaps' , BarConfigGaps ),
222+ ('bar_height' , int ),
223+ ('status_padding' , int ),
224+ ('status_edge_padding' , int ),
154225 ]
155226
156227
0 commit comments