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