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