]> git.sur5r.net Git - i3/i3.github.io/blob - docs/4.13/i3status.html
save docs for 4.13
[i3/i3.github.io] / docs / 4.13 / 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/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.8" />\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://faq.i3wm.org/">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.9,</span>\r
36 <span id="revdate">March 2015</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 or xmobar</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 ~/.i3status.conf\r
70 </p>\r
71 </li>\r
72 <li>\r
73 <p>\r
74 ~/.config/i3status/config (or $XDG_CONFIG_HOME/i3status/config if set)\r
75 </p>\r
76 </li>\r
77 <li>\r
78 <p>\r
79 /etc/i3status.conf\r
80 </p>\r
81 </li>\r
82 <li>\r
83 <p>\r
84 /etc/xdg/i3status/config (or $XDG_CONFIG_DIRS/i3status/config if set)\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 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_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 chose 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 term\r
246 </dt>\r
247 <dd>\r
248 <p>\r
249 Use ANSI Escape sequences to produce a terminal-output as close as possible to\r
250 the graphical outputs. This makes debugging your config file a little bit\r
251 easier because the terminal-output of i3status becomes much more readable, but\r
252 should only used for such quick glances, because it will only support very\r
253 basic output-features (for example you only get 3 bits of color depth).\r
254 </p>\r
255 </dd>\r
256 <dt class="hdlist1">\r
257 none\r
258 </dt>\r
259 <dd>\r
260 <p>\r
261 Does not use any color codes. Separates values by the pipe symbol by default.\r
262 This should be used with i3bar and can be used for custom scripts.\r
263 </p>\r
264 </dd>\r
265 </dl></div>\r
266 <div class="paragraph"><p>It&#8217;s also possible to use the color_good, color_degraded, color_bad directives\r
267 to define specific colors per module. If one of these directives is defined\r
268 in a module section its value will override the value defined in the general\r
269 section just for this module.</p></div>\r
270 <div class="paragraph"><p>If you don&#8217;t fancy the vertical separators between modules i3status/i3bar\r
271 uses by default, you can employ the <tt>separator</tt> directive to configure how\r
272 modules are separated. You can either disable the default separator altogether\r
273 setting it to the empty string. You might then define separation as part of a\r
274 module&#8217;s format string. This is your only option when using the i3bar output\r
275 format as the separator is drawn by i3bar directly otherwise. For the other\r
276 output formats, the provided non-empty string will be automatically enclosed\r
277 with the necessary coloring bits if color support is enabled.</p></div>\r
278 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
279 <div class="listingblock">\r
280 <div class="content">\r
281 <pre><tt>general {\r
282     output_format = "xmobar"\r
283     separator = "  "\r
284 }\r
285 \r
286 order += "load"\r
287 order += "disk /"\r
288 \r
289 load {\r
290     format = "[ load: %1min, %5min, %15min ]"\r
291 }\r
292 disk "/" {\r
293     format = "%avail"\r
294 }</tt></pre>\r
295 </div></div>\r
296 </div>\r
297 <div class="sect2">\r
298 <h3 id="_ipv6">5.2. IPv6</h3>\r
299 <div class="paragraph"><p>This module gets the IPv6 address used for outgoing connections (that is, the\r
300 best available public IPv6 address on your computer).</p></div>\r
301 <div class="paragraph"><p><strong>Example format_up</strong>: <tt>%ip</tt></p></div>\r
302 <div class="paragraph"><p><strong>Example format_down</strong>: <tt>no IPv6</tt></p></div>\r
303 </div>\r
304 <div class="sect2">\r
305 <h3 id="_disk">5.3. Disk</h3>\r
306 <div class="paragraph"><p>Gets used, free, available and total amount of bytes on the given mounted filesystem.</p></div>\r
307 <div class="paragraph"><p>These values can also be expressed in percentages with the percentage_used,\r
308 percentage_free, percentage_avail and percentage_used_of_avail formats.</p></div>\r
309 <div class="paragraph"><p>Byte sizes are presented in a human readable format using a set of prefixes\r
310 whose type can be specified via the "prefix_type" option. Three sets of\r
311 prefixes are available:</p></div>\r
312 <div class="dlist"><dl>\r
313 <dt class="hdlist1">\r
314 binary\r
315 </dt>\r
316 <dd>\r
317 <p>\r
318 IEC prefixes (Ki, Mi, Gi, Ti) represent multiples of powers of 1024.\r
319 This is the default.\r
320 </p>\r
321 </dd>\r
322 <dt class="hdlist1">\r
323 decimal\r
324 </dt>\r
325 <dd>\r
326 <p>\r
327 SI prefixes (k, M, G, T) represent multiples of powers of 1000.\r
328 </p>\r
329 </dd>\r
330 <dt class="hdlist1">\r
331 custom\r
332 </dt>\r
333 <dd>\r
334 <p>\r
335 The custom prefixes (K, M, G, T) represent multiples of powers of 1024.\r
336 </p>\r
337 </dd>\r
338 </dl></div>\r
339 <div class="paragraph"><p>It is possible to define a low_threshold that causes the disk text to be\r
340 displayed using color_bad. The low_threshold type can be of threshold_type\r
341 "bytes_free", "bytes_avail", "percentage_free", or "percentage_avail", where\r
342 the former two can be prepended by a generic prefix (k, m, g, t) having\r
343 prefix_type. So, if you configure low_threshold to 2, threshold_type to\r
344 "gbytes_avail", and prefix_type to "binary", and the remaining available disk\r
345 space is below 2 GiB, it will be colored bad. If not specified, threshold_type\r
346 is assumed to be "percentage_avail" and low_threshold to be set to 0, which\r
347 implies no coloring at all.</p></div>\r
348 <div class="paragraph"><p>You can define a different format with the option "format_not_mounted"\r
349 which is used if the path is not a mount point. So you can just empty\r
350 the output for the given path with adding »format_not_mounted=""«\r
351 to the config section.</p></div>\r
352 <div class="paragraph"><p><strong>Example order</strong>: <tt>disk /mnt/usbstick</tt></p></div>\r
353 <div class="paragraph"><p><strong>Example format</strong>: <tt>%free (%avail)/ %total</tt></p></div>\r
354 <div class="paragraph"><p><strong>Example format</strong>: <tt>%percentage_used used, %percentage_free free, %percentage_avail avail</tt></p></div>\r
355 <div class="paragraph"><p><strong>Example prefix_type</strong>: <tt>custom</tt></p></div>\r
356 <div class="paragraph"><p><strong>Example low_threshold</strong>: <tt>5</tt></p></div>\r
357 <div class="paragraph"><p><strong>Example threshold_type</strong>: <tt>percentage_free</tt></p></div>\r
358 </div>\r
359 <div class="sect2">\r
360 <h3 id="_run_watch">5.4. Run-watch</h3>\r
361 <div class="paragraph"><p>Expands the given path to a pidfile and checks if the process ID found inside\r
362 is valid (that is, if the process is running). You can use this to check if\r
363 a specific application, such as a VPN client or your DHCP client is running.</p></div>\r
364 <div class="paragraph"><p><strong>Example order</strong>: <tt>run_watch DHCP</tt></p></div>\r
365 <div class="paragraph"><p><strong>Example format</strong>: <tt>%title: %status</tt></p></div>\r
366 </div>\r
367 <div class="sect2">\r
368 <h3 id="_path_exists">5.5. Path-exists</h3>\r
369 <div class="paragraph"><p>Checks if the given path exists in the filesystem. You can use this to check if\r
370 something is active, like for example a VPN tunnel managed by NetworkManager.</p></div>\r
371 <div class="paragraph"><p><strong>Example order</strong>: <tt>path_exists VPN</tt></p></div>\r
372 <div class="paragraph"><p><strong>Example format</strong>: <tt>%title: %status</tt></p></div>\r
373 </div>\r
374 <div class="sect2">\r
375 <h3 id="_wireless">5.6. Wireless</h3>\r
376 <div class="paragraph"><p>Gets the link quality, frequency and ESSID of the given wireless network\r
377 interface. You can specify different format strings for the network being\r
378 connected or not connected.</p></div>\r
379 <div class="paragraph"><p>The special interface name <tt>_first_</tt> will be replaced by the first wireless\r
380 network interface found on the system (excluding devices starting with "lo").</p></div>\r
381 <div class="paragraph"><p><strong>Example order</strong>: <tt>wireless wlan0</tt></p></div>\r
382 <div class="paragraph"><p><strong>Example format</strong>: <tt>W: (%quality at %essid, %bitrate / %frequency) %ip</tt></p></div>\r
383 </div>\r
384 <div class="sect2">\r
385 <h3 id="_ethernet">5.7. Ethernet</h3>\r
386 <div class="paragraph"><p>Gets the IP address and (if possible) the link speed of the given ethernet\r
387 interface. Getting the link speed requires the cap_net_admin capability. Set\r
388 it using <tt>setcap cap_net_admin=ep $(which i3status)</tt>.</p></div>\r
389 <div class="paragraph"><p>The special interface name <tt>_first_</tt> will be replaced by the first non-wireless\r
390 network interface found on the system (excluding devices starting with "lo").</p></div>\r
391 <div class="paragraph"><p><strong>Example order</strong>: <tt>ethernet eth0</tt></p></div>\r
392 <div class="paragraph"><p><strong>Example format</strong>: <tt>E: %ip (%speed)</tt></p></div>\r
393 </div>\r
394 <div class="sect2">\r
395 <h3 id="_battery">5.8. Battery</h3>\r
396 <div class="paragraph"><p>Gets the status (charging, discharging, running), percentage, remaining\r
397 time and power consumption (in Watts) of the given battery and when it&#8217;s\r
398 estimated to be empty. If you want to use the last full capacity instead of the\r
399 design capacity (when using the design capacity, it may happen that your\r
400 battery is at 23% when fully charged because it’s old. In general, I want to\r
401 see it this way, because it tells me how worn off my battery is.), just specify\r
402 <tt>last_full_capacity = true</tt>. You can hide seconds in the remaining time and\r
403 empty time estimations by setting <tt>hide_seconds = true</tt>.</p></div>\r
404 <div class="paragraph"><p>If you want the battery percentage to be shown without decimals, add\r
405 <tt>integer_battery_capacity = true</tt>.</p></div>\r
406 <div class="paragraph"><p>If your battery is represented in a non-standard path in /sys, be sure to\r
407 modify the "path" property accordingly, i.e. pointing to the uevent file on\r
408 your system. The first occurence of %d gets replaced with the battery number,\r
409 but you can just hard-code a path as well.</p></div>\r
410 <div class="paragraph"><p>It is possible to define a low_threshold that causes the battery text to be\r
411 colored red. The low_threshold type can be of threshold_type "time" or\r
412 "percentage". So, if you configure low_threshold to 10 and threshold_type to\r
413 "time", and your battery lasts another 9 minutes, it will be colored red.</p></div>\r
414 <div class="paragraph"><p>Optionally custom strings including any UTF-8 symbols can be used for different\r
415 battery states. This makes it possible to display individual symbols\r
416 for each state (charging, discharging, full)\r
417 Of course it will also work with special iconic fonts, such as FontAwesome.\r
418 If any of this special status strings is omitted, the default (CHR, BAT, FULL)\r
419 is used.</p></div>\r
420 <div class="paragraph"><p><strong>Example order</strong>: <tt>battery 0</tt></p></div>\r
421 <div class="paragraph"><p><strong>Example format</strong>: <tt>%status %remaining (%emptytime %consumption)</tt></p></div>\r
422 <div class="paragraph"><p><strong>Example format_down</strong>: <tt>No battery</tt></p></div>\r
423 <div class="paragraph"><p><strong>Example status_chr</strong>: <tt>⚇ CHR</tt></p></div>\r
424 <div class="paragraph"><p><strong>Example status_bat</strong>: <tt>⚡ BAT</tt></p></div>\r
425 <div class="paragraph"><p><strong>Example status_full</strong>: <tt>☻ FULL</tt></p></div>\r
426 <div class="paragraph"><p><strong>Example low_threshold</strong>: <tt>30</tt></p></div>\r
427 <div class="paragraph"><p><strong>Example threshold_type</strong>: <tt>time</tt></p></div>\r
428 <div class="paragraph"><p><strong>Example path</strong>: <tt>/sys/class/power_supply/CMB1/uevent</tt></p></div>\r
429 </div>\r
430 <div class="sect2">\r
431 <h3 id="_cpu_temperature">5.9. CPU-Temperature</h3>\r
432 <div class="paragraph"><p>Gets the temperature of the given thermal zone. It is possible to\r
433 define a max_threshold that will color the temperature red in case the\r
434 specified thermal zone is getting too hot. Defaults to 75 degrees C.</p></div>\r
435 <div class="paragraph"><p><strong>Example order</strong>: <tt>cpu_temperature 0</tt></p></div>\r
436 <div class="paragraph"><p><strong>Example format</strong>: <tt>T: %degrees °C</tt></p></div>\r
437 <div class="paragraph"><p><strong>Example max_threshold</strong>: <tt>42</tt></p></div>\r
438 <div class="paragraph"><p><strong>Example path</strong>: <tt>/sys/devices/platform/coretemp.0/temp1_input</tt></p></div>\r
439 </div>\r
440 <div class="sect2">\r
441 <h3 id="_cpu_usage">5.10. CPU Usage</h3>\r
442 <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
443 <div class="paragraph"><p><strong>Example order</strong>: <tt>cpu_usage</tt></p></div>\r
444 <div class="paragraph"><p><strong>Example format</strong>: <tt>%usage</tt></p></div>\r
445 </div>\r
446 <div class="sect2">\r
447 <h3 id="_load">5.11. Load</h3>\r
448 <div class="paragraph"><p>Gets the system load (number of processes waiting for CPU time in the last\r
449 1, 5 and 15 minutes). It is possible to define a max_threshold that will\r
450 color the load value red in case the load average of the last minute is\r
451 getting higher than the configured threshold. Defaults to 5.</p></div>\r
452 <div class="paragraph"><p><strong>Example order</strong>: <tt>load</tt></p></div>\r
453 <div class="paragraph"><p><strong>Example format</strong>: <tt>%1min %5min %15min</tt></p></div>\r
454 <div class="paragraph"><p><strong>Example max_threshold</strong>: <tt>"0,1"</tt></p></div>\r
455 </div>\r
456 <div class="sect2">\r
457 <h3 id="_time">5.12. Time</h3>\r
458 <div class="paragraph"><p>Outputs the current time in the local timezone.\r
459 To use a different timezone, you can set the TZ environment variable,\r
460 or use the <tt>tztime</tt> module.\r
461 See <tt>strftime(3)</tt> for details on the format string.</p></div>\r
462 <div class="paragraph"><p><strong>Example order</strong>: <tt>time</tt></p></div>\r
463 <div class="paragraph"><p><strong>Example format</strong>: <tt>%Y-%m-%d %H:%M:%S</tt></p></div>\r
464 </div>\r
465 <div class="sect2">\r
466 <h3 id="_tztime">5.13. TzTime</h3>\r
467 <div class="paragraph"><p>Outputs the current time in the given timezone.\r
468 If no timezone is given, local time will be used.\r
469 See <tt>strftime(3)</tt> for details on the format string.\r
470 The system&#8217;s timezone database is usually installed in <tt>/usr/share/zoneinfo</tt>.\r
471 Files below that path make for valid timezone strings, e.g. for\r
472 <tt>/usr/share/zoneinfo/Europe/Berlin</tt> you can set timezone to <tt>Europe/Berlin</tt>\r
473 in the <tt>tztime</tt> module.</p></div>\r
474 <div class="paragraph"><p><strong>Example order</strong>: <tt>tztime berlin</tt></p></div>\r
475 <div class="paragraph"><p><strong>Example format</strong>: <tt>%Y-%m-%d %H:%M:%S %Z</tt></p></div>\r
476 <div class="paragraph"><p><strong>Example timezone</strong>: <tt>Europe/Berlin</tt></p></div>\r
477 </div>\r
478 <div class="sect2">\r
479 <h3 id="_ddate">5.14. DDate</h3>\r
480 <div class="paragraph"><p>Outputs the current discordian date in user-specified format. See <tt>ddate(1)</tt> for\r
481 details on the format string.\r
482 <strong>Note</strong>: Neither <strong>%.</strong> nor <strong>%X</strong> are implemented yet.</p></div>\r
483 <div class="paragraph"><p><strong>Example order</strong>: <tt>ddate</tt></p></div>\r
484 <div class="paragraph"><p><strong>Example format</strong>: <tt>%{%a, %b %d%}, %Y%N - %H</tt></p></div>\r
485 </div>\r
486 <div class="sect2">\r
487 <h3 id="_volume">5.15. Volume</h3>\r
488 <div class="paragraph"><p>Outputs the volume of the specified mixer on the specified device. Works only\r
489 on Linux because it uses ALSA.\r
490 A simplified configuration can be used on FreeBSD and OpenBSD due to\r
491 the lack of ALSA,  the <tt>device</tt> and <tt>mixer</tt> options can be\r
492 ignored on these systems. On these systems the OSS API is used instead to\r
493 query <tt>/dev/mixer</tt> directly if <tt>mixer_dix</tt> is -1, otherwise\r
494 <tt>/dev/mixer</tt>+mixer_idx+.</p></div>\r
495 <div class="paragraph"><p><strong>Example order</strong>: <tt>volume master</tt></p></div>\r
496 <div class="paragraph"><p><strong>Example format</strong>: <tt>♪: %volume</tt>\r
497 <strong>Example format_muted</strong>: <tt>♪: 0%%</tt></p></div>\r
498 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
499 <div class="listingblock">\r
500 <div class="content">\r
501 <pre><tt>volume master {\r
502         format = "♪: %volume"\r
503         format_muted = "♪: muted (%volume)"\r
504         device = "default"\r
505         mixer = "Master"\r
506         mixer_idx = 0\r
507 }</tt></pre>\r
508 </div></div>\r
509 </div>\r
510 </div>\r
511 </div>\r
512 <div class="sect1">\r
513 <h2 id="_universal_module_options">6. Universal module options</h2>\r
514 <div class="sectionbody">\r
515 <div class="paragraph"><p>When using the i3bar output format, there are a few additional options that\r
516 can be used with all modules to customize their appearance:</p></div>\r
517 <div class="dlist"><dl>\r
518 <dt class="hdlist1">\r
519 align\r
520 </dt>\r
521 <dd>\r
522 <p>\r
523         The alignment policy to use when the minimum width (see below) is not\r
524         reached. Either <tt>center</tt> (default), <tt>right</tt> or <tt>left</tt>.\r
525 </p>\r
526 </dd>\r
527 <dt class="hdlist1">\r
528 min_width\r
529 </dt>\r
530 <dd>\r
531 <p>\r
532         The minimum width (in pixels) the module should occupy. If the module takes\r
533         less space than the specified size, the block will be padded to the left\r
534         and/or the right side, according to the defined alignment policy. This is\r
535         useful when you want to prevent the whole status line from shifting when\r
536         values take more or less space between each iteration.\r
537         The option can also be a string. In this case, the width of the given text\r
538         determines the minimum width of the block. This is useful when you want to\r
539         set a sensible minimum width regardless of which font you are using, and at\r
540         what particular size. Please note that a number enclosed with quotes will\r
541         still be treated as a number.\r
542 </p>\r
543 </dd>\r
544 </dl></div>\r
545 <div class="paragraph"><p><strong>Example configuration</strong>:</p></div>\r
546 <div class="listingblock">\r
547 <div class="content">\r
548 <pre><tt>disk "/" {\r
549     format = "%avail"\r
550     align = "left"\r
551     min_width = 100\r
552 }</tt></pre>\r
553 </div></div>\r
554 </div>\r
555 </div>\r
556 <div class="sect1">\r
557 <h2 id="_using_i3status_with_dzen2">7. Using i3status with dzen2</h2>\r
558 <div class="sectionbody">\r
559 <div class="paragraph"><p>After installing dzen2, you can directly use it with i3status. Just ensure that\r
560 <tt>output_format</tt> is set to <tt>dzen2</tt>.</p></div>\r
561 <div class="paragraph"><p><strong>Example for usage of i3status with dzen2</strong>:</p></div>\r
562 <div class="listingblock">\r
563 <div class="content">\r
564 <pre><tt>i3status | dzen2 -fg white -ta r -w 1280 \\r
565 -fn "-misc-fixed-medium-r-normal--13-120-75-75-C-70-iso8859-1"</tt></pre>\r
566 </div></div>\r
567 </div>\r
568 </div>\r
569 <div class="sect1">\r
570 <h2 id="_using_i3status_with_xmobar">8. Using i3status with xmobar</h2>\r
571 <div class="sectionbody">\r
572 <div class="paragraph"><p>To get xmobar to start, you might need to copy the default configuration\r
573 file to <tt>~/.xmobarrc</tt>. Also, ensure that the <tt>output_format</tt> option for i3status\r
574 is set to <tt>xmobar</tt>.</p></div>\r
575 <div class="paragraph"><p><strong>Example for usage of i3status with xmobar</strong>:</p></div>\r
576 <div class="listingblock">\r
577 <div class="content">\r
578 <pre><tt>i3status | xmobar -o -t "%StdinReader%" -c "[Run StdinReader]"</tt></pre>\r
579 </div></div>\r
580 </div>\r
581 </div>\r
582 <div class="sect1">\r
583 <h2 id="_what_about_memory_usage_or_cpu_frequency">9. What about memory usage or CPU frequency?</h2>\r
584 <div class="sectionbody">\r
585 <div class="paragraph"><p>While talking about two specific things, please understand this section as a\r
586 general explanation why your favorite information is not included in i3status.</p></div>\r
587 <div class="paragraph"><p>Let’s talk about memory usage specifically. It is hard to measure memory in a\r
588 way which is accurate or meaningful. An in-depth understanding of how paging\r
589 and virtual memory work in your operating system is required. Furthermore, even\r
590 if we had a well-defined way of displaying memory usage and you would\r
591 understand it, I think that it’s not helpful to repeatedly monitor your memory\r
592 usage. One reason for that is that I have not run out of memory in the last few\r
593 years.  Memory has become so cheap that even in my 4 year old notebook, I have\r
594 8 GiB of RAM. Another reason is that your operating system will do the right\r
595 thing anyway: Either you have not enough RAM for your workload, but you need to\r
596 do it anyway, then your operating system will swap. Or you don’t have enough\r
597 RAM and you want to restrict your workload so that it fits, then the operating\r
598 system will kill the process using too much RAM and you can act accordingly.</p></div>\r
599 <div class="paragraph"><p>For CPU frequency, the situation is similar. Many people don’t understand how\r
600 frequency scaling works precisely. The generally recommended CPU frequency\r
601 governor ("ondemand") changes the CPU frequency far more often than i3status\r
602 could display it. The display number is therefore often incorrect and doesn’t\r
603 tell you anything useful either.</p></div>\r
604 <div class="paragraph"><p>In general, i3status wants to display things which you would look at\r
605 occasionally anyways, like the current date/time, whether you are connected to\r
606 a WiFi network or not, and if you have enough disk space to fit that 4.3 GiB\r
607 download.</p></div>\r
608 <div class="paragraph"><p>However, if you need to look at some kind of information more than once in a\r
609 while (like checking repeatedly how full your RAM is), you are probably better\r
610 off with a script doing that, which pops up an alert when your RAM usage reaches\r
611 a certain threshold. After all, the point of computers is not to burden you\r
612 with additional boring tasks like repeatedly checking a number.</p></div>\r
613 </div>\r
614 </div>\r
615 <div class="sect1">\r
616 <h2 id="_external_scripts_programs_with_i3status">10. External scripts/programs with i3status</h2>\r
617 <div class="sectionbody">\r
618 <div class="paragraph"><p>In i3status, we don’t want to implement process management again. Therefore,\r
619 there is no module to run arbitrary scripts or commands. Instead, you should\r
620 use your shell, for example like this:</p></div>\r
621 <div class="paragraph"><p><strong>Example for prepending the i3status output</strong>:</p></div>\r
622 <div class="listingblock">\r
623 <div class="content">\r
624 <pre><tt>#!/bin/sh\r
625 # shell script to prepend i3status with more stuff\r
626 \r
627 i3status | while :\r
628 do\r
629         read line\r
630         echo "mystuff | $line" || exit 1\r
631 done</tt></pre>\r
632 </div></div>\r
633 <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
634 <div class="paragraph"><p>Note that if you want to use the JSON output format (with colors in i3bar), you\r
635 need to use a slightly more complex wrapper script. There are examples in the\r
636 contrib/ folder, see <a href="http://code.i3wm.org/i3status/tree/contrib">http://code.i3wm.org/i3status/tree/contrib</a></p></div>\r
637 </div>\r
638 </div>\r
639 <div class="sect1">\r
640 <h2 id="_signals">11. SIGNALS</h2>\r
641 <div class="sectionbody">\r
642 <div class="paragraph"><p>When receiving <tt>SIGUSR1</tt>, i3status’s nanosleep() will be interrupted and thus\r
643 you will force an update. You can use killall -USR1 i3status to force an update\r
644 after changing the system volume, for example.</p></div>\r
645 </div>\r
646 </div>\r
647 <div class="sect1">\r
648 <h2 id="_see_also">12. SEE ALSO</h2>\r
649 <div class="sectionbody">\r
650 <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
651 </div>\r
652 </div>\r
653 <div class="sect1">\r
654 <h2 id="_authors">13. AUTHORS</h2>\r
655 <div class="sectionbody">\r
656 <div class="paragraph"><p>Michael Stapelberg and contributors</p></div>\r
657 <div class="paragraph"><p>Thorsten Toepper</p></div>\r
658 <div class="paragraph"><p>Baptiste Daroussin</p></div>\r
659 <div class="paragraph"><p>Axel Wagner</p></div>\r
660 <div class="paragraph"><p>Fernando Tarlá Cardoso Lemos</p></div>\r
661 </div>\r
662 </div>\r
663 </div>\r
664 <div id="footnotes"><hr /></div>\r
665 <div id="footer" lang="de">\r
666 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>\r
667 </div>\r
668 </body>\r
669 </html>\r