]> git.sur5r.net Git - i3/i3.github.io/blobdiff - docs/ipc.html
update ipc docs
[i3/i3.github.io] / docs / ipc.html
index 4b20c01ca672a4d7ac187610cc1835bc0e1fc84f..0459e526fa0b3c766f0e7db3c3856e4a175ac11d 100644 (file)
@@ -31,7 +31,7 @@ window.onload = function(){asciidoc.footnotes(); asciidoc.toc(2);}
 <h1>IPC interface (interprocess communication)</h1>\r
 <span id="author">Michael Stapelberg</span><br />\r
 <span id="email"><tt>&lt;<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>&gt;</tt></span><br />\r
-<span id="revdate">August 2012</span>\r
+<span id="revdate">October 2012</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>
@@ -52,6 +52,18 @@ filename character set (see mkdtemp(3)). You can get the socketpath from i3 by
 calling <tt>i3 --get-socketpath</tt>.</p></div>\r
 <div class="paragraph"><p>All i3 utilities, like <tt>i3-msg</tt> and <tt>i3-input</tt> will read the <tt>I3_SOCKET_PATH</tt>\r
 X11 property, stored on the X11 root window.</p></div>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Warning</div>\r
+</td>\r
+<td class="content">\r
+<div class="title">Use an existing library!</div>There are existing libraries for many languages. You can have a look at\r
+<a href="#libraries">[libraries]</a> or search the web if your language of choice is not mentioned.\r
+Usually, it is not necessary to implement low-level communication with i3\r
+directly.</td>\r
+</tr></table>\r
+</div>\r
 </div>\r
 </div>\r
 <div class="sect1">\r
@@ -167,7 +179,7 @@ GET_VERSION (7)
 <div class="listingblock">\r
 <div class="content">\r
 <pre><tt>00000000  69 33 2d 69 70 63 04 00  00 00 00 00 00 00 65 78  |i3-ipc........ex|\r
-00000010  69 74 0a                                          |it.|</tt></pre>\r
+00000010  69 74                                             |it|</tt></pre>\r
 </div></div>\r
 <div class="paragraph"><p>To generate and send such a message, you could use the following code in Perl:</p></div>\r
 <div class="listingblock">\r
@@ -495,6 +507,14 @@ border (string)
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
+current_border_width (integer)\r
+</dt>\r
+<dd>\r
+<p>\r
+        Number of pixels of the border width.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
 layout (string)\r
 </dt>\r
 <dd>\r
@@ -1059,6 +1079,14 @@ output (1)
         outputs, CRTCs or output properties).\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+mode (2)\r
+</dt>\r
+<dd>\r
+<p>\r
+        Sent whenever i3 changes its binding mode.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 <div class="paragraph"><p><strong>Example:</strong></p></div>\r
 <div class="listingblock">\r
@@ -1101,12 +1129,24 @@ if ($is_event) {
 <pre><tt>{ "change": "unspecified" }</tt></pre>\r
 </div></div>\r
 </div>\r
+<div class="sect2">\r
+<h3 id="_mode_event">4.5. mode event</h3>\r
+<div class="paragraph"><p>This event consists of a single serialized map containing a property\r
+<tt>change (string)</tt> which holds the name of current mode in use. The name\r
+is the same as specified in config when creating a mode. The default\r
+mode is simply named default.</p></div>\r
+<div class="paragraph"><p><strong>Example:</strong></p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>{ "change": "default" }</tt></pre>\r
+</div></div>\r
+</div>\r
 </div>\r
 </div>\r
 <div class="sect1">\r
-<h2 id="_see_also">5. See also</h2>\r
+<h2 id="_see_also_existing_libraries">5. See also (existing libraries)</h2>\r
 <div class="sectionbody">\r
-<div class="paragraph"><p>For some languages, libraries are available (so you don’t have to implement\r
+<div class="paragraph" id="libraries"><p>For some languages, libraries are available (so you don’t have to implement\r
 all this on your own). This list names some (if you wrote one, please let me\r
 know):</p></div>\r
 <div class="dlist"><dl>\r