From: Michael Stapelberg Date: Sun, 12 Aug 2012 17:06:59 +0000 (+0200) Subject: update docs/i3bar-protocol for the {"version":1} header clarification X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c683255a98d15d409a753a1bdee663b7e55f0227;p=i3%2Fi3.github.io update docs/i3bar-protocol for the {"version":1} header clarification --- diff --git a/_docs/i3bar-protocol b/_docs/i3bar-protocol index f66c7a9..21ba9aa 100644 --- a/_docs/i3bar-protocol +++ b/_docs/i3bar-protocol @@ -1,7 +1,7 @@ i3bar input protocol ==================== Michael Stapelberg -February 2012 +August 2012 This document explains the protocol in which i3bar expects its input. It provides support for colors, urgency, shortening and easy manipulation. @@ -49,6 +49,9 @@ consists of a single JSON hash: { "version": 1 } ---------------- +(Note that before i3 v4.3 the precise format had to be +{"version":1}+, +byte-for-byte.) + What follows is an infinite array (so it should be parsed by a streaming JSON parser, but as described above you can go for a simpler solution), whose elements are one array per status line. A status line is one unit of @@ -86,6 +89,10 @@ Please note that this example was pretty printed for human consumption. i3status and others will output single statuslines in one line, separated by \n. +You can find an example of a shell script which can be used as your ++status_command+ in the bar configuration at +http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next + === Blocks in detail full_text:: diff --git a/docs/i3bar-protocol.html b/docs/i3bar-protocol.html index c64aafe..19660d5 100644 --- a/docs/i3bar-protocol.html +++ b/docs/i3bar-protocol.html @@ -4,7 +4,7 @@ - + i3: i3bar input protocol @@ -31,7 +31,7 @@ window.onload = function(){asciidoc.footnotes();}

i3bar input protocol

Michael Stapelberg
<michael@i3wm.org>
-February 2012 +August 2012
@@ -100,6 +100,8 @@ consists of a single JSON hash:

{ "version": 1 }
+

(Note that before i3 v4.3 the precise format had to be {"version":1}, +byte-for-byte.)

What follows is an infinite array (so it should be parsed by a streaming JSON parser, but as described above you can go for a simpler solution), whose elements are one array per status line. A status line is one unit of @@ -135,6 +137,9 @@ be represented by a JSON hash:

Please note that this example was pretty printed for human consumption. i3status and others will output single statuslines in one line, separated by \n.

+

You can find an example of a shell script which can be used as your +status_command in the bar configuration at +http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next

2.1. Blocks in detail