1sway-ipc(7)            Miscellaneous Information Manual            sway-ipc(7)
2
3
4

NAME

6       sway-ipc - IPC protocol for sway
7

DESCRIPTION

9       This details the interprocess communication (IPC) protocol for sway(1).
10       This IPC protocol can be used to control or obtain information from a
11       sway process.
12
13       The IPC protocol uses a UNIX socket as the method of communication. The
14       path to the socket is stored in the environment variable SWAYSOCK and,
15       for backwards compatibility with i3, I3SOCK. You can also retrieve the
16       socket path by calling sway --get-socketpath.
17

MESSAGE AND REPLY FORMAT

19       The format for messages and replies is:
20           <magic-string> <payload-length> <payload-type> <payload>
21       Where
22            <magic-string> is i3-ipc, for compatibility with i3
23            <payload-length> is a 32-bit integer in native byte order
24            <payload-type> is a 32-bit integer in native byte order
25
26       For example, sending the exit command would look like the following
27       hexdump:
28           00000000 | 69 33 2d 69 70 63 04 00 00 00 00 00 00 00 65 78 |i3-ipc........ex|
29           00000010 | 69 74                                           |it              |
30
31       The payload for replies will be a valid serialized JSON data structure.
32

MESSAGES AND REPLIES

34       The following message types and their corresponding reply types are
35       currently supported. For all replies, any properties not listed are
36       subject to removal.
37
38       ┌────────────┬───────────────────┬─────────────────────┐
39TYPE NUMBER MESSAGE NAME    PURPOSE       
40       ├────────────┼───────────────────┼─────────────────────┤
41       │     0      │    RUN_COMMAND    │ Runs the payload as │
42       │            │                   │ sway commands       │
43       ├────────────┼───────────────────┼─────────────────────┤
44       │     1      │  GET_WORKSPACES   │ Get the list of     │
45       │            │                   │ current workspaces  │
46       ├────────────┼───────────────────┼─────────────────────┤
47       │     2      │     SUBSCRIBE     │ Subscribe the IPC   │
48       │            │                   │ connection to the   │
49       │            │                   │ events listed in    │
50       │            │                   │ the payload         │
51       ├────────────┼───────────────────┼─────────────────────┤
52       │     3      │    GET_OUTPUTS    │ Get the list of     │
53       │            │                   │ current outputs     │
54       ├────────────┼───────────────────┼─────────────────────┤
55       │     4      │     GET_TREE      │ Get the node layout │
56       │            │                   │ tree                │
57       ├────────────┼───────────────────┼─────────────────────┤
58       │     5      │     GET_MARKS     │ Get the names of    │
59       │            │                   │ all the marks cur‐  │
60       │            │                   │ rently set          │
61       ├────────────┼───────────────────┼─────────────────────┤
62       │     6      │  GET_BAR_CONFIG   │ Get the specified   │
63       │            │                   │ bar config or a     │
64       │            │                   │ list of bar config  │
65       │            │                   │ names               │
66       ├────────────┼───────────────────┼─────────────────────┤
67       │     7      │    GET_VERSION    │ Get the version of  │
68       │            │                   │ sway that owns the  │
69       │            │                   │ IPC socket          │
70       ├────────────┼───────────────────┼─────────────────────┤
71       │     8      │ GET_BINDING_MODES │ Get the list of     │
72       │            │                   │ binding mode names  │
73       ├────────────┼───────────────────┼─────────────────────┤
74       │     9      │    GET_CONFIG     │ Returns the config  │
75       │            │                   │ that was last       │
76       │            │                   │ loaded              │
77       ├────────────┼───────────────────┼─────────────────────┤
78       │    10      │     SEND_TICK     │ Sends a tick event  │
79       │            │                   │ with the specified  │
80       │            │                   │ payload             │
81       ├────────────┼───────────────────┼─────────────────────┤
82       │    11      │       SYNC        │ Replies failure ob‐ │
83       │            │                   │ ject for i3 compat‐ │
84       │            │                   │ ibility             │
85       ├────────────┼───────────────────┼─────────────────────┤
86       │    12      │ GET_BINDING_STATE │ Request the current │
87       │            │                   │ binding state, e.g. │
88       │            │                   │ the currently ac‐   │
89       │            │                   │ tive binding mode   │
90       │            │                   │ name.               │
91       ├────────────┼───────────────────┼─────────────────────┤
92       │    100     │    GET_INPUTS     │ Get the list of in‐ │
93       │            │                   │ put devices         │
94       ├────────────┼───────────────────┼─────────────────────┤
95       │    101     │     GET_SEATS     │ Get the list of     │
96       │            │                   │ seats               │
97       └────────────┴───────────────────┴─────────────────────┘
98
99   0. RUN_COMMAND
100       MESSAGE
101       Parses and runs the payload as sway commands
102
103       REPLY
104       An array of objects corresponding to each command that was parsed. Each
105       object has the property success, which is a boolean indicating whether
106       the command was successful. The object may also contain the properties
107       error and parse_error. The error property is a human readable error
108       message while parse_error is a boolean indicating whether the reason
109       the command failed was because the command was unknown or not able to
110       be parsed.
111
112       Example Reply:
113           [
114                {
115                     "success": true
116                },
117                {
118                     "success": false,
119                     "parse_error": true,
120                     "error": "Invalid/unknown command"
121                }
122           ]
123
124   1. GET_WORKSPACES
125       MESSAGE
126       Retrieves the list of workspaces.
127
128       REPLY
129       The reply is an array of objects corresponding to each workspace. Each
130       object has the following properties:
131
132       ┌─────────┬───────────┬─────────────────────┐
133PROPERTY DATA TYPE DESCRIPTION     
134       ├─────────┼───────────┼─────────────────────┤
135       │  num    │  integer  │ The workspace num‐  │
136       │         │           │ ber or -1 for       │
137       │         │           │ workspaces that do  │
138       │         │           │ not start with a    │
139       │         │           │ number              │
140       ├─────────┼───────────┼─────────────────────┤
141       │  name   │  string   │ The name of the     │
142       │         │           │ workspace           │
143       ├─────────┼───────────┼─────────────────────┤
144       │visible  │  boolean  │ Whether the         │
145       │         │           │ workspace is cur‐   │
146       │         │           │ rently visible on   │
147       │         │           │ any output          │
148       ├─────────┼───────────┼─────────────────────┤
149       │focused  │  boolean  │ Whether the         │
150       │         │           │ workspace is cur‐   │
151       │         │           │ rently focused by   │
152       │         │           │ the default seat    │
153       │         │           │ (seat0)             │
154       ├─────────┼───────────┼─────────────────────┤
155       │ urgent  │  boolean  │ Whether a view on   │
156       │         │           │ the workspace has   │
157       │         │           │ the urgent flag set │
158       ├─────────┼───────────┼─────────────────────┤
159       │  rect   │  object   │ The bounds of the   │
160       │         │           │ workspace. It con‐  │
161       │         │           │ sists of x, y,      │
162       │         │           │ width, and height
163       ├─────────┼───────────┼─────────────────────┤
164       │ output  │  string   │ The name of the     │
165       │         │           │ output that the     │
166       │         │           │ workspace is on     │
167       └─────────┴───────────┴─────────────────────┘
168
169       Example Reply:
170           [
171                {
172                     "num": 1,
173                     "name": "1",
174                     "visible": true,
175                     "focused": true,
176                     "rect": {
177                          "x": 0,
178                          "y": 23,
179                          "width": 1920,
180                          "height": 1057
181                     },
182                     "output": "eDP-1"
183                },
184           ]
185
186   2. SUBSCRIBE
187       MESSAGE
188       Subscribe this IPC connection to the event types specified in the mes‐
189       sage payload. The payload should be a valid JSON array of events. See
190       the EVENTS section for the list of supported events.
191
192       REPLY
193       A single object that contains the property success, which is a boolean
194       value indicating whether the subscription was successful or not.
195
196       Example Reply:
197           {
198                "success": true
199           }
200
201   3. GET_OUTPUTS
202       MESSAGE
203       Retrieve the list of outputs
204
205       REPLY
206       An array of objects corresponding to each output. Each object has the
207       following properties:
208
209       ┌──────────────────┬───────────┬─────────────────────┐
210PROPERTY      DATA TYPE DESCRIPTION     
211       ├──────────────────┼───────────┼─────────────────────┤
212       │      name        │  string   │ The name of the     │
213       │                  │           │ output. On DRM,     │
214       │                  │           │ this is the connec‐ │
215       │                  │           │ tor                 │
216       ├──────────────────┼───────────┼─────────────────────┤
217       │      make        │  string   │ The make of the     │
218       │                  │           │ output              │
219       ├──────────────────┼───────────┼─────────────────────┤
220       │      model       │  string   │ The model of the    │
221       │                  │           │ output              │
222       ├──────────────────┼───────────┼─────────────────────┤
223       │     serial       │  string   │ The output's serial │
224       │                  │           │ number as a hexa‐   │
225       │                  │           │ decimal string      │
226       ├──────────────────┼───────────┼─────────────────────┤
227       │     active       │  boolean  │ Whether this output │
228       │                  │           │ is active/enabled   │
229       ├──────────────────┼───────────┼─────────────────────┤
230       │      dpms        │  boolean  │ (Deprecated, use    │
231       │                  │           │ power instead)      │
232       │                  │           │ Whether this output │
233       │                  │           │ is on/off (via      │
234       │                  │           │ DPMS)               │
235       ├──────────────────┼───────────┼─────────────────────┤
236       │      power       │  boolean  │ Whether this output │
237       │                  │           │ is on/off           │
238       ├──────────────────┼───────────┼─────────────────────┤
239       │     primary      │  boolean  │ For i3 compatibil‐  │
240       │                  │           │ ity, this will be   │
241       │                  │           │ false. It does not  │
242       │                  │           │ make sense in Way‐  │
243       │                  │           │ land                │
244       ├──────────────────┼───────────┼─────────────────────┤
245       │      scale       │   float   │ The scale currently │
246       │                  │           │ in use on the out‐  │
247       │                  │           │ put or -1 for dis‐  │
248       │                  │           │ abled outputs       │
249       ├──────────────────┼───────────┼─────────────────────┤
250       │subpixel_hinting  │  string   │ The subpixel hint‐  │
251       │                  │           │ ing current in use  │
252       │                  │           │ on the output. This │
253       │                  │           │ can be rgb, bgr,    │
254       │                  │           │ vrgb, vbgr, or none
255       ├──────────────────┼───────────┼─────────────────────┤
256       │    transform     │  string   │ The transform cur‐  │
257       │                  │           │ rently in use for   │
258       │                  │           │ the output. This    │
259       │                  │           │ can be normal, 90,  │
260       │                  │           │ 180, 270,           │
261       │                  │           │ flipped-90,         │
262       │                  │           │ flipped-180, or     │
263       │                  │           │ flipped-270
264       ├──────────────────┼───────────┼─────────────────────┤
265       │current_workspace │  string   │ The workspace cur‐  │
266       │                  │           │ rently visible on   │
267       │                  │           │ the output or null
268       │                  │           │ for disabled out‐   │
269       │                  │           │ puts                │
270       ├──────────────────┼───────────┼─────────────────────┤
271       │      modes       │   array   │ An array of sup‐    │
272       │                  │           │ ported mode ob‐     │
273       │                  │           │ jects. Each object  │
274       │                  │           │ contains width,     │
275       │                  │           │ height, and refresh
276       ├──────────────────┼───────────┼─────────────────────┤
277       │  current_mode    │  object   │ An object repre‐    │
278       │                  │           │ senting the current │
279       │                  │           │ mode containing     │
280       │                  │           │ width, height, and  │
281       │                  │           │ refresh
282       ├──────────────────┼───────────┼─────────────────────┤
283       │      rect        │  object   │ The bounds for the  │
284       │                  │           │ output consisting   │
285       │                  │           │ of x, y, width, and │
286       │                  │           │ height
287       └──────────────────┴───────────┴─────────────────────┘
288
289       Example Reply:
290           [
291                {
292                     "name": "HDMI-A-2",
293                     "make": "Unknown",
294                     "model": "NS-19E310A13",
295                     "serial": "0x00000001",
296                     "active": true,
297                     "primary": false,
298                     "scale": 1.0,
299                     "subpixel_hinting": "rgb",
300                     "transform": "normal",
301                     "current_workspace": "1",
302                     "modes": [
303                          {
304                               "width": 640,
305                               "height": 480,
306                               "refresh": 59940
307                          },
308                          {
309                               "width": 800,
310                               "height": 600,
311                               "refresh": 60317
312                          },
313                          {
314                               "width": 1024,
315                               "height": 768,
316                               "refresh": 60004
317                          },
318                          {
319                               "width": 1920,
320                               "height": 1080,
321                               "refresh": 60000
322                          }
323                     ],
324                     "current_mode": {
325                          "width": 1920,
326                          "height": 1080,
327                          "refresh": 60000
328                     }
329                }
330           ]
331
332   4. GET_TREE
333       MESSAGE
334       Retrieve a JSON representation of the tree
335
336       REPLY
337       An array of objects that represent the current tree. Each object repre‐
338       sents one node and will have the following properties:
339
340       ┌──────────────────┬───────────┬─────────────────────┐
341PROPERTY      DATA TYPE DESCRIPTION     
342       ├──────────────────┼───────────┼─────────────────────┤
343       │       id         │  integer  │ The internal unique │
344       │                  │           │ ID for this node    │
345       ├──────────────────┼───────────┼─────────────────────┤
346       │      name        │  string   │ The name of the     │
347       │                  │           │ node such as the    │
348       │                  │           │ output name or win‐ │
349       │                  │           │ dow title. For the  │
350       │                  │           │ scratchpad, this    │
351       │                  │           │ will be             │
352       │                  │           │ __i3_scratch for    │
353       │                  │           │ compatibility with  │
354       │                  │           │ i3.                 │
355       ├──────────────────┼───────────┼─────────────────────┤
356       │      type        │  string   │ The node type. It   │
357       │                  │           │ can be root, out‐
358       │                  │           │ put, workspace,     │
359       │                  │           │ con, or float‐
360       │                  │           │ ing_con
361       ├──────────────────┼───────────┼─────────────────────┤
362       │     border       │  string   │ The border style    │
363       │                  │           │ for the node. It    │
364       │                  │           │ can be normal,      │
365       │                  │           │ none, pixel, or csd
366       ├──────────────────┼───────────┼─────────────────────┤
367       │  current_bor‐    │  integer  │ Number of pixels    │
368       │  der_width       │           │ used for the border │
369       │                  │           │ width               │
370       ├──────────────────┼───────────┼─────────────────────┤
371       │     layout       │  string   │ The node's layout.  │
372       │                  │           │ It can either be    │
373       │                  │           │ splith, splitv,     │
374       │                  │           │ stacked, tabbed, or │
375       │                  │           │ output
376       ├──────────────────┼───────────┼─────────────────────┤
377       │   orientation    │  string   │ The node's orienta‐ │
378       │                  │           │ tion. It can be     │
379       │                  │           │ vertical, horizon‐
380       │                  │           │ tal, or none
381       ├──────────────────┼───────────┼─────────────────────┤
382       │     percent      │   float   │ The percentage of   │
383       │                  │           │ the node's parent   │
384       │                  │           │ that it takes up or │
385       │                  │           │ null for the root   │
386       │                  │           │ and other special   │
387       │                  │           │ nodes such as the   │
388       │                  │           │ scratchpad          │
389       ├──────────────────┼───────────┼─────────────────────┤
390       │      rect        │  object   │ The absolute geome‐ │
391       │                  │           │ try of the node.    │
392       │                  │           │ The window decora‐  │
393       │                  │           │ tions are excluded  │
394       │                  │           │ from this, but bor‐ │
395       │                  │           │ ders are included.  │
396       ├──────────────────┼───────────┼─────────────────────┤
397       │   window_rect    │  object   │ The geometry of the │
398       │                  │           │ content inside the  │
399       │                  │           │ node. These coordi‐ │
400       │                  │           │ nates are relative  │
401       │                  │           │ to the node itself. │
402       │                  │           │ Window decorations  │
403       │                  │           │ and borders are     │
404       │                  │           │ outside the win‐
405       │                  │           │ dow_rect
406       ├──────────────────┼───────────┼─────────────────────┤
407       │    deco_rect     │  object   │ The geometry of the │
408       │                  │           │ decorations for the │
409       │                  │           │ node relative to    │
410       │                  │           │ the parent node     │
411       ├──────────────────┼───────────┼─────────────────────┤
412       │    geometry      │  object   │ The natural geome‐  │
413       │                  │           │ try of the contents │
414       │                  │           │ if it were to size  │
415       │                  │           │ itself              │
416       ├──────────────────┼───────────┼─────────────────────┤
417       │     urgent       │  boolean  │ Whether the node or │
418       │                  │           │ any of its descen‐  │
419       │                  │           │ dants has the ur‐   │
420       │                  │           │ gent hint set.      │
421       │                  │           │ Note: This may not  │
422       │                  │           │ exist when compiled │
423       │                  │           │ without xwayland
424       │                  │           │ support             │
425       ├──────────────────┼───────────┼─────────────────────┤
426       │     sticky       │  boolean  │ Whether the node is │
427       │                  │           │ sticky (shows on    │
428       │                  │           │ all workspaces)     │
429       ├──────────────────┼───────────┼─────────────────────┤
430       │      marks       │   array   │ List of marks as‐   │
431       │                  │           │ signed to the node  │
432       ├──────────────────┼───────────┼─────────────────────┤
433       │     focused      │  boolean  │ Whether the node is │
434       │                  │           │ currently focused   │
435       │                  │           │ by the default seat │
436       │                  │           │ (seat0)             │
437       ├──────────────────┼───────────┼─────────────────────┤
438       │      focus       │   array   │ Array of child node │
439       │                  │           │ IDs in the current  │
440       │                  │           │ focus order         │
441       ├──────────────────┼───────────┼─────────────────────┤
442       │      nodes       │   array   │ The tiling children │
443       │                  │           │ nodes for the node  │
444       ├──────────────────┼───────────┼─────────────────────┤
445       │ floating_nodes   │   array   │ The floating chil‐  │
446       │                  │           │ dren nodes for the  │
447       │                  │           │ node                │
448       ├──────────────────┼───────────┼─────────────────────┤
449       │ representation   │  string   │ (Only workspaces) A │
450       │                  │           │ string representa‐  │
451       │                  │           │ tion of the layout  │
452       │                  │           │ of the workspace    │
453       │                  │           │ that can be used as │
454       │                  │           │ an aid in submit‐   │
455       │                  │           │ ting reproduction   │
456       │                  │           │ steps for bug re‐   │
457       │                  │           │ ports               │
458       ├──────────────────┼───────────┼─────────────────────┤
459       │ fullscreen_mode  │  integer  │ (Only containers    │
460       │                  │           │ and views) The      │
461       │                  │           │ fullscreen mode of  │
462       │                  │           │ the node. 0 means   │
463       │                  │           │ none, 1 means full  │
464       │                  │           │ workspace, and 2    │
465       │                  │           │ means global        │
466       │                  │           │ fullscreen          │
467       ├──────────────────┼───────────┼─────────────────────┤
468       │     app_id       │  string   │ (Only views) For an │
469       │                  │           │ xdg-shell view, the │
470       │                  │           │ name of the appli‐  │
471       │                  │           │ cation, if set.     │
472       │                  │           │ Otherwise, null
473       ├──────────────────┼───────────┼─────────────────────┤
474       │       pid        │  integer  │ (Only views) The    │
475       │                  │           │ PID of the applica‐ │
476       │                  │           │ tion that owns the  │
477       │                  │           │ view                │
478       ├──────────────────┼───────────┼─────────────────────┤
479       │     visible      │  boolean  │ (Only views)        │
480       │                  │           │ Whether the node is │
481       │                  │           │ visible             │
482       ├──────────────────┼───────────┼─────────────────────┤
483       │      shell       │  string   │ (Only views) The    │
484       │                  │           │ shell of the view,  │
485       │                  │           │ such as xdg_shell
486       │                  │           │ or xwayland
487       ├──────────────────┼───────────┼─────────────────────┤
488       │  inhibit_idle    │  boolean  │ (Only views)        │
489       │                  │           │ Whether the view is │
490       │                  │           │ inhibiting the idle │
491       │                  │           │ state               │
492       ├──────────────────┼───────────┼─────────────────────┤
493       │ idle_inhibitors  │  object   │ (Only views) An ob‐ │
494       │                  │           │ ject containing the │
495       │                  │           │ state of the appli‐
496       │                  │           │ cation and user
497       │                  │           │ idle inhibitors.    │
498       │                  │           │ application can be  │
499       │                  │           │ enabled or none.    │
500       │                  │           │ user can be focus,  │
501       │                  │           │ fullscreen, open,   │
502       │                  │           │ visible or none.    │
503       ├──────────────────┼───────────┼─────────────────────┤
504       │     window       │  integer  │ (Only xwayland      │
505       │                  │           │ views) The X11 win‐ │
506       │                  │           │ dow ID for the      │
507       │                  │           │ xwayland view       │
508       ├──────────────────┼───────────┼─────────────────────┤
509       │window_properties │  object   │ (Only xwayland      │
510       │                  │           │ views) An object    │
511       │                  │           │ containing the ti‐
512       │                  │           │ tle, class, in‐
513       │                  │           │ stance, win‐
514       │                  │           │ dow_role, win‐
515       │                  │           │ dow_type, and tran‐
516       │                  │           │ sient_for for the   │
517       │                  │           │ view                │
518       └──────────────────┴───────────┴─────────────────────┘
519
520       Example Reply:
521           {
522                "id": 1,
523                "name": "root",
524                "rect": {
525                     "x": 0,
526                     "y": 0,
527                     "width": 1920,
528                     "height": 1080
529                },
530                "focused": false,
531                "focus": [
532                     3
533                ],
534                "border": "none",
535                "current_border_width": 0,
536                "layout": "splith",
537                "orientation": "horizontal",
538                "percent": null,
539                "window_rect": {
540                     "x": 0,
541                     "y": 0,
542                     "width": 0,
543                     "height": 0
544                },
545                "deco_rect": {
546                     "x": 0,
547                     "y": 0,
548                     "width": 0,
549                     "height": 0
550                },
551                "geometry": {
552                     "x": 0,
553                     "y": 0,
554                     "width": 0,
555                     "height": 0
556                },
557                "window": null,
558                "urgent": false,
559                "floating_nodes": [
560                ],
561                "sticky": false,
562                "type": "root",
563                "nodes": [
564                     {
565                          "id": 2147483647,
566                          "name": "__i3",
567                          "rect": {
568                               "x": 0,
569                               "y": 0,
570                               "width": 1920,
571                               "height": 1080
572                          },
573                          "focused": false,
574                          "focus": [
575                               2147483646
576                          ],
577                          "border": "none",
578                          "current_border_width": 0,
579                          "layout": "output",
580                          "orientation": "horizontal",
581                          "percent": null,
582                          "window_rect": {
583                               "x": 0,
584                               "y": 0,
585                               "width": 0,
586                               "height": 0
587                          },
588                          "deco_rect": {
589                               "x": 0,
590                               "y": 0,
591                               "width": 0,
592                               "height": 0
593                          },
594                          "geometry": {
595                               "x": 0,
596                               "y": 0,
597                               "width": 0,
598                               "height": 0
599                          },
600                          "window": null,
601                          "urgent": false,
602                          "floating_nodes": [
603                          ],
604                          "sticky": false,
605                          "type": "output",
606                          "nodes": [
607                               {
608                                    "id": 2147483646,
609                                    "name": "__i3_scratch",
610                                    "rect": {
611                                         "x": 0,
612                                         "y": 0,
613                                         "width": 1920,
614                                         "height": 1080
615                                    },
616                                    "focused": false,
617                                    "focus": [
618                                    ],
619                                    "border": "none",
620                                    "current_border_width": 0,
621                                    "layout": "splith",
622                                    "orientation": "horizontal",
623                                    "percent": null,
624                                    "window_rect": {
625                                         "x": 0,
626                                         "y": 0,
627                                         "width": 0,
628                                         "height": 0
629                                    },
630                                    "deco_rect": {
631                                         "x": 0,
632                                         "y": 0,
633                                         "width": 0,
634                                         "height": 0
635                                    },
636                                    "geometry": {
637                                         "x": 0,
638                                         "y": 0,
639                                         "width": 0,
640                                         "height": 0
641                                    },
642                                    "window": null,
643                                    "urgent": false,
644                                    "floating_nodes": [
645                                    ],
646                                    "sticky": false,
647                                    "type": "workspace"
648                               }
649                          ]
650                     },
651                     {
652                          "id": 3,
653                          "name": "eDP-1",
654                          "rect": {
655                               "x": 0,
656                               "y": 0,
657                               "width": 1920,
658                               "height": 1080
659                          },
660                          "focused": false,
661                          "focus": [
662                               4
663                          ],
664                          "border": "none",
665                          "current_border_width": 0,
666                          "layout": "output",
667                          "orientation": "none",
668                          "percent": 1.0,
669                          "window_rect": {
670                               "x": 0,
671                               "y": 0,
672                               "width": 0,
673                               "height": 0
674                          },
675                          "deco_rect": {
676                               "x": 0,
677                               "y": 0,
678                               "width": 0,
679                               "height": 0
680                          },
681                          "geometry": {
682                               "x": 0,
683                               "y": 0,
684                               "width": 0,
685                               "height": 0
686                          },
687                          "window": null,
688                          "urgent": false,
689                          "floating_nodes": [
690                          ],
691                          "sticky": false,
692                          "type": "output",
693                          "active": true,
694                          "primary": false,
695                          "make": "Unknown",
696                          "model": "0x38ED",
697                          "serial": "0x00000000",
698                          "scale": 1.0,
699                          "transform": "normal",
700                          "current_workspace": "1",
701                          "modes": [
702                               {
703                                    "width": 1920,
704                                    "height": 1080,
705                                    "refresh": 60052
706                               }
707                          ],
708                          "current_mode": {
709                               "width": 1920,
710                               "height": 1080,
711                               "refresh": 60052
712                          },
713                          "nodes": [
714                               {
715                                    "id": 4,
716                                    "name": "1",
717                                    "rect": {
718                                         "x": 0,
719                                         "y": 23,
720                                         "width": 1920,
721                                         "height": 1057
722                                    },
723                                    "focused": false,
724                                    "focus": [
725                                         6,
726                                         5
727                                    ],
728                                    "border": "none",
729                                    "current_border_width": 0,
730                                    "layout": "splith",
731                                    "orientation": "horizontal",
732                                    "percent": null,
733                                    "window_rect": {
734                                         "x": 0,
735                                         "y": 0,
736                                         "width": 0,
737                                         "height": 0
738                                    },
739                                    "deco_rect": {
740                                         "x": 0,
741                                         "y": 0,
742                                         "width": 0,
743                                         "height": 0
744                                    },
745                                    "geometry": {
746                                         "x": 0,
747                                         "y": 0,
748                                         "width": 0,
749                                         "height": 0
750                                    },
751                                    "window": null,
752                                    "urgent": false,
753                                    "floating_nodes": [
754                                    ],
755                                    "sticky": false,
756                                    "num": 1,
757                                    "output": "eDP-1",
758                                    "type": "workspace",
759                                    "representation": "H[URxvt termite]",
760                                    "nodes": [
761                                         {
762                                              "id": 5,
763                                              "name": "urxvt",
764                                              "rect": {
765                                                   "x": 0,
766                                                   "y": 23,
767                                                   "width": 960,
768                                                   "height": 1057
769                                              },
770                                              "focused": false,
771                                              "focus": [
772                                              ],
773                                              "border": "normal",
774                                              "current_border_width": 2,
775                                              "layout": "none",
776                                              "orientation": "none",
777                                              "percent": 0.5,
778                                              "window_rect": {
779                                                   "x": 2,
780                                                   "y": 0,
781                                                   "width": 956,
782                                                   "height": 1030
783                                              },
784                                              "deco_rect": {
785                                                   "x": 0,
786                                                   "y": 0,
787                                                   "width": 960,
788                                                   "height": 25
789                                              },
790                                              "geometry": {
791                                                   "x": 0,
792                                                   "y": 0,
793                                                   "width": 1124,
794                                                   "height": 422
795                                              },
796                                              "window": 4194313,
797                                              "urgent": false,
798                                              "floating_nodes": [
799                                              ],
800                                              "sticky": false,
801                                              "type": "con",
802                                              "fullscreen_mode": 0,
803                                              "pid": 23959,
804                                              "app_id": null,
805                                              "visible": true,
806                                              "shell": "xwayland",
807                                              "inhibit_idle": true,
808                                              "idle_inhibitors": {
809                                                   "application": "none",
810                                                   "user": "visible",
811                                              },
812                                              "window_properties": {
813                                                   "class": "URxvt",
814                                                   "instance": "urxvt",
815                                                   "title": "urxvt",
816                                                   "transient_for": null
817                                              },
818                                              "nodes": [
819                                              ]
820                                         },
821                                         {
822                                              "id": 6,
823                                              "name": "",
824                                              "rect": {
825                                                   "x": 960,
826                                                   "y": 23,
827                                                   "width": 960,
828                                                   "height": 1057
829                                              },
830                                              "focused": true,
831                                              "focus": [
832                                              ],
833                                              "border": "normal",
834                                              "current_border_width": 2,
835                                              "layout": "none",
836                                              "orientation": "none",
837                                              "percent": 0.5,
838                                              "window_rect": {
839                                                   "x": 2,
840                                                   "y": 0,
841                                                   "width": 956,
842                                                   "height": 1030
843                                              },
844                                              "deco_rect": {
845                                                   "x": 0,
846                                                   "y": 0,
847                                                   "width": 960,
848                                                   "height": 25
849                                              },
850                                              "geometry": {
851                                                   "x": 0,
852                                                   "y": 0,
853                                                   "width": 817,
854                                                   "height": 458
855                                              },
856                                              "window": null,
857                                              "urgent": false,
858                                              "floating_nodes": [
859                                              ],
860                                              "sticky": false,
861                                              "type": "con",
862                                              "fullscreen_mode": 0,
863                                              "pid": 25370,
864                                              "app_id": "termite",
865                                              "visible": true,
866                                              "shell": "xdg_shell",
867                                              "inhibit_idle": false,
868                                              "idle_inhibitors": {
869                                                   "application": "none",
870                                                   "user": "fullscreen",
871                                              },
872                                              "nodes": [
873                                              ]
874                                         }
875                                    ]
876                               }
877                          ]
878                     }
879                ]
880           }
881
882   5. GET_MARKS
883       MESSAGE
884       Retrieve the currently set marks
885
886       REPLY
887       An array of marks current set. Since each mark can only be set for one
888       container, this is a set so each value is unique and the order is unde‐
889       fined.
890
891       Example Reply:
892           [
893                "one",
894                "test"
895           ]
896
897   6. GET_BAR_CONFIG (WITHOUT A PAYLOAD)
898       MESSAGE
899       When sending without a payload, this retrieves the list of configured
900       bar IDs
901
902       REPLY
903       An array of bar IDs, which are strings
904
905       Example Reply:
906           [
907                "bar-0",
908                "bar-1"
909           ]
910
911   6. GET_BAR_CONFIG (WITH A PAYLOAD)
912       MESSAGE
913       When sent with a bar ID as the payload, this retrieves the config asso‐
914       ciated with the specified by the bar ID in the payload. This is used by
915       swaybar, but could also be used for third party bars
916
917       REPLY
918       An object that represents the configuration for the bar with the bar ID
919       sent as the payload. The following properties exists and more informa‐
920       tion about what their value mean can be found in sway-bar(5):
921
922       ┌────────────────────┬───────────┬─────────────────────┐
923PROPERTY       DATA TYPE DESCRIPTION     
924       ├────────────────────┼───────────┼─────────────────────┤
925       │        id          │  string   │ The bar ID          │
926       ├────────────────────┼───────────┼─────────────────────┤
927       │       mode         │  string   │ The mode for the    │
928       │                    │           │ bar. It can be      │
929       │                    │           │ dock, hide, or in‐
930       │                    │           │ visible
931       ├────────────────────┼───────────┼─────────────────────┤
932       │     position       │  string   │ The bar's position. │
933       │                    │           │ It can currently    │
934       │                    │           │ either be bottom or │
935       │                    │           │ top
936       ├────────────────────┼───────────┼─────────────────────┤
937       │  status_command    │  string   │ The command which   │
938       │                    │           │ should be run to    │
939       │                    │           │ generate the status │
940       │                    │           │ line                │
941       ├────────────────────┼───────────┼─────────────────────┤
942       │       font         │  string   │ The font to use for │
943       │                    │           │ the text on the bar │
944       ├────────────────────┼───────────┼─────────────────────┤
945       │ workspace_buttons  │  boolean  │ Whether to display  │
946       │                    │           │ the workspace but‐  │
947       │                    │           │ tons on the bar     │
948       ├────────────────────┼───────────┼─────────────────────┤
949       │workspace_min_width │  integer  │ Minimum width in px │
950       │                    │           │ for the workspace   │
951       │                    │           │ buttons on the bar  │
952       ├────────────────────┼───────────┼─────────────────────┤
953       │binding_mode_indi‐  │  boolean  │ Whether to display  │
954       │cator               │           │ the current binding │
955       │                    │           │ mode on the bar     │
956       ├────────────────────┼───────────┼─────────────────────┤
957       │      verbose       │  boolean  │ For i3 compatibil‐  │
958       │                    │           │ ity, this will be   │
959       │                    │           │ the boolean value   │
960       │                    │           │ false.              │
961       ├────────────────────┼───────────┼─────────────────────┤
962       │      colors        │  object   │ An object contain‐  │
963       │                    │           │ ing the #RRGGBBAA
964       │                    │           │ colors to use for   │
965       │                    │           │ the bar. See below  │
966       │                    │           │ for more informa‐   │
967       │                    │           │ tion                │
968       ├────────────────────┼───────────┼─────────────────────┤
969       │       gaps         │  object   │ An object repre‐    │
970       │                    │           │ senting the gaps    │
971       │                    │           │ for the bar con‐    │
972       │                    │           │ sisting of top,     │
973       │                    │           │ right, bottom, and  │
974       │                    │           │ left.               │
975       ├────────────────────┼───────────┼─────────────────────┤
976       │    bar_height      │  integer  │ The absolute height │
977       │                    │           │ to use for the bar  │
978       │                    │           │ or 0 to automati‐   │
979       │                    │           │ cally size based on │
980       │                    │           │ the font            │
981       ├────────────────────┼───────────┼─────────────────────┤
982       │  status_padding    │  integer  │ The vertical pad‐   │
983       │                    │           │ ding to use for the │
984       │                    │           │ status line         │
985       ├────────────────────┼───────────┼─────────────────────┤
986       │status_edge_padding │  integer  │ The horizontal pad‐ │
987       │                    │           │ ding to use for the │
988       │                    │           │ status line when at │
989       │                    │           │ the end of an out‐  │
990       │                    │           │ put                 │
991       └────────────────────┴───────────┴─────────────────────┘
992
993       The colors object contains the following properties, which are all
994       strings containing the #RRGGBBAA representation of the color:
995
996       ┌──────────────────────────┬────────────────────────────┐
997PROPERTY          DESCRIPTION         
998       ├──────────────────────────┼────────────────────────────┤
999       │       background         │ The color to use for the   │
1000       │                          │ bar background on unfo‐    │
1001       │                          │ cused outputs              │
1002       ├──────────────────────────┼────────────────────────────┤
1003       │       statusline         │ The color to use for the   │
1004       │                          │ status line text on unfo‐  │
1005       │                          │ cused outputs              │
1006       ├──────────────────────────┼────────────────────────────┤
1007       │        separator         │ The color to use for the   │
1008       │                          │ separator text on unfo‐    │
1009       │                          │ cused outputs              │
1010       ├──────────────────────────┼────────────────────────────┤
1011       │   focused_background     │ The color to use for the   │
1012       │                          │ background of the bar on   │
1013       │                          │ the focused output         │
1014       ├──────────────────────────┼────────────────────────────┤
1015       │   focused_statusline     │ The color to use for the   │
1016       │                          │ status line text on the    │
1017       │                          │ focused output             │
1018       ├──────────────────────────┼────────────────────────────┤
1019       │    focused_separator     │ The color to use for the   │
1020       │                          │ separator text on the fo‐  │
1021       │                          │ cused output               │
1022       ├──────────────────────────┼────────────────────────────┤
1023       │ focused_workspace_text   │ The color to use for the   │
1024       │                          │ text of the focused        │
1025       │                          │ workspace button           │
1026       ├──────────────────────────┼────────────────────────────┤
1027       │  focused_workspace_bg    │ The color to use for the   │
1028       │                          │ background of the focused  │
1029       │                          │ workspace button           │
1030       ├──────────────────────────┼────────────────────────────┤
1031       │focused_workspace_border  │ The color to use for the   │
1032       │                          │ border of the focused      │
1033       │                          │ workspace button           │
1034       ├──────────────────────────┼────────────────────────────┤
1035       │  active_workspace_text   │ The color to use for the   │
1036       │                          │ text of the workspace but‐ │
1037       │                          │ tons for the visible       │
1038       │                          │ workspaces on unfocused    │
1039       │                          │ outputs                    │
1040       ├──────────────────────────┼────────────────────────────┤
1041       │   active_workspace_bg    │ The color to use for the   │
1042       │                          │ background of the          │
1043       │                          │ workspace buttons for the  │
1044       │                          │ visible workspaces on un‐  │
1045       │                          │ focused outputs            │
1046       ├──────────────────────────┼────────────────────────────┤
1047       │ active_workspace_border  │ The color to use for the   │
1048       │                          │ border of the workspace    │
1049       │                          │ buttons for the visible    │
1050       │                          │ workspaces on unfocused    │
1051       │                          │ outputs                    │
1052       ├──────────────────────────┼────────────────────────────┤
1053       │ inactive_workspace_text  │ The color to use for the   │
1054       │                          │ text of the workspace but‐ │
1055       │                          │ tons for workspaces that   │
1056       │                          │ are not visible            │
1057       ├──────────────────────────┼────────────────────────────┤
1058       │  inactive_workspace_bg   │ The color to use for the   │
1059       │                          │ background of the          │
1060       │                          │ workspace buttons for      │
1061       │                          │ workspaces that are not    │
1062       │                          │ visible                    │
1063       ├──────────────────────────┼────────────────────────────┤
1064       │inactive_workspace_border │ The color to use for the   │
1065       │                          │ border of the workspace    │
1066       │                          │ buttons for workspaces     │
1067       │                          │ that are not visible       │
1068       ├──────────────────────────┼────────────────────────────┤
1069       │  urgent_workspace_text   │ The color to use for the   │
1070       │                          │ text of the workspace but‐ │
1071       │                          │ tons for workspaces that   │
1072       │                          │ contain an urgent view     │
1073       ├──────────────────────────┼────────────────────────────┤
1074       │   urgent_workspace_bg    │ The color to use for the   │
1075       │                          │ background of the          │
1076       │                          │ workspace buttons for      │
1077       │                          │ workspaces that contain an │
1078       │                          │ urgent view                │
1079       ├──────────────────────────┼────────────────────────────┤
1080       │ urgent_workspace_border  │ The color to use for the   │
1081       │                          │ border of the workspace    │
1082       │                          │ buttons for workspaces     │
1083       │                          │ that contain an urgent     │
1084       │                          │ view                       │
1085       ├──────────────────────────┼────────────────────────────┤
1086       │    binding_mode_text     │ The color to use for the   │
1087       │                          │ text of the binding mode   │
1088       │                          │ indicator                  │
1089       ├──────────────────────────┼────────────────────────────┤
1090       │     binding_mode_bg      │ The color to use for the   │
1091       │                          │ background of the binding  │
1092       │                          │ mode indicator             │
1093       ├──────────────────────────┼────────────────────────────┤
1094       │   binding_mode_border    │ The color to use for the   │
1095       │                          │ border of the binding mode │
1096       │                          │ indicator                  │
1097       └──────────────────────────┴────────────────────────────┘
1098
1099       Example Reply:
1100           {
1101                "id": "bar-0",
1102                "mode": "dock",
1103                "position": "top",
1104                "status_command": "while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done",
1105                "font": "monospace 10",
1106                "gaps": {
1107                     "top": 0,
1108                     "right": 0,
1109                     "bottom": 0,
1110                     "left": 0
1111                },
1112                "bar_height": 0,
1113                "status_padding": 1,
1114                "status_edge_padding": 3,
1115                "workspace_buttons": true,
1116                "workspace_min_width": 0,
1117                "binding_mode_indicator": true,
1118                "verbose": false,
1119                "pango_markup": false,
1120                "colors": {
1121                     "background": "#323232ff",
1122                     "statusline": "#ffffffff",
1123                     "separator": "#666666ff",
1124                     "focused_background": "#323232ff",
1125                     "focused_statusline": "#ffffffff",
1126                     "focused_separator": "#666666ff",
1127                     "focused_workspace_border": "#4c7899ff",
1128                     "focused_workspace_bg": "#285577ff",
1129                     "focused_workspace_text": "#ffffffff",
1130                     "inactive_workspace_border": "#32323200",
1131                     "inactive_workspace_bg": "#32323200",
1132                     "inactive_workspace_text": "#5c5c5cff",
1133                     "active_workspace_border": "#333333ff",
1134                     "active_workspace_bg": "#5f676aff",
1135                     "active_workspace_text": "#ffffffff",
1136                     "urgent_workspace_border": "#2f343aff",
1137                     "urgent_workspace_bg": "#900000ff",
1138                     "urgent_workspace_text": "#ffffffff",
1139                     "binding_mode_border": "#2f343aff",
1140                     "binding_mode_bg": "#900000ff",
1141                     "binding_mode_text": "#ffffffff"
1142                },
1143           }
1144
1145   7. GET_VERSION
1146       MESSAGE
1147       Retrieve version information about the sway process
1148
1149       REPLY
1150       An object containing the following properties:
1151
1152       ┌───────────────┬───────────┬─────────────────────┐
1153PROPERTY    DATA TYPE DESCRIPTION     
1154       ├───────────────┼───────────┼─────────────────────┤
1155       │    major      │  integer  │ The major version   │
1156       │               │           │ of the sway process │
1157       ├───────────────┼───────────┼─────────────────────┤
1158       │    minor      │  integer  │ The minor version   │
1159       │               │           │ of the sway process │
1160       ├───────────────┼───────────┼─────────────────────┤
1161       │    patch      │  integer  │ The patch version   │
1162       │               │           │ of the sway process │
1163       ├───────────────┼───────────┼─────────────────────┤
1164       │human_readable │  string   │ A human readable    │
1165       │               │           │ version string that │
1166       │               │           │ will likely contain │
1167       │               │           │ more useful infor‐  │
1168       │               │           │ mation such as the  │
1169       │               │           │ git commit short    │
1170       │               │           │ hash and git branch │
1171       ├───────────────┼───────────┼─────────────────────┤
1172       │loaded_con‐    │  string   │ The path to the     │
1173       │fig_file_name  │           │ loaded config file  │
1174       └───────────────┴───────────┴─────────────────────┘
1175
1176       Example Reply:
1177           {
1178                "human_readable": "1.0-rc1-117-g2f7247e0 (Feb 24 2019, branch 'master')",
1179                "major": 1,
1180                "minor": 0,
1181                "patch": 0,
1182                "loaded_config_file_name": "/home/redsoxfan/.config/sway/config"
1183           }
1184
1185   8. GET_BINDING_MODES
1186       MESSAGE
1187       Retrieve the list of binding modes that currently configured
1188
1189       REPLY
1190       An array of strings, with each string being the name of a binding mode.
1191       This will always contain at least one mode (currently default), which
1192       is the default binding mode
1193
1194       Example Reply:
1195           [
1196                "default",
1197                "resize",
1198           ]
1199
1200   9. GET_CONFIG
1201       MESSAGE
1202       Retrieve the contents of the config that was last loaded
1203
1204       REPLY
1205       An object with a single string property containing the contents of the
1206       config
1207
1208       Example Reply:
1209           {
1210                "config": "set $mod Mod4nbindsym $mod+q exitn"
1211           }
1212
1213   10. SEND_TICK
1214       MESSAGE
1215       Issues a TICK event to all clients subscribing to the event to ensure
1216       that all events prior to the tick were received. If a payload is given,
1217       it will be included in the TICK event
1218
1219       REPLY
1220       A single object contains the property success, which is a boolean value
1221       indicating whether the TICK event was sent.
1222
1223       Example Reply:
1224           {
1225                "success": true
1226           }
1227
1228   11. SYNC
1229       MESSAGE
1230       For i3 compatibility, this command will just return a failure object
1231       since it does not make sense to implement in sway due to the X11 nature
1232       of the command. If you are curious about what this IPC command does in
1233       i3, refer to the i3 documentation.
1234
1235       REPLY
1236       A single object that contains the property success, which is set to the
1237       boolean value false.
1238
1239       Exact Reply:
1240           {
1241                "success": false
1242           }
1243
1244   12. GET_BINDING_STATE
1245       MESSAGE
1246       Returns the currently active binding mode.
1247
1248       REPLY
1249       A single object that contains the property name, which is set to the
1250       currently active binding mode as a string.
1251
1252       Exact Reply:
1253           {
1254                "name": "default"
1255           }
1256
1257   100. GET_INPUTS
1258       MESSAGE
1259       Retrieve a list of the input devices currently available
1260
1261       REPLY
1262       An array of objects corresponding to each input device. Each object has
1263       the following properties:
1264
1265       ┌─────────────────┬───────────┬─────────────────────┐
1266PROPERTY     DATA TYPE DESCRIPTION     
1267       ├─────────────────┼───────────┼─────────────────────┤
1268       │   identifier    │  string   │ The identifier for  │
1269       │                 │           │ the input device    │
1270       ├─────────────────┼───────────┼─────────────────────┤
1271       │      name       │  string   │ The human readable  │
1272       │                 │           │ name for the device │
1273       ├─────────────────┼───────────┼─────────────────────┤
1274       │     vendor      │  integer  │ The vendor code for │
1275       │                 │           │ the input device    │
1276       ├─────────────────┼───────────┼─────────────────────┤
1277       │    product      │  integer  │ The product code    │
1278       │                 │           │ for the input de‐   │
1279       │                 │           │ vice                │
1280       ├─────────────────┼───────────┼─────────────────────┤
1281       │      type       │  string   │ The device type.    │
1282       │                 │           │ Currently this can  │
1283       │                 │           │ be keyboard,        │
1284       │                 │           │ pointer, touch,     │
1285       │                 │           │ tablet_tool,        │
1286       │                 │           │ tablet_pad, or      │
1287       │                 │           │ switch
1288       ├─────────────────┼───────────┼─────────────────────┤
1289       │xkb_active_lay‐  │  string   │ (Only keyboards)    │
1290       │out_name         │           │ The name of the ac‐ │
1291       │                 │           │ tive keyboard lay‐  │
1292       │                 │           │ out in use          │
1293       ├─────────────────┼───────────┼─────────────────────┤
1294       │xkb_layout_names │   array   │ (Only keyboards) A  │
1295       │                 │           │ list a layout names │
1296       │                 │           │ configured for the  │
1297       │                 │           │ keyboard            │
1298       ├─────────────────┼───────────┼─────────────────────┤
1299       │xkb_active_lay‐  │  integer  │ (Only keyboards)    │
1300       │out_index        │           │ The index of the    │
1301       │                 │           │ active keyboard     │
1302       │                 │           │ layout in use       │
1303       ├─────────────────┼───────────┼─────────────────────┤
1304       │ scroll_factor   │ floating  │ (Only pointers)     │
1305       │                 │           │ Multiplier applied  │
1306       │                 │           │ on scroll event     │
1307       │                 │           │ values.             │
1308       ├─────────────────┼───────────┼─────────────────────┤
1309       │    libinput     │  object   │ (Only libinput de‐  │
1310       │                 │           │ vices) An object    │
1311       │                 │           │ describing the cur‐ │
1312       │                 │           │ rent device set‐    │
1313       │                 │           │ tings. See below    │
1314       │                 │           │ for more informa‐   │
1315       │                 │           │ tion                │
1316       └─────────────────┴───────────┴─────────────────────┘
1317       The libinput object describes the device configuration for libinput de‐
1318       vices. Only properties that are supported for the device will be added
1319       to the object. In addition to the possible options listed, all string
1320       properties may also be unknown, in the case that a new option is added
1321       to libinput. See sway-input(5) for information on the meaning of the
1322       possible values. The following properties will be included for devices
1323       that support them:
1324
1325       ┌───────────────────┬───────────┬─────────────────────┐
1326PROPERTY      DATA TYPE DESCRIPTION     
1327       ├───────────────────┼───────────┼─────────────────────┤
1328       │   send_events     │  string   │ Whether events are  │
1329       │                   │           │ being sent by the   │
1330       │                   │           │ device. It can be   │
1331       │                   │           │ enabled, disabled,  │
1332       │                   │           │ or disabled_on_ex‐
1333       │                   │           │ ternal_mouse
1334       ├───────────────────┼───────────┼─────────────────────┤
1335       │       tap         │  string   │ Whether tap to      │
1336       │                   │           │ click is enabled.   │
1337       │                   │           │ It can be enabled
1338       │                   │           │ or disabled
1339       ├───────────────────┼───────────┼─────────────────────┤
1340       │  tap_button_map   │  string   │ The finger to but‐  │
1341       │                   │           │ ton mapping in use. │
1342       │                   │           │ It can be lmr or    │
1343       │                   │           │ lrm
1344       ├───────────────────┼───────────┼─────────────────────┤
1345       │     tap_drag      │  string   │ Whether tap-and-    │
1346       │                   │           │ drag is enabled. It │
1347       │                   │           │ can be enabled or   │
1348       │                   │           │ disabled
1349       ├───────────────────┼───────────┼─────────────────────┤
1350       │  tap_drag_lock    │  string   │ Whether drag-lock   │
1351       │                   │           │ is enabled. It can  │
1352       │                   │           │ be enabled or dis‐
1353       │                   │           │ abled
1354       ├───────────────────┼───────────┼─────────────────────┤
1355       │   accel_speed     │  double   │ The pointer-accel‐  │
1356       │                   │           │ eration in use      │
1357       ├───────────────────┼───────────┼─────────────────────┤
1358       │  accel_profile    │  string   │ The acceleration    │
1359       │                   │           │ profile in use. It  │
1360       │                   │           │ can be none, flat,  │
1361       │                   │           │ or adaptive
1362       ├───────────────────┼───────────┼─────────────────────┤
1363       │  natural_scroll   │  string   │ Whether natural     │
1364       │                   │           │ scrolling is en‐    │
1365       │                   │           │ abled. It can be    │
1366       │                   │           │ enabled or disabled
1367       ├───────────────────┼───────────┼─────────────────────┤
1368       │   left_handed     │  string   │ Whether left-handed │
1369       │                   │           │ mode is enabled. It │
1370       │                   │           │ can be enabled or   │
1371       │                   │           │ disabled
1372       ├───────────────────┼───────────┼─────────────────────┤
1373       │   click_method    │  string   │ The click method in │
1374       │                   │           │ use. It can be      │
1375       │                   │           │ none, button_areas, │
1376       │                   │           │ or clickfinger
1377       ├───────────────────┼───────────┼─────────────────────┤
1378       │ middle_emulation  │  string   │ Whether middle emu‐ │
1379       │                   │           │ lation is enabled.  │
1380       │                   │           │ It can be enabled
1381       │                   │           │ or disabled
1382       ├───────────────────┼───────────┼─────────────────────┤
1383       │  scroll_method    │  string   │ The scroll method   │
1384       │                   │           │ in use. It can be   │
1385       │                   │           │ none, two_finger,   │
1386       │                   │           │ edge, or on_but‐
1387       │                   │           │ ton_down
1388       ├───────────────────┼───────────┼─────────────────────┤
1389       │  scroll_button    │    int    │ The scroll button   │
1390       │                   │           │ to use when         │
1391       │                   │           │ scroll_method is    │
1392       │                   │           │ on_button_down.     │
1393       │                   │           │ This will be given  │
1394       │                   │           │ as an input event   │
1395       │                   │           │ code                │
1396       ├───────────────────┼───────────┼─────────────────────┤
1397       │       dwt         │  string   │ Whether disable-    │
1398       │                   │           │ while-typing is en‐ │
1399       │                   │           │ abled. It can be    │
1400       │                   │           │ enabled or disabled
1401       ├───────────────────┼───────────┼─────────────────────┤
1402       │       dwtp        │  string   │ Whether disable-    │
1403       │                   │           │ while-trackpointing │
1404       │                   │           │ is enabled. It can  │
1405       │                   │           │ be enabled or_dis‐  │
1406       │                   │           │ abled_              │
1407       ├───────────────────┼───────────┼─────────────────────┤
1408       │calibration_matrix │   array   │ An array of 6       │
1409       │                   │           │ floats representing │
1410       │                   │           │ the calibration ma‐ │
1411       │                   │           │ trix for absolute   │
1412       │                   │           │ devices such as     │
1413       │                   │           │ touchscreens        │
1414       └───────────────────┴───────────┴─────────────────────┘
1415
1416       Example Reply:
1417           [
1418                {
1419                     "identifier": "1:1:AT_Translated_Set_2_keyboard",
1420                     "name": "AT Translated Set 2 keyboard",
1421                     "vendor": 1,
1422                     "product": 1,
1423                     "type": "keyboard",
1424                     "xkb_active_layout_name": "English (US)",
1425                     "libinput": {
1426                          "send_events": "enabled"
1427                     }
1428                },
1429                {
1430                     "identifier": "1267:5:Elan_Touchpad",
1431                     "name": "Elan Touchpad",
1432                     "vendor": 1267,
1433                     "product": 5,
1434                     "type": "pointer",
1435                     "libinput": {
1436                          "send_events": "enabled",
1437                          "tap": "enabled",
1438                          "tap_button_map": "lmr",
1439                          "tap_drag": "enabled",
1440                          "tap_drag_lock": "disabled",
1441                          "accel_speed": 0.0,
1442                          "accel_profile": "none",
1443                          "natural_scroll", "disabled",
1444                          "left_handed": "disabled",
1445                          "click_method": "button_areas",
1446                          "middle_emulation": "disabled",
1447                          "scroll_method": "edge",
1448                          "dwt": "enabled",
1449                          "dwtp": "enabled"
1450                     }
1451                },
1452                {
1453                     "identifier": "3034:22494:USB2.0_VGA_UVC_WebCam:_USB2.0_V",
1454                     "name": "USB2.0 VGA UVC WebCam: USB2.0 V",
1455                     "vendor": 3034,
1456                     "product": 22494,
1457                     "type": "keyboard",
1458                     "xkb_active_layout_name": "English (US)",
1459                     "libinput": {
1460                          "send_events": "enabled"
1461                     }
1462                },
1463                {
1464                     "identifier": "0:3:Sleep_Button",
1465                     "name": "Sleep Button",
1466                     "vendor": 0,
1467                     "product": 3,
1468                     "type": "keyboard",
1469                     "xkb_active_layout_name": "English (US)",
1470                     "libinput": {
1471                          "send_events": "enabled"
1472                     }
1473                },
1474                {
1475                     "identifier": "0:5:Lid_Switch",
1476                     "name": "Lid Switch",
1477                     "vendor": 0,
1478                     "product": 5,
1479                     "type": "switch",
1480                     "libinput": {
1481                          "send_events": "enabled"
1482                     }
1483                },
1484                {
1485                     "identifier": "0:6:Video_Bus",
1486                     "name": "Video Bus",
1487                     "vendor": 0,
1488                     "product": 6,
1489                     "type": "keyboard",
1490                     "xkb_active_layout_name": "English (US)",
1491                     "libinput": {
1492                          "send_events": "enabled"
1493                     }
1494                },
1495                {
1496                     "identifier": "0:1:Power_Button",
1497                     "name": "Power Button",
1498                     "vendor": 0,
1499                     "product": 1,
1500                     "type": "keyboard",
1501                     "xkb_active_layout_name": "English (US)",
1502                     "libinput": {
1503                          "send_events": "enabled"
1504                     }
1505                }
1506           ]
1507
1508   101. GET_SEATS
1509       MESSAGE
1510       Retrieve a list of the seats currently configured
1511
1512       REPLY
1513       An array of objects corresponding to each seat. There will always be at
1514       least one seat. Each object has the following properties:
1515
1516       ┌─────────────┬───────────┬─────────────────────┐
1517PROPERTY   DATA TYPE DESCRIPTION     
1518       ├─────────────┼───────────┼─────────────────────┤
1519       │    name     │  string   │ The unique name for │
1520       │             │           │ the seat            │
1521       ├─────────────┼───────────┼─────────────────────┤
1522       │capabilities │  integer  │ The number of capa‐ │
1523       │             │           │ bilities that the   │
1524       │             │           │ seat has            │
1525       ├─────────────┼───────────┼─────────────────────┤
1526       │   focus     │  integer  │  The id of the node │
1527       │             │           │  currently focused  │
1528       │             │           │  by the seat or 0
1529       │             │           │  when the seat is   │
1530       │             │           │  not currently fo‐  │
1531       │             │           │  cused by a node    │
1532       │             │           │  (i.e. a surface    │
1533       │             │           │  layer or xwayland  │
1534       │             │           │  unmanaged has fo‐  │
1535       │             │           │  cus)               │
1536       ├─────────────┼───────────┼─────────────────────┤
1537       │  devices    │   array   │ An array of input   │
1538       │             │           │ devices that are    │
1539       │             │           │ attached to the     │
1540       │             │           │ seat. Currently,    │
1541       │             │           │ this is an array of │
1542       │             │           │ objects that are    │
1543       │             │           │ identical to those  │
1544       │             │           │ returned by GET_IN‐
1545       │             │           │ PUTS
1546       └─────────────┴───────────┴─────────────────────┘
1547
1548       Example Reply:
1549           [
1550                {
1551                     "name": "seat0",
1552                     "capabilities": 3,
1553                     "focus": 7,
1554                     "devices": [
1555                          {
1556                               "identifier": "1:1:AT_Translated_Set_2_keyboard",
1557                               "name": "AT Translated Set 2 keyboard",
1558                               "vendor": 1,
1559                               "product": 1,
1560                               "type": "keyboard",
1561                               "xkb_active_layout_name": "English (US)",
1562                               "libinput": {
1563                                    "send_events": "enabled"
1564                               }
1565                          },
1566                          {
1567                               "identifier": "1267:5:Elan_Touchpad",
1568                               "name": "Elan Touchpad",
1569                               "vendor": 1267,
1570                               "product": 5,
1571                               "type": "pointer",
1572                               "libinput": {
1573                                    "send_events": "enabled",
1574                                    "tap": "enabled",
1575                                    "tap_button_map": "lmr",
1576                                    "tap_drag": "enabled",
1577                                    "tap_drag_lock": "disabled",
1578                                    "accel_speed": 0.0,
1579                                    "accel_profile": "none",
1580                                    "natural_scroll", "disabled",
1581                                    "left_handed": "disabled",
1582                                    "click_method": "button_areas",
1583                                    "middle_emulation": "disabled",
1584                                    "scroll_method": "edge",
1585                                    "dwt": "enabled",
1586                                    "dwtp": "enabled"
1587                               }
1588                          },
1589                          {
1590                               "identifier": "3034:22494:USB2.0_VGA_UVC_WebCam:_USB2.0_V",
1591                               "name": "USB2.0 VGA UVC WebCam: USB2.0 V",
1592                               "vendor": 3034,
1593                               "product": 22494,
1594                               "type": "keyboard",
1595                               "xkb_active_layout_name": "English (US)",
1596                               "libinput": {
1597                                    "send_events": "enabled"
1598                               }
1599                          },
1600                          {
1601                               "identifier": "0:3:Sleep_Button",
1602                               "name": "Sleep Button",
1603                               "vendor": 0,
1604                               "product": 3,
1605                               "type": "keyboard",
1606                               "xkb_active_layout_name": "English (US)",
1607                               "libinput": {
1608                                    "send_events": "enabled"
1609                               }
1610                          },
1611                          {
1612                               "identifier": "0:5:Lid_Switch",
1613                               "name": "Lid Switch",
1614                               "vendor": 0,
1615                               "product": 5,
1616                               "type": "switch",
1617                               "libinput": {
1618                                    "send_events": "enabled"
1619                               }
1620                          },
1621                          {
1622                               "identifier": "0:6:Video_Bus",
1623                               "name": "Video Bus",
1624                               "vendor": 0,
1625                               "product": 6,
1626                               "type": "keyboard",
1627                               "xkb_active_layout_name": "English (US)",
1628                               "libinput": {
1629                                    "send_events": "enabled"
1630                               }
1631                          },
1632                          {
1633                               "identifier": "0:1:Power_Button",
1634                               "name": "Power Button",
1635                               "vendor": 0,
1636                               "product": 1,
1637                               "type": "keyboard",
1638                               "xkb_active_layout_name": "English (US)",
1639                               "libinput": {
1640                                    "send_events": "enabled"
1641                               }
1642                          }
1643                     ]
1644                }
1645           ]
1646

