]> git.sur5r.net Git - i3/i3.github.io/blob - docs/i3status.html
fix identation and typos
[i3/i3.github.io] / docs / i3status.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
2     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
4 <head>\r
5 <link rel="icon" type="image/png" href="/favicon.png">\r
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
7 <meta name="generator" content="AsciiDoc 8.6.9" />\r
8 <title>i3: i3status(1)</title>\r
9 <link rel="stylesheet" href="/css/style.css" type="text/css" />\r
10 <link rel="stylesheet" href="/css/xhtml11.css" type="text/css" />\r
11 <script type="text/javascript">\r
12 /*<![CDATA[*/\r
13 document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes(); asciidoc.toc(2);}, false);\r
14 /*]]>*/\r
15 </script>\r
16 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
17 </head>\r
18 <body class="article">\r
19 \r
20         <div id="main">\r
21             <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>\r
22                         <ul id="nav">\r
23                                 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>\r
24                                 <li><a href="/screenshots">Screens</a></li>\r
25                                 <li><a href="/contact">Contact</a></li>\r
26                                 <li><a href="http://bugs.i3wm.org/">Bugs</a></li>\r
27                         </ul>\r
28         <br style="clear: both">\r
29 <div id="content">\r
30 <div id="header">\r
31 <h1>i3status(1)</h1>\r
32 <span id="author">Michael Stapelberg</span><br />\r
33 <span id="email"><tt>&lt;<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>&gt;</tt></span><br />\r
34 <span id="revnumber">version 2.6,</span>\r
35 <span id="revdate">October 2012</span>\r
36 <div id="toc">
37   <div id="toctitle">Table of Contents</div>
38   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
39 </div>\r
40 </div>\r
41 <div class="sect1">\r
42 <h2 id="_name">1. NAME</h2>\r
43 <div class="sectionbody">\r
44 <div class="paragraph"><p>i3status - Generates a status line for dzen2 or xmobar</p></div>\r
45 </div>\r
46 </div>\r
47 <div class="sect1">\r
48 <h2 id="_synopsis">2. SYNOPSIS</h2>\r
49 <div class="sectionbody">\r
50 <div class="paragraph"><p>i3status [-c configfile] [-h] [-v]</p></div>\r
51 </div>\r
52 </div>\r
53 <div class="sect1">\r
54 <h2 id="_options">3. OPTIONS</h2>\r
55 <div class="sectionbody">\r
56 <div class="dlist"><dl>\r
57 <dt class="hdlist1">\r
58 -c\r
59 </dt>\r
60 <dd>\r
61 <p>\r
62 Specifies an alternate configuration file path. By default, i3status looks for\r
63 configuration files in the following order:\r
64 </p>\r
65 <div class="olist arabic"><ol class="arabic">\r
66 <li>\r
67 <p>\r
68 ~/.i3status.conf\r
69 </p>\r
70 </li>\r
71 <li>\r
72 <p>\r
73 ~/.config/i3status/config (or $XDG_CONFIG_HOME/i3status/config if set)\r
74 </p>\r
75 </li>\r
76 <li>\r
77 <p>\r
78 /etc/i3status.conf\r
79 </p>\r
80 </li>\r
81 <li>\r
82 <p>\r
83 /etc/xdg/i3status/config (or $XDG_CONFIG_DIRS/i3status/config if set)\r
84 </p>\r
85 </li>\r
86 </ol></div>\r
87 </dd>\r
88 </dl></div>\r
89 </div>\r
90 </div>\r
91 <div class="sect1">\r
92 <h2 id="_description">4. DESCRIPTION</h2>\r
93 <div class="sectionbody">\r
94 <div class="paragraph"><p>i3status is a small program (about 1500 SLOC) for generating a status bar for\r
95 i3bar, dzen2, xmobar or similar programs. It is designed to be very\r
96 efficient by issuing a very small number of system calls, as one generally\r
97 wants to update such a status line every second. This ensures that even under\r
98 high load, your status bar is updated correctly. Also, it saves a bit of energy\r
99 by not hogging your CPU as much as spawning the corresponding amount of shell\r
100 commands would.</p></div>\r
101 </div>\r
102 </div>\r
103 <div class="sect1">\r
104 <h2 id="_configuration">5. CONFIGURATION</h2>\r
105 <div class="sectionbody">\r
106 <div class="paragraph"><p>The basic idea of i3status is that you can specify which "modules" should\r
107 be used (the order directive). You can then configure each module with its\r
108 own section. For every module, you can specify the output format. See below\r
109 for a complete reference.</p></div>\r
110 <div class="listingblock">\r
111 <div class="title">Sample configuration</div>\r
112 <div class="content">\r
113 <pre><tt>general {\r
114         output_format = "dzen2"\r
115         colors = true\r
116         interval = 5\r
117 }\r
118 \r
119 order += "ipv6"\r
120 order += "disk /"\r
121 order += "run_watch DHCP"\r
122 order += "run_watch VPN"\r
123 order += "wireless wlan0"\r
124 order += "ethernet eth0"\r
125 order += "battery 0"\r
126 order += "cpu_temperature 0"\r
127 order += "load"\r
128 order += "tztime local"\r
129 order += "tztime berlin"\r
130 \r
131 wireless wlan0 {\r
132         format_up = "W: (%quality at %essid, %bitrate) %ip"\r
133         format_down = "W: down"\r
134 }\r
135 \r
136 ethernet eth0 {\r
137         # if you use %speed, i3status requires the cap_net_admin capability\r
138         format_up = "E: %ip (%speed)"\r
139         format_down = "E: down"\r
140 }\r
141 \r
142 battery 0 {\r
143         format = "%status %percentage %remaining %emptytime"\r
144         path = "/sys/class/power_supply/BAT%d/uevent"\r
145         low_threshold = 10\r
146 }\r
147 \r
148 run_watch DHCP {\r
149         pidfile = "/var/run/dhclient*.pid"\r
150 }\r
151 \r
152 run_watch VPN {\r
153         pidfile = "/var/run/vpnc/pid"\r
154 }\r
155 \r
156 tztime local {\r
157         format = "%Y-%m-%d %H:%M:%S"\r
158 }\r
159 \r
160 tztime berlin {\r
161         format = "%Y-%m-%d %H:%M:%S %Z"\r
162         timezone = "Europe/Berlin"\r
163 }\r
164 \r
165 load {\r
166         format = "%5min"\r
167 }\r
168 \r
169 cpu_temperature 0 {\r
170         format = "T: %degrees °C"\r
171         path = "/sys/devices/platform/coretemp.0/temp1_input"\r
172 }\r
173 \r
174 disk "/" {\r
175         format = "%free"\r
176 }</tt></pre>\r
177 </div></div>\r
178 <div class="sect2">\r
179 <h3 id="_general">5.1. General</h3>\r
180 <div class="paragraph"><p>The <tt>colors</tt> directive will disable all colors if you set it to <tt>false</tt>. You can\r
181 also specify the colors that will be used to display "good", "degraded" or "bad"\r
182 values using the <tt>color_good</tt>, <tt>color_degraded</tt> or <tt>color_bad</tt> directives,\r
183 respectively. Those directives are only used if color support is not disabled by\r
184 the <tt>colors</tt> directive. The input format for color values is the canonical RGB\r
185 hexadecimal triplet (with no separators between the colors), prefixed by a hash\r
186 character ("#").</p></div>\r
187 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
188 <div class="listingblock">\r
189 <div class="content">\r
190 <pre><tt>color_good = "#00FF00"</tt></pre>\r
191 </div></div>\r
192 <div class="paragraph"><p>Likewise, you can use the <tt>color_separator</tt> directive to specify the color that\r
193 will be used to paint the separator bar. The separator is always output in\r
194 color, even when colors are disabled by the <tt>colors</tt> directive.</p></div>\r
195 <div class="paragraph"><p>The <tt>interval</tt> directive specifies the time in seconds for which i3status will\r
196 sleep before printing the next status line.</p></div>\r
197 <div class="paragraph"><p>Using <tt>output_format</tt> you can chose which format strings i3status should\r
198 use in its output. Currently available are:</p></div>\r
199 <div class="dlist"><dl>\r
200 <dt class="hdlist1">\r
201 i3bar\r
202 </dt>\r
203 <dd>\r
204 <p>\r
205 i3bar comes with i3 and provides a workspace bar which does the right thing in\r
206 multi-monitor situations. It also comes with tray support and can display the\r
207 i3status output. This output type uses JSON to pass as much meta-information to\r
208 i3bar as possible (like colors, which blocks can be shortened in which way,\r
209 etc.).\r
210 </p>\r
211 </dd>\r
212 <dt class="hdlist1">\r
213 dzen2\r
214 </dt>\r
215 <dd>\r
216 <p>\r
217 Dzen is a general purpose messaging, notification and menuing program for X11.\r
218 It was designed to be scriptable in any language and integrate well with window\r
219 managers like dwm, wmii and xmonad though it will work with any windowmanger\r
220 </p>\r
221 </dd>\r
222 <dt class="hdlist1">\r
223 xmobar\r
224 </dt>\r
225 <dd>\r
226 <p>\r
227 xmobar is a minimalistic, text based, status bar. It was designed to work\r
228 with the xmonad Window Manager.\r
229 </p>\r
230 </dd>\r
231 <dt class="hdlist1">\r
232 none\r
233 </dt>\r
234 <dd>\r
235 <p>\r
236 Does not use any color codes. Separates values by the pipe symbol. This should\r
237 be used with i3bar and can be used for custom scripts.\r
238 </p>\r
239 </dd>\r
240 </dl></div>\r
241 <div class="paragraph"><p>It&#8217;s also possible to use the color_good, color_degraded, color_bad directives\r
242 to define specific colors per module. If one of these directives is defined\r
243 in a module section its value will override the value defined in the general\r
244 section just for this module.</p></div>\r
245 </div>\r
246 <div class="sect2">\r
247 <h3 id="_ipv6">5.2. IPv6</h3>\r
248 <div class="paragraph"><p>This module gets the IPv6 address used for outgoing connections (that is, the\r
249 best available public IPv6 address on your computer).</p></div>\r
250 <div class="paragraph"><p><strong>Example format_up</strong>: <tt>%ip</tt></p></div>\r
251 <div class="paragraph"><p><strong>Example format_down</strong> <tt>no IPv6</tt></p></div>\r
252 </div>\r
253 <div class="sect2">\r
254 <h3 id="_disk">5.3. Disk</h3>\r
255 <div class="paragraph"><p>Gets used, free, available and total amount of bytes on the given mounted filesystem.</p></div>\r
256 <div class="paragraph"><p>These values can also be expressed in percentages with the percentage_used,\r
257 percentage_free, percentage_avail and percentage_used_of_avail formats.</p></div>\r
258 <div class="paragraph"><p><strong>Example order</strong>: <tt>disk /mnt/usbstick</tt></p></div>\r
259 <div class="paragraph"><p><strong>Example format</strong>: <tt>%free (%avail)/ %total</tt></p></div>\r
260 <div class="paragraph"><p><strong>Example format</strong>: <tt>%percentage_used used, %percentage_free free, %percentage_avail avail</tt></p></div>\r
261 </div>\r
262 <div class="sect2">\r
263 <h3 id="_run_watch">5.4. Run-watch</h3>\r
264 <div class="paragraph"><p>Expands the given path to a pidfile and checks if the process ID found inside\r
265 is valid (that is, if the process is running). You can use this to check if\r
266 a specific application, such as a VPN client or your DHCP client is running.</p></div>\r
267 <div class="paragraph"><p><strong>Example order</strong>: <tt>run_watch DHCP</tt></p></div>\r
268 <div class="paragraph"><p><strong>Example format</strong>: <tt>%title: %status</tt></p></div>\r
269 </div>\r
270 <div class="sect2">\r
271 <h3 id="_wireless">5.5. Wireless</h3>\r
272 <div class="paragraph"><p>Gets the link quality and ESSID of the given wireless network interface. You\r
273 can specify different format strings for the network being connected or not\r
274 connected.</p></div>\r
275 <div class="paragraph"><p><strong>Example order</strong>: <tt>wireless wlan0</tt></p></div>\r
276 <div class="paragraph"><p><strong>Example format</strong>: <tt>W: (%quality at %essid, %bitrate) %ip</tt></p></div>\r
277 </div>\r
278 <div class="sect2">\r
279 <h3 id="_ethernet">5.6. Ethernet</h3>\r
280 <div class="paragraph"><p>Gets the IP address and (if possible) the link speed of the given ethernet\r
281 interface. Getting the link speed requires the cap_net_admin capability. Set\r
282 it using <tt>setcap cap_net_admin=ep $(which i3status)</tt>.</p></div>\r
283 <div class="paragraph"><p><strong>Example order</strong>: <tt>ethernet eth0</tt></p></div>\r
284 <div class="paragraph"><p><strong>Example format</strong>: <tt>E: %ip (%speed)</tt></p></div>\r
285 </div>\r
286 <div class="sect2">\r
287 <h3 id="_battery">5.7. Battery</h3>\r
288 <div class="paragraph"><p>Gets the status (charging, discharging, running), percentage, remaining\r
289 time and power consumption (in Watts) of the given battery and when it&#8217;s\r
290 estimated to be empty. If you want to use the last full capacity instead of the\r
291 design capacity (when using the design capacity, it may happen that your\r
292 battery is at 23% when fully charged because it’s old. In general, I want to\r
293 see it this way, because it tells me how worn off my battery is.), just specify\r
294 <tt>last_full_capacity = true</tt>.</p></div>\r
295 <div class="paragraph"><p>If you want the battery percentage to be shown without decimals, add\r
296 <tt>integer_battery_capacity = true</tt>.</p></div>\r
297 <div class="paragraph"><p>If your battery is represented in a non-standard path in /sys, be sure to\r
298 modify the "path" property accordingly. The first occurence of %d gets replaced\r
299 with the battery number, but you can just hard-code a path as well.</p></div>\r
300 <div class="paragraph"><p>It is possible to define a low_threshold that causes the battery text to be\r
301 colored red. The low_threshold type can be of threshold_type "time" or\r
302 "percentage". So, if you configure low_threshold to 10 and threshold_type to\r
303 "time", and your battery lasts another 9 minutes, it will be colored red.</p></div>\r
304 <div class="paragraph"><p><strong>Example order</strong>: <tt>battery 0</tt></p></div>\r
305 <div class="paragraph"><p><strong>Example format</strong>: <tt>%status %remaining (%emptytime %consumption)</tt></p></div>\r
306 <div class="paragraph"><p><strong>Example low_threshold</strong>: <tt>30</tt></p></div>\r
307 <div class="paragraph"><p><strong>Example threshold_type</strong>: <tt>time</tt></p></div>\r
308 </div>\r
309 <div class="sect2">\r
310 <h3 id="_cpu_temperature">5.8. CPU-Temperature</h3>\r
311 <div class="paragraph"><p>Gets the temperature of the given thermal zone. It is possible to\r
312 define a max_threshold that will color the temperature red in case the\r
313 specified thermal zone is getting too hot. Defaults to 75 degrees C.</p></div>\r
314 <div class="paragraph"><p><strong>Example order</strong>: <tt>cpu_temperature 0</tt></p></div>\r
315 <div class="paragraph"><p><strong>Example format</strong>: <tt>T: %degrees °C</tt></p></div>\r
316 <div class="paragraph"><p><strong>Example max_threshold</strong>: <tt>42</tt></p></div>\r
317 </div>\r
318 <div class="sect2">\r
319 <h3 id="_cpu_usage">5.9. CPU Usage</h3>\r
320 <div class="paragraph"><p>Gets the percentual CPU usage from <tt>/proc/stat</tt> (Linux) or <tt>sysctl(3)</tt> (FreeBSD/OpenBSD).</p></div>\r
321 <div class="paragraph"><p><strong>Example order</strong>: <tt>cpu_usage</tt></p></div>\r
322 <div class="paragraph"><p><strong>Example format</strong>: <tt>%usage</tt></p></div>\r
323 </div>\r
324 <div class="sect2">\r
325 <h3 id="_load">5.10. Load</h3>\r
326 <div class="paragraph"><p>Gets the system load (number of processes waiting for CPU time in the last\r
327 1, 5 and 15 minutes). It is possible to define a max_threshold that will\r
328 color the load value red in case the load average of the last minute is\r
329 getting higher than the configured threshold. Defaults to 5.</p></div>\r
330 <div class="paragraph"><p><strong>Example order</strong>: <tt>load</tt></p></div>\r
331 <div class="paragraph"><p><strong>Example format</strong>: <tt>%1min %5min %15min</tt></p></div>\r
332 <div class="paragraph"><p><strong>Example max_threshold</strong>: 5</p></div>\r
333 </div>\r
334 <div class="sect2">\r
335 <h3 id="_time">5.11. Time</h3>\r
336 <div class="paragraph"><p>Outputs the current time in the local timezone.\r
337 To use a different timezone, you can set the TZ environment variable,\r
338 or use the <tt>tztime</tt> module.\r
339 See <tt>strftime(3)</tt> for details on the format string.</p></div>\r
340 <div class="paragraph"><p><strong>Example order</strong>: <tt>time</tt></p></div>\r
341 <div class="paragraph"><p><strong>Example format</strong>: <tt>%Y-%m-%d %H:%M:%S</tt></p></div>\r
342 </div>\r
343 <div class="sect2">\r
344 <h3 id="_tztime">5.12. TzTime</h3>\r
345 <div class="paragraph"><p>Outputs the current time in the given timezone.\r
346 If no timezone is given, local time will be used.\r
347 See <tt>strftime(3)</tt> for details on the format string.\r
348 The system&#8217;s timezone database is usually installed in <tt>/usr/share/zoneinfo</tt>.\r
349 Files below that path make for valid timezone strings, e.g. for\r
350 <tt>/usr/share/zoneinfo/Europe/Berlin</tt> you can set timezone to <tt>Europe/Berlin</tt>\r
351 in the <tt>tztime</tt> module.</p></div>\r
352 <div class="paragraph"><p><strong>Example order</strong>: <tt>tztime berlin</tt></p></div>\r
353 <div class="paragraph"><p><strong>Example format</strong>: <tt>%Y-%m-%d %H:%M:%S %Z</tt></p></div>\r
354 <div class="paragraph"><p><strong>Example timezone</strong>: <tt>Europe/Berlin</tt></p></div>\r
355 </div>\r
356 <div class="sect2">\r
357 <h3 id="_ddate">5.13. DDate</h3>\r
358 <div class="paragraph"><p>Outputs the current discordian date in user-specified format. See <tt>ddate(1)</tt> for\r
359 details on the format string.\r
360 <strong>Note</strong>: Neither <strong>%.</strong> nor <strong>%X</strong> are implemented yet.</p></div>\r
361 <div class="paragraph"><p><strong>Example order</strong>: <tt>ddate</tt></p></div>\r
362 <div class="paragraph"><p><strong>Example format</strong>: <tt>%{%a, %b %d%}, %Y%N - %H</tt></p></div>\r
363 </div>\r
364 <div class="sect2">\r
365 <h3 id="_volume">5.14. Volume</h3>\r
366 <div class="paragraph"><p>Outputs the volume of the specified mixer on the specified device. Works only\r
367 on Linux because it uses ALSA.\r
368 A simplified configuration can be used on FreeBSD and OpenBSD due to\r
369 the lack of ALSA,  the <tt>device</tt>, <tt>mixer</tt> and <tt>mixder_idx</tt> options can be\r
370 ignored on these systems. On these systems the OSS API is used instead to\r
371 query <tt>/dev/mixer</tt> directly.</p></div>\r
372 <div class="paragraph"><p><strong>Example order</strong>: <tt>volume master</tt></p></div>\r
373 <div class="paragraph"><p><strong>Example format</strong>: <tt>♪: %volume</tt></p></div>\r
374 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
375 <div class="listingblock">\r
376 <div class="content">\r
377 <pre><tt>volume master {\r
378         format = "♪: %volume"\r
379         device = "default"\r
380         mixer = "Master"\r
381         mixer_idx = 0\r
382 }</tt></pre>\r
383 </div></div>\r
384 </div>\r
385 </div>\r
386 </div>\r
387 <div class="sect1">\r
388 <h2 id="_using_i3status_with_dzen2">6. Using i3status with dzen2</h2>\r
389 <div class="sectionbody">\r
390 <div class="paragraph"><p>After installing dzen2, you can directly use it with i3status. Just ensure that\r
391 <tt>output_format</tt> is set to <tt>dzen2</tt>.</p></div>\r
392 <div class="paragraph"><p><strong>Example for usage of i3status with dzen2</strong>:</p></div>\r
393 <div class="listingblock">\r
394 <div class="content">\r
395 <pre><tt>i3status | dzen2 -fg white -ta r -w 1280 \\r
396 -fn "-misc-fixed-medium-r-normal--13-120-75-75-C-70-iso8859-1"</tt></pre>\r
397 </div></div>\r
398 </div>\r
399 </div>\r
400 <div class="sect1">\r
401 <h2 id="_using_i3status_with_xmobar">7. Using i3status with xmobar</h2>\r
402 <div class="sectionbody">\r
403 <div class="paragraph"><p>To get xmobar to start, you might need to copy the default configuration\r
404 file to <tt>~/.xmobarrc</tt>. Also, ensure that the <tt>output_format</tt> option for i3status\r
405 is set to <tt>xmobar</tt>.</p></div>\r
406 <div class="paragraph"><p><strong>Example for usage of i3status with xmobar</strong>:</p></div>\r
407 <div class="listingblock">\r
408 <div class="content">\r
409 <pre><tt>i3status | xmobar -o -t "%StdinReader%" -c "[Run StdinReader]"</tt></pre>\r
410 </div></div>\r
411 </div>\r
412 </div>\r
413 <div class="sect1">\r
414 <h2 id="_what_about_memory_usage_or_cpu_frequency">8. What about memory usage or CPU frequency?</h2>\r
415 <div class="sectionbody">\r
416 <div class="paragraph"><p>While talking about two specific things, please understand this section as a\r
417 general explanation why your favorite information is not included in i3status.</p></div>\r
418 <div class="paragraph"><p>Let’s talk about memory usage specifically. It is hard to measure memory in a\r
419 way which is accurate or meaningful. An in-depth understanding of how paging\r
420 and virtual memory work in your operating system is required. Furthermore, even\r
421 if we had a well-defined way of displaying memory usage and you would\r
422 understand it, I think that it’s not helpful to repeatedly monitor your memory\r
423 usage. One reason for that is that I have not run out of memory in the last few\r
424 years.  Memory has become so cheap that even in my 4 year old notebook, I have\r
425 8 GiB of RAM. Another reason is that your operating system will do the right\r
426 thing anyway: Either you have not enough RAM for your workload, but you need to\r
427 do it anyway, then your operating system will swap. Or you don’t have enough\r
428 RAM and you want to restrict your workload so that it fits, then the operating\r
429 system will kill the process using too much RAM and you can act accordingly.</p></div>\r
430 <div class="paragraph"><p>For CPU frequency, the situation is similar. Many people don’t understand how\r
431 frequency scaling works precisely. The generally recommended CPU frequency\r
432 governor ("ondemand") changes the CPU frequency far more often than i3status\r
433 could display it. The display number is therefore often incorrect and doesn’t\r
434 tell you anything useful either.</p></div>\r
435 <div class="paragraph"><p>In general, i3status wants to display things which you would look at\r
436 occasionally anyways, like the current date/time, whether you are connected to\r
437 a WiFi network or not, and if you have enough disk space to fit that 4.3 GiB\r
438 download.</p></div>\r
439 <div class="paragraph"><p>However, if you need to look at some kind of information more than once in a\r
440 while (like checking repeatedly how full your RAM is), you are probably better\r
441 off with a script doing that, which pops up an alert when your RAM usage reaches\r
442 a certain threshold. After all, the point of computers is not to burden you\r
443 with additional boring tasks like repeatedly checking a number.</p></div>\r
444 </div>\r
445 </div>\r
446 <div class="sect1">\r
447 <h2 id="_external_scripts_programs_with_i3status">9. External scripts/programs with i3status</h2>\r
448 <div class="sectionbody">\r
449 <div class="paragraph"><p>In i3status, we don’t want to implement process management again. Therefore,\r
450 there is no module to run arbitrary scripts or commands. Instead, you should\r
451 use your shell, for example like this:</p></div>\r
452 <div class="paragraph"><p><strong>Example for prepending the i3status output</strong>:</p></div>\r
453 <div class="listingblock">\r
454 <div class="content">\r
455 <pre><tt>#!/bin/sh\r
456 # shell script to prepend i3status with more stuff\r
457 \r
458 i3status | while :\r
459 do\r
460         read line\r
461         echo "mystuff | $line" || exit 1\r
462 done</tt></pre>\r
463 </div></div>\r
464 <div class="paragraph"><p>Put that in some script, say <tt>.bin/my_i3status.sh</tt> and execute that instead of i3status.</p></div>\r
465 <div class="paragraph"><p>Note that if you want to use the JSON output format (with colors in i3bar), you\r
466 need to use a slightly more complex wrapper script. There are examples in the\r
467 contrib/ folder, see <a href="http://code.i3wm.org/i3status/tree/contrib">http://code.i3wm.org/i3status/tree/contrib</a></p></div>\r
468 </div>\r
469 </div>\r
470 <div class="sect1">\r
471 <h2 id="_signals">10. SIGNALS</h2>\r
472 <div class="sectionbody">\r
473 <div class="paragraph"><p>When receiving <tt>SIGUSR1</tt>, i3status’s nanosleep() will be interrupted and thus\r
474 you will force an update. You can use killall -USR1 i3status to force an update\r
475 after changing the system volume, for example.</p></div>\r
476 </div>\r
477 </div>\r
478 <div class="sect1">\r
479 <h2 id="_see_also">11. SEE ALSO</h2>\r
480 <div class="sectionbody">\r
481 <div class="paragraph"><p><tt>strftime(3)</tt>, <tt>date(1)</tt>, <tt>glob(3)</tt>, <tt>dzen2(1)</tt>, <tt>xmobar(1)</tt></p></div>\r
482 </div>\r
483 </div>\r
484 <div class="sect1">\r
485 <h2 id="_authors">12. AUTHORS</h2>\r
486 <div class="sectionbody">\r
487 <div class="paragraph"><p>Michael Stapelberg and contributors</p></div>\r
488 <div class="paragraph"><p>Thorsten Toepper</p></div>\r
489 <div class="paragraph"><p>Baptiste Daroussin</p></div>\r
490 <div class="paragraph"><p>Axel Wagner</p></div>\r
491 <div class="paragraph"><p>Fernando Tarlá Cardoso Lemos</p></div>\r
492 </div>\r
493 </div>\r
494 </div>\r
495 <div id="footnotes"><hr /></div>\r
496 <div id="footer" lang="de">\r
497 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>\r
498 </div>\r
499 </body>\r
500 </html>\r