]> git.sur5r.net Git - i3/i3.github.io/blobdiff - docs/i3bar-protocol.html
save docs for 4.9.1
[i3/i3.github.io] / docs / i3bar-protocol.html
index b2fd9f444ef5fd4caadf452545491ecdca082474..509236868095161240673bdd0b60e655ac62ff4f 100644 (file)
@@ -2,15 +2,15 @@
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
 <head>\r
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
 <head>\r
-<link rel="icon" type="image/png" href="/favicon.png">\r
+<link rel="icon" type="image/x-icon" href="/favicon.ico">\r
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 8.6.7" />\r
+<meta name="generator" content="AsciiDoc 8.6.8" />\r
 <title>i3: i3bar input protocol</title>\r
 <link rel="stylesheet" href="/css/style.css" type="text/css" />\r
 <link rel="stylesheet" href="/css/xhtml11.css" type="text/css" />\r
 <script type="text/javascript">\r
 /*<![CDATA[*/\r
 <title>i3: i3bar input protocol</title>\r
 <link rel="stylesheet" href="/css/style.css" type="text/css" />\r
 <link rel="stylesheet" href="/css/xhtml11.css" type="text/css" />\r
 <script type="text/javascript">\r
 /*<![CDATA[*/\r
-window.onload = function(){asciidoc.footnotes();}\r
+document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes();}, false);\r
 /*]]>*/\r
 </script>\r
 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
 /*]]>*/\r
 </script>\r
 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
@@ -22,8 +22,9 @@ window.onload = function(){asciidoc.footnotes();}
                         <ul id="nav">\r
                                 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>\r
                                 <li><a href="/screenshots">Screens</a></li>\r
                         <ul id="nav">\r
                                 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>\r
                                 <li><a href="/screenshots">Screens</a></li>\r
+                                <li><a href="https://faq.i3wm.org/">FAQ</a></li>\r
                                 <li><a href="/contact">Contact</a></li>\r
                                 <li><a href="/contact">Contact</a></li>\r
-                                <li><a href="http://bugs.i3wm.org/">Bugs</a></li>\r
+                                <li><a href="https://github.com/i3/i3/issues">Bugs</a></li>\r
                         </ul>\r
         <br style="clear: both">\r
 <div id="content">\r
                         </ul>\r
         <br style="clear: both">\r
 <div id="content">\r
@@ -103,7 +104,7 @@ consists of a single JSON hash:</p></div>
 <div class="paragraph"><p><strong>All features example</strong>:</p></div>\r
 <div class="listingblock">\r
 <div class="content">\r
 <div class="paragraph"><p><strong>All features example</strong>:</p></div>\r
 <div class="listingblock">\r
 <div class="content">\r
-<pre><tt>{ "version": 1, "stop_signal": 10, "cont_signal": 12 }</tt></pre>\r
+<pre><tt>{ "version": 1, "stop_signal": 10, "cont_signal": 12, "click_events": true }</tt></pre>\r
 </div></div>\r
 <div class="paragraph"><p>(Note that before i3 v4.3 the precise format had to be <tt>{"version":1}</tt>,\r
 byte-for-byte.)</p></div>\r
 </div></div>\r
 <div class="paragraph"><p>(Note that before i3 v4.3 the precise format had to be <tt>{"version":1}</tt>,\r
 byte-for-byte.)</p></div>\r
@@ -176,6 +177,15 @@ cont_signal
         The default value (if none is specified) is SIGCONT.\r
 </p>\r
 </dd>\r
         The default value (if none is specified) is SIGCONT.\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+click_events\r
+</dt>\r
+<dd>\r
+<p>\r
+        If specified and true i3bar will write a infinite array (same as above)\r
+        to your stdin.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 </div>\r
 <div class="sect2">\r
 </dl></div>\r
 </div>\r
 <div class="sect2">\r
@@ -188,7 +198,8 @@ full_text
 <p>\r
         The most simple block you can think of is one which just includes the\r
         only required key, the <tt>full_text</tt> key. i3bar will display the string\r
 <p>\r
         The most simple block you can think of is one which just includes the\r
         only required key, the <tt>full_text</tt> key. i3bar will display the string\r
-        value and that’s it.\r
+        value parsed as\r
+        <a href="https://developer.gnome.org/pango/stable/PangoMarkupFormat.html">Pango markup</a>.\r
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
@@ -230,6 +241,10 @@ min_width
         will be padded to the left and/or the right side, according to the <tt>align</tt>\r
         key. This is useful when you want to prevent the whole status line to shift\r
         when value take more or less space between each iteration.\r
         will be padded to the left and/or the right side, according to the <tt>align</tt>\r
         key. This is useful when you want to prevent the whole status line to shift\r
         when value take more or less space between each iteration.\r
