<h1>IPC interface (interprocess communication)</h1>\r
<span id="author">Michael Stapelberg</span><br />\r
<span id="email"><tt><<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>></tt></span><br />\r
-<span id="revdate">October 2012</span>\r
+<span id="revdate">February 2014</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>\r
<div class="sect2">\r
<h3 id="_command_reply">3.2. COMMAND reply</h3>\r
-<div class="paragraph"><p>The reply consists of a single serialized map. At the moment, the only\r
-property is <tt>success (bool)</tt>, but this will be expanded in future versions.</p></div>\r
+<div class="paragraph"><p>The reply consists of a list of serialized maps for each command that was\r
+parsed. Each has the property <tt>success (bool)</tt> and may also include a\r
+human-readable error message in the property <tt>error (string)</tt>.</p></div>\r
<div class="paragraph"><p><strong>Example:</strong></p></div>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>{ "success": true }</tt></pre>\r
+<pre><tt>[{ "success": true }]</tt></pre>\r
</div></div>\r
</div>\r
<div class="sect2">\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
-current_workspace (integer)\r
+current_workspace (string)\r
</dt>\r
<dd>\r
<p>\r
- The current workspace which is visible on this output. <tt>null</tt> if the\r
- output is not active.\r
+ The name of the current workspace that is visible on this output. <tt>null</tt> if\r
+ the output is not active.\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
{\r
"name": "LVDS1",\r
"active": true,\r
- "current_workspace": 4,\r
+ "current_workspace": "4",\r
"rect": {\r
"x": 0,\r
"y": 0,\r
{\r
"name": "VGA1",\r
"active": true,\r
- "current_workspace": 1,\r
+ "current_workspace": "1",\r
"rect": {\r
"x": 1280,\r
"y": 0,\r
The internal name of this container. For all containers which are part\r
of the tree structure down to the workspace contents, this is set to a\r
nice human-readable name of the container.\r
+ For containers that have an X11 window, the content is the title\r
+ (_NET_WM_NAME property) of that window.\r
For all other containers, the content is not defined (yet).\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
+type (string)\r
+</dt>\r
+<dd>\r
+<p>\r
+ Type of this container. Can be one of "root", "output", "con",\r
+ "floating_con", "workspace" or "dockarea".\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
border (string)\r
</dt>\r
<dd>\r
<dd>\r
<p>\r
Sent when a client’s window is successfully reparented (that is when i3\r
- has finished fitting it into a container).\r
+ has finished fitting it into a container), when a window received input\r
+ focus or when certain properties of the window have changed.\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
<dd>\r
<p>\r
Sent when the hidden_state or mode field in the barconfig of any bar\r
- instance was updated.\r
+ instance was updated and when the config is reloaded.\r
</p>\r
</dd>\r
</dl></div>\r
"change": "focus",\r
"current": {\r
"id": 28489712,\r
- "type":4,\r
+ "type": "workspace",\r
...\r
}\r
"old": {\r
"id": 28489715,\r
- "type": 4,\r
+ "type": "workspace",\r
...\r
}\r
}</tt></pre>\r
<div class="sect2">\r
<h3 id="_window_event">4.6. window event</h3>\r
<div class="paragraph"><p>This event consists of a single serialized map containing a property\r
-<tt>change (string)</tt> which currently can indicate only that a new window\r
-has been successfully reparented (the value will be "new").</p></div>\r
+<tt>change (string)</tt> which indicates the type of the change</p></div>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+<tt>new</tt> - the window has become managed by i3\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<tt>focus</tt> - the window has received input focus\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<tt>title</tt> - the window’s title has changed\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<tt>fullscreen_mode</tt> - the window has entered or exited fullscreen mode\r
+</p>\r
+</li>\r
+</ul></div>\r
<div class="paragraph"><p>Additionally a <tt>container (object)</tt> field will be present, which consists\r
-of the window’s parent container. Be aware that the container will hold\r
-the initial name of the newly reparented window (e.g. if you run urxvt\r
-with a shell that changes the title, you will still at this point get the\r
-window title as "urxvt").</p></div>\r
+of the window’s parent container. Be aware that for the "new" event, the\r
+container will hold the initial name of the newly reparented window (e.g.\r
+if you run urxvt with a shell that changes the title, you will still at\r
+this point get the window title as "urxvt").</p></div>\r
<div class="paragraph"><p><strong>Example:</strong></p></div>\r
<div class="listingblock">\r
<div class="content">\r
"change": "new",\r
"container": {\r
"id": 35569536,\r
- "type": 2,\r
+ "type": "con",\r
...\r
}\r
}</tt></pre>\r
<div class="sect2">\r
<h3 id="_barconfig_update_event">4.7. barconfig_update event</h3>\r
<div class="paragraph"><p>This event consists of a single serialized map reporting on options from the\r
-barconfig of the specified bar_id that were updated in i3. The map always\r
-consists of a property <tt>id (string)</tt>, which specifies to which bar instance the\r
-sent config update belongs, a property <tt>hidden_state (string)</tt>, which indicates\r
-the hidden_state of an i3bar instance, and a property <tt>mode (string)</tt>, which\r
-corresponds to the current mode.</p></div>\r
-<div class="paragraph"><p><strong>Example:</strong></p></div>\r
-<div class="listingblock">\r
-<div class="content">\r
-<pre><tt>{\r
- "id": "bar-0",\r
- "hidden_state": "hide"\r
- "mode": "hide"\r
-}</tt></pre>\r
-</div></div>\r
+barconfig of the specified bar_id that were updated in i3. This event is the\r
+same as a <tt>GET_BAR_CONFIG</tt> reply for the bar with the given id.</p></div>\r
</div>\r
</div>\r
</div>\r
<dd>\r
<p>\r
i3 includes a headerfile <tt>i3/ipc.h</tt> which provides you all constants.\r
- However, there is no library yet.\r
</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-Ruby\r
-</dt>\r
-<dd>\r
-<p>\r
- <a href="http://github.com/badboy/i3-ipc">http://github.com/badboy/i3-ipc</a>\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-Perl\r
-</dt>\r
-<dd>\r
-<p>\r
- <a href="https://metacpan.org/module/AnyEvent::I3">https://metacpan.org/module/AnyEvent::I3</a>\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-Python\r
-</dt>\r
-<dd>\r
-<div class="ulist"><ul>\r
-<li>\r
-<p>\r
-<a href="https://github.com/whitelynx/i3ipc">https://github.com/whitelynx/i3ipc</a>\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-<a href="https://github.com/ziberna/i3-py">https://github.com/ziberna/i3-py</a> (includes higher-level features)\r
-</p>\r
-</li>\r
-</ul></div>\r
-</dd>\r
-<dt class="hdlist1">\r
-Go\r
-</dt>\r
-<dd>\r
-<div class="ulist"><ul>\r
-<li>\r
-<p>\r
-<a href="https://github.com/proxypoke/i3ipc">https://github.com/proxypoke/i3ipc</a>\r
-</p>\r
-</li>\r
-</ul></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt> https://github.com/acrisci/i3ipc-glib\r
+Go::\r
+ * https://github.com/proxypoke/i3ipc\r
+JavaScript::\r
+ * https://github.com/acrisci/i3ipc-gjs\r
+Lua::\r
+ * https:/github.com/acrisci/i3ipc-lua\r
+Perl::\r
+ * https://metacpan.org/module/AnyEvent::I3\r
+Python::\r
+ * https://github.com/acrisci/i3ipc-python\r
+ * https://github.com/whitelynx/i3ipc (not maintained)\r
+ * https://github.com/ziberna/i3-py (not maintained)\r
+Ruby::\r
+ http://github.com/badboy/i3-ipc</tt></pre>\r
+</div></div>\r
</dd>\r
</dl></div>\r
</div>\r