]> git.sur5r.net Git - i3/i3.github.io/blob - docs/userguide.html
add i3 v4.2
[i3/i3.github.io] / docs / userguide.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
2     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
4 <head>\r
5 <link rel="icon" type="image/png" href="/favicon.png">\r
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
7 <meta name="generator" content="AsciiDoc 8.6.4" />\r
8 <title>i3: i3 User’s Guide</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 window.onload = function(){asciidoc.footnotes(); asciidoc.toc(2);}\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>i3 User’s Guide</h1>\r
32 <span id="author">Michael Stapelberg</span><br />\r
33 <span id="email"><tt>&lt;<a href="mailto:michael+i3@stapelberg.de">michael+i3@stapelberg.de</a>&gt;</tt></span><br />\r
34 <span id="revdate">April 2012</span>\r
35 <div id="toc">
36   <div id="toctitle">Table of Contents</div>
37   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
38 </div>\r
39 </div>\r
40 <div id="preamble">\r
41 <div class="sectionbody">\r
42 <div class="paragraph"><p>This document contains all the information you need to configure and use the i3\r
43 window manager. If it does not, please contact us on IRC (preferred) or post your\r
44 question(s) on the mailing list.</p></div>\r
45 </div>\r
46 </div>\r
47 <div class="sect1">\r
48 <h2 id="_default_keybindings">1. Default keybindings</h2>\r
49 <div class="sectionbody">\r
50 <div class="paragraph"><p>For the "too long; didn’t read" people, here is an overview of the default\r
51 keybindings (click to see the full size image):</p></div>\r
52 <div class="paragraph"><p><strong>Keys to use with mod (alt):</strong></p></div>\r
53 <div class="paragraph"><p><span class="image">\r
54 <a class="image" href="keyboard-layer1.png">\r
55 <img src="keyboard-layer1.png" alt="Keys to use with mod (alt)" width="600" />\r
56 </a>\r
57 </span></p></div>\r
58 <div class="paragraph"><p><strong>Keys to use with Shift+mod:</strong></p></div>\r
59 <div class="paragraph"><p><span class="image">\r
60 <a class="image" href="keyboard-layer2.png">\r
61 <img src="keyboard-layer2.png" alt="Keys to use with Shift+mod" width="600" />\r
62 </a>\r
63 </span></p></div>\r
64 <div class="paragraph"><p>The red keys are the modifiers you need to press (by default), the blue keys\r
65 are your homerow.</p></div>\r
66 </div>\r
67 </div>\r
68 <div class="sect1">\r
69 <h2 id="_using_i3">2. Using i3</h2>\r
70 <div class="sectionbody">\r
71 <div class="paragraph"><p>Throughout this guide, the keyword <tt>mod</tt> will be used to refer to the\r
72 configured modifier. This is the alt key (Mod1) by default, with windows (Mod4)\r
73 being a popular alternative.</p></div>\r
74 <div class="sect2">\r
75 <h3 id="_opening_terminals_and_moving_around">2.1. Opening terminals and moving around</h3>\r
76 <div class="paragraph"><p>One very basic operation is opening a new terminal. By default, the keybinding\r
77 for this is mod+Enter, that is Alt+Enter in the default configuration. By\r
78 pressing mod+Enter, a new terminal will be opened.  It will fill the whole\r
79 space available on your screen.</p></div>\r
80 <div class="paragraph"><p><span class="image">\r
81 <img src="single_terminal.png" alt="Single terminal" />\r
82 </span></p></div>\r
83 <div class="paragraph"><p>If you now open another terminal, i3 will place it next to the current one,\r
84 splitting the screen size in half. Depending on your monitor, i3 will put the\r
85 created window beside the existing window (on wide displays) or below the\r
86 existing window (rotated displays).</p></div>\r
87 <div class="paragraph"><p><span class="image">\r
88 <img src="two_terminals.png" alt="Two terminals" />\r
89 </span></p></div>\r
90 <div class="paragraph"><p>To move the focus between the two terminals, you can use the direction keys\r
91 which you may know from the editor <tt>vi</tt>. However, in i3, your homerow is used\r
92 for these keys (in <tt>vi</tt>, the keys are shifted to the left by one for\r
93 compatibility with most keyboard layouts). Therefore, <tt>mod+J</tt> is left, <tt>mod+K</tt>\r
94 is down, <tt>mod+L</tt> is up and <tt>mod+;</tt> is right. So, to switch between the\r
95 terminals, use <tt>mod+K</tt> or <tt>mod+L</tt>. Of course, you can also use the arrow keys.</p></div>\r
96 <div class="paragraph"><p>At the moment, your workspace is split (it contains two terminals) in a\r
97 specific direction (horizontal by default). Every window can be split\r
98 horizontally or vertically again, just like the workspace. The terminology is\r
99 "window" for a container that actually contains an X11 window (like a terminal\r
100 or browser) and "split container" for containers that consist of one or more\r
101 windows.</p></div>\r
102 <div class="paragraph"><p>TODO: picture of the tree</p></div>\r
103 <div class="paragraph"><p>To split a window vertically, press <tt>mod+v</tt>. To split it horizontally, press\r
104 <tt>mod+h</tt>.</p></div>\r
105 </div>\r
106 <div class="sect2">\r
107 <h3 id="_changing_the_container_layout">2.2. Changing the container layout</h3>\r
108 <div class="paragraph"><p>A split container can have one of the following layouts:</p></div>\r
109 <div class="dlist"><dl>\r
110 <dt class="hdlist1">\r
111 default\r
112 </dt>\r
113 <dd>\r
114 <p>\r
115 Windows are sized so that every window gets an equal amount of space in the\r
116 container.\r
117 </p>\r
118 </dd>\r
119 <dt class="hdlist1">\r
120 stacking\r
121 </dt>\r
122 <dd>\r
123 <p>\r
124 Only the focused window in the container is displayed. You get a list of\r
125 windows at the top of the container.\r
126 </p>\r
127 </dd>\r
128 <dt class="hdlist1">\r
129 tabbed\r
130 </dt>\r
131 <dd>\r
132 <p>\r
133 The same principle as <tt>stacking</tt>, but the list of windows at the top is only\r
134 a single line which is vertically split.\r
135 </p>\r
136 </dd>\r
137 </dl></div>\r
138 <div class="paragraph"><p>To switch modes, press <tt>mod+e</tt> for default, <tt>mod+s</tt> for stacking and\r
139 <tt>mod+w</tt> for tabbed.</p></div>\r
140 <div class="paragraph"><p><span class="image">\r
141 <img src="modes.png" alt="Container modes" />\r
142 </span></p></div>\r
143 </div>\r
144 <div class="sect2">\r
145 <h3 id="_toggling_fullscreen_mode_for_a_window">2.3. Toggling fullscreen mode for a window</h3>\r
146 <div class="paragraph"><p>To display a window in fullscreen mode or to go out of fullscreen mode again,\r
147 press <tt>mod+f</tt>.</p></div>\r
148 <div class="paragraph"><p>There is also a global fullscreen mode in i3 in which the client will span all\r
149 available outputs (the command is <tt>fullscreen global</tt>).</p></div>\r
150 </div>\r
151 <div class="sect2">\r
152 <h3 id="_opening_other_applications">2.4. Opening other applications</h3>\r
153 <div class="paragraph"><p>Aside from opening applications from a terminal, you can also use the handy\r
154 <tt>dmenu</tt> which is opened by pressing <tt>mod+d</tt> by default. Just type the name\r
155 (or a part of it) of the application which you want to open. The corresponding\r
156 application has to be in your <tt>$PATH</tt> for this to work.</p></div>\r
157 <div class="paragraph"><p>Additionally, if you have applications you open very frequently, you can\r
158 create a keybinding for starting the application directly. See the section\r
159 <a href="#configuring">[configuring]</a> for details.</p></div>\r
160 </div>\r
161 <div class="sect2">\r
162 <h3 id="_closing_windows">2.5. Closing windows</h3>\r
163 <div class="paragraph"><p>If an application does not provide a mechanism for closing (most applications\r
164 provide a menu, the escape key or a shortcut like <tt>Control+W</tt> to close), you\r
165 can press <tt>mod+Shift+q</tt> to kill a window. For applications which support\r
166 the WM_DELETE protocol, this will correctly close the application (saving\r
167 any modifications or doing other cleanup). If the application doesn’t support\r
168 the WM_DELETE protocol your X server will kill the window and the behaviour\r
169 depends on the application.</p></div>\r
170 </div>\r
171 <div class="sect2">\r
172 <h3 id="_using_workspaces">2.6. Using workspaces</h3>\r
173 <div class="paragraph"><p>Workspaces are an easy way to group a set of windows. By default, you are on\r
174 the first workspace, as the bar on the bottom left indicates. To switch to\r
175 another workspace, press <tt>mod+num</tt> where <tt>num</tt> is the number of the workspace\r
176 you want to use. If the workspace does not exist yet, it will be created.</p></div>\r
177 <div class="paragraph"><p>A common paradigm is to put the web browser on one workspace, communication\r
178 applications (<tt>mutt</tt>, <tt>irssi</tt>, &#8230;) on another one, and the ones with which you\r
179 work, on the third one. Of course, there is no need to follow this approach.</p></div>\r
180 <div class="paragraph"><p>If you have multiple screens, a workspace will be created on each screen at\r
181 startup. If you open a new workspace, it will be bound to the screen you\r
182 created it on.  When you switch to a workspace on another screen, i3 will set\r
183 focus to that screen.</p></div>\r
184 </div>\r
185 <div class="sect2">\r
186 <h3 id="_moving_windows_to_workspaces">2.7. Moving windows to workspaces</h3>\r
187 <div class="paragraph"><p>To move a window to another workspace, simply press <tt>mod+Shift+num</tt> where\r
188 <tt>num</tt> is (like when switching workspaces) the number of the target workspace.\r
189 Similarly to switching workspaces, the target workspace will be created if\r
190 it does not yet exist.</p></div>\r
191 </div>\r
192 <div class="sect2">\r
193 <h3 id="_resizing">2.8. Resizing</h3>\r
194 <div class="paragraph"><p>The easiest way to resize a container is by using the mouse: Grab the border\r
195 and move it to the wanted size.</p></div>\r
196 <div class="paragraph"><p>See <a href="#resizingconfig">[resizingconfig]</a> for how to configure i3 to be able to resize\r
197 columns/rows with your keyboard.</p></div>\r
198 </div>\r
199 <div class="sect2">\r
200 <h3 id="_restarting_i3_inplace">2.9. Restarting i3 inplace</h3>\r
201 <div class="paragraph"><p>To restart i3 inplace (and thus get into a clean state if there is a bug, or\r
202 to upgrade to a newer version of i3) you can use <tt>mod+Shift+r</tt>.</p></div>\r
203 </div>\r
204 <div class="sect2">\r
205 <h3 id="_exiting_i3">2.10. Exiting i3</h3>\r
206 <div class="paragraph"><p>To cleanly exit i3 without killing your X server, you can use <tt>mod+Shift+e</tt>.</p></div>\r
207 </div>\r
208 <div class="sect2">\r
209 <h3 id="_floating">2.11. Floating</h3>\r
210 <div class="paragraph"><p>Floating mode is the opposite of tiling mode. The position and size of a window\r
211 are not managed by i3, but by you. Using this mode violates the tiling\r
212 paradigm but can be useful for some corner cases like "Save as" dialog\r
213 windows, or toolbar windows (GIMP or similar). Those windows usually set the\r
214 appropriate hint and are opened in floating mode by default.</p></div>\r
215 <div class="paragraph"><p>You can toggle floating mode for a window by pressing <tt>mod+Shift+Space</tt>. By\r
216 dragging the window’s titlebar with your mouse you can move the window\r
217 around. By grabbing the borders and moving them you can resize the window. You\r
218 can also do that by using the <a href="#floating_modifier">[floating_modifier]</a>.</p></div>\r
219 <div class="paragraph"><p>For resizing floating windows with your keyboard, see <a href="#resizingconfig">[resizingconfig]</a>.</p></div>\r
220 <div class="paragraph"><p>Floating windows are always on top of tiling windows.</p></div>\r
221 </div>\r
222 </div>\r
223 </div>\r
224 <div class="sect1">\r
225 <h2 id="_tree">3. Tree</h2>\r
226 <div class="sectionbody">\r
227 <div class="paragraph"><p>i3 stores all information about the X11 outputs, workspaces and layout of the\r
228 windows on them in a tree. The root node is the X11 root window, followed by\r
229 the X11 outputs, then dock areas and a content container, then workspaces and\r
230 finally the windows themselves. In previous versions of i3 we had multiple lists\r
231 (of outputs, workspaces) and a table for each workspace. That approach turned\r
232 out to be complicated to use (snapping), understand and implement.</p></div>\r
233 <div class="sect2">\r
234 <h3 id="_the_tree_consists_of_containers">3.1. The tree consists of Containers</h3>\r
235 <div class="paragraph"><p>The building blocks of our tree are so called <tt>Containers</tt>. A <tt>Container</tt> can\r
236 host a window (meaning an X11 window, one that you can actually see and use,\r
237 like a browser). Alternatively, it could contain one or more <tt>Containers</tt>. A\r
238 simple example is the workspace: When you start i3 with a single monitor, a\r
239 single workspace and you open two terminal windows, you will end up with a tree\r
240 like this:</p></div>\r
241 <div class="imageblock" style="float:right;">\r
242 <div class="content">\r
243 <img src="tree-layout2.png" alt="layout2" />\r
244 </div>\r
245 </div>\r
246 <div class="imageblock">\r
247 <div class="content">\r
248 <img src="tree-shot4.png" alt="shot4" />\r
249 </div>\r
250 <div class="title">Figure 1. Two terminals on standard workspace</div>\r
251 </div>\r
252 </div>\r
253 <div class="sect2">\r
254 <h3 id="_orientation_and_split_containers">3.2. Orientation and Split Containers</h3>\r
255 <div class="paragraph" id="OrientationSplit"><p>It is only natural to use so-called <tt>Split Containers</tt> in order to build a\r
256 layout when using a tree as data structure. In i3, every <tt>Container</tt> has an\r
257 orientation (horizontal, vertical or unspecified). So, in our example with the\r
258 workspace, the default orientation of the workspace <tt>Container</tt> is horizontal\r
259 (most monitors are widescreen nowadays). If you change the orientation to\r
260 vertical (<tt>mod+v</tt> in the default config) and <strong>then</strong> open two terminals, i3 will\r
261 configure your windows like this:</p></div>\r
262 <div class="imageblock">\r
263 <div class="content">\r
264 <img src="tree-shot2.png" alt="shot2" />\r
265 </div>\r
266 <div class="title">Figure 2. Vertical Workspace Orientation</div>\r
267 </div>\r
268 <div class="paragraph"><p>An interesting new feature of the tree branch is the ability to split anything:\r
269 Let’s assume you have two terminals on a workspace (with horizontal\r
270 orientation), focus is on the right terminal. Now you want to open another\r
271 terminal window below the current one. If you would just open a new terminal\r
272 window, it would show up to the right due to the horizontal workspace\r
273 orientation. Instead, press <tt>mod+v</tt> to create a <tt>Vertical Split Container</tt> (to\r
274 open a <tt>Horizontal Split Container</tt>, use <tt>mod+h</tt>). Now you can open a new\r
275 terminal and it will open below the current one:</p></div>\r
276 <div class="imageblock" style="float:right;">\r
277 <div class="content">\r
278 <img src="tree-layout1.png" alt="Layout" />\r
279 </div>\r
280 </div>\r
281 <div class="imageblock">\r
282 <div class="content">\r
283 <img src="tree-shot1.png" alt="shot" />\r
284 </div>\r
285 <div class="title">Figure 3. Vertical Split Container</div>\r
286 </div>\r
287 <div style="clear:both;"></div>\r
288 <div class="paragraph"><p>You probably guessed it already: There is no limit on how deep your hierarchy\r
289 of splits can be.</p></div>\r
290 </div>\r
291 <div class="sect2">\r
292 <h3 id="_focus_parent">3.3. Focus parent</h3>\r
293 <div class="paragraph"><p>Let’s stay with our example from above. We have a terminal on the left and two\r
294 vertically split terminals on the right, focus is on the bottom right one. When\r
295 you open a new terminal, it will open below the current one.</p></div>\r
296 <div class="paragraph"><p>So, how can you open a new terminal window to the <strong>right</strong> of the current one?\r
297 The solution is to use <tt>focus parent</tt>, which will focus the <tt>Parent Container</tt> of\r
298 the current <tt>Container</tt>. In this case, you would focus the <tt>Vertical Split\r
299 Container</tt> which is <strong>inside</strong> the horizontally oriented workspace. Thus, now new\r
300 windows will be opened to the right of the <tt>Vertical Split Container</tt>:</p></div>\r
301 <div class="imageblock">\r
302 <div class="content">\r
303 <img src="tree-shot3.png" alt="shot3" />\r
304 </div>\r
305 <div class="title">Figure 4. Focus parent, then open new terminal</div>\r
306 </div>\r
307 </div>\r
308 </div>\r
309 </div>\r
310 <div class="sect1">\r
311 <h2 id="configuring">4. Configuring i3</h2>\r
312 <div class="sectionbody">\r
313 <div class="paragraph"><p>This is where the real fun begins ;-). Most things are very dependant on your\r
314 ideal working environment so we can’t make reasonable defaults for them.</p></div>\r
315 <div class="paragraph"><p>While not using a programming language for the configuration, i3 stays\r
316 quite flexible in regards to the things you usually want your window manager\r
317 to do.</p></div>\r
318 <div class="paragraph"><p>For example, you can configure bindings to jump to specific windows,\r
319 you can set specific applications to start on specific workspaces, you can\r
320 automatically start applications, you can change the colors of i3, and you\r
321 can bind your keys to do useful things.</p></div>\r
322 <div class="paragraph"><p>To change the configuration of i3, copy <tt>/etc/i3/config</tt> to <tt>~/.i3/config</tt>\r
323 (or <tt>~/.config/i3/config</tt> if you like the XDG directory scheme) and edit it\r
324 with a text editor.</p></div>\r
325 <div class="paragraph"><p>On first start (and on all following starts, unless you have a configuration\r
326 file), i3 will offer you to create a configuration file. You can tell the\r
327 wizard to use either Alt (Mod1) or Windows (Mod4) as modifier in the config\r
328 file. Also, the created config file will use the key symbols of your current\r
329 keyboard layout. To start the wizard, use the command <tt>i3-config-wizard</tt>.\r
330 Please note that you must not have <tt>~/.i3/config</tt>, otherwise the wizard will\r
331 exit.</p></div>\r
332 <div class="sect2">\r
333 <h3 id="_comments">4.1. Comments</h3>\r
334 <div class="paragraph"><p>It is possible and recommended to use comments in your configuration file to\r
335 properly document your setup for later reference. Comments are started with\r
336 a # and can only be used at the beginning of a line:</p></div>\r
337 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
338 <div class="listingblock">\r
339 <div class="content">\r
340 <pre><tt># This is a comment</tt></pre>\r
341 </div></div>\r
342 </div>\r
343 <div class="sect2">\r
344 <h3 id="_fonts">4.2. Fonts</h3>\r
345 <div class="paragraph"><p>i3 uses X core fonts (not Xft) for rendering window titles. You can use\r
346 <tt>xfontsel(1)</tt> to generate such a font description. To see special characters\r
347 (Unicode), you need to use a font which supports the ISO-10646 encoding.</p></div>\r
348 <div class="paragraph"><p>If i3 cannot open the configured font, it will output an error in the logfile\r
349 and fall back to a working font.</p></div>\r
350 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
351 <div class="listingblock">\r
352 <div class="content">\r
353 <pre><tt>font &lt;X core font description&gt;</tt></pre>\r
354 </div></div>\r
355 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
356 <div class="listingblock">\r
357 <div class="content">\r
358 <pre><tt>font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1</tt></pre>\r
359 </div></div>\r
360 </div>\r
361 <div class="sect2">\r
362 <h3 id="keybindings">4.3. Keyboard bindings</h3>\r
363 <div class="paragraph"><p>A keyboard binding makes i3 execute a command (see below) upon pressing a\r
364 specific key. i3 allows you to bind either on keycodes or on keysyms (you can\r
365 also mix your bindings, though i3 will not protect you from overlapping ones).</p></div>\r
366 <div class="ulist"><ul>\r
367 <li>\r
368 <p>\r
369 A keysym (key symbol) is a description for a specific symbol, like "a"\r
370   or "b", but also more strange ones like "underscore" instead of "_". These\r
371   are the ones you use in Xmodmap to remap your keys. To get the current\r
372   mapping of your keys, use <tt>xmodmap -pke</tt>. To interactively enter a key and\r
373   see what keysym it is configured to, use <tt>xev</tt>.\r
374 </p>\r
375 </li>\r
376 <li>\r
377 <p>\r
378 Keycodes do not need to have a symbol assigned (handy for custom vendor\r
379   hotkeys on some notebooks) and they will not change their meaning as you\r
380   switch to a different keyboard layout (when using <tt>xmodmap</tt>).\r
381 </p>\r
382 </li>\r
383 </ul></div>\r
384 <div class="paragraph"><p>My recommendation is: If you often switch keyboard layouts but you want to keep\r
385 your bindings in the same physical location on the keyboard, use keycodes.\r
386 If you don’t switch layouts, and want a clean and simple config file, use\r
387 keysyms.</p></div>\r
388 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
389 <div class="listingblock">\r
390 <div class="content">\r
391 <pre><tt>bindsym [Modifiers+]keysym command\r
392 bindcode [Modifiers+]keycode command</tt></pre>\r
393 </div></div>\r
394 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
395 <div class="listingblock">\r
396 <div class="content">\r
397 <pre><tt># Fullscreen\r
398 bindsym mod+f fullscreen\r
399 \r
400 # Restart\r
401 bindsym mod+Shift+r restart\r
402 \r
403 # Notebook-specific hotkeys\r
404 bindcode 214 exec /home/michael/toggle_beamer.sh</tt></pre>\r
405 </div></div>\r
406 <div class="paragraph"><p>Available Modifiers:</p></div>\r
407 <div class="dlist"><dl>\r
408 <dt class="hdlist1">\r
409 Mod1-Mod5, Shift, Control\r
410 </dt>\r
411 <dd>\r
412 <p>\r
413 Standard modifiers, see <tt>xmodmap(1)</tt>\r
414 </p>\r
415 </dd>\r
416 <dt class="hdlist1">\r
417 Mode_switch\r
418 </dt>\r
419 <dd>\r
420 <p>\r
421 Unlike other window managers, i3 can use Mode_switch as a modifier. This allows\r
422 you to remap capslock (for example) to Mode_switch and use it for both: typing\r
423 umlauts or special characters <em>and</em> having some comfortably reachable key\r
424 bindings. For example, when typing, capslock+1 or capslock+2 for switching\r
425 workspaces is totally convenient. Try it :-).\r
426 </p>\r
427 </dd>\r
428 </dl></div>\r
429 </div>\r
430 <div class="sect2">\r
431 <h3 id="floating_modifier">4.4. The floating modifier</h3>\r
432 <div class="paragraph"><p>To move floating windows with your mouse, you can either grab their titlebar\r
433 or configure the so called floating modifier which you can then press and\r
434 click anywhere in the window itself to move it. The most common setup is to\r
435 use the same key you use for managing windows (Mod1 for example). Then\r
436 you can press Mod1, click into a window using your left mouse button, and drag\r
437 it to the position you want.</p></div>\r
438 <div class="paragraph"><p>When holding the floating modifier, you can resize a floating window by\r
439 pressing the right mouse button on it and moving around while holding it. If\r
440 you hold the shift button as well, the resize will be proportional (the aspect\r
441 ratio will be preserved).</p></div>\r
442 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
443 <div class="listingblock">\r
444 <div class="content">\r
445 <pre><tt>floating_modifier &lt;Modifiers&gt;</tt></pre>\r
446 </div></div>\r
447 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
448 <div class="listingblock">\r
449 <div class="content">\r
450 <pre><tt>floating_modifier Mod1</tt></pre>\r
451 </div></div>\r
452 </div>\r
453 <div class="sect2">\r
454 <h3 id="_constraining_floating_window_size">4.5. Constraining floating window size</h3>\r
455 <div class="paragraph"><p>The maximum and minimum dimensions of floating windows can be specified. If\r
456 either dimension of <tt>floating_maximum_size</tt> is specified as -1, that dimension\r
457 will be unconstrained with respect to its maximum value. If either dimension of\r
458 <tt>floating_maximum_size</tt> is undefined, or specified as 0, i3 will use a default\r
459 value to constrain the maximum size. <tt>floating_minimum_size</tt> is treated in a\r
460 manner analogous to <tt>floating_maximum_size</tt>.</p></div>\r
461 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
462 <div class="listingblock">\r
463 <div class="content">\r
464 <pre><tt>floating_minimum_size &lt;width&gt; x &lt;height&gt;\r
465 floating_maximum_size &lt;width&gt; x &lt;height&gt;</tt></pre>\r
466 </div></div>\r
467 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
468 <div class="listingblock">\r
469 <div class="content">\r
470 <pre><tt>floating_minimum_size 75 x 50\r
471 floating_maximum_size -1 x -1</tt></pre>\r
472 </div></div>\r
473 </div>\r
474 <div class="sect2">\r
475 <h3 id="_orientation_for_new_workspaces">4.6. Orientation for new workspaces</h3>\r
476 <div class="paragraph"><p>New workspaces get a reasonable default orientation: Wide-screen monitors\r
477 (anything wider than high) get horizontal orientation, rotated monitors\r
478 (anything higher than wide) get vertical orientation.</p></div>\r
479 <div class="paragraph"><p>With the <tt>default_orientation</tt> configuration directive, you can override that\r
480 behaviour.</p></div>\r
481 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
482 <div class="listingblock">\r
483 <div class="content">\r
484 <pre><tt>default_orientation &lt;horizontal|vertical|auto&gt;</tt></pre>\r
485 </div></div>\r
486 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
487 <div class="listingblock">\r
488 <div class="content">\r
489 <pre><tt>default_orientation vertical</tt></pre>\r
490 </div></div>\r
491 </div>\r
492 <div class="sect2">\r
493 <h3 id="_layout_mode_for_new_containers">4.7. Layout mode for new containers</h3>\r
494 <div class="paragraph"><p>This option determines in which mode new containers on workspace level will\r
495 start.</p></div>\r
496 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
497 <div class="listingblock">\r
498 <div class="content">\r
499 <pre><tt>workspace_layout &lt;default|stacking|tabbed&gt;</tt></pre>\r
500 </div></div>\r
501 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
502 <div class="listingblock">\r
503 <div class="content">\r
504 <pre><tt>workspace_layout tabbed</tt></pre>\r
505 </div></div>\r
506 </div>\r
507 <div class="sect2">\r
508 <h3 id="_border_style_for_new_windows">4.8. Border style for new windows</h3>\r
509 <div class="paragraph"><p>This option determines which border style new windows will have.</p></div>\r
510 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
511 <div class="listingblock">\r
512 <div class="content">\r
513 <pre><tt>new_window &lt;normal|1pixel|none&gt;</tt></pre>\r
514 </div></div>\r
515 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
516 <div class="listingblock">\r
517 <div class="content">\r
518 <pre><tt>new_window 1pixel</tt></pre>\r
519 </div></div>\r
520 </div>\r
521 <div class="sect2">\r
522 <h3 id="_arbitrary_commands_for_specific_windows_for_window">4.9. Arbitrary commands for specific windows (for_window)</h3>\r
523 <div class="paragraph"><p>With the <tt>for_window</tt> command, you can let i3 execute any command when it\r
524 encounters a specific window. This can be used to set windows to floating or to\r
525 change their border style, for example.</p></div>\r
526 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
527 <div class="listingblock">\r
528 <div class="content">\r
529 <pre><tt>for_window &lt;criteria&gt; command</tt></pre>\r
530 </div></div>\r
531 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
532 <div class="listingblock">\r
533 <div class="content">\r
534 <pre><tt># enable floating mode for all XTerm windows\r
535 for_window [class="XTerm"] floating enable\r
536 \r
537 # Make all urxvts use a 1-pixel border:\r
538 for_window [class="urxvt"] border 1pixel\r
539 \r
540 # A less useful, but rather funny example:\r
541 # makes the window floating as soon as I change\r
542 # directory to ~/work\r
543 for_window [title="x200: ~/work"] floating enable</tt></pre>\r
544 </div></div>\r
545 <div class="paragraph"><p>The valid criteria are the same as those for commands, see <a href="#command_criteria">[command_criteria]</a>.</p></div>\r
546 </div>\r
547 <div class="sect2">\r
548 <h3 id="_variables">4.10. Variables</h3>\r
549 <div class="paragraph"><p>As you learned in the section about keyboard bindings, you will have\r
550 to configure lots of bindings containing modifier keys. If you want to save\r
551 yourself some typing and be able to change the modifier you use later,\r
552 variables can be handy.</p></div>\r
553 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
554 <div class="listingblock">\r
555 <div class="content">\r
556 <pre><tt>set $name value</tt></pre>\r
557 </div></div>\r
558 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
559 <div class="listingblock">\r
560 <div class="content">\r
561 <pre><tt>set $m Mod1\r
562 bindsym $m+Shift+r restart</tt></pre>\r
563 </div></div>\r
564 <div class="paragraph"><p>Variables are directly replaced in the file when parsing. There is no fancy\r
565 handling and there are absolutely no plans to change this. If you need a more\r
566 dynamic configuration you should create a little script which generates a\r
567 configuration file and run it before starting i3 (for example in your\r
568 <tt>~/.xsession</tt> file).</p></div>\r
569 </div>\r
570 <div class="sect2">\r
571 <h3 id="_automatically_putting_clients_on_specific_workspaces">4.11. Automatically putting clients on specific workspaces</h3>\r
572 <div class="paragraph" id="assign_workspace"><p>To automatically make a specific window show up on a specific workspace, you\r
573 can use an <strong>assignment</strong>. You can match windows by using any criteria,\r
574 see <a href="#command_criteria">[command_criteria]</a>. It is recommended that you match on window classes\r
575 (and instances, when appropriate) instead of window titles whenever possible\r
576 because some applications first create their window, and then worry about\r
577 setting the correct title. Firefox with Vimperator comes to mind. The window\r
578 starts up being named Firefox, and only when Vimperator is loaded does the\r
579 title change. As i3 will get the title as soon as the application maps the\r
580 window (mapping means actually displaying it on the screen), you’d need to have\r
581 to match on <em>Firefox</em> in this case.</p></div>\r
582 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
583 <div class="listingblock">\r
584 <div class="content">\r
585 <pre><tt>assign &lt;criteria&gt; [→] workspace</tt></pre>\r
586 </div></div>\r
587 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
588 <div class="listingblock">\r
589 <div class="content">\r
590 <pre><tt># Assign URxvt terminals to workspace 2\r
591 assign [class="URxvt"] 2\r
592 \r
593 # Same thing, but more precise (exact match instead of substring)\r
594 assign [class="^URxvt$"] 2\r
595 \r
596 # Same thing, but with a beautiful arrow :)\r
597 assign [class="^URxvt$"] → 2\r
598 \r
599 # Assignment to a named workspace\r
600 assign [class="^URxvt$"] → work\r
601 \r
602 # Start urxvt -name irssi\r
603 assign [class="^URxvt$" instance="^irssi$"] → 3</tt></pre>\r
604 </div></div>\r
605 <div class="paragraph"><p>Note that the arrow is not required, it just looks good :-). If you decide to\r
606 use it, it has to be a UTF-8 encoded arrow, not <tt>-&gt;</tt> or something like that.</p></div>\r
607 <div class="paragraph"><p>To get the class and instance, you can use <tt>xprop</tt>. After clicking on the\r
608 window, you will see the following output:</p></div>\r
609 <div class="paragraph"><p><strong>xprop</strong>:</p></div>\r
610 <div class="listingblock">\r
611 <div class="content">\r
612 <pre><tt>WM_CLASS(STRING) = "irssi", "URxvt"</tt></pre>\r
613 </div></div>\r
614 <div class="paragraph"><p>The first part of the WM_CLASS is the instance ("irssi" in this example), the\r
615 second part is the class ("URxvt" in this example).</p></div>\r
616 <div class="paragraph"><p>Should you have any problems with assignments, make sure to check the i3\r
617 logfile first (see <a href="http://i3wm.org/docs/debugging.html">http://i3wm.org/docs/debugging.html</a>). It includes more\r
618 details about the matching process and the window’s actual class, instance and\r
619 title when starting up.</p></div>\r
620 </div>\r
621 <div class="sect2">\r
622 <h3 id="_automatically_starting_applications_on_i3_startup">4.12. Automatically starting applications on i3 startup</h3>\r
623 <div class="paragraph"><p>By using the <tt>exec</tt> keyword outside a keybinding, you can configure\r
624 which commands will be performed by i3 on initial startup. <tt>exec</tt>\r
625 commands will not run when restarting i3, if you need a command to run\r
626 also when restarting i3 you should use the <tt>exec_always</tt>\r
627 keyword. These commands will be run in order.</p></div>\r
628 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
629 <div class="listingblock">\r
630 <div class="content">\r
631 <pre><tt>exec [--no-startup-id] command\r
632 exec_always [--no-startup-id] command</tt></pre>\r
633 </div></div>\r
634 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
635 <div class="listingblock">\r
636 <div class="content">\r
637 <pre><tt>exec chromium\r
638 exec_always ~/my_script.sh\r
639 \r
640 # Execute the terminal emulator urxvt, which is not yet startup-notification aware.\r
641 exec --no-startup-id urxvt</tt></pre>\r
642 </div></div>\r
643 <div class="paragraph"><p>The flag --no-startup-id is explained in <a href="#exec">[exec]</a>.</p></div>\r
644 </div>\r
645 <div class="sect2">\r
646 <h3 id="workspace_screen">4.13. Automatically putting workspaces on specific screens</h3>\r
647 <div class="paragraph"><p>If you assign clients to workspaces, it might be handy to put the\r
648 workspaces on specific screens. Also, the assignment of workspaces to screens\r
649 will determine which workspace i3 uses for a new screen when adding screens\r
650 or when starting (e.g., by default it will use 1 for the first screen, 2 for\r
651 the second screen and so on).</p></div>\r
652 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
653 <div class="listingblock">\r
654 <div class="content">\r
655 <pre><tt>workspace &lt;workspace&gt; output &lt;output&gt;</tt></pre>\r
656 </div></div>\r
657 <div class="paragraph"><p>The <em>output</em> is the name of the RandR output you attach your screen to. On a\r
658 laptop, you might have VGA1 and LVDS1 as output names. You can see the\r
659 available outputs by running <tt>xrandr --current</tt>.</p></div>\r
660 <div class="paragraph"><p>If you use named workspaces, they must be quoted:</p></div>\r
661 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
662 <div class="listingblock">\r
663 <div class="content">\r
664 <pre><tt>workspace 1 output LVDS1\r
665 workspace 5 output VGA1\r
666 workspace "2: vim" output VGA1</tt></pre>\r
667 </div></div>\r
668 </div>\r
669 <div class="sect2">\r
670 <h3 id="_changing_colors">4.14. Changing colors</h3>\r
671 <div class="paragraph"><p>You can change all colors which i3 uses to draw the window decorations.</p></div>\r
672 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
673 <div class="listingblock">\r
674 <div class="content">\r
675 <pre><tt>colorclass border background text indicator</tt></pre>\r
676 </div></div>\r
677 <div class="paragraph"><p>Where colorclass can be one of:</p></div>\r
678 <div class="dlist"><dl>\r
679 <dt class="hdlist1">\r
680 client.focused\r
681 </dt>\r
682 <dd>\r
683 <p>\r
684         A client which currently has the focus.\r
685 </p>\r
686 </dd>\r
687 <dt class="hdlist1">\r
688 client.focused_inactive\r
689 </dt>\r
690 <dd>\r
691 <p>\r
692         A client which is the focused one of its container, but it does not have\r
693         the focus at the moment.\r
694 </p>\r
695 </dd>\r
696 <dt class="hdlist1">\r
697 client.unfocused\r
698 </dt>\r
699 <dd>\r
700 <p>\r
701         A client which is not the focused one of its container.\r
702 </p>\r
703 </dd>\r
704 <dt class="hdlist1">\r
705 client.urgent\r
706 </dt>\r
707 <dd>\r
708 <p>\r
709         A client which has its urgency hint activated.\r
710 </p>\r
711 </dd>\r
712 </dl></div>\r
713 <div class="paragraph"><p>You can also specify the color to be used to paint the background of the client\r
714 windows. This color will be used to paint the window on top of which the client\r
715 will be rendered.</p></div>\r
716 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
717 <div class="listingblock">\r
718 <div class="content">\r
719 <pre><tt>client.background color</tt></pre>\r
720 </div></div>\r
721 <div class="paragraph"><p>Only clients that do not cover the whole area of this window expose the color\r
722 used to paint it. If you use a color other than black for your terminals, you\r
723 most likely want to set the client background color to the same color as your\r
724 terminal program&#8217;s background color to avoid black gaps between the rendered\r
725 area of the terminal and the i3 border.</p></div>\r
726 <div class="paragraph"><p>Colors are in HTML hex format (#rrggbb), see the following example:</p></div>\r
727 <div class="paragraph"><p><strong>Examples (default colors)</strong>:</p></div>\r
728 <div class="listingblock">\r
729 <div class="content">\r
730 <pre><tt># class                 border  backgr. text    indicator\r
731 client.focused          #4c7899 #285577 #ffffff #2e9ef4\r
732 client.focused_inactive #333333 #5f676a #ffffff #484e50\r
733 client.unfocused        #333333 #222222 #888888 #292d2e\r
734 client.urgent           #2f343a #900000 #ffffff #900000</tt></pre>\r
735 </div></div>\r
736 <div class="paragraph"><p>Note that for the window decorations, the color around the child window is the\r
737 background color, and the border color is only the two thin lines at the top of\r
738 the window.</p></div>\r
739 <div class="paragraph"><p>The indicator color is used for indicating where a new window will be opened.\r
740 For horizontal split containers, the right border will be painted in indicator\r
741 color, for vertical split containers, the bottom border. This only applies to\r
742 single windows within a split container, which are otherwise indistinguishable\r
743 from single windows outside of a split container.</p></div>\r
744 </div>\r
745 <div class="sect2">\r
746 <h3 id="_interprocess_communication">4.15. Interprocess communication</h3>\r
747 <div class="paragraph"><p>i3 uses unix sockets to provide an IPC interface. This allows third-party\r
748 programs to get information from i3, such as the current workspaces\r
749 (to display a workspace bar), and to control i3.</p></div>\r
750 <div class="paragraph"><p>The IPC socket is enabled by default and will be created in\r
751 <tt>/tmp/i3-%u.XXXXXX/ipc-socket.%p</tt> where <tt>%u</tt> is your UNIX username, <tt>%p</tt> is\r
752 the PID of i3 and XXXXXX is a string of random characters from the portable\r
753 filename character set (see mkdtemp(3)).</p></div>\r
754 <div class="paragraph"><p>You can override the default path through the environment-variable <tt>I3SOCK</tt> or\r
755 by specifying the <tt>ipc-socket</tt> directive. This is discouraged, though, since i3\r
756 does the right thing by default. If you decide to change it, it is strongly\r
757 recommended to set this to a location in your home directory so that no other\r
758 user can create that directory.</p></div>\r
759 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
760 <div class="listingblock">\r
761 <div class="content">\r
762 <pre><tt>ipc-socket ~/.i3/i3-ipc.sock</tt></pre>\r
763 </div></div>\r
764 <div class="paragraph"><p>You can then use the <tt>i3-msg</tt> application to perform any command listed in\r
765 the next section.</p></div>\r
766 </div>\r
767 <div class="sect2">\r
768 <h3 id="_focus_follows_mouse">4.16. Focus follows mouse</h3>\r
769 <div class="paragraph"><p>If you have a setup where your mouse usually is in your way (like a touchpad\r
770 on your laptop which you do not want to disable completely), you might want\r
771 to disable <em>focus follows mouse</em> and control focus only by using your keyboard.\r
772 The mouse will still be useful inside the currently active window (for example\r
773 to click on links in your browser window).</p></div>\r
774 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
775 <div class="listingblock">\r
776 <div class="content">\r
777 <pre><tt>focus_follows_mouse &lt;yes|no&gt;</tt></pre>\r
778 </div></div>\r
779 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
780 <div class="listingblock">\r
781 <div class="content">\r
782 <pre><tt>focus_follows_mouse no</tt></pre>\r
783 </div></div>\r
784 </div>\r
785 <div class="sect2">\r
786 <h3 id="_popups_during_fullscreen_mode">4.17. Popups during fullscreen mode</h3>\r
787 <div class="paragraph"><p>When you are in fullscreen mode, some applications still open popup windows\r
788 (take Xpdf for example). This is because these applications may not be aware\r
789 that they are in fullscreen mode (they do not check the corresponding hint).\r
790 There are two things which are possible to do in this situation:</p></div>\r
791 <div class="olist arabic"><ol class="arabic">\r
792 <li>\r
793 <p>\r
794 Just ignore the popup (don’t map it). This won’t interrupt you while you are\r
795    in fullscreen. However, some apps might react badly to this (deadlock until\r
796    you go out of fullscreen).\r
797 </p>\r
798 </li>\r
799 <li>\r
800 <p>\r
801 Leave fullscreen mode. This is the default.\r
802 </p>\r
803 </li>\r
804 </ol></div>\r
805 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
806 <div class="listingblock">\r
807 <div class="content">\r
808 <pre><tt>popup_during_fullscreen &lt;ignore|leave_fullscreen&gt;</tt></pre>\r
809 </div></div>\r
810 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
811 <div class="listingblock">\r
812 <div class="content">\r
813 <pre><tt>popup_during_fullscreen ignore</tt></pre>\r
814 </div></div>\r
815 </div>\r
816 <div class="sect2">\r
817 <h3 id="_focus_wrapping">4.18. Focus wrapping</h3>\r
818 <div class="paragraph"><p>When being in a tabbed or stacked container, the first container will be\r
819 focused when you use <tt>focus down</tt> on the last container&#8201;&#8212;&#8201;the focus wraps. If\r
820 however there is another stacked/tabbed container in that direction, focus will\r
821 be set on that container. This is the default behaviour so you can navigate to\r
822 all your windows without having to use <tt>focus parent</tt>.</p></div>\r
823 <div class="paragraph"><p>If you want the focus to <strong>always</strong> wrap and you are aware of using <tt>focus\r
824 parent</tt> to switch to different containers, you can use the\r
825 <tt>force_focus_wrapping</tt> configuration directive. After enabling it, the focus\r
826 will always wrap.</p></div>\r
827 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
828 <div class="listingblock">\r
829 <div class="content">\r
830 <pre><tt>force_focus_wrapping &lt;yes|no&gt;</tt></pre>\r
831 </div></div>\r
832 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
833 <div class="listingblock">\r
834 <div class="content">\r
835 <pre><tt>force_focus_wrapping yes</tt></pre>\r
836 </div></div>\r
837 </div>\r
838 <div class="sect2">\r
839 <h3 id="_forcing_xinerama">4.19. Forcing Xinerama</h3>\r
840 <div class="paragraph"><p>As explained in-depth in <a href="http://i3wm.org/docs/multi-monitor.html">http://i3wm.org/docs/multi-monitor.html</a>, some X11\r
841 video drivers (especially the nVidia binary driver) only provide support for\r
842 Xinerama instead of RandR. In such a situation, i3 must be told to use the\r
843 inferior Xinerama API explicitly and therefore don’t provide support for\r
844 reconfiguring your screens on the fly (they are read only once on startup and\r
845 that’s it).</p></div>\r
846 <div class="paragraph"><p>For people who do cannot modify their <tt>~/.xsession</tt> to add the\r
847 <tt>--force-xinerama</tt> commandline parameter, a configuration option is provided:</p></div>\r
848 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
849 <div class="listingblock">\r
850 <div class="content">\r
851 <pre><tt>force_xinerama &lt;yes|no&gt;</tt></pre>\r
852 </div></div>\r
853 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
854 <div class="listingblock">\r
855 <div class="content">\r
856 <pre><tt>force_xinerama yes</tt></pre>\r
857 </div></div>\r
858 <div class="paragraph"><p>Also note that your output names are not descriptive (like <tt>HDMI1</tt>) when using\r
859 Xinerama, instead they are counted up, starting at 0: <tt>xinerama-0</tt>, <tt>xinerama-1</tt>, …</p></div>\r
860 </div>\r
861 <div class="sect2">\r
862 <h3 id="_automatic_back_and_forth_when_switching_to_the_current_workspace">4.20. Automatic back-and-forth when switching to the current workspace</h3>\r
863 <div class="paragraph"><p>This configuration directive enables automatic <tt>workspace back_and_forth</tt> (see\r
864 <a href="#back_and_forth">[back_and_forth]</a>) when switching to the workspace that is currently focused.</p></div>\r
865 <div class="paragraph"><p>For instance: Assume you are on workspace "1: www" and switch to "2: IM" using\r
866 mod+2 because somebody sent you a message. You don’t need to remember where you\r
867 came from now, you can just press mod+2 again to switch back to "1: www".</p></div>\r
868 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
869 <div class="listingblock">\r
870 <div class="content">\r
871 <pre><tt>workspace_auto_back_and_forth &lt;yes|no&gt;</tt></pre>\r
872 </div></div>\r
873 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
874 <div class="listingblock">\r
875 <div class="content">\r
876 <pre><tt>workspace_auto_back_and_forth yes</tt></pre>\r
877 </div></div>\r
878 </div>\r
879 </div>\r
880 </div>\r
881 <div class="sect1">\r
882 <h2 id="_configuring_i3bar">5. Configuring i3bar</h2>\r
883 <div class="sectionbody">\r
884 <div class="paragraph"><p>The bar at the bottom of your monitor is drawn by a separate process called\r
885 i3bar. Having this part of "the i3 user interface" in a separate process has\r
886 several advantages:</p></div>\r
887 <div class="olist arabic"><ol class="arabic">\r
888 <li>\r
889 <p>\r
890 It is a modular approach. If you don’t need a workspace bar at all, or if\r
891    you prefer a different one (dzen2, xmobar, maybe even gnome-panel?), you can\r
892    just remove the i3bar configuration and start your favorite bar instead.\r
893 </p>\r
894 </li>\r
895 <li>\r
896 <p>\r
897 It follows the UNIX philosophy of "Make each program do one thing well".\r
898    While i3 manages your windows well, i3bar is good at displaying a bar on\r
899    each monitor (unless you configure it otherwise).\r
900 </p>\r
901 </li>\r
902 <li>\r
903 <p>\r
904 It leads to two separate, clean codebases. If you want to understand i3, you\r
905    don’t need to bother with the details of i3bar and vice versa.\r
906 </p>\r
907 </li>\r
908 </ol></div>\r
909 <div class="paragraph"><p>That said, i3bar is configured in the same configuration file as i3. This is\r
910 because it is tightly coupled with i3 (in contrary to i3lock or i3status which\r
911 are useful for people using other window managers). Therefore, it makes no\r
912 sense to use a different configuration place when we already have a good\r
913 configuration infrastructure in place.</p></div>\r
914 <div class="paragraph"><p>Configuring your workspace bar starts with opening a <tt>bar</tt> block. You can have\r
915 multiple bar blocks to use different settings for different outputs (monitors):</p></div>\r
916 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
917 <div class="listingblock">\r
918 <div class="content">\r
919 <pre><tt>bar {\r
920     status_command i3status\r
921 }</tt></pre>\r
922 </div></div>\r
923 <div class="sect2">\r
924 <h3 id="_i3bar_command">5.1. i3bar command</h3>\r
925 <div class="paragraph"><p>By default i3 will just pass <tt>i3bar</tt> and let your shell handle the execution,\r
926 searching your <tt>$PATH</tt> for a correct version.\r
927 If you have a different <tt>i3bar</tt> somewhere or the binary is not in your <tt>$PATH</tt> you can\r
928 tell i3 what to execute.</p></div>\r
929 <div class="paragraph"><p>The specified command will be passed to <tt>sh -c</tt>, so you can use globbing and\r
930 have to have correct quoting etc.</p></div>\r
931 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
932 <div class="listingblock">\r
933 <div class="content">\r
934 <pre><tt>i3bar_command command</tt></pre>\r
935 </div></div>\r
936 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
937 <div class="listingblock">\r
938 <div class="content">\r
939 <pre><tt>bar {\r
940     i3bar_command /home/user/bin/i3bar\r
941 }</tt></pre>\r
942 </div></div>\r
943 </div>\r
944 <div class="sect2">\r
945 <h3 id="status_command">5.2. Statusline command</h3>\r
946 <div class="paragraph"><p>i3bar can run a program and display every line of its <tt>stdout</tt> output on the\r
947 right hand side of the bar. This is useful to display system information like\r
948 your current IP address, battery status or date/time.</p></div>\r
949 <div class="paragraph"><p>The specified command will be passed to <tt>sh -c</tt>, so you can use globbing and\r
950 have to have correct quoting etc.</p></div>\r
951 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
952 <div class="listingblock">\r
953 <div class="content">\r
954 <pre><tt>status_command command</tt></pre>\r
955 </div></div>\r
956 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
957 <div class="listingblock">\r
958 <div class="content">\r
959 <pre><tt>bar {\r
960     status_command i3status --config ~/.i3status.conf\r
961 }</tt></pre>\r
962 </div></div>\r
963 </div>\r
964 <div class="sect2">\r
965 <h3 id="_display_mode">5.3. Display mode</h3>\r
966 <div class="paragraph"><p>You can have i3bar either be visible permanently at one edge of the screen\r
967 (<tt>dock</tt> mode) or make it show up when you press your modifier key (<tt>hide</tt>\r
968 mode). The modifier key can be configured using the <tt>modifier</tt> option.</p></div>\r
969 <div class="paragraph"><p>The hide mode maximizes screen space that can be used for actual windows. Also,\r
970 i3bar sends the <tt>SIGSTOP</tt> and <tt>SIGCONT</tt> signals to the statusline process to\r
971 save battery power.</p></div>\r
972 <div class="paragraph"><p>The default is dock mode; in hide mode, the default modifier is Mod4 (usually\r
973 the windows key).</p></div>\r
974 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
975 <div class="listingblock">\r
976 <div class="content">\r
977 <pre><tt>mode &lt;dock|hide&gt;\r
978 modifier &lt;Modifier&gt;</tt></pre>\r
979 </div></div>\r
980 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
981 <div class="listingblock">\r
982 <div class="content">\r
983 <pre><tt>bar {\r
984     mode hide\r
985     modifier Mod1\r
986 }</tt></pre>\r
987 </div></div>\r
988 <div class="paragraph"><p>Available modifiers are Mod1-Mod5, Shift, Control (see <tt>xmodmap(1)</tt>).</p></div>\r
989 </div>\r
990 <div class="sect2">\r
991 <h3 id="i3bar_position">5.4. Position</h3>\r
992 <div class="paragraph"><p>This option determines in which edge of the screen i3bar should show up.</p></div>\r
993 <div class="paragraph"><p>The default is bottom.</p></div>\r
994 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
995 <div class="listingblock">\r
996 <div class="content">\r
997 <pre><tt>position &lt;top|bottom&gt;</tt></pre>\r
998 </div></div>\r
999 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1000 <div class="listingblock">\r
1001 <div class="content">\r
1002 <pre><tt>bar {\r
1003     position top\r
1004 }</tt></pre>\r
1005 </div></div>\r
1006 </div>\r
1007 <div class="sect2">\r
1008 <h3 id="_output_s">5.5. Output(s)</h3>\r
1009 <div class="paragraph"><p>You can restrict i3bar to one or more outputs (monitors). The default is to\r
1010 handle all outputs. Restricting the outputs is useful for using different\r
1011 options for different outputs by using multiple <em>bar</em> blocks.</p></div>\r
1012 <div class="paragraph"><p>To make a particular i3bar instance handle multiple outputs, specify the output\r
1013 directive multiple times.</p></div>\r
1014 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1015 <div class="listingblock">\r
1016 <div class="content">\r
1017 <pre><tt>output &lt;output&gt;</tt></pre>\r
1018 </div></div>\r
1019 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1020 <div class="listingblock">\r
1021 <div class="content">\r
1022 <pre><tt># big monitor: everything\r
1023 bar {\r
1024     # The display is connected either via HDMI or via DisplayPort\r
1025     output HDMI2\r
1026     output DP2\r
1027     status_command i3status\r
1028 }\r
1029 \r
1030 # laptop monitor: bright colors and i3status with less modules.\r
1031 bar {\r
1032     output LVDS1\r
1033     status_command i3status --config ~/.i3status-small.conf\r
1034     colors {\r
1035         background #000000\r
1036         statusline #ffffff\r
1037     }\r
1038 }</tt></pre>\r
1039 </div></div>\r
1040 </div>\r
1041 <div class="sect2">\r
1042 <h3 id="_tray_output">5.6. Tray output</h3>\r
1043 <div class="paragraph"><p>i3bar by default provides a system tray area where programs such as\r
1044 NetworkManager, VLC, Pidgin, etc. can place little icons.</p></div>\r
1045 <div class="paragraph"><p>You can configure on which output (monitor) the icons should be displayed or\r
1046 you can turn off the functionality entirely.</p></div>\r
1047 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1048 <div class="listingblock">\r
1049 <div class="content">\r
1050 <pre><tt>tray_output &lt;none|primary|output&gt;</tt></pre>\r
1051 </div></div>\r
1052 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1053 <div class="listingblock">\r
1054 <div class="content">\r
1055 <pre><tt># disable system tray\r
1056 bar {\r
1057     tray_output none\r
1058 }\r
1059 \r
1060 # show tray icons on the primary monitor\r
1061 tray_output primary\r
1062 \r
1063 # show tray icons on the big monitor\r
1064 bar {\r
1065     tray_output HDMI2\r
1066 }</tt></pre>\r
1067 </div></div>\r
1068 <div class="paragraph"><p>Note that you might not have a primary output configured yet. To do so, run:</p></div>\r
1069 <div class="listingblock">\r
1070 <div class="content">\r
1071 <pre><tt>xrandr --output &lt;output&gt; --primary</tt></pre>\r
1072 </div></div>\r
1073 </div>\r
1074 <div class="sect2">\r
1075 <h3 id="_font">5.7. Font</h3>\r
1076 <div class="paragraph"><p>Specifies the font (again, X core font, not Xft, just like in i3) to be used in\r
1077 the bar.</p></div>\r
1078 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1079 <div class="listingblock">\r
1080 <div class="content">\r
1081 <pre><tt>font &lt;font&gt;</tt></pre>\r
1082 </div></div>\r
1083 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1084 <div class="listingblock">\r
1085 <div class="content">\r
1086 <pre><tt>bar {\r
1087     font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1\r
1088 }</tt></pre>\r
1089 </div></div>\r
1090 </div>\r
1091 <div class="sect2">\r
1092 <h3 id="_workspace_buttons">5.8. Workspace buttons</h3>\r
1093 <div class="paragraph"><p>Specifies whether workspace buttons should be shown or not. This is useful if\r
1094 you want to display a statusline-only bar containing additional information.</p></div>\r
1095 <div class="paragraph"><p>The default is to show workspace buttons.</p></div>\r
1096 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1097 <div class="listingblock">\r
1098 <div class="content">\r
1099 <pre><tt>workspace_buttons &lt;yes|no&gt;</tt></pre>\r
1100 </div></div>\r
1101 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1102 <div class="listingblock">\r
1103 <div class="content">\r
1104 <pre><tt>bar {\r
1105     workspace_buttons no\r
1106 }</tt></pre>\r
1107 </div></div>\r
1108 </div>\r
1109 <div class="sect2">\r
1110 <h3 id="_colors">5.9. Colors</h3>\r
1111 <div class="paragraph"><p>As with i3, colors are in HTML hex format (#rrggbb). The following colors can\r
1112 be configured at the moment:</p></div>\r
1113 <div class="dlist"><dl>\r
1114 <dt class="hdlist1">\r
1115 background\r
1116 </dt>\r
1117 <dd>\r
1118 <p>\r
1119         Background color of the bar.\r
1120 </p>\r
1121 </dd>\r
1122 <dt class="hdlist1">\r
1123 statusline\r
1124 </dt>\r
1125 <dd>\r
1126 <p>\r
1127         Text color to be used for the statusline.\r
1128 </p>\r
1129 </dd>\r
1130 <dt class="hdlist1">\r
1131 focused_workspace\r
1132 </dt>\r
1133 <dd>\r
1134 <p>\r
1135         Border, background and text color for a workspace button when the workspace\r
1136         has focus.\r
1137 </p>\r
1138 </dd>\r
1139 <dt class="hdlist1">\r
1140 active_workspace\r
1141 </dt>\r
1142 <dd>\r
1143 <p>\r
1144         Border, background and text color for a workspace button when the workspace\r
1145         is active (visible) on some output, but the focus is on another one.\r
1146         You can only tell this apart from the focused workspace when you are\r
1147         using multiple monitors.\r
1148 </p>\r
1149 </dd>\r
1150 <dt class="hdlist1">\r
1151 inactive_workspace\r
1152 </dt>\r
1153 <dd>\r
1154 <p>\r
1155         Border, background and text color for a workspace button when the workspace\r
1156         does not have focus and is not active (visible) on any output. This\r
1157         will be the case for most workspaces.\r
1158 </p>\r
1159 </dd>\r
1160 <dt class="hdlist1">\r
1161 urgent_workspace\r
1162 </dt>\r
1163 <dd>\r
1164 <p>\r
1165         Border, background and text color for a workspace button when the workspace\r
1166         window with the urgency hint set.\r
1167 </p>\r
1168 </dd>\r
1169 </dl></div>\r
1170 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1171 <div class="listingblock">\r
1172 <div class="content">\r
1173 <pre><tt>colors {\r
1174     background &lt;color&gt;\r
1175     statusline &lt;color&gt;\r
1176 \r
1177     colorclass &lt;border&gt; &lt;background&gt; &lt;text&gt;\r
1178 }</tt></pre>\r
1179 </div></div>\r
1180 <div class="paragraph"><p><strong>Example (default colors)</strong>:</p></div>\r
1181 <div class="listingblock">\r
1182 <div class="content">\r
1183 <pre><tt>bar {\r
1184     colors {\r
1185         background #000000\r
1186         statusline #ffffff\r
1187 \r
1188         focused_workspace  #4c7899 #285577 #ffffff\r
1189         active_workspace   #333333 #5f676a #ffffff\r
1190         inactive_workspace #333333 #222222 #888888\r
1191         urgent_workspace   #2f343a #900000 #ffffff\r
1192     }\r
1193 }</tt></pre>\r
1194 </div></div>\r
1195 </div>\r
1196 </div>\r
1197 </div>\r
1198 <div class="sect1">\r
1199 <h2 id="_list_of_commands">6. List of commands</h2>\r
1200 <div class="sectionbody">\r
1201 <div class="paragraph"><p>Commands are what you bind to specific keypresses. You can also issue commands\r
1202 at runtime without pressing a key by using the IPC interface. An easy way to\r
1203 do this is to use the <tt>i3-msg</tt> utility:</p></div>\r
1204 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1205 <div class="listingblock">\r
1206 <div class="content">\r
1207 <pre><tt># execute this on your shell to make the current container borderless\r
1208 i3-msg border none</tt></pre>\r
1209 </div></div>\r
1210 <div class="paragraph"><p>Commands can be chained by using <tt>;</tt> (a semicolon). So, to move a window to a\r
1211 specific workspace and immediately switch to that workspace, you can configure\r
1212 the following keybinding:</p></div>\r
1213 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1214 <div class="listingblock">\r
1215 <div class="content">\r
1216 <pre><tt>bindsym mod+x move container to workspace 3; workspace 3</tt></pre>\r
1217 </div></div>\r
1218 <div class="paragraph" id="command_criteria"><p>Furthermore, you can change the scope of a command, that is, which containers\r
1219 should be affected by that command, by using various criteria. These are\r
1220 prefixed in square brackets to every command. If you want to kill all windows\r
1221 which have the class Firefox, use:</p></div>\r
1222 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1223 <div class="listingblock">\r
1224 <div class="content">\r
1225 <pre><tt>bindsym mod+x [class="Firefox"] kill\r
1226 \r
1227 # same thing, but case-insensitive\r
1228 bindsym mod+x [class="(?i)firefox"] kill</tt></pre>\r
1229 </div></div>\r
1230 <div class="paragraph"><p>The criteria which are currently implemented are:</p></div>\r
1231 <div class="dlist"><dl>\r
1232 <dt class="hdlist1">\r
1233 class\r
1234 </dt>\r
1235 <dd>\r
1236 <p>\r
1237         Compares the window class (the second part of WM_CLASS)\r
1238 </p>\r
1239 </dd>\r
1240 <dt class="hdlist1">\r
1241 instance\r
1242 </dt>\r
1243 <dd>\r
1244 <p>\r
1245         Compares the window instance (the first part of WM_CLASS)\r
1246 </p>\r
1247 </dd>\r
1248 <dt class="hdlist1">\r
1249 window_role\r
1250 </dt>\r
1251 <dd>\r
1252 <p>\r
1253         Compares the window role (WM_WINDOW_ROLE).\r
1254 </p>\r
1255 </dd>\r
1256 <dt class="hdlist1">\r
1257 id\r
1258 </dt>\r
1259 <dd>\r
1260 <p>\r
1261         Compares the X11 window ID, which you can get via <tt>xwininfo</tt> for example.\r
1262 </p>\r
1263 </dd>\r
1264 <dt class="hdlist1">\r
1265 title\r
1266 </dt>\r
1267 <dd>\r
1268 <p>\r
1269         Compares the X11 window title (_NET_WM_NAME or WM_NAME as fallback).\r
1270 </p>\r
1271 </dd>\r
1272 <dt class="hdlist1">\r
1273 urgent\r
1274 </dt>\r
1275 <dd>\r
1276 <p>\r
1277         Compares the urgent state of the window. Can be "latest" or "oldest".\r
1278         Matches the latest or oldest urgent window, respectively.\r
1279         (The following aliases are also available: newest, last, recent, first)\r
1280 </p>\r
1281 </dd>\r
1282 <dt class="hdlist1">\r
1283 con_mark\r
1284 </dt>\r
1285 <dd>\r
1286 <p>\r
1287         Compares the mark set for this container, see <a href="#vim_like_marks">[vim_like_marks]</a>.\r
1288 </p>\r
1289 </dd>\r
1290 <dt class="hdlist1">\r
1291 con_id\r
1292 </dt>\r
1293 <dd>\r
1294 <p>\r
1295         Compares the i3-internal container ID, which you can get via the IPC\r
1296         interface. Handy for scripting.\r
1297 </p>\r
1298 </dd>\r
1299 </dl></div>\r
1300 <div class="paragraph"><p>The criteria <tt>class</tt>, <tt>instance</tt>, <tt>role</tt>, <tt>title</tt> and <tt>mark</tt> are actually\r
1301 regular expressions (PCRE). See <tt>pcresyntax(3)</tt> or <tt>perldoc perlre</tt> for\r
1302 information on how to use them.</p></div>\r
1303 <div class="sect2">\r
1304 <h3 id="exec">6.1. Executing applications (exec)</h3>\r
1305 <div class="paragraph"><p>What good is a window manager if you can’t actually start any applications?\r
1306 The exec command starts an application by passing the command you specify to a\r
1307 shell. This implies that you can use globbing (wildcards) and programs will be\r
1308 searched in your $PATH.</p></div>\r
1309 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1310 <div class="listingblock">\r
1311 <div class="content">\r
1312 <pre><tt>exec [--no-startup-id] command</tt></pre>\r
1313 </div></div>\r
1314 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1315 <div class="listingblock">\r
1316 <div class="content">\r
1317 <pre><tt># Start the GIMP\r
1318 bindsym mod+g exec gimp\r
1319 \r
1320 # Start the terminal emulator urxvt which is not yet startup-notification-aware\r
1321 bindsym mod+Return exec --no-startup-id urxvt</tt></pre>\r
1322 </div></div>\r
1323 <div class="paragraph"><p>The <tt>--no-startup-id</tt> parameter disables startup-notification support for this\r
1324 particular exec command. With startup-notification, i3 can make sure that a\r
1325 window appears on the workspace on which you used the exec command. Also, it\r
1326 will change the X11 cursor to <tt>watch</tt> (a clock) while the application is\r
1327 launching. So, if an application is not startup-notification aware (most GTK\r
1328 and Qt using applications seem to be, though), you will end up with a watch\r
1329 cursor for 60 seconds.</p></div>\r
1330 </div>\r
1331 <div class="sect2">\r
1332 <h3 id="_splitting_containers">6.2. Splitting containers</h3>\r
1333 <div class="paragraph"><p>The split command makes the current window a split container. Split containers\r
1334 can contain multiple windows. Every split container has an orientation, it is\r
1335 either split horizontally (a new window gets placed to the right of the current\r
1336 one) or vertically (a new window gets placed below the current one).</p></div>\r
1337 <div class="paragraph"><p>If you apply this command to a split container with the same orientation,\r
1338 nothing will happen. If you use a different orientation, the split container’s\r
1339 orientation will be changed (if it does not have more than one window).</p></div>\r
1340 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1341 <div class="listingblock">\r
1342 <div class="content">\r
1343 <pre><tt>split &lt;vertical|horizontal&gt;</tt></pre>\r
1344 </div></div>\r
1345 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1346 <div class="listingblock">\r
1347 <div class="content">\r
1348 <pre><tt>bindsym mod+v split vertical\r
1349 bindsym mod+h split horizontal</tt></pre>\r
1350 </div></div>\r
1351 </div>\r
1352 <div class="sect2">\r
1353 <h3 id="_manipulating_layout">6.3. Manipulating layout</h3>\r
1354 <div class="paragraph"><p>Use <tt>layout default</tt>, <tt>layout stacking</tt> or <tt>layout tabbed</tt> to change the\r
1355 current container layout to default, stacking or tabbed layout, respectively.</p></div>\r
1356 <div class="paragraph"><p>To make the current window (!) fullscreen, use <tt>fullscreen</tt>, to make\r
1357 it floating (or tiling again) use <tt>floating enable</tt> respectively <tt>floating disable</tt>\r
1358 (or <tt>floating toggle</tt>):</p></div>\r
1359 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1360 <div class="listingblock">\r
1361 <div class="content">\r
1362 <pre><tt>bindsym mod+s layout stacking\r
1363 bindsym mod+l layout default\r
1364 bindsym mod+w layout tabbed\r
1365 \r
1366 # Toggle fullscreen\r
1367 bindsym mod+f fullscreen\r
1368 \r
1369 # Toggle floating/tiling\r
1370 bindsym mod+t floating toggle</tt></pre>\r
1371 </div></div>\r
1372 </div>\r
1373 <div class="sect2">\r
1374 <h3 id="_focusing_moving_containers">6.4. Focusing/Moving containers</h3>\r
1375 <div class="paragraph"><p>To change the focus, use the focus command: <tt>focus left</tt>, <tt>focus right</tt>, <tt>focus\r
1376 down</tt> and <tt>focus up</tt>.</p></div>\r
1377 <div class="paragraph"><p>There are a few special parameters you can use for the focus command:</p></div>\r
1378 <div class="dlist"><dl>\r
1379 <dt class="hdlist1">\r
1380 parent\r
1381 </dt>\r
1382 <dd>\r
1383 <p>\r
1384         Sets focus to the <tt>Parent Container</tt> of the current <tt>Container</tt>.\r
1385 </p>\r
1386 </dd>\r
1387 <dt class="hdlist1">\r
1388 child\r
1389 </dt>\r
1390 <dd>\r
1391 <p>\r
1392         The opposite of <tt>focus parent</tt>, sets the focus to the last focused\r
1393         child container.\r
1394 </p>\r
1395 </dd>\r
1396 <dt class="hdlist1">\r
1397 floating\r
1398 </dt>\r
1399 <dd>\r
1400 <p>\r
1401         Sets focus to the last focused floating container.\r
1402 </p>\r
1403 </dd>\r
1404 <dt class="hdlist1">\r
1405 tiling\r
1406 </dt>\r
1407 <dd>\r
1408 <p>\r
1409         Sets focus to the last focused tiling container.\r
1410 </p>\r
1411 </dd>\r
1412 <dt class="hdlist1">\r
1413 mode_toggle\r
1414 </dt>\r
1415 <dd>\r
1416 <p>\r
1417         Toggles between floating/tiling containers.\r
1418 </p>\r
1419 </dd>\r
1420 <dt class="hdlist1">\r
1421 output\r
1422 </dt>\r
1423 <dd>\r
1424 <p>\r
1425         Followed by a direction or an output name, this will focus the\r
1426         corresponding output.\r
1427 </p>\r
1428 </dd>\r
1429 </dl></div>\r
1430 <div class="paragraph"><p>For moving, use <tt>move left</tt>, <tt>move right</tt>, <tt>move down</tt> and <tt>move up</tt>.</p></div>\r
1431 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1432 <div class="listingblock">\r
1433 <div class="content">\r
1434 <pre><tt>focus &lt;left|right|down|up&gt;\r
1435 focus &lt;parent|child|floating|tiling|mode_toggle&gt;\r
1436 focus output &lt;&lt;left|right|down|up&gt;|output&gt;\r
1437 move &lt;left|right|down|up&gt; [&lt;px&gt; px]\r
1438 move [absolute] position [[&lt;px&gt; px] [&lt;px&gt; px]|center]</tt></pre>\r
1439 </div></div>\r
1440 <div class="paragraph"><p>Note that the amount of pixels you can specify for the <tt>move</tt> command is only\r
1441 relevant for floating containers. The default amount is 10 pixels.</p></div>\r
1442 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1443 <div class="listingblock">\r
1444 <div class="content">\r
1445 <pre><tt># Focus container on the left, bottom, top, right:\r
1446 bindsym mod+j focus left\r
1447 bindsym mod+k focus down\r
1448 bindsym mod+l focus up\r
1449 bindsym mod+semicolon focus right\r
1450 \r
1451 # Focus parent container\r
1452 bindsym mod+u focus parent\r
1453 \r
1454 # Focus last floating/tiling container\r
1455 bindsym mod+g focus mode_toggle\r
1456 \r
1457 # Focus the output right to the current one\r
1458 bindsym mod+x focus output right\r
1459 \r
1460 # Focus the big output\r
1461 bindsym mod+x focus output HDMI-2\r
1462 \r
1463 # Move container to the left, bottom, top, right:\r
1464 bindsym mod+j move left\r
1465 bindsym mod+k move down\r
1466 bindsym mod+l move up\r
1467 bindsym mod+semicolon move right\r
1468 \r
1469 # Move container, but make floating containers\r
1470 # move more than the default\r
1471 bindsym mod+j move left 20 px\r
1472 \r
1473 # Move floating container to the center\r
1474 # of all outputs\r
1475 bindsym mod+c move absolute position center</tt></pre>\r
1476 </div></div>\r
1477 </div>\r
1478 <div class="sect2">\r
1479 <h3 id="_changing_named_workspaces_moving_to_workspaces">6.5. Changing (named) workspaces/moving to workspaces</h3>\r
1480 <div class="paragraph"><p>To change to a specific workspace, use the <tt>workspace</tt> command, followed by the\r
1481 number or name of the workspace. To move containers to specific workspaces, use\r
1482 <tt>move container to workspace</tt>.</p></div>\r
1483 <div class="paragraph"><p>You can also switch to the next and previous workspace with the commands\r
1484 <tt>workspace next</tt> and <tt>workspace prev</tt>, which is handy, for example, if you have\r
1485 workspace 1, 3, 4 and 9 and you want to cycle through them with a single key\r
1486 combination. To restrict those to the current output, use <tt>workspace\r
1487 next_on_output</tt> and <tt>workspace prev_on_output</tt>. Similarly, you can use <tt>move\r
1488 container to workspace next</tt> and <tt>move container to workspace prev</tt> to move a\r
1489 container to the next/previous workspace.</p></div>\r
1490 <div class="paragraph" id="back_and_forth"><p>To switch back to the previously focused workspace, use <tt>workspace\r
1491 back_and_forth</tt>.</p></div>\r
1492 <div class="paragraph"><p>To move a container to another xrandr output such as <tt>LVDS1</tt> or <tt>VGA1</tt>, you can\r
1493 use the <tt>move container to output</tt> command followed by the name of the target\r
1494 output. You may also use <tt>left</tt>, <tt>right</tt>, <tt>up</tt>, <tt>down</tt> instead of the xrandr\r
1495 output name to move to the next output in the specified direction.</p></div>\r
1496 <div class="paragraph"><p>To move a whole workspace to another xrandr output such as <tt>LVDS1</tt> or <tt>VGA1</tt>,\r
1497 you can use the <tt>move workspace to output</tt> command followed by the name of the\r
1498 target output. You may also use <tt>left</tt>, <tt>right</tt>, <tt>up</tt>, <tt>down</tt> instead of the\r
1499 xrandr output name to move to the next output in the specified direction.</p></div>\r
1500 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1501 <div class="listingblock">\r
1502 <div class="content">\r
1503 <pre><tt>bindsym mod+1 workspace 1\r
1504 bindsym mod+2 workspace 2\r
1505 ...\r
1506 \r
1507 bindsym mod+Shift+1 move container to workspace 1\r
1508 bindsym mod+Shift+2 move container to workspace 2\r
1509 ...\r
1510 \r
1511 # switch between the current and the previously focused one\r
1512 bindsym mod+b workspace back_and_forth\r
1513 \r
1514 # move the whole workspace to the next output\r
1515 bindsym mod+x move workspace to output right</tt></pre>\r
1516 </div></div>\r
1517 <div class="sect3">\r
1518 <h4 id="_named_workspaces">6.5.1. Named workspaces</h4>\r
1519 <div class="paragraph"><p>Workspaces are identified by their name. So, instead of using numbers in the\r
1520 workspace command, you can use an arbitrary name:</p></div>\r
1521 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1522 <div class="listingblock">\r
1523 <div class="content">\r
1524 <pre><tt>bindsym mod+1 workspace mail\r
1525 ...</tt></pre>\r
1526 </div></div>\r
1527 <div class="paragraph"><p>If you want the workspace to have a number <strong>and</strong> a name, just prefix the\r
1528 number, like this:</p></div>\r
1529 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1530 <div class="listingblock">\r
1531 <div class="content">\r
1532 <pre><tt>bindsym mod+1 workspace 1: mail\r
1533 bindsym mod+2 workspace 2: www\r
1534 ...</tt></pre>\r
1535 </div></div>\r
1536 <div class="paragraph"><p>Note that the workspace will really be named "1: mail". i3 treats workspace\r
1537 names beginning with a number in a slightly special way. Normally, named\r
1538 workspaces are ordered the way they appeared. When they start with a number, i3\r
1539 will order them numerically. Also, you will be able to use <tt>workspace number 1</tt>\r
1540 to switch to the workspace which begins with number 1, regardless of which name\r
1541 it has. This is useful in case you are changing the workspace’s name\r
1542 dynamically.</p></div>\r
1543 </div>\r
1544 </div>\r
1545 <div class="sect2">\r
1546 <h3 id="_renaming_workspaces">6.6. Renaming workspaces</h3>\r
1547 <div class="paragraph"><p>You can rename workspaces. This might be useful to start with the default\r
1548 numbered workspaces, do your work, and rename the workspaces afterwards to\r
1549 reflect what’s actually on them.</p></div>\r
1550 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1551 <div class="listingblock">\r
1552 <div class="content">\r
1553 <pre><tt>rename workspace &lt;old_name&gt; to &lt;new_name&gt;</tt></pre>\r
1554 </div></div>\r
1555 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1556 <div class="listingblock">\r
1557 <div class="content">\r
1558 <pre><tt>i3-msg 'rename workspace 5 to 6'\r
1559 i3-msg 'rename workspace 1 to "1: www"'\r
1560 i3-msg 'rename workspace "1: www" to "10: www"'</tt></pre>\r
1561 </div></div>\r
1562 </div>\r
1563 <div class="sect2">\r
1564 <h3 id="resizingconfig">6.7. Resizing containers/windows</h3>\r
1565 <div class="paragraph"><p>If you want to resize containers/windows using your keyboard, you can use the\r
1566 <tt>resize</tt> command:</p></div>\r
1567 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1568 <div class="listingblock">\r
1569 <div class="content">\r
1570 <pre><tt>resize &lt;grow|shrink&gt; &lt;direction&gt; [&lt;px&gt; px] [or &lt;ppt&gt; ppt]</tt></pre>\r
1571 </div></div>\r
1572 <div class="paragraph"><p>Direction can either be one of <tt>up</tt>, <tt>down</tt>, <tt>left</tt> or <tt>right</tt>. Or you can be\r
1573 less specific and use <tt>width</tt> or <tt>height</tt>, in which case i3 will take/give\r
1574 space from all the other containers. The optional pixel argument specifies by\r
1575 how many pixels a <strong>floating container</strong> should be grown or shrunk (the default\r
1576 is 10 pixels). The ppt argument means percentage points and specifies by how\r
1577 many percentage points a <strong>tiling container</strong> should be grown or shrunk (the\r
1578 default is 10 percentage points).</p></div>\r
1579 <div class="paragraph"><p>I recommend using the resize command inside a so called <tt>mode</tt>:</p></div>\r
1580 <div class="listingblock">\r
1581 <div class="title">Example: Configuration file, defining a mode for resizing</div>\r
1582 <div class="content">\r
1583 <pre><tt>mode "resize" {\r
1584         # These bindings trigger as soon as you enter the resize mode\r
1585 \r
1586         # Pressing left will shrink the window’s width.\r
1587         # Pressing right will grow the window’s width.\r
1588         # Pressing up will shrink the window’s height.\r
1589         # Pressing down will grow the window’s height.\r
1590         bindsym j           resize shrink width 10 px or 10 ppt\r
1591         bindsym k           resize grow height 10 px or 10 ppt\r
1592         bindsym l           resize shrink height 10 px or 10 ppt\r
1593         bindsym semicolon   resize grow width 10 px or 10 ppt\r
1594 \r
1595         # same bindings, but for the arrow keys\r
1596         bindsym Left        resize shrink width 10 px or 10 ppt\r
1597         bindsym Down        resize grow height 10 px or 10 ppt\r
1598         bindsym Up          resize shrink height 10 px or 10 ppt\r
1599         bindsym Right       resize grow width 10 px or 10 ppt\r
1600 \r
1601         # back to normal: Enter or Escape\r
1602         bindsym Return mode "default"\r
1603         bindsym Escape mode "default"\r
1604 }\r
1605 \r
1606 # Enter resize mode\r
1607 bindsym mod+r mode "resize"</tt></pre>\r
1608 </div></div>\r
1609 </div>\r
1610 <div class="sect2">\r
1611 <h3 id="_jumping_to_specific_windows">6.8. Jumping to specific windows</h3>\r
1612 <div class="paragraph"><p>Often when in a multi-monitor environment, you want to quickly jump to a\r
1613 specific window. For example, while working on workspace 3 you may want to\r
1614 jump to your mail client to email your boss that you’ve achieved some\r
1615 important goal. Instead of figuring out how to navigate to your mailclient,\r
1616 it would be more convenient to have a shortcut. You can use the <tt>focus</tt> command\r
1617 with criteria for that.</p></div>\r
1618 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1619 <div class="listingblock">\r
1620 <div class="content">\r
1621 <pre><tt>[class="class"] focus\r
1622 [title="title"] focus</tt></pre>\r
1623 </div></div>\r
1624 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1625 <div class="listingblock">\r
1626 <div class="content">\r
1627 <pre><tt># Get me to the next open VIM instance\r
1628 bindsym mod+a [class="urxvt" title="VIM"] focus</tt></pre>\r
1629 </div></div>\r
1630 </div>\r
1631 <div class="sect2">\r
1632 <h3 id="_vim_like_marks_mark_goto">6.9. VIM-like marks (mark/goto)</h3>\r
1633 <div class="paragraph" id="vim_like_marks"><p>This feature is like the jump feature: It allows you to directly jump to a\r
1634 specific window (this means switching to the appropriate workspace and setting\r
1635 focus to the windows). However, you can directly mark a specific window with\r
1636 an arbitrary label and use it afterwards.  You do not need to ensure that your\r
1637 windows have unique classes or titles, and you do not need to change your\r
1638 configuration file.</p></div>\r
1639 <div class="paragraph"><p>As the command needs to include the label with which you want to mark the\r
1640 window, you cannot simply bind it to a key.  <tt>i3-input</tt> is a tool created\r
1641 for this purpose: It lets you input a command and sends the command to i3. It\r
1642 can also prefix this command and display a custom prompt for the input dialog.</p></div>\r
1643 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1644 <div class="listingblock">\r
1645 <div class="content">\r
1646 <pre><tt>mark identifier\r
1647 [con_mark="identifier"] focus</tt></pre>\r
1648 </div></div>\r
1649 <div class="paragraph"><p><strong>Example (in a terminal)</strong>:</p></div>\r
1650 <div class="listingblock">\r
1651 <div class="content">\r
1652 <pre><tt>$ i3-msg mark irssi\r
1653 $ i3-msg '[con_mark="irssi"] focus'</tt></pre>\r
1654 </div></div>\r
1655 </div>\r
1656 <div class="sect2">\r
1657 <h3 id="_changing_border_style">6.10. Changing border style</h3>\r
1658 <div class="paragraph"><p>To change the border of the current client, you can use <tt>border normal</tt> to use the normal\r
1659 border (including window title), <tt>border 1pixel</tt> to use a 1-pixel border (no window title)\r
1660 and <tt>border none</tt> to make the client borderless.</p></div>\r
1661 <div class="paragraph"><p>There is also <tt>border toggle</tt> which will toggle the different border styles.</p></div>\r
1662 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1663 <div class="listingblock">\r
1664 <div class="content">\r
1665 <pre><tt>bindsym mod+t border normal\r
1666 bindsym mod+y border 1pixel\r
1667 bindsym mod+u border none</tt></pre>\r
1668 </div></div>\r
1669 </div>\r
1670 <div class="sect2">\r
1671 <h3 id="stack-limit">6.11. Reloading/Restarting/Exiting</h3>\r
1672 <div class="paragraph"><p>You can make i3 reload its configuration file with <tt>reload</tt>. You can also\r
1673 restart i3 inplace with the <tt>restart</tt> command to get it out of some weird state\r
1674 (if that should ever happen) or to perform an upgrade without having to restart\r
1675 your X session. To exit i3 properly, you can use the <tt>exit</tt> command,\r
1676 however you don’t need to (simply killing your X session is fine as well).</p></div>\r
1677 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1678 <div class="listingblock">\r
1679 <div class="content">\r
1680 <pre><tt>bindsym mod+Shift+r restart\r
1681 bindsym mod+Shift+w reload\r
1682 bindsym mod+Shift+e exit</tt></pre>\r
1683 </div></div>\r
1684 </div>\r
1685 <div class="sect2">\r
1686 <h3 id="_scratchpad">6.12. Scratchpad</h3>\r
1687 <div class="paragraph"><p>There are two commands to use any existing window as scratchpad window. <tt>move\r
1688 scratchpad</tt> will move a window to the scratchpad workspace. This will make it\r
1689 invisible until you show it again. There is no way to open that workspace.\r
1690 Instead, when using <tt>scratchpad show</tt>, the window will be shown again, as a\r
1691 floating window, centered on your current workspace (using <tt>scratchpad show</tt> on\r
1692 a visible scratchpad window will make it hidden again, so you can have a\r
1693 keybinding to toggle).</p></div>\r
1694 <div class="paragraph"><p>As the name indicates, this is useful for having a window with your favorite\r
1695 editor always at hand. However, you can also use this for other permanently\r
1696 running applications which you don’t want to see all the time: Your music\r
1697 player, alsamixer, maybe even your mail client…?</p></div>\r
1698 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1699 <div class="listingblock">\r
1700 <div class="content">\r
1701 <pre><tt>move scratchpad\r
1702 \r
1703 scratchpad show</tt></pre>\r
1704 </div></div>\r
1705 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1706 <div class="listingblock">\r
1707 <div class="content">\r
1708 <pre><tt># Make the currently focused window a scratchpad\r
1709 bindsym mod+Shift+minus move scratchpad\r
1710 \r
1711 # Show the first scratchpad window\r
1712 bindsym mod+minus scratchpad show\r
1713 \r
1714 # Show the sup-mail scratchpad window, if any.\r
1715 bindsym mod4+s [title="^Sup ::"] scratchpad show</tt></pre>\r
1716 </div></div>\r
1717 </div>\r
1718 </div>\r
1719 </div>\r
1720 <div class="sect1">\r
1721 <h2 id="multi_monitor">7. Multiple monitors</h2>\r
1722 <div class="sectionbody">\r
1723 <div class="paragraph"><p>As you can see in the goal list on the website, i3 was specifically developed\r
1724 with support for multiple monitors in mind. This section will explain how to\r
1725 handle multiple monitors.</p></div>\r
1726 <div class="paragraph"><p>When you have only one monitor, things are simple. You usually start with\r
1727 workspace 1 on your monitor and open new ones as you need them.</p></div>\r
1728 <div class="paragraph"><p>When you have more than one monitor, each monitor will get an initial\r
1729 workspace.  The first monitor gets 1, the second gets 2 and a possible third\r
1730 would get 3. When you switch to a workspace on a different monitor, i3 will\r
1731 switch to that monitor and then switch to the workspace. This way, you don’t\r
1732 need shortcuts to switch to a specific monitor, and you don’t need to remember\r
1733 where you put which workspace. New workspaces will be opened on the currently\r
1734 active monitor.  It is not possible to have a monitor without a workspace.</p></div>\r
1735 <div class="paragraph"><p>The idea of making workspaces global is based on the observation that most\r
1736 users have a very limited set of workspaces on their additional monitors.\r
1737 They are often used for a specific task (browser, shell) or for monitoring\r
1738 several things (mail, IRC, syslog, …). Thus, using one workspace on one monitor\r
1739 and "the rest" on the other monitors often makes sense. However, as you can\r
1740 create an unlimited number of workspaces in i3 and tie them to specific\r
1741 screens, you can have the "traditional" approach of having X workspaces per\r
1742 screen by changing your configuration (using modes, for example).</p></div>\r
1743 <div class="sect2">\r
1744 <h3 id="_configuring_your_monitors">7.1. Configuring your monitors</h3>\r
1745 <div class="paragraph"><p>To help you get going if you have never used multiple monitors before, here is\r
1746 a short overview of the xrandr options which will probably be of interest to\r
1747 you. It is always useful to get an overview of the current screen configuration.\r
1748 Just run "xrandr" and you will get an output like the following:</p></div>\r
1749 <div class="listingblock">\r
1750 <div class="content">\r
1751 <pre><tt>$ xrandr\r
1752 Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192\r
1753 VGA1 disconnected (normal left inverted right x axis y axis)\r
1754 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm\r
1755    1280x800       60.0*+   50.0\r
1756    1024x768       85.0     75.0     70.1     60.0\r
1757    832x624        74.6\r
1758    800x600        85.1     72.2     75.0     60.3     56.2\r
1759    640x480        85.0     72.8     75.0     59.9\r
1760    720x400        85.0\r
1761    640x400        85.1\r
1762    640x350        85.1</tt></pre>\r
1763 </div></div>\r
1764 <div class="paragraph"><p>Several things are important here: You can see that <tt>LVDS1</tt> is connected (of\r
1765 course, it is the internal flat panel) but <tt>VGA1</tt> is not. If you have a monitor\r
1766 connected to one of the ports but xrandr still says "disconnected", you should\r
1767 check your cable, monitor or graphics driver.</p></div>\r
1768 <div class="paragraph"><p>The maximum resolution you can see at the end of the first line is the maximum\r
1769 combined resolution of your monitors. By default, it is usually too low and has\r
1770 to be increased by editing <tt>/etc/X11/xorg.conf</tt>.</p></div>\r
1771 <div class="paragraph"><p>So, say you connected VGA1 and want to use it as an additional screen:</p></div>\r
1772 <div class="listingblock">\r
1773 <div class="content">\r
1774 <pre><tt>xrandr --output VGA1 --auto --left-of LVDS1</tt></pre>\r
1775 </div></div>\r
1776 <div class="paragraph"><p>This command makes xrandr try to find the native resolution of the device\r
1777 connected to <tt>VGA1</tt> and configures it to the left of your internal flat panel.\r
1778 When running "xrandr" again, the output looks like this:</p></div>\r
1779 <div class="listingblock">\r
1780 <div class="content">\r
1781 <pre><tt>$ xrandr\r
1782 Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 8192 x 8192\r
1783 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm\r
1784    1280x1024      60.0*+   75.0\r
1785    1280x960       60.0\r
1786    1152x864       75.0\r
1787    1024x768       75.1     70.1     60.0\r
1788    832x624        74.6\r
1789    800x600        72.2     75.0     60.3     56.2\r
1790    640x480        72.8     75.0     66.7     60.0\r
1791    720x400        70.1\r
1792 LVDS1 connected 1280x800+1280+0 (normal left inverted right x axis y axis) 261mm x 163mm\r
1793    1280x800       60.0*+   50.0\r
1794    1024x768       85.0     75.0     70.1     60.0\r
1795    832x624        74.6\r
1796    800x600        85.1     72.2     75.0     60.3     56.2\r
1797    640x480        85.0     72.8     75.0     59.9\r
1798    720x400        85.0\r
1799    640x400        85.1\r
1800    640x350        85.1</tt></pre>\r
1801 </div></div>\r
1802 <div class="paragraph"><p>Please note that i3 uses exactly the same API as xrandr does, so it will see\r
1803 only what you can see in xrandr.</p></div>\r
1804 <div class="paragraph"><p>See also <a href="#presentations">[presentations]</a> for more examples of multi-monitor setups.</p></div>\r
1805 </div>\r
1806 <div class="sect2">\r
1807 <h3 id="_interesting_configuration_for_multi_monitor_environments">7.2. Interesting configuration for multi-monitor environments</h3>\r
1808 <div class="paragraph"><p>There are several things to configure in i3 which may be interesting if you\r
1809 have more than one monitor:</p></div>\r
1810 <div class="olist arabic"><ol class="arabic">\r
1811 <li>\r
1812 <p>\r
1813 You can specify which workspace should be put on which screen. This\r
1814    allows you to have a different set of workspaces when starting than just\r
1815    1 for the first monitor, 2 for the second and so on. See\r
1816    <a href="#workspace_screen">[workspace_screen]</a>.\r
1817 </p>\r
1818 </li>\r
1819 <li>\r
1820 <p>\r
1821 If you want some applications to generally open on the bigger screen\r
1822    (MPlayer, Firefox, …), you can assign them to a specific workspace, see\r
1823    <a href="#assign_workspace">[assign_workspace]</a>.\r
1824 </p>\r
1825 </li>\r
1826 <li>\r
1827 <p>\r
1828 If you have many workspaces on many monitors, it might get hard to keep\r
1829    track of which window you put where. Thus, you can use vim-like marks to\r
1830    quickly switch between windows. See <a href="#vim_like_marks">[vim_like_marks]</a>.\r
1831 </p>\r
1832 </li>\r
1833 </ol></div>\r
1834 </div>\r
1835 </div>\r
1836 </div>\r
1837 <div class="sect1">\r
1838 <h2 id="_i3_and_the_rest_of_your_software_world">8. i3 and the rest of your software world</h2>\r
1839 <div class="sectionbody">\r
1840 <div class="sect2">\r
1841 <h3 id="_displaying_a_status_line">8.1. Displaying a status line</h3>\r
1842 <div class="paragraph"><p>A very common thing amongst users of exotic window managers is a status line at\r
1843 some corner of the screen. It is an often superior replacement to the widget\r
1844 approach you have in the task bar of a traditional desktop environment.</p></div>\r
1845 <div class="paragraph"><p>If you don’t already have your favorite way of generating such a status line\r
1846 (self-written scripts, conky, …), then i3status is the recommended tool for\r
1847 this task. It was written in C with the goal of using as few syscalls as\r
1848 possible to reduce the time your CPU is woken up from sleep states. Because\r
1849 i3status only spits out text, you need to combine it with some other tool, like\r
1850 i3bar. See <a href="#status_command">[status_command]</a> for how to display i3status in i3bar.</p></div>\r
1851 <div class="paragraph"><p>Regardless of which application you use to display the status line, you\r
1852 want to make sure that it registers as a dock window using EWMH hints. i3 will\r
1853 position the window either at the top or at the bottom of the screen, depending\r
1854 on which hint the application sets. With i3bar, you can configure its position,\r
1855 see <a href="#i3bar_position">[i3bar_position]</a>.</p></div>\r
1856 </div>\r
1857 <div class="sect2">\r
1858 <h3 id="_giving_presentations_multi_monitor">8.2. Giving presentations (multi-monitor)</h3>\r
1859 <div class="paragraph"><p>When giving a presentation, you typically want the audience to see what you see\r
1860 on your screen and then go through a series of slides (if the presentation is\r
1861 simple). For more complex presentations, you might want to have some notes\r
1862 which only you can see on your screen, while the audience can only see the\r
1863 slides.</p></div>\r
1864 <div class="sect3">\r
1865 <h4 id="presentations">8.2.1. Case 1: everybody gets the same output</h4>\r
1866 <div class="paragraph"><p>This is the simple case. You connect your computer to the video projector,\r
1867 turn on both (computer and video projector) and configure your X server to\r
1868 clone the internal flat panel of your computer to the video output:</p></div>\r
1869 <div class="listingblock">\r
1870 <div class="content">\r
1871 <pre><tt>xrandr --output VGA1 --mode 1024x768 --same-as LVDS1</tt></pre>\r
1872 </div></div>\r
1873 <div class="paragraph"><p>i3 will then use the lowest common subset of screen resolutions, the rest of\r
1874 your screen will be left untouched (it will show the X background). So, in\r
1875 our example, this would be 1024x768 (my notebook has 1280x800).</p></div>\r
1876 </div>\r
1877 <div class="sect3">\r
1878 <h4 id="_case_2_you_can_see_more_than_your_audience">8.2.2. Case 2: you can see more than your audience</h4>\r
1879 <div class="paragraph"><p>This case is a bit harder. First of all, you should configure the VGA output\r
1880 somewhere near your internal flat panel, say right of it:</p></div>\r
1881 <div class="listingblock">\r
1882 <div class="content">\r
1883 <pre><tt>xrandr --output VGA1 --mode 1024x768 --right-of LVDS1</tt></pre>\r
1884 </div></div>\r
1885 <div class="paragraph"><p>Now, i3 will put a new workspace (depending on your settings) on the new screen\r
1886 and you are in multi-monitor mode (see <a href="#multi_monitor">[multi_monitor]</a>).</p></div>\r
1887 <div class="paragraph"><p>Because i3 is not a compositing window manager, there is no ability to\r
1888 display a window on two screens at the same time. Instead, your presentation\r
1889 software needs to do this job (that is, open a window on each screen).</p></div>\r
1890 </div>\r
1891 </div>\r
1892 </div>\r
1893 </div>\r
1894 </div>\r
1895 <div id="footnotes"><hr /></div>\r
1896 <div id="footer" lang="de">\r
1897 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>\r
1898 </div>\r
1899 </body>\r
1900 </html>\r