+        The value can also be a string. In this case, the width of the text given\r
+        by <tt>min_width</tt> determines the minimum width of the block. This is useful\r
+        when you want to set a sensible minimum width regardless of which font you\r
+        are using, and at what particular size.\r
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
@@ -237,7 +252,7 @@ align
 </dt>\r
 <dd>\r
 <p>\r
 </dt>\r
 <dd>\r
 <p>\r
-        Align text on the <tt>center</tt> (default), <tt>right</tt> or <tt>left</tt> of the block, when\r
+        Align text on the <tt>center</tt>, <tt>right</tt> or <tt>left</tt> (default) of the block, when\r
         the minimum width of the latter, specified by the <tt>min_width</tt> key, is not\r
         reached.\r
 </p>\r
         the minimum width of the latter, specified by the <tt>min_width</tt> key, is not\r
         reached.\r
 </p>\r
@@ -264,6 +279,28 @@ urgent
         space (for non-root users). The presentation of urgency is up to i3bar.\r
 </p>\r
 </dd>\r
         space (for non-root users). The presentation of urgency is up to i3bar.\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+separator\r
+</dt>\r
+<dd>\r
+<p>\r
+        A boolean which specifies whether a separator line should be drawn\r
+        after this block. The default is true, meaning the separator line will\r
+        be drawn. Note that if you disable the separator line, there will still\r
+        be a gap after the block, unless you also use <tt>separator_block_width</tt>.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+separator_block_width\r
+</dt>\r
+<dd>\r
+<p>\r
+        The amount of pixels to leave blank after the block. In the middle of\r
+        this gap, a separator line will be drawn unless <tt>separator</tt> is\r
+        disabled. Normally, you want to set this to an odd value (the default\r
+        is 9 pixels), since the separator line is drawn in the middle.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 <div class="paragraph"><p>If you want to put in your own entries into a block, prefix the key with an\r
 underscore (_). i3bar will ignore all keys it doesn’t understand, and prefixing\r
 </dl></div>\r
 <div class="paragraph"><p>If you want to put in your own entries into a block, prefix the key with an\r
 underscore (_). i3bar will ignore all keys it doesn’t understand, and prefixing\r
@@ -277,6 +314,16 @@ of the i3bar protocol.</p></div>
  "_ethernet_vendor": "Intel"\r
 }</tt></pre>\r
 </div></div>\r
  "_ethernet_vendor": "Intel"\r
 }</tt></pre>\r
 </div></div>\r
+<div class="paragraph"><p>In the following example, the longest (widest) possible value of the block is\r
+used to set the minimum width:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>{\r
+ "full_text": "CPU 4%",\r
+ "min_width": "CPU 100%",\r
+ "align": "left"\r
+}</tt></pre>\r
+</div></div>\r
 <div class="paragraph"><p>An example of a block which uses all possible entries follows:</p></div>\r
 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
 <div class="listingblock">\r
 <div class="paragraph"><p>An example of a block which uses all possible entries follows:</p></div>\r
 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
 <div class="listingblock">\r
@@ -289,7 +336,59 @@ of the i3bar protocol.</p></div>
  "align": "right",\r
  "urgent": false,\r
  "name": "ethernet",\r
  "align": "right",\r
  "urgent": false,\r
  "name": "ethernet",\r
- "instance": "eth0"\r
+ "instance": "eth0",\r
+ "separator": true,\r
+ "separator_block_width": 9\r
+}</tt></pre>\r
+</div></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_click_events">2.3. Click events</h3>\r
+<div class="paragraph"><p>If enabled i3bar will send you notifications if the user clicks on a block and\r
+looks like this:</p></div>\r
+<div class="dlist"><dl>\r
+<dt class="hdlist1">\r
+name\r
+</dt>\r
+<dd>\r
+<p>\r
+        Name of the block, if set\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+instance\r
+</dt>\r
+<dd>\r
+<p>\r
+        Instance of the block, if set\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+x, y\r
+</dt>\r
+<dd>\r
+<p>\r
+        X11 root window coordinates where the click occured\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+button\r
+</dt>\r
+<dd>\r
+<p>\r
+        X11 button ID (for example 1 to 3 for left/middle/right mouse button)\r
+</p>\r
+</dd>\r
+</dl></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>{\r
+ "name": "ethernet",\r
+ "instance": "eth0",\r
+ "button": 1,\r
+ "x": 1320,\r
+ "y": 1400\r
 }</tt></pre>\r
 </div></div>\r
 </div>\r
 }</tt></pre>\r
 </div></div>\r
 </div>\r