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