]> git.sur5r.net Git - i3/i3.github.io/blob - i3status/manpage.html
2d6ec329f861aefa6352c9c550292286f50942c1
[i3/i3.github.io] / i3status / manpage.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/x-icon" href="/favicon.ico">\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="https://www.reddit.com/r/i3wm/">FAQ</a></li>\r
26                                 <li><a href="/contact">Contact</a></li>\r
27                                 <li><a href="https://github.com/i3/i3/issues">Bugs</a></li>\r
28                         </ul>\r
29         <br style="clear: both">\r
30 <div id="content">\r
31 <div id="header">\r
32 <h1>i3status(1)</h1>\r
33 <span id="author">Michael Stapelberg</span><br />\r
34 <span id="email"><tt>&lt;<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>&gt;</tt></span><br />\r
35 <span id="revnumber">version 2.11,</span>\r
36 <span id="revdate">January 2017</span>\r
37 <div id="toc">
38   <div id="toctitle">Table of Contents</div>
39   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
40 </div>\r
41 </div>\r
42 <div class="sect1">\r
43 <h2 id="_name">1. NAME</h2>\r
44 <div class="sectionbody">\r
45 <div class="paragraph"><p>i3status - Generates a status line for i3bar, dzen2, xmobar or lemonbar</p></div>\r
46 </div>\r
47 </div>\r
48 <div class="sect1">\r
49 <h2 id="_synopsis">2. SYNOPSIS</h2>\r
50 <div class="sectionbody">\r
51 <div class="paragraph"><p>i3status [-c configfile] [-h] [-v]</p></div>\r
52 </div>\r
53 </div>\r
54 <div class="sect1">\r
55 <h2 id="_options">3. OPTIONS</h2>\r
56 <div class="sectionbody">\r
57 <div class="dlist"><dl>\r
58 <dt class="hdlist1">\r
59 -c\r
60 </dt>\r
61 <dd>\r
62 <p>\r
63 Specifies an alternate configuration file path. By default, i3status looks for\r
64 configuration files in the following order:\r
65 </p>\r
66 <div class="olist arabic"><ol class="arabic">\r
67 <li>\r
68 <p>\r
69 ~/.config/i3status/config (or $XDG_CONFIG_HOME/i3status/config if set)\r
70 </p>\r
71 </li>\r
72 <li>\r
73 <p>\r
74 /etc/xdg/i3status/config (or $XDG_CONFIG_DIRS/i3status/config if set)\r
75 </p>\r
76 </li>\r
77 <li>\r
78 <p>\r
79 ~/.i3status.conf\r
80 </p>\r
81 </li>\r
82 <li>\r
83 <p>\r
84 /etc/i3status.conf\r
85 </p>\r
86 </li>\r
87 </ol></div>\r
88 </dd>\r
89 </dl></div>\r
90 </div>\r
91 </div>\r
92 <div class="sect1">\r
93 <h2 id="_description">4. DESCRIPTION</h2>\r
94 <div class="sectionbody">\r
95 <div class="paragraph"><p>i3status is a small program (about 1500 SLOC) for generating a status bar for\r
96 i3bar, dzen2, xmobar, lemonbar or similar programs. It is designed to be very\r
97 efficient by issuing a very small number of system calls, as one generally\r
98 wants to update such a status line every second. This ensures that even under\r
99 high load, your status bar is updated correctly. Also, it saves a bit of energy\r
100 by not hogging your CPU as much as spawning the corresponding amount of shell\r
101 commands would.</p></div>\r
102 </div>\r
103 </div>\r
104 <div class="sect1">\r
105 <h2 id="_configuration">5. CONFIGURATION</h2>\r
106 <div class="sectionbody">\r
107 <div class="paragraph"><p>The basic idea of i3status is that you can specify which "modules" should\r
108 be used (the order directive). You can then configure each module with its\r
109 own section. For every module, you can specify the output format. See below\r
110 for a complete reference.</p></div>\r
111 <div class="listingblock">\r
112 <div class="title">Sample configuration</div>\r
113 <div class="content">\r
114 <pre><tt>general {\r
115         output_format = "dzen2"\r
116         colors = true\r
117         interval = 5\r
118 }\r
119 \r
120 order += "ipv6"\r
121 order += "disk /"\r
122 order += "run_watch DHCP"\r
123 order += "run_watch VPNC"\r
124 order += "path_exists VPN"\r
125 order += "wireless wlan0"\r
126 order += "ethernet eth0"\r
127 order += "battery 0"\r
128 order += "cpu_temperature 0"\r
129 order += "load"\r
130 order += "tztime local"\r
131 order += "tztime berlin"\r
132 \r
133 wireless wlan0 {\r
134         format_up = "W: (%quality at %essid, %bitrate) %ip"\r
135         format_down = "W: down"\r
136 }\r
137 \r
138 ethernet eth0 {\r
139         # if you use %speed, i3status requires the cap_net_admin capability\r
140         format_up = "E: %ip (%speed)"\r
141         format_down = "E: down"\r
142 }\r
143 \r
144 battery 0 {\r
145         format = "%status %percentage %remaining %emptytime"\r
146         format_down = "No battery"\r
147         status_chr = "⚡ CHR"\r
148         status_bat = "🔋 BAT"\r
149         status_unk = "? UNK"\r
150         status_full = "☻ FULL"\r
151         path = "/sys/class/power_supply/BAT%d/uevent"\r
152         low_threshold = 10\r
153 }\r
154 \r
155 run_watch DHCP {\r
156         pidfile = "/var/run/dhclient*.pid"\r
157 }\r
158 \r
159 run_watch VPNC {\r
160         # file containing the PID of a vpnc process\r
161         pidfile = "/var/run/vpnc/pid"\r
162 }\r
163 \r
164 path_exists VPN {\r
165         # path exists when a VPN tunnel launched by nmcli/nm-applet is active\r
166         path = "/proc/sys/net/ipv4/conf/tun0"\r
167 }\r
168 \r
169 tztime local {\r
170         format = "%Y-%m-%d %H:%M:%S"\r
171 }\r
172 \r
173 tztime berlin {\r
174         format = "%Y-%m-%d %H:%M:%S %Z"\r
175         timezone = "Europe/Berlin"\r
176 }\r
177 \r
178 load {\r
179         format = "%5min"\r
180 }\r
181 \r
182 cpu_temperature 0 {\r
183         format = "T: %degrees °C"\r
184         path = "/sys/devices/platform/coretemp.0/temp1_input"\r
185 }\r
186 \r
187 disk "/" {\r
188         format = "%free"\r
189 }</tt></pre>\r
190 </div></div>\r
191 <div class="sect2">\r
192 <h3 id="_general">5.1. General</h3>\r
193 <div class="paragraph"><p>The <tt>colors</tt> directive will disable all colors if you set it to <tt>false</tt>. You can\r
194 also specify the colors that will be used to display "good", "degraded" or "bad"\r
195 values using the <tt>color_good</tt>, <tt>color_degraded</tt> or <tt>color_bad</tt> directives,\r
196 respectively. Those directives are only used if color support is not disabled by\r
197 the <tt>colors</tt> directive. The input format for color values is the canonical RGB\r
198 hexadecimal triplet (with no separators between the colors), prefixed by a hash\r
199 character ("#").</p></div>\r
200 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
201 <div class="listingblock">\r
202 <div class="content">\r
203 <pre><tt>color_good = "#00FF00"</tt></pre>\r
204 </div></div>\r
205 <div class="paragraph"><p>Likewise, you can use the <tt>color_separator</tt> directive to specify the color that\r
206 will be used to paint the separator bar. The separator is always output in\r
207 color, even when colors are disabled by the <tt>colors</tt> directive. This option has\r
208 no effect when <tt>output_format</tt> is set to <tt>i3bar</tt> or <tt>none</tt>.</p></div>\r
209 <div class="paragraph"><p>The <tt>interval</tt> directive specifies the time in seconds for which i3status will\r
210 sleep before printing the next status line.</p></div>\r
211 <div class="paragraph"><p>Using <tt>output_format</tt> you can chose which format strings i3status should\r
212 use in its output. Currently available are:</p></div>\r
213 <div class="dlist"><dl>\r
214 <dt class="hdlist1">\r
215 i3bar\r
216 </dt>\r
217 <dd>\r
218 <p>\r
219 i3bar comes with i3 and provides a workspace bar which does the right thing in\r
220 multi-monitor situations. It also comes with tray support and can display the\r
221 i3status output. This output type uses JSON to pass as much meta-information to\r
222 i3bar as possible (like colors, which blocks can be shortened in which way,\r
223 etc.).\r
224 </p>\r
225 </dd>\r
226 <dt class="hdlist1">\r
227 dzen2\r
228 </dt>\r
229 <dd>\r
230 <p>\r
231 Dzen is a general purpose messaging, notification and menuing program for X11.\r
232 It was designed to be scriptable in any language and integrate well with window\r
233 managers like dwm, wmii and xmonad though it will work with any windowmanger\r
234 </p>\r
235 </dd>\r
236 <dt class="hdlist1">\r
237 xmobar\r
238 </dt>\r
239 <dd>\r
240 <p>\r
241 xmobar is a minimalistic, text based, status bar. It was designed to work\r
242 with the xmonad Window Manager.\r
243 </p>\r
244 </dd>\r
245 <dt class="hdlist1">\r
246 lemonbar\r
247 </dt>\r
248 <dd>\r
249 <p>\r
250 lemonbar is a lightweight bar based entirely on XCB. It has full UTF-8 support\r
251 and is EWMH compliant.\r
252 </p>\r
253 </dd>\r
254 <dt class="hdlist1">\r
255 term\r
256 </dt>\r
257 <dd>\r
258 <p>\r
259 Use ANSI Escape sequences to produce a terminal-output as close as possible to\r
260 the graphical outputs. This makes debugging your config file a little bit\r
261 easier because the terminal-output of i3status becomes much more readable, but\r
262 should only used for such quick glances, because it will only support very\r
263 basic output-features (for example you only get 3 bits of color depth).\r
264 </p>\r
265 </dd>\r
266 <dt class="hdlist1">\r
267 none\r
268 </dt>\r
269 <dd>\r
270 <p>\r
271 Does not use any color codes. Separates values by the pipe symbol by default.\r
272 This should be used with i3bar and can be used for custom scripts.\r
273 </p>\r
274 </dd>\r
275 </dl></div>\r
276 <div class="paragraph"><p>It&#8217;s also possible to use the color_good, color_degraded, color_bad directives\r
277 to define specific colors per module. If one of these directives is defined\r
278 in a module section its value will override the value defined in the general\r
279 section just for this module.</p></div>\r
280 <div class="paragraph"><p>If you don&#8217;t fancy the vertical separators between modules i3status/i3bar\r
281 uses by default, you can employ the <tt>separator</tt> directive to configure how\r
282 modules are separated. You can either disable the default separator altogether\r
283 setting it to the empty string. You might then define separation as part of a\r
284 module&#8217;s format string. This is your only option when using the i3bar output\r
285 format as the separator is drawn by i3bar directly otherwise. For the other\r
286 output formats, the provided non-empty string will be automatically enclosed\r
287 with the necessary coloring bits if color support is enabled.</p></div>\r
288 <div class="paragraph"><p>i3bar supports Pango markup, allowing your format strings to specify font\r
289 color, size, etc. by setting the <tt>markup</tt> directive to "pango". Note that the\r
290 ampersand ("&amp;"), less-than ("&lt;"), greater-than ("&gt;"), single-quote ("'"), and\r
291 double-quote (""") characters need to be replaced with "<tt>&amp;amp;</tt>", "<tt>&amp;lt;</tt>",\r
292 "<tt>&amp;gt;</tt>", "<tt>&amp;apos;</tt>", and "<tt>&amp;quot;</tt>" respectively. This is done automatically\r
293 for generated content (e.g. wireless ESSID, time).</p></div>\r
294 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
295 <div class="listingblock">\r
296 <div class="content">\r
297 <pre><tt>general {\r
298     output_format = "xmobar"\r
299     separator = "  "\r
300 }\r
301 \r
302 order += "load"\r
303 order += "disk /"\r
304 \r
305 load {\r
306     format = "[ load: %1min, %5min, %15min ]"\r
307 }\r
308 disk "/" {\r
309     format = "%avail"\r
310 }</tt></pre>\r
311 </div></div>\r
312 </div>\r
313 <div class="sect2">\r
314 <h3 id="_ipv6">5.2. IPv6</h3>\r
315 <div class="paragraph"><p>This module gets the IPv6 address used for outgoing connections (that is, the\r
316 best available public IPv6 address on your computer).</p></div>\r
317 <div class="paragraph"><p><strong>Example format_up</strong>: <tt>%ip</tt></p></div>\r
318 <div class="paragraph"><p><strong>Example format_down</strong>: <tt>no IPv6</tt></p></div>\r
319 </div>\r
320 <div class="sect2">\r
321 <h3 id="_disk">5.3. Disk</h3>\r
322 <div class="paragraph"><p>Gets used, free, available and total amount of bytes on the given mounted filesystem.</p></div>\r
323 <div class="paragraph"><p>These values can also be expressed in percentages with the percentage_used,\r
324 percentage_free, percentage_avail and percentage_used_of_avail formats.</p></div>\r
325 <div class="paragraph"><p>Byte sizes are presented in a human readable format using a set of prefixes\r
326 whose type can be specified via the "prefix_type" option. Three sets of\r
327 prefixes are available:</p></div>\r
328 <div class="dlist"><dl>\r
329 <dt class="hdlist1">\r
330 binary\r
331 </dt>\r
332 <dd>\r
333 <p>\r
334 IEC prefixes (Ki, Mi, Gi, Ti) represent multiples of powers of 1024.\r
335 This is the default.\r
336 </p>\r
337 </dd>\r
338 <dt class="hdlist1">\r
339 decimal\r
340 </dt>\r
341 <dd>\r
342 <p>\r
343 SI prefixes (k, M, G, T) represent multiples of powers of 1000.\r
344 </p>\r
345 </dd>\r
346 <dt class="hdlist1">\r
347 custom\r
348 </dt>\r
349 <dd>\r
350 <p>\r
351 The custom prefixes (K, M, G, T) represent multiples of powers of 1024.\r
352 </p>\r
353 </dd>\r
354 </dl></div>\r
355 <div class="paragraph"><p>It is possible to define a low_threshold that causes the disk text to be\r
356 displayed using color_bad. The low_threshold type can be of threshold_type\r
357 "bytes_free", "bytes_avail", "percentage_free", or "percentage_avail", where\r
358 the former two can be prepended by a generic prefix (k, m, g, t) having\r
359 prefix_type. So, if you configure low_threshold to 2, threshold_type to\r
360 "gbytes_avail", and prefix_type to "binary", and the remaining available disk\r
361 space is below 2 GiB, it will be colored bad. If not specified, threshold_type\r
362 is assumed to be "percentage_avail" and low_threshold to be set to 0, which\r
363 implies no coloring at all. You can customize the output format when below\r
364 low_threshold with format_below_threshold.</p></div>\r
365 <div class="paragraph"><p>You can define a different format with the option "format_not_mounted"\r
366 which is used if the path does not exist or is not a mount point. Defaults to "".</p></div>\r
367 <div class="paragraph"><p><strong>Example order</strong>: <tt>disk /mnt/usbstick</tt></p></div>\r
368 <div class="paragraph"><p><strong>Example format</strong>: <tt>%free (%avail)/ %total</tt></p></div>\r
369 <div class="paragraph"><p><strong>Example format</strong>: <tt>%percentage_used used, %percentage_free free, %percentage_avail avail</tt></p></div>\r
370 <div class="paragraph"><p><strong>Example prefix_type</strong>: <tt>custom</tt></p></div>\r
371 <div class="paragraph"><p><strong>Example low_threshold</strong>: <tt>5</tt></p></div>\r
372 <div class="paragraph"><p><strong>Example format_below_threshold</strong>: <tt>Warning: %percentage_avail</tt></p></div>\r
373 <div class="paragraph"><p><strong>Example threshold_type</strong>: <tt>percentage_free</tt></p></div>\r
374 </div>\r
375 <div class="sect2">\r
376 <h3 id="_run_watch">5.4. Run-watch</h3>\r
377 <div class="paragraph"><p>Expands the given path to a pidfile and checks if the process ID found inside\r
378 is valid (that is, if the process is running). You can use this to check if\r
379 a specific application, such as a VPN client or your DHCP client is running.\r
380 There also is an option "format_down". You can hide the output with\r
381 <tt>format_down=""</tt>.</p></div>\r
382 <div class="paragraph"><p><strong>Example order</strong>: <tt>run_watch DHCP</tt></p></div>\r
383 <div class="paragraph"><p><strong>Example format</strong>: <tt>%title: %status</tt></p></div>\r
384 </div>\r
385 <div class="sect2">\r
386 <h3 id="_path_exists">5.5. Path-exists</h3>\r
387 <div class="paragraph"><p>Checks if the given path exists in the filesystem. You can use this to check if\r
388 something is active, like for example a VPN tunnel managed by NetworkManager.\r
389 There also is an option "format_down". You can hide the output with\r
390 <tt>format_down=""</tt>.</p></div>\r
391 <div class="paragraph"><p><strong>Example order</strong>: <tt>path_exists VPN</tt></p></div>\r
392 <div class="paragraph"><p><strong>Example format</strong>: <tt>%title: %status</tt></p></div>\r
393 </div>\r
394 <div class="sect2">\r
395 <h3 id="_wireless">5.6. Wireless</h3>\r
396 <div class="paragraph"><p>Gets the link quality, frequency and ESSID of the given wireless network\r
397 interface. You can specify different format strings for the network being\r
398 connected or not connected.</p></div>\r
399 <div class="paragraph"><p>The special interface name <tt>_first_</tt> will be replaced by the first wireless\r
400 network interface found on the system (excluding devices starting with "lo").</p></div>\r
401 <div class="paragraph"><p><strong>Example order</strong>: <tt>wireless wlan0</tt></p></div>\r
402 <div class="paragraph"><p><strong>Example format</strong>: <tt>W: (%quality at %essid, %bitrate / %frequency) %ip</tt></p></div>\r
403 </div>\r
404 <div class="sect2">\r
405 <h3 id="_ethernet">5.7. Ethernet</h3>\r
406 <div class="paragraph"><p>Gets the IP address and (if possible) the link speed of the given ethernet\r
407 interface. Getting the link speed requires the cap_net_admin capability. Set\r
408 it using <tt>setcap cap_net_admin=ep $(which i3status)</tt>.</p></div>\r
409 <div class="paragraph"><p>The special interface name <tt>_first_</tt> will be replaced by the first non-wireless\r
410 network interface found on the system (excluding devices starting with "lo").</p></div>\r
411 <div class="paragraph"><p><strong>Example order</strong>: <tt>ethernet eth0</tt></p></div>\r
412 <div class="paragraph"><p><strong>Example format</strong>: <tt>E: %ip (%speed)</tt></p></div>\r
413 </div>\r
414 <div class="sect2">\r
415 <h3 id="_battery">5.8. Battery</h3>\r
416 <div class="paragraph"><p>Gets the status (charging, discharging, unknown, full), percentage, remaining\r
417 time and power consumption (in Watts) of the given battery and when it&#8217;s\r
418 estimated to be empty. If you want to use the last full capacity instead of the\r
419 design capacity (when using the design capacity, it may happen that your\r
420 battery is at 23% when fully charged because it’s old. In general, I want to\r
421 see it this way, because it tells me how worn off my battery is.), just specify\r
422 <tt>last_full_capacity = true</tt>. You can hide seconds in the remaining time and\r
423 empty time estimations by setting <tt>hide_seconds = true</tt>.</p></div>\r
424 <div class="paragraph"><p>If you want the battery percentage to be shown without decimals, add\r
425 <tt>integer_battery_capacity = true</tt>.</p></div>\r
426 <div class="paragraph"><p>If your battery is represented in a non-standard path in /sys, be sure to\r
427 modify the "path" property accordingly, i.e. pointing to the uevent file on\r
428 your system. The first occurrence of %d gets replaced with the battery number,\r
429 but you can just hard-code a path as well.</p></div>\r
430 <div class="paragraph"><p>It is possible to define a low_threshold that causes the battery text to be\r
431 colored red. The low_threshold type can be of threshold_type "time" or\r
432 "percentage". So, if you configure low_threshold to 10 and threshold_type to\r
433 "time", and your battery lasts another 9 minutes, it will be colored red.</p></div>\r
434 <div class="paragraph"><p>To show an aggregate of all batteries in the system, use "all" as the number. In\r
435 this case (for Linux), the /sys path must contain the "%d" sequence. Otherwise,\r
436 the number indicates the battery index as reported in /sys.</p></div>\r
437 <div class="paragraph"><p>Optionally custom strings including any UTF-8 symbols can be used for different\r
438 battery states. This makes it possible to display individual symbols\r
439 for each state (charging, discharging, unknown, full)\r
440 Of course it will also work with special iconic fonts, such as FontAwesome.\r
441 If any of these special status strings are omitted, the default (CHR, BAT, UNK,\r
442 FULL) is used.</p></div>\r
443 <div class="paragraph"><p><strong>Example order (for the first battery)</strong>: <tt>battery 0</tt></p></div>\r
444 <div class="paragraph"><p><strong>Example order (aggregate of all batteries)</strong>: <tt>battery all</tt></p></div>\r
445 <div class="paragraph"><p><strong>Example format</strong>: <tt>%status %remaining (%emptytime %consumption)</tt></p></div>\r
446 <div class="paragraph"><p><strong>Example format_down</strong>: <tt>No battery</tt></p></div>\r
447 <div class="paragraph"><p><strong>Example status_chr</strong>: <tt>⚡ CHR</tt></p></div>\r
448 <div class="paragraph"><p><strong>Example status_bat</strong>: <tt>🔋 BAT</tt></p></div>\r
449 <div class="paragraph"><p><strong>Example status_unk</strong>: <tt>? UNK</tt></p></div>\r
450 <div class="paragraph"><p><strong>Example status_full</strong>: <tt>☻ FULL</tt></p></div>\r
451 <div class="paragraph"><p><strong>Example low_threshold</strong>: <tt>30</tt></p></div>\r
452 <div class="paragraph"><p><strong>Example threshold_type</strong>: <tt>time</tt></p></div>\r
453 <div class="paragraph"><p><strong>Example path (%d replaced by title number)</strong>: <tt>/sys/class/power_supply/CMB%d/uevent</tt></p></div>\r
454 <div class="paragraph"><p><strong>Example path (ignoring the number)</strong>: <tt>/sys/class/power_supply/CMB1/uevent</tt></p></div>\r
455 </div>\r
456 <div class="sect2">\r
457 <h3 id="_cpu_temperature">5.9. CPU-Temperature</h3>\r
458 <div class="paragraph"><p>Gets the temperature of the given thermal zone. It is possible to\r
459 define a max_threshold that will color the temperature red in case the\r
460 specified thermal zone is getting too hot. Defaults to 75 degrees C. The\r
461 output format when above max_threshold can be customized with\r
462 format_above_threshold.</p></div>\r
463 <div class="paragraph"><p><strong>Example order</strong>: <tt>cpu_temperature 0</tt></p></div>\r
464 <div class="paragraph"><p><strong>Example format</strong>: <tt>T: %degrees °C</tt></p></div>\r
465 <div class="paragraph"><p><strong>Example max_threshold</strong>: <tt>42</tt></p></div>\r
466 <div class="paragraph"><p><strong>Example format_above_threshold</strong>: <tt>Warning T above threshold: %degrees °C</tt></p></div>\r
467 <div class="paragraph"><p><strong>Example path</strong>: <tt>/sys/devices/platform/coretemp.0/temp1_input</tt></p></div>\r
468 </div>\r
469 <div class="sect2">\r
470 <h3 id="_cpu_usage">5.10. CPU Usage</h3>\r
471 <div class="paragraph"><p>Gets the percentual CPU usage from <tt>/proc/stat</tt> (Linux) or <tt>sysctl(3)</tt>\r
472 (FreeBSD/OpenBSD).</p></div>\r
473 <div class="paragraph"><p>It is possible to define a max_threshold that will color the load\r
474 value red in case the CPU average over the last interval is getting\r
475 higher than the configured threshold. Defaults to 95. The output\r
476 format when above max_threshold can be customized with\r
477 format_above_threshold.</p></div>\r
478 <div class="paragraph"><p>It is possible to define a degraded_threshold that will color the load\r
479 value yellow in case the CPU average over the last interval is getting\r
480 higher than the configured threshold.  Defaults to 90. The output format\r
481 when above degraded threshold can be customized with\r
482 format_above_degraded_threshold.</p></div>\r
483 <div class="paragraph"><p><strong>Example order</strong>: <tt>cpu_usage</tt></p></div>\r
484 <div class="paragraph"><p><strong>Example format</strong>: <tt>%usage</tt></p></div>\r
485 <div class="paragraph"><p><strong>Example max_threshold</strong>: <tt>75</tt></p></div>\r
486 <div class="paragraph"><p><strong>Example format_above_threshold</strong>: <tt>Warning above threshold: %usage</tt></p></div>\r
487 <div class="paragraph"><p><strong>Example degraded_threshold</strong>: <tt>25</tt></p></div>\r
488 <div class="paragraph"><p><strong>Example format_above_degraded_threshold</strong>: <tt>Warning above degraded threshold: %usage</tt></p></div>\r
489 </div>\r
490 <div class="sect2">\r
491 <h3 id="_load">5.11. Load</h3>\r
492 <div class="paragraph"><p>Gets the system load (number of processes waiting for CPU time in the last\r
493 1, 5 and 15 minutes). It is possible to define a max_threshold that will\r
494 color the load value red in case the load average of the last minute is\r
495 getting higher than the configured threshold. Defaults to 5. The output\r
496 format when above max_threshold can be customized with\r
497 format_above_threshold.</p></div>\r
498 <div class="paragraph"><p><strong>Example order</strong>: <tt>load</tt></p></div>\r
499 <div class="paragraph"><p><strong>Example format</strong>: <tt>%1min %5min %15min</tt></p></div>\r
500 <div class="paragraph"><p><strong>Example max_threshold</strong>: <tt>"0,1"</tt></p></div>\r
501 <div class="paragraph"><p><strong>Example format_above_threshold</strong>: <tt>Warning: %1min %5min %15min</tt></p></div>\r
502 </div>\r
503 <div class="sect2">\r
504 <h3 id="_time">5.12. Time</h3>\r
505 <div class="paragraph"><p>Outputs the current time in the local timezone.\r
506 To use a different timezone, you can set the TZ environment variable,\r
507 or use the <tt>tztime</tt> module.\r
508 See <tt>strftime(3)</tt> for details on the format string.</p></div>\r
509 <div class="paragraph"><p><strong>Example order</strong>: <tt>time</tt></p></div>\r
510 <div class="paragraph"><p><strong>Example format</strong>: <tt>%Y-%m-%d %H:%M:%S</tt></p></div>\r
511 </div>\r
512 <div class="sect2">\r
513 <h3 id="_tztime">5.13. TzTime</h3>\r
514 <div class="paragraph"><p>Outputs the current time in the given timezone.\r
515 If no timezone is given, local time will be used.\r
516 See <tt>strftime(3)</tt> for details on the format string.\r
517 The system&#8217;s timezone database is usually installed in <tt>/usr/share/zoneinfo</tt>.\r
518 Files below that path make for valid timezone strings, e.g. for\r
519 <tt>/usr/share/zoneinfo/Europe/Berlin</tt> you can set timezone to <tt>Europe/Berlin</tt>\r
520 in the <tt>tztime</tt> module.\r
521 To override the locale settings of your environment, set the <tt>locale</tt> option.</p></div>\r
522 <div class="paragraph"><p><strong>Example order</strong>: <tt>tztime berlin</tt></p></div>\r
523 <div class="paragraph"><p><strong>Example format</strong>: <tt>%Y-%m-%d %H:%M:%S %Z</tt></p></div>\r
524 <div class="paragraph"><p><strong>Example timezone</strong>: <tt>Europe/Berlin</tt></p></div>\r
525 <div class="paragraph"><p><strong>Example locale</strong>: <tt>de_DE.UTF-8</tt></p></div>\r
526 <div class="paragraph"><p>If you would like to use markup in this section, there is a separate\r
527 <tt>format_time</tt> option that is automatically escaped. Its output then replaces\r
528 %time in the format string.</p></div>\r
529 <div class="paragraph"><p><strong>Example configuration (markup)</strong>:</p></div>\r
530 <div class="listingblock">\r
531 <div class="content">\r
532 <pre><tt>tztime berlin {\r
533         format = "&lt;span foreground='#ffffff'&gt;time:&lt;/span&gt; %time"\r
534         format_time = "%H:%M %Z"\r
535         timezone = "Europe/Berlin"\r
536 }</tt></pre>\r
537 </div></div>\r
538 </div>\r
539 <div class="sect2">\r
540 <h3 id="_ddate">5.14. DDate</h3>\r
541 <div class="paragraph"><p>Outputs the current discordian date in user-specified format. See <tt>ddate(1)</tt> for\r
542 details on the format string.\r
543 <strong>Note</strong>: Neither <strong>%.</strong> nor <strong>%X</strong> are implemented yet.</p></div>\r
544 <div class="paragraph"><p><strong>Example order</strong>: <tt>ddate</tt></p></div>\r
545 <div class="paragraph"><p><strong>Example format</strong>: <tt>%{%a, %b %d%}, %Y%N - %H</tt></p></div>\r
546 </div>\r
547 <div class="sect2">\r
548 <h3 id="_volume">5.15. Volume</h3>\r
549 <div class="paragraph"><p>Outputs the volume of the specified mixer on the specified device.  PulseAudio\r
550 and ALSA (Linux only) are supported.  If PulseAudio is absent, a simplified\r
551 configuration can be used on FreeBSD and OpenBSD due to the lack of ALSA,  the\r
552 <tt>device</tt> and <tt>mixer</tt> options can be ignored on these systems. On these systems\r
553 the OSS API is used instead to query <tt>/dev/mixer</tt> directly if <tt>mixer_idx</tt> is\r
554 -1, otherwise <tt>/dev/mixer</tt>+mixer_idx+.</p></div>\r
555 <div class="paragraph"><p>To get PulseAudio volume information, one must use the following format in the\r
556 device line:</p></div>\r
557 <div class="literalblock">\r
558 <div class="content">\r
559 <pre><tt>device = "pulse"</tt></pre>\r
560 </div></div>\r
561 <div class="paragraph"><p>or</p></div>\r
562 <div class="literalblock">\r
563 <div class="content">\r
564 <pre><tt>device = "pulse:N"</tt></pre>\r
565 </div></div>\r
566 <div class="paragraph"><p>where N is the index or name of the PulseAudio sink. You can obtain the name of\r
567 the sink with the following command:</p></div>\r
568 <div class="literalblock">\r
569 <div class="content">\r
570 <pre><tt>$ pacmd list-sinks | grep name:\r
571            name: &lt;alsa_output.pci-0000_00_14.2.analog-stereo&gt;</tt></pre>\r
572 </div></div>\r
573 <div class="paragraph"><p>The name is what&#8217;s inside the angle brackets, not including them. If no sink is\r
574 specified the default sink is used. If the device string is missing or is set\r
575 to "default", PulseAudio will be tried if detected and will fallback to ALSA\r
576 (Linux) or OSS (FreeBSD/OpenBSD).</p></div>\r
577 <div class="paragraph"><p><strong>Example order</strong>: <tt>volume master</tt></p></div>\r
578 <div class="paragraph"><p><strong>Example format</strong>: <tt>♪: %volume</tt></p></div>\r
579 <div class="paragraph"><p><strong>Example format_muted</strong>: <tt>♪: 0%%</tt></p></div>\r
580 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
581 <div class="listingblock">\r
582 <div class="content">\r
583 <pre><tt>volume master {\r
584         format = "♪: %volume"\r
585         format_muted = "♪: muted (%volume)"\r
586         device = "default"\r
587         mixer = "Master"\r
588         mixer_idx = 0\r
589 }</tt></pre>\r
590 </div></div>\r
591 <div class="paragraph"><p><strong>Example configuration (PulseAudio)</strong>:</p></div>\r
592 <div class="listingblock">\r
593 <div class="content">\r
594 <pre><tt>volume master {\r
595         format = "♪: %volume"\r
596         format_muted = "♪: muted (%volume)"\r
597         device = "pulse:1"\r
598 }</tt></pre>\r
599 </div></div>\r
600 <div class="listingblock">\r
601 <div class="content">\r
602 <pre><tt>volume master {\r
603         format = "♪: %volume"\r
604         format_muted = "♪: muted (%volume)"\r
605         device = "pulse:alsa_output.pci-0000_00_14.2.analog-stereo"\r
606 }</tt></pre>\r
607 </div></div>\r
608 </div>\r
609 </div>\r
610 </div>\r
611 <div class="sect1">\r
612 <h2 id="_universal_module_options">6. Universal module options</h2>\r
613 <div class="sectionbody">\r
614 <div class="paragraph"><p>When using the i3bar output format, there are a few additional options that\r
615 can be used with all modules to customize their appearance:</p></div>\r
616 <div class="dlist"><dl>\r
617 <dt class="hdlist1">\r
618 align\r
619 </dt>\r
620 <dd>\r
621 <p>\r
622         The alignment policy to use when the minimum width (see below) is not\r
623         reached. Either <tt>center</tt> (default), <tt>right</tt> or <tt>left</tt>.\r
624 </p>\r
625 </dd>\r
626 <dt class="hdlist1">\r
627 min_width\r
628 </dt>\r
629 <dd>\r
630 <p>\r
631         The minimum width (in pixels) the module should occupy. If the module takes\r
632         less space than the specified size, the block will be padded to the left\r
633         and/or the right side, according to the defined alignment policy. This is\r
634         useful when you want to prevent the whole status line from shifting when\r
635         values take more or less space between each iteration.\r
636         The option can also be a string. In this case, the width of the given text\r
637         determines the minimum width of the block. This is useful when you want to\r
638         set a sensible minimum width regardless of which font you are using, and at\r
639         what particular size. Please note that a number enclosed with quotes will\r
640         still be treated as a number.\r
641 </p>\r
642 </dd>\r
643 <dt class="hdlist1">\r
644 separator\r
645 </dt>\r
646 <dd>\r
647 <p>\r
648         A boolean value which specifies whether a separator line should be drawn\r
649         after this block. The default is true, meaning the separator line will be\r
650         drawn. Note that if you disable the separator line, there will still be a\r
651         gap after the block, unless you also use separator_block_width.\r
652 </p>\r
653 </dd>\r
654 <dt class="hdlist1">\r
655 separator_block_width\r
656 </dt>\r
657 <dd>\r
658 <p>\r
659         The amount of pixels to leave blank after the block. In the middle of this\r
660         gap, a separator symbol will be drawn unless separator is disabled. This is\r
661         why the specified width should leave enough space for the separator symbol.\r
662 </p>\r
663 </dd>\r
664 </dl></div>\r
665 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
666 <div class="listingblock">\r
667 <div class="content">\r
668 <pre><tt>disk "/" {\r
669     format = "%avail"\r
670     align = "left"\r
671     min_width = 100\r
672     separator = false\r
673     separator_block_width = 1\r
674 }</tt></pre>\r
675 </div></div>\r
676 </div>\r
677 </div>\r
678 <div class="sect1">\r
679 <h2 id="_using_i3status_with_dzen2">7. Using i3status with dzen2</h2>\r
680 <div class="sectionbody">\r
681 <div class="paragraph"><p>After installing dzen2, you can directly use it with i3status. Just ensure that\r
682 <tt>output_format</tt> is set to <tt>dzen2</tt>.</p></div>\r
683 <div class="paragraph"><p><strong>Example for usage of i3status with dzen2</strong>:</p></div>\r
684 <div class="listingblock">\r
685 <div class="content">\r
686 <pre><tt>i3status | dzen2 -fg white -ta r -w 1280 \\r
687 -fn "-misc-fixed-medium-r-normal--13-120-75-75-C-70-iso8859-1"</tt></pre>\r
688 </div></div>\r
689 </div>\r
690 </div>\r
691 <div class="sect1">\r
692 <h2 id="_using_i3status_with_xmobar">8. Using i3status with xmobar</h2>\r
693 <div class="sectionbody">\r
694 <div class="paragraph"><p>To get xmobar to start, you might need to copy the default configuration\r
695 file to <tt>~/.xmobarrc</tt>. Also, ensure that the <tt>output_format</tt> option for i3status\r
696 is set to <tt>xmobar</tt>.</p></div>\r
697 <div class="paragraph"><p><strong>Example for usage of i3status with xmobar</strong>:</p></div>\r
698 <div class="listingblock">\r
699 <div class="content">\r
700 <pre><tt>i3status | xmobar -o -t "%StdinReader%" -c "[Run StdinReader]"</tt></pre>\r
701 </div></div>\r
702 </div>\r
703 </div>\r
704 <div class="sect1">\r
705 <h2 id="_what_about_memory_usage_or_cpu_frequency">9. What about memory usage or CPU frequency?</h2>\r
706 <div class="sectionbody">\r
707 <div class="paragraph"><p>While talking about two specific things, please understand this section as a\r
708 general explanation why your favorite information is not included in i3status.</p></div>\r
709 <div class="paragraph"><p>Let’s talk about memory usage specifically. It is hard to measure memory in a\r
710 way which is accurate or meaningful. An in-depth understanding of how paging\r
711 and virtual memory work in your operating system is required. Furthermore, even\r
712 if we had a well-defined way of displaying memory usage and you would\r
713 understand it, I think that it’s not helpful to repeatedly monitor your memory\r
714 usage. One reason for that is that I have not run out of memory in the last few\r
715 years.  Memory has become so cheap that even in my 4 year old notebook, I have\r
716 8 GiB of RAM. Another reason is that your operating system will do the right\r
717 thing anyway: Either you have not enough RAM for your workload, but you need to\r
718 do it anyway, then your operating system will swap. Or you don’t have enough\r
719 RAM and you want to restrict your workload so that it fits, then the operating\r
720 system will kill the process using too much RAM and you can act accordingly.</p></div>\r
721 <div class="paragraph"><p>For CPU frequency, the situation is similar. Many people don’t understand how\r
722 frequency scaling works precisely. The generally recommended CPU frequency\r
723 governor ("ondemand") changes the CPU frequency far more often than i3status\r
724 could display it. The display number is therefore often incorrect and doesn’t\r
725 tell you anything useful either.</p></div>\r
726 <div class="paragraph"><p>In general, i3status wants to display things which you would look at\r
727 occasionally anyways, like the current date/time, whether you are connected to\r
728 a WiFi network or not, and if you have enough disk space to fit that 4.3 GiB\r
729 download.</p></div>\r
730 <div class="paragraph"><p>However, if you need to look at some kind of information more than once in a\r
731 while (like checking repeatedly how full your RAM is), you are probably better\r
732 off with a script doing that, which pops up an alert when your RAM usage reaches\r
733 a certain threshold. After all, the point of computers is not to burden you\r
734 with additional boring tasks like repeatedly checking a number.</p></div>\r
735 </div>\r
736 </div>\r
737 <div class="sect1">\r
738 <h2 id="_external_scripts_programs_with_i3status">10. External scripts/programs with i3status</h2>\r
739 <div class="sectionbody">\r
740 <div class="paragraph"><p>In i3status, we don’t want to implement process management again. Therefore,\r
741 there is no module to run arbitrary scripts or commands. Instead, you should\r
742 use your shell, for example like this:</p></div>\r
743 <div class="paragraph"><p><strong>Example for prepending the i3status output</strong>:</p></div>\r
744 <div class="listingblock">\r
745 <div class="content">\r
746 <pre><tt>#!/bin/sh\r
747 # shell script to prepend i3status with more stuff\r
748 \r
749 i3status | while :\r
750 do\r
751         read line\r
752         echo "mystuff | $line" || exit 1\r
753 done</tt></pre>\r
754 </div></div>\r
755 <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
756 <div class="paragraph"><p>Note that if you want to use the JSON output format (with colors in i3bar), you\r
757 need to use a slightly more complex wrapper script. There are examples in the\r
758 contrib/ folder, see <a href="https://github.com/i3/i3status/tree/master/contrib">https://github.com/i3/i3status/tree/master/contrib</a></p></div>\r
759 </div>\r
760 </div>\r
761 <div class="sect1">\r
762 <h2 id="_signals">11. SIGNALS</h2>\r
763 <div class="sectionbody">\r
764 <div class="paragraph"><p>When receiving <tt>SIGUSR1</tt>, i3status’s nanosleep() will be interrupted and thus\r
765 you will force an update. You can use killall -USR1 i3status to force an update\r
766 after changing the system volume, for example.</p></div>\r
767 </div>\r
768 </div>\r
769 <div class="sect1">\r
770 <h2 id="_see_also">12. SEE ALSO</h2>\r
771 <div class="sectionbody">\r
772 <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
773 </div>\r
774 </div>\r
775 <div class="sect1">\r
776 <h2 id="_authors">13. AUTHORS</h2>\r
777 <div class="sectionbody">\r
778 <div class="paragraph"><p>Michael Stapelberg and contributors</p></div>\r
779 <div class="paragraph"><p>Thorsten Toepper</p></div>\r
780 <div class="paragraph"><p>Baptiste Daroussin</p></div>\r
781 <div class="paragraph"><p>Axel Wagner</p></div>\r
782 <div class="paragraph"><p>Fernando Tarlá Cardoso Lemos</p></div>\r
783 </div>\r
784 </div>\r
785 </div>\r
786 <div id="footnotes"><hr /></div>\r
787 <div id="footer" lang="de">\r
788 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>\r
789 </div>\r
790 </body>\r
791 </html>\r