understand the old protocol version, but in order to use the new one, you need\r
to provide the correct version. The header block is terminated by a newline and\r
consists of a single JSON hash:</p></div>\r
-<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="paragraph"><p><strong>Minimal example</strong>:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>{ "version": 1 }</tt></pre>\r
</div></div>\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
+</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 class="paragraph"><p>What follows is an infinite array (so it should be parsed by a streaming JSON\r
<tt>status_command</tt> in the bar configuration at\r
<a href="http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next">http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next</a></p></div>\r
<div class="sect2">\r
-<h3 id="_blocks_in_detail">2.1. Blocks in detail</h3>\r
+<h3 id="_header_in_detail">2.1. Header in detail</h3>\r
+<div class="dlist"><dl>\r
+<dt class="hdlist1">\r
+version\r
+</dt>\r
+<dd>\r
+<p>\r
+ The version number (as an integer) of the i3bar protocol you will use.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+stop_signal\r
+</dt>\r
+<dd>\r
+<p>\r
+ Specify to i3bar the signal (as an integer) to send to stop your\r
+ processing.\r
+ The default value (if none is specified) is SIGSTOP.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+cont_signal\r
+</dt>\r
+<dd>\r
+<p>\r
+ Specify to i3bar the signal (as an integer)to send to continue your\r
+ processing.\r
+ The default value (if none is specified) is SIGCONT.\r
+</p>\r
+</dd>\r
+</dl></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_blocks_in_detail">2.2. Blocks in detail</h3>\r
<div class="dlist"><dl>\r
<dt class="hdlist1">\r
full_text\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
+min_width\r
+</dt>\r
+<dd>\r
+<p>\r
+ The minimum width (in pixels) of the block. If the content of the\r
+ <tt>full_text</tt> key take less space than the specified min_width, the block\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
+align\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
+ the minimum width of the latter, specified by the <tt>min_width</tt> key, is not\r
+ reached.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
name and instance\r
</dt>\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
"_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
"full_text": "E: 10.0.0.1 (1000 Mbit/s)",\r
"short_text": "10.0.0.1",\r
"color": "#00ff00",\r
+ "min_width": 300,\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