EVENTS

1648       Events are a way for client to get notified of changes to sway. A
1649       client can subscribe to any events it wants to be notified of changes
1650       for. The event is sent in the same format as a reply. The following
1651       events are currently available:
1652
1653       ┌───────────┬──────────────────┬─────────────────────┐
1654EVENT TYPE NAME       DESCRIPTION     
1655       ├───────────┼──────────────────┼─────────────────────┤
1656       │0x80000000 │    workspace     │ Sent whenever an    │
1657       │           │                  │ event involving a   │
1658       │           │                  │ workspace occurs    │
1659       │           │                  │ such as initializa‐ │
1660       │           │                  │ tion of a new       │
1661       │           │                  │ workspace or a dif‐ │
1662       │           │                  │ ferent workspace    │
1663       │           │                  │ gains focus         │
1664       ├───────────┼──────────────────┼─────────────────────┤
1665       │0x80000002 │       mode       │ Sent whenever the   │
1666       │           │                  │ binding mode        │
1667       │           │                  │ changes             │
1668       ├───────────┼──────────────────┼─────────────────────┤
1669       │0x80000003 │      window      │ Sent whenever an    │
1670       │           │                  │ event involving a   │
1671       │           │                  │ view occurs such as │
1672       │           │                  │ being reparented,   │
1673       │           │                  │ focused, or closed  │
1674       ├───────────┼──────────────────┼─────────────────────┤
1675       │0x80000004 │ barconfig_update │ Sent whenever a bar │
1676       │           │                  │ config changes      │
1677       ├───────────┼──────────────────┼─────────────────────┤
1678       │0x80000005 │     binding      │ Sent when a config‐ │
1679       │           │                  │ ured binding is ex‐ │
1680       │           │                  │ ecuted              │
1681       ├───────────┼──────────────────┼─────────────────────┤
1682       │0x80000006 │     shutdown     │ Sent when the ipc   │
1683       │           │                  │ shuts down because  │
1684       │           │                  │ sway is exiting     │
1685       ├───────────┼──────────────────┼─────────────────────┤
1686       │0x80000007 │       tick       │ Sent when an ipc    │
1687       │           │                  │ client sends a      │
1688       │           │                  │ SEND_TICK message   │
1689       ├───────────┼──────────────────┼─────────────────────┤
1690       │0x80000014 │ bar_state_update │ Send when the visi‐ │
1691       │           │                  │ bility of a bar     │
1692       │           │                  │ should change due   │
1693       │           │                  │ to a modifier       │
1694       ├───────────┼──────────────────┼─────────────────────┤
1695       │0x80000015 │      input       │ Sent when something │
1696       │           │                  │ related to input    │
1697       │           │                  │ devices changes     │
1698       └───────────┴──────────────────┴─────────────────────┘
1699
1700   0x80000000. WORKSPACE
1701       Sent whenever a change involving a workspace occurs. The event consists
1702       of a single object with the following properties:
1703
1704       ┌─────────┬───────────┬─────────────────────┐
1705PROPERTY DATA TYPE DESCRIPTION     
1706       ├─────────┼───────────┼─────────────────────┤
1707       │ change  │  string   │ The type of change  │
1708       │         │           │ that occurred. See  │
1709       │         │           │ below for more in‐  │
1710       │         │           │ formation           │
1711       ├─────────┼───────────┼─────────────────────┤
1712       │current  │  object   │ An object repre‐    │
1713       │         │           │ senting the         │
1714       │         │           │ workspace effected  │
1715       │         │           │ or null for reload
1716       │         │           │ changes             │
1717       ├─────────┼───────────┼─────────────────────┤
1718       │  old    │  object   │ For a focus change, │
1719       │         │           │ this is will be an  │
1720       │         │           │ object representing │
1721       │         │           │ the workspace being │
1722       │         │           │ switched from. Oth‐ │
1723       │         │           │ erwise, it is null
1724       └─────────┴───────────┴─────────────────────┘
1725
1726       The following change types are currently available:
1727
1728       ┌───────┬────────────────────────────┐
1729TYPE  DESCRIPTION         
1730       ├───────┼────────────────────────────┤
1731       │ init  │ The workspace was created  │
1732       ├───────┼────────────────────────────┤
1733       │empty  │ The workspace is empty and │
1734       │       │ is being destroyed since   │
1735       │       │ it is not visible          │
1736       ├───────┼────────────────────────────┤
1737       │focus  │ The workspace was focused. │
1738       │       │ See the old property for   │
1739       │       │ the previous focus         │
1740       ├───────┼────────────────────────────┤
1741       │ move  │ The workspace was moved to │
1742       │       │ a different output         │
1743       ├───────┼────────────────────────────┤
1744       │rename │ The workspace was renamed  │
1745       ├───────┼────────────────────────────┤
1746       │urgent │ A view on the workspace    │
1747       │       │ has had their urgency hint │
1748       │       │ set or all urgency hints   │
1749       │       │ for views on the workspace │
1750       │       │ have been cleared          │
1751       ├───────┼────────────────────────────┤
1752       │reload │ The configuration file has │
1753       │       │ been reloaded              │
1754       └───────┴────────────────────────────┘
1755
1756       Example Event:
1757           {
1758                "change": "init",
1759                "old": null,
1760                "current": {
1761                     "id": 10,
1762                     "name": "2",
1763                     "rect": {
1764                          "x": 0,
1765                          "y": 0,
1766                          "width": 0,
1767                          "height": 0
1768                     },
1769                     "focused": false,
1770                     "focus": [
1771                     ],
1772                     "border": "none",
1773                     "current_border_width": 0,
1774                     "layout": "splith",
1775                     "percent": null,
1776                     "window_rect": {
1777                          "x": 0,
1778                          "y": 0,
1779                          "width": 0,
1780                          "height": 0
1781                     },
1782                     "deco_rect": {
1783                          "x": 0,
1784                          "y": 0,
1785                          "width": 0,
1786                          "height": 0
1787                     },
1788                     "geometry": {
1789                          "x": 0,
1790                          "y": 0,
1791                          "width": 0,
1792                          "height": 0
1793                     },
1794                     "window": null,
1795                     "urgent": false,
1796                     "floating_nodes": [
1797                     ],
1798                     "num": 2,
1799                     "output": "eDP-1",
1800                     "type": "workspace",
1801                     "representation": null,
1802                     "nodes": [
1803                     ]
1804                }
1805           }
1806
1807   0x80000002. MODE
1808       Sent whenever the binding mode changes. The event consists of a single
1809       object with the following properties:
1810
1811       ┌─────────────┬───────────┬─────────────────────┐
1812PROPERTY   DATA TYPE DESCRIPTION     
1813       ├─────────────┼───────────┼─────────────────────┤
1814       │   change    │  string   │ The binding mode    │
1815       │             │           │ that became active  │
1816       ├─────────────┼───────────┼─────────────────────┤
1817       │pango_markup │  boolean  │ Whether the mode    │
1818       │             │           │ should be parsed as │
1819       │             │           │ pango markup        │
1820       └─────────────┴───────────┴─────────────────────┘
1821
1822       Example Event:
1823           {
1824                "change": "default",
1825                "pango_markup": false
1826           }
1827
1828   0x80000003. WINDOW
1829       Sent whenever a change involving a view occurs. The event consists of a
1830       single object with the following properties:
1831
1832       ┌──────────┬───────────┬────────────────────┐
1833PROPERTY  DATA TYPE DESCRIPTION     
1834       ├──────────┼───────────┼────────────────────┤
1835       │ change   │  string   │ The type of change │
1836       │          │           │ that occurred. See │
1837       │          │           │ below for more in‐ │
1838       │          │           │ formation          │
1839       ├──────────┼───────────┼────────────────────┤
1840       │container │  object   │ An object repre‐   │
1841       │          │           │ senting the view   │
1842       │          │           │ effected           │
1843       └──────────┴───────────┴────────────────────┘
1844
1845       The following change types are currently available:
1846
1847       ┌────────────────┬────────────────────────────┐
1848TYPE       DESCRIPTION         
1849       ├────────────────┼────────────────────────────┤
1850       │      new       │ The view was created       │
1851       ├────────────────┼────────────────────────────┤
1852       │     close      │ The view was closed        │
1853       ├────────────────┼────────────────────────────┤
1854       │     focus      │ The view was focused       │
1855       ├────────────────┼────────────────────────────┤
1856       │     title      │ The view's title has       │
1857       │                │ changed                    │
1858       ├────────────────┼────────────────────────────┤
1859       │fullscreen_mode │ The view's fullscreen mode │
1860       │                │ has changed                │
1861       ├────────────────┼────────────────────────────┤
1862       │     move       │ The view has been repar‐   │
1863       │                │ ented in the tree          │
1864       ├────────────────┼────────────────────────────┤
1865       │   floating     │ The view has become float‐ │
1866       │                │ ing or is no longer float‐ │
1867       │                │ ing                        │
1868       ├────────────────┼────────────────────────────┤
1869       │    urgent      │ The view's urgency hint    │
1870       │                │ has changed status         │
1871       ├────────────────┼────────────────────────────┤
1872       │     mark       │ A mark has been added or   │
1873       │                │ removed from the view      │
1874       └────────────────┴────────────────────────────┘
1875
1876       Example Event:
1877           {
1878                "change": "new",
1879                "container": {
1880                     "id": 12,
1881                     "name": null,
1882                     "rect": {
1883                          "x": 0,
1884                          "y": 0,
1885                          "width": 0,
1886                          "height": 0
1887                     },
1888                     "focused": false,
1889                     "focus": [
1890                     ],
1891                     "border": "none",
1892                     "current_border_width": 0,
1893                     "layout": "none",
1894                     "percent": 0.0,
1895                     "window_rect": {
1896                          "x": 0,
1897                          "y": 0,
1898                          "width": 0,
1899                          "height": 0
1900                     },
1901                     "deco_rect": {
1902                          "x": 0,
1903                          "y": 0,
1904                          "width": 0,
1905                          "height": 0
1906                     },
1907                     "geometry": {
1908                          "x": 0,
1909                          "y": 0,
1910                          "width": 1124,
1911                          "height": 422
1912                     },
1913                     "window": 4194313,
1914                     "urgent": false,
1915                     "floating_nodes": [
1916                     ],
1917                     "type": "con",
1918                     "pid": 19787,
1919                     "app_id": null,
1920                     "window_properties": {
1921                          "class": "URxvt",
1922                          "instance": "urxvt",
1923                          "transient_for": null
1924                     },
1925                     "nodes": [
1926                     ]
1927                }
1928           }
1929
1930   0x80000004. BARCONFIG_UPDATE
1931       Sent whenever a config for a bar changes. The event is identical to
1932       that of GET_BAR_CONFIG when a bar ID is given as a payload. See 6.
1933       GET_BAR_CONFIG (WITH A PAYLOAD) above for more information.
1934
1935   0x80000005. BINDING
1936       Sent whenever a binding is executed. The event is a single object with
1937       the following properties:
1938
1939       ┌─────────────────┬───────────┬─────────────────────┐
1940PROPERTY     DATA TYPE DESCRIPTION     
1941       ├─────────────────┼───────────┼─────────────────────┤
1942       │     change      │  string   │ The change that oc‐ │
1943       │                 │           │ curred for the      │
1944       │                 │           │ binding. Currently  │
1945       │                 │           │ this will only be   │
1946       │                 │           │ run
1947       ├─────────────────┼───────────┼─────────────────────┤
1948       │    command      │  string   │ The command associ‐ │
1949       │                 │           │ ated with the bind‐ │
1950       │                 │           │ ing                 │
1951       ├─────────────────┼───────────┼─────────────────────┤
1952       │event_state_mask │   array   │ An array of strings │
1953       │                 │           │ that correspond to  │
1954       │                 │           │ each modifier key   │
1955       │                 │           │ for the binding     │
1956       ├─────────────────┼───────────┼─────────────────────┤
1957       │   input_code    │  integer  │ For keyboard bind‐  │
1958       │                 │           │ codes, this is the  │
1959       │                 │           │ key code for the    │
1960       │                 │           │ binding. For mouse  │
1961       │                 │           │ bindings, this is   │
1962       │                 │           │ the X11 button num‐ │
1963       │                 │           │ ber, if there is an │
1964       │                 │           │ equivalent. In all  │
1965       │                 │           │ other cases, this   │
1966       │                 │           │ will be 0.          │
1967       ├─────────────────┼───────────┼─────────────────────┤
1968       │     symbol      │  string   │ For keyboard        │
1969       │                 │           │ bindsyms, this is   │
1970       │                 │           │ the bindsym for the │
1971       │                 │           │ binding. Otherwise, │
1972       │                 │           │ this will be null
1973       ├─────────────────┼───────────┼─────────────────────┤
1974       │   input_type    │  string   │ The input type that │
1975       │                 │           │ triggered the bind‐ │
1976       │                 │           │ ing. This is either │
1977       │                 │           │ keyboard or mouse
1978       └─────────────────┴───────────┴─────────────────────┘
1979
1980       Example Event:
1981           {
1982                "change": "run",
1983                "binding": {
1984                     "command": "workspace 2",
1985                     "event_state_mask": [
1986                          "Mod4"
1987                     ],
1988                     "input_code": 0,
1989                     "symbol": "2",
1990                     "input_type": "keyboard"
1991                }
1992           }
1993
1994   0x80000006. SHUTDOWN
1995       Sent whenever the IPC is shutting down. The event is a single object
1996       with the property change, which is a string containing the reason for
1997       the shutdown. Currently, the only value for change is exit, which is
1998       issued when sway is exiting.
1999
2000       Example Event:
2001           {
2002                "change": "exit"
2003           }
2004
2005   0x80000007. TICK
2006       Sent when first subscribing to tick events or by a SEND_TICK message.
2007       The event is a single object with the following properties:
2008
2009       ┌─────────┬───────────┬─────────────────────┐
2010PROPERTY DATA TYPE DESCRIPTION     
2011       ├─────────┼───────────┼─────────────────────┤
2012       │ first   │  boolean  │ Whether this event  │
2013       │         │           │ was triggered by    │
2014       │         │           │ subscribing to the  │
2015       │         │           │ tick events         │
2016       ├─────────┼───────────┼─────────────────────┤
2017       │payload  │  string   │ The payload given   │
2018       │         │           │ with a SEND_TICK
2019       │         │           │ message, if any.    │
2020       │         │           │ Otherwise, an empty │
2021       │         │           │ string              │
2022       └─────────┴───────────┴─────────────────────┘
2023
2024       Example Event:
2025           {
2026                "first": true
2027                "payload": ""
2028           }
2029
2030   0x80000014. BAR_STATE_UPDATE
2031       Sent when the visibility of a bar changes due to a modifier being
2032       pressed. The event is a single object with the following properties:
2033
2034       ┌────────────────────┬───────────┬─────────────────────┐
2035PROPERTY       DATA TYPE DESCRIPTION     
2036       ├────────────────────┼───────────┼─────────────────────┤
2037       │        id          │  string   │ The bar ID effected │
2038       ├────────────────────┼───────────┼─────────────────────┤
2039       │visible_by_modifier │  boolean  │ Whether the bar     │
2040       │                    │           │ should be made vis‐ │
2041       │                    │           │ ible due to a modi‐ │
2042       │                    │           │ fier being pressed  │
2043       └────────────────────┴───────────┴─────────────────────┘
2044
2045       Example Event:
2046           {
2047                "id": "bar-0",
2048                "visible_by_modifier": true
2049           }
2050
2051   0x80000015. INPUT
2052       Sent when something related to the input devices changes. The event is
2053       a single object with the following properties:
2054
2055       ┌─────────┬───────────┬─────────────────────┐
2056PROPERTY DATA TYPE DESCRIPTION     
2057       ├─────────┼───────────┼─────────────────────┤
2058       │ change  │  string   │ What has changed    │
2059       ├─────────┼───────────┼─────────────────────┤
2060       │ input   │  object   │ An object repre‐    │
2061       │         │           │ senting the input   │
2062       │         │           │ that is identical   │
2063       │         │           │ the ones GET_INPUTS │
2064       │         │           │ gives               │
2065       └─────────┴───────────┴─────────────────────┘
2066       The following change types are currently available:
2067
2068       ┌────────────────┬────────────────────────────┐
2069TYPE       DESCRIPTION         
2070       ├────────────────┼────────────────────────────┤
2071       │     added      │ The input device became    │
2072       │                │ available                  │
2073       ├────────────────┼────────────────────────────┤
2074       │    removed     │ The input device is no     │
2075       │                │ longer available           │
2076       ├────────────────┼────────────────────────────┤
2077       │  xkb_keymap    │ (Keyboards only) The       │
2078       │                │ keymap for the keyboard    │
2079       │                │ has changed                │
2080       ├────────────────┼────────────────────────────┤
2081       │  xkb_layout    │ (Keyboards only) The ef‐   │
2082       │                │ fective layout in the      │
2083       │                │ keymap has changed         │
2084       ├────────────────┼────────────────────────────┤
2085       │libinput_config │ (libinput device only) A   │
2086       │                │ libinput config option for │
2087       │                │ the device changed         │
2088       └────────────────┴────────────────────────────┘
2089       Example Event:
2090           {
2091                "change": "xkb_layout",
2092                "input": {
2093                     "identifier": "1:1:AT_Translated_Set_2_keyboard",
2094                     "name": "AT Translated Set 2 keyboard",
2095                     "vendor": 1,
2096                     "product": 1,
2097                     "type": "keyboard",
2098                     "xkb_layout_names": [
2099                          "English (US)",
2100                          "English (Dvorak)"
2101                     ],
2102                     "xkb_active_layout_index": 1,
2103                     "xkb_active_layout_name": "English (Dvorak)",
2104                     "libinput": {
2105                          "send_events": "enabled"
2106                     }
2107                }
2108           }
2109

SEE ALSO

2111       sway(1) sway(5) sway-bar(5) swaymsg(1) sway-input(5) sway-output(5)
2112
2113
2114
2115                                  2023-02-12                       sway-ipc(7)
Impressum