Updated the documentation for COMMAND reply. (#3754)

This commit is contained in:
Iskustvo 2019-08-02 23:56:48 +02:00 committed by Michael Stapelberg
parent 8cc2743bd6
commit ac100e36d9
1 changed files with 15 additions and 7 deletions

View File

@ -111,12 +111,6 @@ The following reply types are implemented:
COMMAND (0):: COMMAND (0)::
Confirmation/Error code for the RUN_COMMAND message. Confirmation/Error code for the RUN_COMMAND message.
+
Note that when sending the `restart` command, you will get a reply once
the restart completed. All IPC connection state (e.g. subscriptions)
will reset, and libraries must be able to cope with it. One way of
achieving that is to close the connection, if the library already
supports transparent reconnects.
WORKSPACES (1):: WORKSPACES (1)::
Reply to the GET_WORKSPACES message. Reply to the GET_WORKSPACES message.
SUBSCRIBE (2):: SUBSCRIBE (2)::
@ -145,6 +139,20 @@ The reply consists of a list of serialized maps for each command that was
parsed. Each has the property +success (bool)+ and may also include a parsed. Each has the property +success (bool)+ and may also include a
human-readable error message in the property +error (string)+. human-readable error message in the property +error (string)+.
NOTE: When sending the `restart` command, you will get a singular reply once the
restart completed. All IPC connection states (e.g. subscriptions) will reset and
all but one socket will be closed. Libraries must be able to cope with this by
aligning their internal states. It is also recommended that libraries close
the last remaining socket(one which replied to `restart` command) to achieve
the full reset.
NOTE: It is easiest to always send the `restart` command alone: due to i3s
state reset, the reply messages of preceding commands are lost, and following
commands will not be executed.
NOTE: When processing the `exit` command, i3 will immediately exit without
sending a reply. Expect the socket to be shut down.
*Example:* *Example:*
------------------- -------------------
[{ "success": true }] [{ "success": true }]
@ -777,7 +785,7 @@ This event consists of a single serialized map containing a property
+change (string)+ which indicates the type of the change ("focus", "init", +change (string)+ which indicates the type of the change ("focus", "init",
"empty", "urgent", "reload", "rename", "restored", "move"). A "empty", "urgent", "reload", "rename", "restored", "move"). A
+current (object)+ property will be present with the affected workspace +current (object)+ property will be present with the affected workspace
whenever the type of event affects a workspace (otherwise, it will be +null). whenever the type of event affects a workspace (otherwise, it will be +null+).
When the change is "focus", an +old (object)+ property will be present with the When the change is "focus", an +old (object)+ property will be present with the
previous workspace. When the first switch occurs (when i3 focuses the previous workspace. When the first switch occurs (when i3 focuses the