]> git.sur5r.net Git - i3/i3.github.io/blob - docs/userguide.html
update docs for 4.11
[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/x-icon" href="/favicon.ico">\r
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
7 <meta name="generator" content="AsciiDoc 8.6.9" />\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 document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes(); asciidoc.toc(2);}, false);\r
14 /*]]>*/\r
15 </script>\r
16 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
17 </head>\r
18 <body class="article">\r
19 \r
20         <div id="main">\r
21             <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>\r
22                         <ul id="nav">\r
23                                 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>\r
24                                 <li><a href="/screenshots">Screens</a></li>\r
25                                 <li><a href="https://faq.i3wm.org/">FAQ</a></li>\r
26                                 <li><a href="/contact">Contact</a></li>\r
27                                 <li><a href="https://github.com/i3/i3/issues">Bugs</a></li>\r
28                         </ul>\r
29         <br style="clear: both">\r
30 <div id="content">\r
31 <div id="header">\r
32 <h1>i3 User’s Guide</h1>\r
33 <span id="author">Michael Stapelberg</span><br />\r
34 <span id="email"><tt>&lt;<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>&gt;</tt></span><br />\r
35 <span id="revdate">March 2013</span>\r
36 <div id="toc">
37   <div id="toctitle">Table of Contents</div>
38   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
39 </div>\r
40 </div>\r
41 <div id="preamble">\r
42 <div class="sectionbody">\r
43 <div class="paragraph"><p>This document contains all the information you need to configure and use the i3\r
44 window manager. If it does not, please check <a href="http://faq.i3wm.org/">http://faq.i3wm.org/</a> first, then\r
45 contact us on IRC (preferred) or post your question(s) on the mailing list.</p></div>\r
46 </div>\r
47 </div>\r
48 <div class="sect1">\r
49 <h2 id="_default_keybindings">1. Default keybindings</h2>\r
50 <div class="sectionbody">\r
51 <div class="paragraph"><p>For the "too long; didn’t read" people, here is an overview of the default\r
52 keybindings (click to see the full size image):</p></div>\r
53 <div class="paragraph"><p><strong>Keys to use with $mod (Alt):</strong></p></div>\r
54 <div class="paragraph"><p><span class="image">\r
55 <a class="image" href="keyboard-layer1.png">\r
56 <img src="keyboard-layer1.png" alt="Keys to use with $mod (Alt)" width="600" />\r
57 </a>\r
58 </span></p></div>\r
59 <div class="paragraph"><p><strong>Keys to use with Shift+$mod:</strong></p></div>\r
60 <div class="paragraph"><p><span class="image">\r
61 <a class="image" href="keyboard-layer2.png">\r
62 <img src="keyboard-layer2.png" alt="Keys to use with Shift+$mod" width="600" />\r
63 </a>\r
64 </span></p></div>\r
65 <div class="paragraph"><p>The red keys are the modifiers you need to press (by default), the blue keys\r
66 are your homerow.</p></div>\r
67 <div class="paragraph"><p>Note that when starting i3 without a config file, i3-config-wizard will offer\r
68 you to create a config file in which the key positions (!) match what you see\r
69 in the image above, regardless of the keyboard layout you are using. If you\r
70 prefer to use a config file where the key letters match what you are seeing\r
71 above, just decline i3-config-wizard’s offer and base your config on\r
72 <tt>/etc/i3/config</tt>.</p></div>\r
73 </div>\r
74 </div>\r
75 <div class="sect1">\r
76 <h2 id="_using_i3">2. Using i3</h2>\r
77 <div class="sectionbody">\r
78 <div class="paragraph"><p>Throughout this guide, the keyword <tt>$mod</tt> will be used to refer to the\r
79 configured modifier. This is the Alt key (Mod1) by default, with the Windows\r
80 key (Mod4) being a popular alternative.</p></div>\r
81 <div class="sect2">\r
82 <h3 id="_opening_terminals_and_moving_around">2.1. Opening terminals and moving around</h3>\r
83 <div class="paragraph"><p>One very basic operation is opening a new terminal. By default, the keybinding\r
84 for this is $mod+Enter, that is Alt+Enter in the default configuration. By\r
85 pressing $mod+Enter, a new terminal will be opened.  It will fill the whole\r
86 space available on your screen.</p></div>\r
87 <div class="paragraph"><p><span class="image">\r
88 <img src="single_terminal.png" alt="Single terminal" />\r
89 </span></p></div>\r
90 <div class="paragraph"><p>If you now open another terminal, i3 will place it next to the current one,\r
91 splitting the screen size in half. Depending on your monitor, i3 will put the\r
92 created window beside the existing window (on wide displays) or below the\r
93 existing window (rotated displays).</p></div>\r
94 <div class="paragraph"><p><span class="image">\r
95 <img src="two_terminals.png" alt="Two terminals" />\r
96 </span></p></div>\r
97 <div class="paragraph"><p>To move the focus between the two terminals, you can use the direction keys\r
98 which you may know from the editor <tt>vi</tt>. However, in i3, your homerow is used\r
99 for these keys (in <tt>vi</tt>, the keys are shifted to the left by one for\r
100 compatibility with most keyboard layouts). Therefore, <tt>$mod+J</tt> is left, <tt>$mod+K</tt>\r
101 is down, <tt>$mod+L</tt> is up and <tt>$mod+;</tt> is right. So, to switch between the\r
102 terminals, use <tt>$mod+K</tt> or <tt>$mod+L</tt>. Of course, you can also use the arrow keys.</p></div>\r
103 <div class="paragraph"><p>At the moment, your workspace is split (it contains two terminals) in a\r
104 specific direction (horizontal by default). Every window can be split\r
105 horizontally or vertically again, just like the workspace. The terminology is\r
106 "window" for a container that actually contains an X11 window (like a terminal\r
107 or browser) and "split container" for containers that consist of one or more\r
108 windows.</p></div>\r
109 <div class="paragraph"><p>TODO: picture of the tree</p></div>\r
110 <div class="paragraph"><p>To split a window vertically, press <tt>$mod+v</tt> before you create the new window.\r
111 To split it horizontally, press <tt>$mod+h</tt>.</p></div>\r
112 </div>\r
113 <div class="sect2">\r
114 <h3 id="_changing_the_container_layout">2.2. Changing the container layout</h3>\r
115 <div class="paragraph"><p>A split container can have one of the following layouts:</p></div>\r
116 <div class="dlist"><dl>\r
117 <dt class="hdlist1">\r
118 splith/splitv\r
119 </dt>\r
120 <dd>\r
121 <p>\r
122 Windows are sized so that every window gets an equal amount of space in the\r
123 container. splith distributes the windows horizontally (windows are right next\r
124 to each other), splitv distributes them vertically (windows are on top of each\r
125 other).\r
126 </p>\r
127 </dd>\r
128 <dt class="hdlist1">\r
129 stacking\r
130 </dt>\r
131 <dd>\r
132 <p>\r
133 Only the focused window in the container is displayed. You get a list of\r
134 windows at the top of the container.\r
135 </p>\r
136 </dd>\r
137 <dt class="hdlist1">\r
138 tabbed\r
139 </dt>\r
140 <dd>\r
141 <p>\r
142 The same principle as <tt>stacking</tt>, but the list of windows at the top is only\r
143 a single line which is vertically split.\r
144 </p>\r
145 </dd>\r
146 </dl></div>\r
147 <div class="paragraph"><p>To switch modes, press <tt>$mod+e</tt> for splith/splitv (it toggles), <tt>$mod+s</tt> for\r
148 stacking and <tt>$mod+w</tt> for tabbed.</p></div>\r
149 <div class="paragraph"><p><span class="image">\r
150 <img src="modes.png" alt="Container modes" />\r
151 </span></p></div>\r
152 </div>\r
153 <div class="sect2">\r
154 <h3 id="_toggling_fullscreen_mode_for_a_window">2.3. Toggling fullscreen mode for a window</h3>\r
155 <div class="paragraph"><p>To display a window in fullscreen mode or to go out of fullscreen mode again,\r
156 press <tt>$mod+f</tt>.</p></div>\r
157 <div class="paragraph"><p>There is also a global fullscreen mode in i3 in which the client will span all\r
158 available outputs (the command is <tt>fullscreen toggle global</tt>).</p></div>\r
159 </div>\r
160 <div class="sect2">\r
161 <h3 id="_opening_other_applications">2.4. Opening other applications</h3>\r
162 <div class="paragraph"><p>Aside from opening applications from a terminal, you can also use the handy\r
163 <tt>dmenu</tt> which is opened by pressing <tt>$mod+d</tt> by default. Just type the name\r
164 (or a part of it) of the application which you want to open. The corresponding\r
165 application has to be in your <tt>$PATH</tt> for this to work.</p></div>\r
166 <div class="paragraph"><p>Additionally, if you have applications you open very frequently, you can\r
167 create a keybinding for starting the application directly. See the section\r
168 <a href="#configuring">[configuring]</a> for details.</p></div>\r
169 </div>\r
170 <div class="sect2">\r
171 <h3 id="_closing_windows">2.5. Closing windows</h3>\r
172 <div class="paragraph"><p>If an application does not provide a mechanism for closing (most applications\r
173 provide a menu, the escape key or a shortcut like <tt>Control+W</tt> to close), you\r
174 can press <tt>$mod+Shift+q</tt> to kill a window. For applications which support\r
175 the WM_DELETE protocol, this will correctly close the application (saving\r
176 any modifications or doing other cleanup). If the application doesn’t support\r
177 the WM_DELETE protocol your X server will kill the window and the behaviour\r
178 depends on the application.</p></div>\r
179 </div>\r
180 <div class="sect2">\r
181 <h3 id="_using_workspaces">2.6. Using workspaces</h3>\r
182 <div class="paragraph"><p>Workspaces are an easy way to group a set of windows. By default, you are on\r
183 the first workspace, as the bar on the bottom left indicates. To switch to\r
184 another workspace, press <tt>$mod+num</tt> where <tt>num</tt> is the number of the workspace\r
185 you want to use. If the workspace does not exist yet, it will be created.</p></div>\r
186 <div class="paragraph"><p>A common paradigm is to put the web browser on one workspace, communication\r
187 applications (<tt>mutt</tt>, <tt>irssi</tt>, &#8230;) on another one, and the ones with which you\r
188 work, on the third one. Of course, there is no need to follow this approach.</p></div>\r
189 <div class="paragraph"><p>If you have multiple screens, a workspace will be created on each screen at\r
190 startup. If you open a new workspace, it will be bound to the screen you\r
191 created it on.  When you switch to a workspace on another screen, i3 will set\r
192 focus to that screen.</p></div>\r
193 </div>\r
194 <div class="sect2">\r
195 <h3 id="_moving_windows_to_workspaces">2.7. Moving windows to workspaces</h3>\r
196 <div class="paragraph"><p>To move a window to another workspace, simply press <tt>$mod+Shift+num</tt> where\r
197 <tt>num</tt> is (like when switching workspaces) the number of the target workspace.\r
198 Similarly to switching workspaces, the target workspace will be created if\r
199 it does not yet exist.</p></div>\r
200 </div>\r
201 <div class="sect2">\r
202 <h3 id="_resizing">2.8. Resizing</h3>\r
203 <div class="paragraph"><p>The easiest way to resize a container is by using the mouse: Grab the border\r
204 and move it to the wanted size.</p></div>\r
205 <div class="paragraph"><p>See <a href="#resizingconfig">[resizingconfig]</a> for how to configure i3 to be able to resize\r
206 columns/rows with your keyboard.</p></div>\r
207 </div>\r
208 <div class="sect2">\r
209 <h3 id="_restarting_i3_inplace">2.9. Restarting i3 inplace</h3>\r
210 <div class="paragraph"><p>To restart i3 in place (and thus get into a clean state if there is a bug, or\r
211 to upgrade to a newer version of i3) you can use <tt>$mod+Shift+r</tt>.</p></div>\r
212 </div>\r
213 <div class="sect2">\r
214 <h3 id="_exiting_i3">2.10. Exiting i3</h3>\r
215 <div class="paragraph"><p>To cleanly exit i3 without killing your X server, you can use <tt>$mod+Shift+e</tt>.\r
216 By default, a dialog will ask you to confirm if you really want to quit.</p></div>\r
217 </div>\r
218 <div class="sect2">\r
219 <h3 id="_floating">2.11. Floating</h3>\r
220 <div class="paragraph"><p>Floating mode is the opposite of tiling mode. The position and size of\r
221 a window are not managed automatically by i3, but manually by\r
222 you. Using this mode violates the tiling paradigm but can be useful\r
223 for some corner cases like "Save as" dialog windows, or toolbar\r
224 windows (GIMP or similar). Those windows usually set the appropriate\r
225 hint and are opened in floating mode by default.</p></div>\r
226 <div class="paragraph"><p>You can toggle floating mode for a window by pressing <tt>$mod+Shift+Space</tt>. By\r
227 dragging the window’s titlebar with your mouse you can move the window\r
228 around. By grabbing the borders and moving them you can resize the window. You\r
229 can also do that by using the <a href="#floating_modifier">[floating_modifier]</a>. Another way to resize\r
230 floating windows using the mouse is to right-click on the titlebar and drag.</p></div>\r
231 <div class="paragraph"><p>For resizing floating windows with your keyboard, see <a href="#resizingconfig">[resizingconfig]</a>.</p></div>\r
232 <div class="paragraph"><p>Floating windows are always on top of tiling windows.</p></div>\r
233 </div>\r
234 </div>\r
235 </div>\r
236 <div class="sect1">\r
237 <h2 id="_tree">3. Tree</h2>\r
238 <div class="sectionbody">\r
239 <div class="paragraph"><p>i3 stores all information about the X11 outputs, workspaces and layout of the\r
240 windows on them in a tree. The root node is the X11 root window, followed by\r
241 the X11 outputs, then dock areas and a content container, then workspaces and\r
242 finally the windows themselves. In previous versions of i3 we had multiple lists\r
243 (of outputs, workspaces) and a table for each workspace. That approach turned\r
244 out to be complicated to use (snapping), understand and implement.</p></div>\r
245 <div class="sect2">\r
246 <h3 id="_the_tree_consists_of_containers">3.1. The tree consists of Containers</h3>\r
247 <div class="paragraph"><p>The building blocks of our tree are so called <tt>Containers</tt>. A <tt>Container</tt> can\r
248 host a window (meaning an X11 window, one that you can actually see and use,\r
249 like a browser). Alternatively, it could contain one or more <tt>Containers</tt>. A\r
250 simple example is the workspace: When you start i3 with a single monitor, a\r
251 single workspace and you open two terminal windows, you will end up with a tree\r
252 like this:</p></div>\r
253 <div class="imageblock" style="float:right;">\r
254 <div class="content">\r
255 <img src="tree-layout2.png" alt="layout2" />\r
256 </div>\r
257 </div>\r
258 <div class="imageblock">\r
259 <div class="content">\r
260 <img src="tree-shot4.png" alt="shot4" />\r
261 </div>\r
262 <div class="title">Figure 1. Two terminals on standard workspace</div>\r
263 </div>\r
264 </div>\r
265 <div class="sect2">\r
266 <h3 id="_orientation_and_split_containers">3.2. Orientation and Split Containers</h3>\r
267 <div class="paragraph" id="OrientationSplit"><p>It is only natural to use so-called <tt>Split Containers</tt> in order to build a\r
268 layout when using a tree as data structure. In i3, every <tt>Container</tt> has an\r
269 orientation (horizontal, vertical or unspecified) and the orientation depends\r
270 on the layout the container is in (vertical for splitv and stacking, horizontal\r
271 for splith and tabbed). So, in our example with the workspace, the default\r
272 layout of the workspace <tt>Container</tt> is splith (most monitors are widescreen\r
273 nowadays). If you change the layout to splitv (<tt>$mod+v</tt> in the default config)\r
274 and <strong>then</strong> open two terminals, i3 will configure your windows like this:</p></div>\r
275 <div class="imageblock">\r
276 <div class="content">\r
277 <img src="tree-shot2.png" alt="shot2" />\r
278 </div>\r
279 <div class="title">Figure 2. Vertical Workspace Orientation</div>\r
280 </div>\r
281 <div class="paragraph"><p>An interesting new feature of i3 since version 4 is the ability to split anything:\r
282 Let’s assume you have two terminals on a workspace (with splith layout, that is\r
283 horizontal orientation), focus is on the right terminal. Now you want to open\r
284 another terminal window below the current one. If you would just open a new\r
285 terminal window, it would show up to the right due to the splith layout.\r
286 Instead, press <tt>$mod+v</tt> to split the container with the splitv layout (to\r
287 open a <tt>Horizontal Split Container</tt>, use <tt>$mod+h</tt>). Now you can open a new\r
288 terminal and it will open below the current one:</p></div>\r
289 <div class="imageblock" style="float:right;">\r
290 <div class="content">\r
291 <img src="tree-layout1.png" alt="Layout" />\r
292 </div>\r
293 </div>\r
294 <div class="imageblock">\r
295 <div class="content">\r
296 <img src="tree-shot1.png" alt="shot" />\r
297 </div>\r
298 <div class="title">Figure 3. Vertical Split Container</div>\r
299 </div>\r
300 <div style="clear:both;"></div>\r
301 <div class="paragraph"><p>You probably guessed it already: There is no limit on how deep your hierarchy\r
302 of splits can be.</p></div>\r
303 </div>\r
304 <div class="sect2">\r
305 <h3 id="_focus_parent">3.3. Focus parent</h3>\r
306 <div class="paragraph"><p>Let’s stay with our example from above. We have a terminal on the left and two\r
307 vertically split terminals on the right, focus is on the bottom right one. When\r
308 you open a new terminal, it will open below the current one.</p></div>\r
309 <div class="paragraph"><p>So, how can you open a new terminal window to the <strong>right</strong> of the current one?\r
310 The solution is to use <tt>focus parent</tt>, which will focus the <tt>Parent Container</tt> of\r
311 the current <tt>Container</tt>. In this case, you would focus the <tt>Vertical Split\r
312 Container</tt> which is <strong>inside</strong> the horizontally oriented workspace. Thus, now new\r
313 windows will be opened to the right of the <tt>Vertical Split Container</tt>:</p></div>\r
314 <div class="imageblock">\r
315 <div class="content">\r
316 <img src="tree-shot3.png" alt="shot3" />\r
317 </div>\r
318 <div class="title">Figure 4. Focus parent, then open new terminal</div>\r
319 </div>\r
320 </div>\r
321 <div class="sect2">\r
322 <h3 id="_implicit_containers">3.4. Implicit containers</h3>\r
323 <div class="paragraph"><p>In some cases, i3 needs to implicitly create a container to fulfill your\r
324 command.</p></div>\r
325 <div class="paragraph"><p>One example is the following scenario: You start i3 with a single monitor and a\r
326 single workspace on which you open three terminal windows. All these terminal\r
327 windows are directly attached to one node inside i3’s layout tree, the\r
328 workspace node. By default, the workspace node’s orientation is <tt>horizontal</tt>.</p></div>\r
329 <div class="paragraph"><p>Now you move one of these terminals down (<tt>$mod+Shift+k</tt> by default). The\r
330 workspace node’s orientation will be changed to <tt>vertical</tt>. The terminal window\r
331 you moved down is directly attached to the workspace and appears on the bottom\r
332 of the screen. A new (horizontal) container was created to accommodate the\r
333 other two terminal windows. You will notice this when switching to tabbed mode\r
334 (for example). You would end up having one tab with a representation of the split\r
335 container (e.g., "H[urxvt firefox]") and the other one being the terminal window\r
336 you moved down.</p></div>\r
337 </div>\r
338 </div>\r
339 </div>\r
340 <div class="sect1">\r
341 <h2 id="configuring">4. Configuring i3</h2>\r
342 <div class="sectionbody">\r
343 <div class="paragraph"><p>This is where the real fun begins ;-). Most things are very dependent on your\r
344 ideal working environment so we can’t make reasonable defaults for them.</p></div>\r
345 <div class="paragraph"><p>While not using a programming language for the configuration, i3 stays\r
346 quite flexible in regards to the things you usually want your window manager\r
347 to do.</p></div>\r
348 <div class="paragraph"><p>For example, you can configure bindings to jump to specific windows,\r
349 you can set specific applications to start on specific workspaces, you can\r
350 automatically start applications, you can change the colors of i3, and you\r
351 can bind your keys to do useful things.</p></div>\r
352 <div class="paragraph"><p>To change the configuration of i3, copy <tt>/etc/i3/config</tt> to <tt>~/.i3/config</tt>\r
353 (or <tt>~/.config/i3/config</tt> if you like the XDG directory scheme) and edit it\r
354 with a text editor.</p></div>\r
355 <div class="paragraph"><p>On first start (and on all following starts, unless you have a configuration\r
356 file), i3 will offer you to create a configuration file. You can tell the\r
357 wizard to use either Alt (Mod1) or Windows (Mod4) as modifier in the config\r
358 file. Also, the created config file will use the key symbols of your current\r
359 keyboard layout. To start the wizard, use the command <tt>i3-config-wizard</tt>.\r
360 Please note that you must not have <tt>~/.i3/config</tt>, otherwise the wizard will\r
361 exit.</p></div>\r
362 <div class="sect2">\r
363 <h3 id="_comments">4.1. Comments</h3>\r
364 <div class="paragraph"><p>It is possible and recommended to use comments in your configuration file to\r
365 properly document your setup for later reference. Comments are started with\r
366 a # and can only be used at the beginning of a line:</p></div>\r
367 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
368 <div class="listingblock">\r
369 <div class="content">\r
370 <pre><tt># This is a comment</tt></pre>\r
371 </div></div>\r
372 </div>\r
373 <div class="sect2">\r
374 <h3 id="fonts">4.2. Fonts</h3>\r
375 <div class="paragraph"><p>i3 has support for both X core fonts and FreeType fonts (through Pango) to\r
376 render window titles.</p></div>\r
377 <div class="paragraph"><p>To generate an X core font description, you can use <tt>xfontsel(1)</tt>. To see\r
378 special characters (Unicode), you need to use a font which supports the\r
379 ISO-10646 encoding.</p></div>\r
380 <div class="paragraph"><p>A FreeType font description is composed by a font family, a style, a weight,\r
381 a variant, a stretch and a size.\r
382 FreeType fonts support right-to-left rendering and contain often more\r
383 Unicode glyphs than X core fonts.</p></div>\r
384 <div class="paragraph"><p>If i3 cannot open the configured font, it will output an error in the logfile\r
385 and fall back to a working font.</p></div>\r
386 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
387 <div class="listingblock">\r
388 <div class="content">\r
389 <pre><tt>font &lt;X core font description&gt;\r
390 font pango:&lt;family list&gt; [&lt;style options&gt;] &lt;size&gt;</tt></pre>\r
391 </div></div>\r
392 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
393 <div class="listingblock">\r
394 <div class="content">\r
395 <pre><tt>font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1\r
396 font pango:DejaVu Sans Mono 10\r
397 font pango:DejaVu Sans Mono, Terminus Bold Semi-Condensed 11\r
398 font pango:Terminus 11px</tt></pre>\r
399 </div></div>\r
400 </div>\r
401 <div class="sect2">\r
402 <h3 id="keybindings">4.3. Keyboard bindings</h3>\r
403 <div class="paragraph"><p>A keyboard binding makes i3 execute a command (see below) upon pressing a\r
404 specific key. i3 allows you to bind either on keycodes or on keysyms (you can\r
405 also mix your bindings, though i3 will not protect you from overlapping ones).</p></div>\r
406 <div class="ulist"><ul>\r
407 <li>\r
408 <p>\r
409 A keysym (key symbol) is a description for a specific symbol, like "a"\r
410   or "b", but also more strange ones like "underscore" instead of "_". These\r
411   are the ones you use in Xmodmap to remap your keys. To get the current\r
412   mapping of your keys, use <tt>xmodmap -pke</tt>. To interactively enter a key and\r
413   see what keysym it is configured to, use <tt>xev</tt>.\r
414 </p>\r
415 </li>\r
416 <li>\r
417 <p>\r
418 Keycodes do not need to have a symbol assigned (handy for custom vendor\r
419   hotkeys on some notebooks) and they will not change their meaning as you\r
420   switch to a different keyboard layout (when using <tt>xmodmap</tt>).\r
421 </p>\r
422 </li>\r
423 </ul></div>\r
424 <div class="paragraph"><p>My recommendation is: If you often switch keyboard layouts but you want to keep\r
425 your bindings in the same physical location on the keyboard, use keycodes.\r
426 If you don’t switch layouts, and want a clean and simple config file, use\r
427 keysyms.</p></div>\r
428 <div class="paragraph"><p>Some tools (such as <tt>import</tt> or <tt>xdotool</tt>) might be unable to run upon a\r
429 KeyPress event, because the keyboard/pointer is still grabbed. For these\r
430 situations, the <tt>--release</tt> flag can be used, which will execute the command\r
431 after the keys have been released.</p></div>\r
432 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
433 <div class="listingblock">\r
434 <div class="content">\r
435 <pre><tt>bindsym [--release] [&lt;Group&gt;+][&lt;Modifiers&gt;+]&lt;keysym&gt; command\r
436 bindcode [--release] [&lt;Group&gt;+][&lt;Modifiers&gt;+]&lt;keycode&gt; command</tt></pre>\r
437 </div></div>\r
438 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
439 <div class="listingblock">\r
440 <div class="content">\r
441 <pre><tt># Fullscreen\r
442 bindsym $mod+f fullscreen toggle\r
443 \r
444 # Restart\r
445 bindsym $mod+Shift+r restart\r
446 \r
447 # Notebook-specific hotkeys\r
448 bindcode 214 exec --no-startup-id /home/michael/toggle_beamer.sh\r
449 \r
450 # Simulate ctrl+v upon pressing $mod+x\r
451 bindsym --release $mod+x exec --no-startup-id xdotool key --clearmodifiers ctrl+v\r
452 \r
453 # Take a screenshot upon pressing $mod+x (select an area)\r
454 bindsym --release $mod+x exec --no-startup-id import /tmp/latest-screenshot.png</tt></pre>\r
455 </div></div>\r
456 <div class="paragraph"><p>Available Modifiers:</p></div>\r
457 <div class="dlist"><dl>\r
458 <dt class="hdlist1">\r
459 Mod1-Mod5, Shift, Control\r
460 </dt>\r
461 <dd>\r
462 <p>\r
463 Standard modifiers, see <tt>xmodmap(1)</tt>\r
464 </p>\r
465 </dd>\r
466 <dt class="hdlist1">\r
467 Group1, Group2, Group3, Group4\r
468 </dt>\r
469 <dd>\r
470 <p>\r
471 When using multiple keyboard layouts (e.g. with <tt>setxkbmap -layout us,ru</tt>), you\r
472 can specify in which XKB group (also called “layout”) a keybinding should be\r
473 active. By default, keybindings are translated in Group1 and are active in all\r
474 groups. If you want to override keybindings in one of your layouts, specify the\r
475 corresponding group. For backwards compatibility, the group “Mode_switch” is an\r
476 alias for Group2.\r
477 </p>\r
478 </dd>\r
479 </dl></div>\r
480 </div>\r
481 <div class="sect2">\r
482 <h3 id="mousebindings">4.4. Mouse bindings</h3>\r
483 <div class="paragraph"><p>A mouse binding makes i3 execute a command upon pressing a specific mouse\r
484 button in the scope of the clicked container (see <a href="#command_criteria">[command_criteria]</a>). You\r
485 can configure mouse bindings in a similar way to key bindings.</p></div>\r
486 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
487 <div class="listingblock">\r
488 <div class="content">\r
489 <pre><tt>bindsym [--release] [--border] [--whole-window] [&lt;Modifiers&gt;+]button&lt;n&gt; command</tt></pre>\r
490 </div></div>\r
491 <div class="paragraph"><p>By default, the binding will only run when you click on the titlebar of the\r
492 window. If the <tt>--release</tt> flag is given, it will run when the mouse button\r
493 is released.</p></div>\r
494 <div class="paragraph"><p>If the <tt>--whole-window</tt> flag is given, the binding will also run when any part\r
495 of the window is clicked, with the exception of the border. To have a bind run\r
496 when the border is clicked, specify the <tt>--border</tt> flag.</p></div>\r
497 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
498 <div class="listingblock">\r
499 <div class="content">\r
500 <pre><tt># The middle button over a titlebar kills the window\r
501 bindsym --release button2 kill\r
502 \r
503 # The middle button and a modifer over any part of the window kills the window\r
504 bindsym --whole-window $mod+button2 kill\r
505 \r
506 # The right button toggles floating\r
507 bindsym button3 floating toggle\r
508 bindsym $mod+button3 floating toggle\r
509 \r
510 # The side buttons move the window around\r
511 bindsym button9 move left\r
512 bindsym button8 move right</tt></pre>\r
513 </div></div>\r
514 </div>\r
515 <div class="sect2">\r
516 <h3 id="floating_modifier">4.5. The floating modifier</h3>\r
517 <div class="paragraph"><p>To move floating windows with your mouse, you can either grab their titlebar\r
518 or configure the so called floating modifier which you can then press and\r
519 click anywhere in the window itself to move it. The most common setup is to\r
520 use the same key you use for managing windows (Mod1 for example). Then\r
521 you can press Mod1, click into a window using your left mouse button, and drag\r
522 it to the position you want.</p></div>\r
523 <div class="paragraph"><p>When holding the floating modifier, you can resize a floating window by\r
524 pressing the right mouse button on it and moving around while holding it. If\r
525 you hold the shift button as well, the resize will be proportional (the aspect\r
526 ratio will be preserved).</p></div>\r
527 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
528 <div class="listingblock">\r
529 <div class="content">\r
530 <pre><tt>floating_modifier &lt;Modifier&gt;</tt></pre>\r
531 </div></div>\r
532 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
533 <div class="listingblock">\r
534 <div class="content">\r
535 <pre><tt>floating_modifier Mod1</tt></pre>\r
536 </div></div>\r
537 </div>\r
538 <div class="sect2">\r
539 <h3 id="_constraining_floating_window_size">4.6. Constraining floating window size</h3>\r
540 <div class="paragraph"><p>The maximum and minimum dimensions of floating windows can be specified. If\r
541 either dimension of <tt>floating_maximum_size</tt> is specified as -1, that dimension\r
542 will be unconstrained with respect to its maximum value. If either dimension of\r
543 <tt>floating_maximum_size</tt> is undefined, or specified as 0, i3 will use a default\r
544 value to constrain the maximum size. <tt>floating_minimum_size</tt> is treated in a\r
545 manner analogous to <tt>floating_maximum_size</tt>.</p></div>\r
546 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
547 <div class="listingblock">\r
548 <div class="content">\r
549 <pre><tt>floating_minimum_size &lt;width&gt; x &lt;height&gt;\r
550 floating_maximum_size &lt;width&gt; x &lt;height&gt;</tt></pre>\r
551 </div></div>\r
552 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
553 <div class="listingblock">\r
554 <div class="content">\r
555 <pre><tt>floating_minimum_size 75 x 50\r
556 floating_maximum_size -1 x -1</tt></pre>\r
557 </div></div>\r
558 </div>\r
559 <div class="sect2">\r
560 <h3 id="_orientation_for_new_workspaces">4.7. Orientation for new workspaces</h3>\r
561 <div class="paragraph"><p>New workspaces get a reasonable default orientation: Wide-screen monitors\r
562 (anything wider than high) get horizontal orientation, rotated monitors\r
563 (anything higher than wide) get vertical orientation.</p></div>\r
564 <div class="paragraph"><p>With the <tt>default_orientation</tt> configuration directive, you can override that\r
565 behavior.</p></div>\r
566 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
567 <div class="listingblock">\r
568 <div class="content">\r
569 <pre><tt>default_orientation horizontal|vertical|auto</tt></pre>\r
570 </div></div>\r
571 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
572 <div class="listingblock">\r
573 <div class="content">\r
574 <pre><tt>default_orientation vertical</tt></pre>\r
575 </div></div>\r
576 </div>\r
577 <div class="sect2">\r
578 <h3 id="_layout_mode_for_new_containers">4.8. Layout mode for new containers</h3>\r
579 <div class="paragraph"><p>This option determines in which mode new containers on workspace level will\r
580 start.</p></div>\r
581 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
582 <div class="listingblock">\r
583 <div class="content">\r
584 <pre><tt>workspace_layout default|stacking|tabbed</tt></pre>\r
585 </div></div>\r
586 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
587 <div class="listingblock">\r
588 <div class="content">\r
589 <pre><tt>workspace_layout tabbed</tt></pre>\r
590 </div></div>\r
591 </div>\r
592 <div class="sect2">\r
593 <h3 id="_border_style_for_new_windows">4.9. Border style for new windows</h3>\r
594 <div class="paragraph"><p>This option determines which border style new windows will have. The default is\r
595 <tt>normal</tt>. Note that new_float applies only to windows which are starting out as\r
596 floating windows, e.g., dialog windows, but not windows that are floated later on.</p></div>\r
597 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
598 <div class="listingblock">\r
599 <div class="content">\r
600 <pre><tt>new_window normal|none|pixel\r
601 new_window normal|pixel &lt;px&gt;\r
602 new_float normal|none|pixel\r
603 new_float normal|pixel &lt;px&gt;</tt></pre>\r
604 </div></div>\r
605 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
606 <div class="listingblock">\r
607 <div class="content">\r
608 <pre><tt>new_window pixel</tt></pre>\r
609 </div></div>\r
610 <div class="paragraph"><p>The "normal" and "pixel" border styles support an optional border width in\r
611 pixels:</p></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># The same as new_window none\r
616 new_window pixel 0\r
617 \r
618 # A 3 px border\r
619 new_window pixel 3</tt></pre>\r
620 </div></div>\r
621 </div>\r
622 <div class="sect2">\r
623 <h3 id="_hiding_vertical_borders">4.10. Hiding vertical borders</h3>\r
624 <div class="paragraph"><p>You can hide vertical borders adjacent to the screen edges using\r
625 <tt>hide_edge_borders</tt>. This is useful if you are using scrollbars, or do not want\r
626 to waste even two pixels in displayspace. Default is none.</p></div>\r
627 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
628 <div class="listingblock">\r
629 <div class="content">\r
630 <pre><tt>hide_edge_borders none|vertical|horizontal|both</tt></pre>\r
631 </div></div>\r
632 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
633 <div class="listingblock">\r
634 <div class="content">\r
635 <pre><tt>hide_edge_borders vertical</tt></pre>\r
636 </div></div>\r
637 </div>\r
638 <div class="sect2">\r
639 <h3 id="_arbitrary_commands_for_specific_windows_for_window">4.11. Arbitrary commands for specific windows (for_window)</h3>\r
640 <div class="paragraph" id="for_window"><p>With the <tt>for_window</tt> command, you can let i3 execute any command when it\r
641 encounters a specific window. This can be used to set windows to floating or to\r
642 change their border style, for example.</p></div>\r
643 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
644 <div class="listingblock">\r
645 <div class="content">\r
646 <pre><tt>for_window &lt;criteria&gt; &lt;command&gt;</tt></pre>\r
647 </div></div>\r
648 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
649 <div class="listingblock">\r
650 <div class="content">\r
651 <pre><tt># enable floating mode for all XTerm windows\r
652 for_window [class="XTerm"] floating enable\r
653 \r
654 # Make all urxvts use a 1-pixel border:\r
655 for_window [class="urxvt"] border pixel 1\r
656 \r
657 # A less useful, but rather funny example:\r
658 # makes the window floating as soon as I change\r
659 # directory to ~/work\r
660 for_window [title="x200: ~/work"] floating enable</tt></pre>\r
661 </div></div>\r
662 <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
663 </div>\r
664 <div class="sect2">\r
665 <h3 id="_don_8217_t_focus_window_upon_opening">4.12. Don&#8217;t focus window upon opening</h3>\r
666 <div class="paragraph" id="no_focus"><p>When a new window appears, it will be focused. The <tt>no_focus</tt> directive allows preventing\r
667 this from happening and can be used in combination with <a href="#command_criteria">[command_criteria]</a>.</p></div>\r
668 <div class="paragraph"><p>Note that this does not apply to all cases, e.g., when feeding data into a running application\r
669 causing it to request being focused. To configure the behavior in such cases, refer to\r
670 <a href="#focus_on_window_activation">[focus_on_window_activation]</a>.</p></div>\r
671 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
672 <div class="listingblock">\r
673 <div class="content">\r
674 <pre><tt>no_focus &lt;criteria&gt;</tt></pre>\r
675 </div></div>\r
676 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
677 <div class="listingblock">\r
678 <div class="content">\r
679 <pre><tt>no_focus [window_role="pop-up"]</tt></pre>\r
680 </div></div>\r
681 </div>\r
682 <div class="sect2">\r
683 <h3 id="_variables">4.13. Variables</h3>\r
684 <div class="paragraph"><p>As you learned in the section about keyboard bindings, you will have\r
685 to configure lots of bindings containing modifier keys. If you want to save\r
686 yourself some typing and be able to change the modifier you use later,\r
687 variables can be handy.</p></div>\r
688 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
689 <div class="listingblock">\r
690 <div class="content">\r
691 <pre><tt>set $&lt;name&gt; &lt;value&gt;</tt></pre>\r
692 </div></div>\r
693 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
694 <div class="listingblock">\r
695 <div class="content">\r
696 <pre><tt>set $m Mod1\r
697 bindsym $m+Shift+r restart</tt></pre>\r
698 </div></div>\r
699 <div class="paragraph"><p>Variables are directly replaced in the file when parsing. Variables expansion\r
700 is not recursive so it is not possible to define a variable with a value\r
701 containing another variable. There is no fancy handling and there are\r
702 absolutely no plans to change this. If you need a more dynamic configuration\r
703 you should create a little script which generates a configuration file and run\r
704 it before starting i3 (for example in your <tt>~/.xsession</tt> file).</p></div>\r
705 </div>\r
706 <div class="sect2">\r
707 <h3 id="_automatically_putting_clients_on_specific_workspaces">4.14. Automatically putting clients on specific workspaces</h3>\r
708 <div class="paragraph" id="assign_workspace"><p>To automatically make a specific window show up on a specific workspace, you\r
709 can use an <strong>assignment</strong>. You can match windows by using any criteria,\r
710 see <a href="#command_criteria">[command_criteria]</a>. It is recommended that you match on window classes\r
711 (and instances, when appropriate) instead of window titles whenever possible\r
712 because some applications first create their window, and then worry about\r
713 setting the correct title. Firefox with Vimperator comes to mind. The window\r
714 starts up being named Firefox, and only when Vimperator is loaded does the\r
715 title change. As i3 will get the title as soon as the application maps the\r
716 window (mapping means actually displaying it on the screen), you’d need to have\r
717 to match on <em>Firefox</em> in this case.</p></div>\r
718 <div class="paragraph"><p>Assignments are processed by i3 in the order in which they appear in the config\r
719 file. The first one which matches the window wins and later assignments are not\r
720 considered.</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>assign &lt;criteria&gt; [→] [workspace] &lt;workspace&gt;</tt></pre>\r
725 </div></div>\r
726 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
727 <div class="listingblock">\r
728 <div class="content">\r
729 <pre><tt># Assign URxvt terminals to workspace 2\r
730 assign [class="URxvt"] 2\r
731 \r
732 # Same thing, but more precise (exact match instead of substring)\r
733 assign [class="^URxvt$"] 2\r
734 \r
735 # Same thing, but with a beautiful arrow :)\r
736 assign [class="^URxvt$"] → 2\r
737 \r
738 # Assignment to a named workspace\r
739 assign [class="^URxvt$"] → work\r
740 \r
741 # Start urxvt -name irssi\r
742 assign [class="^URxvt$" instance="^irssi$"] → 3</tt></pre>\r
743 </div></div>\r
744 <div class="paragraph"><p>Note that the arrow is not required, it just looks good :-). If you decide to\r
745 use it, it has to be a UTF-8 encoded arrow, not <tt>-&gt;</tt> or something like that.</p></div>\r
746 <div class="paragraph"><p>To get the class and instance, you can use <tt>xprop</tt>. After clicking on the\r
747 window, you will see the following output:</p></div>\r
748 <div class="paragraph"><p><strong>xprop</strong>:</p></div>\r
749 <div class="listingblock">\r
750 <div class="content">\r
751 <pre><tt>WM_CLASS(STRING) = "irssi", "URxvt"</tt></pre>\r
752 </div></div>\r
753 <div class="paragraph"><p>The first part of the WM_CLASS is the instance ("irssi" in this example), the\r
754 second part is the class ("URxvt" in this example).</p></div>\r
755 <div class="paragraph"><p>Should you have any problems with assignments, make sure to check the i3\r
756 logfile first (see <a href="http://i3wm.org/docs/debugging.html">http://i3wm.org/docs/debugging.html</a>). It includes more\r
757 details about the matching process and the window’s actual class, instance and\r
758 title when starting up.</p></div>\r
759 <div class="paragraph"><p>Note that if you want to start an application just once on a specific\r
760 workspace, but you don’t want to assign all instances of it permanently, you\r
761 can make use of i3’s startup-notification support (see <a href="#exec">[exec]</a>) in your config\r
762 file in the following way:</p></div>\r
763 <div class="paragraph"><p><strong>Start iceweasel on workspace 3 (once)</strong>:</p></div>\r
764 <div class="listingblock">\r
765 <div class="content">\r
766 <pre><tt># Start iceweasel on workspace 3, then switch back to workspace 1\r
767 # (Being a command-line utility, i3-msg does not support startup notifications,\r
768 #  hence the exec --no-startup-id.)\r
769 # (Starting iceweasel with i3’s exec command is important in order to make i3\r
770 #  create a startup notification context, without which the iceweasel window(s)\r
771 #  cannot be matched onto the workspace on which the command was started.)\r
772 exec --no-startup-id i3-msg 'workspace 3; exec iceweasel; workspace 1'</tt></pre>\r
773 </div></div>\r
774 </div>\r
775 <div class="sect2">\r
776 <h3 id="_automatically_starting_applications_on_i3_startup">4.15. Automatically starting applications on i3 startup</h3>\r
777 <div class="paragraph"><p>By using the <tt>exec</tt> keyword outside a keybinding, you can configure\r
778 which commands will be performed by i3 on initial startup. <tt>exec</tt>\r
779 commands will not run when restarting i3, if you need a command to run\r
780 also when restarting i3 you should use the <tt>exec_always</tt>\r
781 keyword. These commands will be run in order.</p></div>\r
782 <div class="paragraph"><p>See <a href="#command_chaining">[command_chaining]</a> for details on the special meaning of <tt>;</tt> (semicolon)\r
783 and <tt>,</tt> (comma): they chain commands together in i3, so you need to use quoted\r
784 strings if they appear in your command.</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>exec [--no-startup-id] &lt;command&gt;\r
789 exec_always [--no-startup-id] &lt;command&gt;</tt></pre>\r
790 </div></div>\r
791 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
792 <div class="listingblock">\r
793 <div class="content">\r
794 <pre><tt>exec chromium\r
795 exec_always ~/my_script.sh\r
796 \r
797 # Execute the terminal emulator urxvt, which is not yet startup-notification aware.\r
798 exec --no-startup-id urxvt</tt></pre>\r
799 </div></div>\r
800 <div class="paragraph"><p>The flag --no-startup-id is explained in <a href="#exec">[exec]</a>.</p></div>\r
801 </div>\r
802 <div class="sect2">\r
803 <h3 id="workspace_screen">4.16. Automatically putting workspaces on specific screens</h3>\r
804 <div class="paragraph"><p>If you assign clients to workspaces, it might be handy to put the\r
805 workspaces on specific screens. Also, the assignment of workspaces to screens\r
806 will determine which workspace i3 uses for a new screen when adding screens\r
807 or when starting (e.g., by default it will use 1 for the first screen, 2 for\r
808 the second screen and so on).</p></div>\r
809 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
810 <div class="listingblock">\r
811 <div class="content">\r
812 <pre><tt>workspace &lt;workspace&gt; output &lt;output&gt;</tt></pre>\r
813 </div></div>\r
814 <div class="paragraph"><p>The <em>output</em> is the name of the RandR output you attach your screen to. On a\r
815 laptop, you might have VGA1 and LVDS1 as output names. You can see the\r
816 available outputs by running <tt>xrandr --current</tt>.</p></div>\r
817 <div class="paragraph"><p>If you use named workspaces, they must be quoted:</p></div>\r
818 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
819 <div class="listingblock">\r
820 <div class="content">\r
821 <pre><tt>workspace 1 output LVDS1\r
822 workspace 5 output VGA1\r
823 workspace "2: vim" output VGA1</tt></pre>\r
824 </div></div>\r
825 </div>\r
826 <div class="sect2">\r
827 <h3 id="_changing_colors">4.17. Changing colors</h3>\r
828 <div class="paragraph"><p>You can change all colors which i3 uses to draw the window decorations.</p></div>\r
829 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
830 <div class="listingblock">\r
831 <div class="content">\r
832 <pre><tt>&lt;colorclass&gt; &lt;border&gt; &lt;background&gt; &lt;text&gt; &lt;indicator&gt;</tt></pre>\r
833 </div></div>\r
834 <div class="paragraph"><p>Where colorclass can be one of:</p></div>\r
835 <div class="dlist"><dl>\r
836 <dt class="hdlist1">\r
837 client.focused\r
838 </dt>\r
839 <dd>\r
840 <p>\r
841         A client which currently has the focus.\r
842 </p>\r
843 </dd>\r
844 <dt class="hdlist1">\r
845 client.focused_inactive\r
846 </dt>\r
847 <dd>\r
848 <p>\r
849         A client which is the focused one of its container, but it does not have\r
850         the focus at the moment.\r
851 </p>\r
852 </dd>\r
853 <dt class="hdlist1">\r
854 client.unfocused\r
855 </dt>\r
856 <dd>\r
857 <p>\r
858         A client which is not the focused one of its container.\r
859 </p>\r
860 </dd>\r
861 <dt class="hdlist1">\r
862 client.urgent\r
863 </dt>\r
864 <dd>\r
865 <p>\r
866         A client which has its urgency hint activated.\r
867 </p>\r
868 </dd>\r
869 <dt class="hdlist1">\r
870 client.placeholder\r
871 </dt>\r
872 <dd>\r
873 <p>\r
874         Background and text color are used to draw placeholder window contents\r
875         (when restoring layouts). Border and indicator are ignored.\r
876 </p>\r
877 </dd>\r
878 <dt class="hdlist1">\r
879 client.background\r
880 </dt>\r
881 <dd>\r
882 <p>\r
883         Background color which will be used to paint the background of the\r
884         client window on top of which the client will be rendered. Only clients\r
885         which do not cover the whole area of this window expose the color. Note\r
886         that this colorclass only takes a single color.\r
887 </p>\r
888 </dd>\r
889 </dl></div>\r
890 <div class="paragraph"><p>Colors are in HTML hex format (#rrggbb), see the following example:</p></div>\r
891 <div class="paragraph"><p><strong>Examples (default colors)</strong>:</p></div>\r
892 <div class="listingblock">\r
893 <div class="content">\r
894 <pre><tt># class                 border  backgr. text    indicator\r
895 client.focused          #4c7899 #285577 #ffffff #2e9ef4\r
896 client.focused_inactive #333333 #5f676a #ffffff #484e50\r
897 client.unfocused        #333333 #222222 #888888 #292d2e\r
898 client.urgent           #2f343a #900000 #ffffff #900000\r
899 client.placeholder      #000000 #0c0c0c #ffffff #000000\r
900 \r
901 client.background       #ffffff</tt></pre>\r
902 </div></div>\r
903 <div class="paragraph"><p>Note that for the window decorations, the color around the child window is the\r
904 background color, and the border color is only the two thin lines at the top of\r
905 the window.</p></div>\r
906 <div class="paragraph"><p>The indicator color is used for indicating where a new window will be opened.\r
907 For horizontal split containers, the right border will be painted in indicator\r
908 color, for vertical split containers, the bottom border. This only applies to\r
909 single windows within a split container, which are otherwise indistinguishable\r
910 from single windows outside of a split container.</p></div>\r
911 </div>\r
912 <div class="sect2">\r
913 <h3 id="_interprocess_communication">4.18. Interprocess communication</h3>\r
914 <div class="paragraph"><p>i3 uses Unix sockets to provide an IPC interface. This allows third-party\r
915 programs to get information from i3, such as the current workspaces\r
916 (to display a workspace bar), and to control i3.</p></div>\r
917 <div class="paragraph"><p>The IPC socket is enabled by default and will be created in\r
918 <tt>/tmp/i3-%u.XXXXXX/ipc-socket.%p</tt> where <tt>%u</tt> is your UNIX username, <tt>%p</tt> is\r
919 the PID of i3 and XXXXXX is a string of random characters from the portable\r
920 filename character set (see mkdtemp(3)).</p></div>\r
921 <div class="paragraph"><p>You can override the default path through the environment-variable <tt>I3SOCK</tt> or\r
922 by specifying the <tt>ipc-socket</tt> directive. This is discouraged, though, since i3\r
923 does the right thing by default. If you decide to change it, it is strongly\r
924 recommended to set this to a location in your home directory so that no other\r
925 user can create that directory.</p></div>\r
926 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
927 <div class="listingblock">\r
928 <div class="content">\r
929 <pre><tt>ipc-socket ~/.i3/i3-ipc.sock</tt></pre>\r
930 </div></div>\r
931 <div class="paragraph"><p>You can then use the <tt>i3-msg</tt> application to perform any command listed in\r
932 the next section.</p></div>\r
933 </div>\r
934 <div class="sect2">\r
935 <h3 id="_focus_follows_mouse">4.19. Focus follows mouse</h3>\r
936 <div class="paragraph"><p>By default, window focus follows your mouse movements. However, if you have a\r
937 setup where your mouse usually is in your way (like a touchpad on your laptop\r
938 which you do not want to disable completely), you might want to disable <em>focus\r
939 follows mouse</em> and control focus only by using your keyboard.  The mouse will\r
940 still be useful inside the currently active window (for example to click on\r
941 links in your browser window).</p></div>\r
942 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
943 <div class="listingblock">\r
944 <div class="content">\r
945 <pre><tt>focus_follows_mouse yes|no</tt></pre>\r
946 </div></div>\r
947 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
948 <div class="listingblock">\r
949 <div class="content">\r
950 <pre><tt>focus_follows_mouse no</tt></pre>\r
951 </div></div>\r
952 </div>\r
953 <div class="sect2">\r
954 <h3 id="_mouse_warping">4.20. Mouse warping</h3>\r
955 <div class="paragraph"><p>By default, when switching focus to a window on a different output (e.g.\r
956 focusing a window on workspace 3 on output VGA-1, coming from workspace 2 on\r
957 LVDS-1), the mouse cursor is warped to the center of that window.</p></div>\r
958 <div class="paragraph"><p>With the <tt>mouse_warping</tt> option, you can control when the mouse cursor should\r
959 be warped. <tt>none</tt> disables warping entirely, whereas <tt>output</tt> is the default\r
960 behavior described above.</p></div>\r
961 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
962 <div class="listingblock">\r
963 <div class="content">\r
964 <pre><tt>mouse_warping output|none</tt></pre>\r
965 </div></div>\r
966 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
967 <div class="listingblock">\r
968 <div class="content">\r
969 <pre><tt>mouse_warping none</tt></pre>\r
970 </div></div>\r
971 </div>\r
972 <div class="sect2">\r
973 <h3 id="_popups_during_fullscreen_mode">4.21. Popups during fullscreen mode</h3>\r
974 <div class="paragraph"><p>When you are in fullscreen mode, some applications still open popup windows\r
975 (take Xpdf for example). This is because these applications may not be aware\r
976 that they are in fullscreen mode (they do not check the corresponding hint).\r
977 There are three things which are possible to do in this situation:</p></div>\r
978 <div class="olist arabic"><ol class="arabic">\r
979 <li>\r
980 <p>\r
981 Display the popup if it belongs to the fullscreen application only. This is\r
982    the default and should be reasonable behavior for most users.\r
983 </p>\r
984 </li>\r
985 <li>\r
986 <p>\r
987 Just ignore the popup (don’t map it). This won’t interrupt you while you are\r
988    in fullscreen. However, some apps might react badly to this (deadlock until\r
989    you go out of fullscreen).\r
990 </p>\r
991 </li>\r
992 <li>\r
993 <p>\r
994 Leave fullscreen mode.\r
995 </p>\r
996 </li>\r
997 </ol></div>\r
998 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
999 <div class="listingblock">\r
1000 <div class="content">\r
1001 <pre><tt>popup_during_fullscreen smart|ignore|leave_fullscreen</tt></pre>\r
1002 </div></div>\r
1003 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1004 <div class="listingblock">\r
1005 <div class="content">\r
1006 <pre><tt>popup_during_fullscreen smart</tt></pre>\r
1007 </div></div>\r
1008 </div>\r
1009 <div class="sect2">\r
1010 <h3 id="_focus_wrapping">4.22. Focus wrapping</h3>\r
1011 <div class="paragraph"><p>When being in a tabbed or stacked container, the first container will be\r
1012 focused when you use <tt>focus down</tt> on the last container&#8201;&#8212;&#8201;the focus wraps. If\r
1013 however there is another stacked/tabbed container in that direction, focus will\r
1014 be set on that container. This is the default behavior so you can navigate to\r
1015 all your windows without having to use <tt>focus parent</tt>.</p></div>\r
1016 <div class="paragraph"><p>If you want the focus to <strong>always</strong> wrap and you are aware of using <tt>focus\r
1017 parent</tt> to switch to different containers, you can use the\r
1018 <tt>force_focus_wrapping</tt> configuration directive. After enabling it, the focus\r
1019 will always wrap.</p></div>\r
1020 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1021 <div class="listingblock">\r
1022 <div class="content">\r
1023 <pre><tt>force_focus_wrapping yes|no</tt></pre>\r
1024 </div></div>\r
1025 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1026 <div class="listingblock">\r
1027 <div class="content">\r
1028 <pre><tt>force_focus_wrapping yes</tt></pre>\r
1029 </div></div>\r
1030 </div>\r
1031 <div class="sect2">\r
1032 <h3 id="_forcing_xinerama">4.23. Forcing Xinerama</h3>\r
1033 <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
1034 video drivers (especially the nVidia binary driver) only provide support for\r
1035 Xinerama instead of RandR. In such a situation, i3 must be told to use the\r
1036 inferior Xinerama API explicitly and therefore don’t provide support for\r
1037 reconfiguring your screens on the fly (they are read only once on startup and\r
1038 that’s it).</p></div>\r
1039 <div class="paragraph"><p>For people who cannot modify their <tt>~/.xsession</tt> to add the\r
1040 <tt>--force-xinerama</tt> commandline parameter, a configuration option is provided:</p></div>\r
1041 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1042 <div class="listingblock">\r
1043 <div class="content">\r
1044 <pre><tt>force_xinerama yes|no</tt></pre>\r
1045 </div></div>\r
1046 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1047 <div class="listingblock">\r
1048 <div class="content">\r
1049 <pre><tt>force_xinerama yes</tt></pre>\r
1050 </div></div>\r
1051 <div class="paragraph"><p>Also note that your output names are not descriptive (like <tt>HDMI1</tt>) when using\r
1052 Xinerama, instead they are counted up, starting at 0: <tt>xinerama-0</tt>, <tt>xinerama-1</tt>, …</p></div>\r
1053 </div>\r
1054 <div class="sect2">\r
1055 <h3 id="_automatic_back_and_forth_when_switching_to_the_current_workspace">4.24. Automatic back-and-forth when switching to the current workspace</h3>\r
1056 <div class="paragraph"><p>This configuration directive enables automatic <tt>workspace back_and_forth</tt> (see\r
1057 <a href="#back_and_forth">[back_and_forth]</a>) when switching to the workspace that is currently focused.</p></div>\r
1058 <div class="paragraph"><p>For instance: Assume you are on workspace "1: www" and switch to "2: IM" using\r
1059 mod+2 because somebody sent you a message. You don’t need to remember where you\r
1060 came from now, you can just press $mod+2 again to switch back to "1: www".</p></div>\r
1061 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1062 <div class="listingblock">\r
1063 <div class="content">\r
1064 <pre><tt>workspace_auto_back_and_forth yes|no</tt></pre>\r
1065 </div></div>\r
1066 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1067 <div class="listingblock">\r
1068 <div class="content">\r
1069 <pre><tt>workspace_auto_back_and_forth yes</tt></pre>\r
1070 </div></div>\r
1071 </div>\r
1072 <div class="sect2">\r
1073 <h3 id="_delaying_urgency_hint_reset_on_workspace_change">4.25. Delaying urgency hint reset on workspace change</h3>\r
1074 <div class="paragraph"><p>If an application on another workspace sets an urgency hint, switching to this\r
1075 workspace may lead to immediate focus of the application, which also means the\r
1076 window decoration color would be immediately reset to <tt>client.focused</tt>. This\r
1077 may make it unnecessarily hard to tell which window originally raised the\r
1078 event.</p></div>\r
1079 <div class="paragraph"><p>In order to prevent this, you can tell i3 to delay resetting the urgency state\r
1080 by a certain time using the <tt>force_display_urgency_hint</tt> directive. Setting the\r
1081 value to 0 disables this feature.</p></div>\r
1082 <div class="paragraph"><p>The default is 500ms.</p></div>\r
1083 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1084 <div class="listingblock">\r
1085 <div class="content">\r
1086 <pre><tt>force_display_urgency_hint &lt;timeout&gt; ms</tt></pre>\r
1087 </div></div>\r
1088 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1089 <div class="listingblock">\r
1090 <div class="content">\r
1091 <pre><tt>force_display_urgency_hint 500 ms</tt></pre>\r
1092 </div></div>\r
1093 </div>\r
1094 <div class="sect2">\r
1095 <h3 id="_focus_on_window_activation">4.26. Focus on window activation</h3>\r
1096 <div class="paragraph" id="focus_on_window_activation"><p>If a window is activated, e.g., via <tt>google-chrome www.google.com</tt>, it may request\r
1097 to take focus. Since this may not preferable, different reactions can be configured.</p></div>\r
1098 <div class="paragraph"><p>Note that this may not affect windows that are being opened. To prevent new windows\r
1099 from being focused, see <a href="#no_focus">[no_focus]</a>.</p></div>\r
1100 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1101 <div class="listingblock">\r
1102 <div class="content">\r
1103 <pre><tt>focus_on_window_activation smart|urgent|focus|none</tt></pre>\r
1104 </div></div>\r
1105 <div class="paragraph"><p>The different modes will act as follows:</p></div>\r
1106 <div class="dlist"><dl>\r
1107 <dt class="hdlist1">\r
1108 smart\r
1109 </dt>\r
1110 <dd>\r
1111 <p>\r
1112     This is the default behavior. If the window requesting focus is on an active\r
1113     workspace, it will receive the focus. Otherwise, the urgency hint will be set.\r
1114 </p>\r
1115 </dd>\r
1116 <dt class="hdlist1">\r
1117 urgent\r
1118 </dt>\r
1119 <dd>\r
1120 <p>\r
1121     The window will always be marked urgent, but the focus will not be stolen.\r
1122 </p>\r
1123 </dd>\r
1124 <dt class="hdlist1">\r
1125 focus\r
1126 </dt>\r
1127 <dd>\r
1128 <p>\r
1129     The window will always be focused and not be marked urgent.\r
1130 </p>\r
1131 </dd>\r
1132 <dt class="hdlist1">\r
1133 none\r
1134 </dt>\r
1135 <dd>\r
1136 <p>\r
1137     The window will neither be focused, nor be marked urgent.\r
1138 </p>\r
1139 </dd>\r
1140 </dl></div>\r
1141 </div>\r
1142 <div class="sect2">\r
1143 <h3 id="_drawing_marks_on_window_decoration">4.27. Drawing marks on window decoration</h3>\r
1144 <div class="paragraph"><p>If activated, marks on windows are drawn in their window decoration. However,\r
1145 any mark starting with an underscore in its name (<tt>_</tt>) will not be drawn even if\r
1146 this option is activated.</p></div>\r
1147 <div class="paragraph"><p>The default for this option is <tt>yes</tt>.</p></div>\r
1148 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1149 <div class="listingblock">\r
1150 <div class="content">\r
1151 <pre><tt>show_marks yes|no</tt></pre>\r
1152 </div></div>\r
1153 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1154 <div class="listingblock">\r
1155 <div class="content">\r
1156 <pre><tt>show_marks yes</tt></pre>\r
1157 </div></div>\r
1158 </div>\r
1159 <div class="sect2">\r
1160 <h3 id="line_continuation">4.28. Line continuation</h3>\r
1161 <div class="paragraph"><p>Config files support line continuation, meaning when you end a line in a\r
1162 backslash character (<tt>\</tt>), the line-break will be ignored by the parser. This\r
1163 feature can be used to create more readable configuration files.</p></div>\r
1164 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1165 <div class="listingblock">\r
1166 <div class="content">\r
1167 <pre><tt>bindsym Mod1+f \\r
1168 fullscreen toggle</tt></pre>\r
1169 </div></div>\r
1170 </div>\r
1171 </div>\r
1172 </div>\r
1173 <div class="sect1">\r
1174 <h2 id="_configuring_i3bar">5. Configuring i3bar</h2>\r
1175 <div class="sectionbody">\r
1176 <div class="paragraph"><p>The bar at the bottom of your monitor is drawn by a separate process called\r
1177 i3bar. Having this part of "the i3 user interface" in a separate process has\r
1178 several advantages:</p></div>\r
1179 <div class="olist arabic"><ol class="arabic">\r
1180 <li>\r
1181 <p>\r
1182 It is a modular approach. If you don’t need a workspace bar at all, or if\r
1183    you prefer a different one (dzen2, xmobar, maybe even gnome-panel?), you can\r
1184    just remove the i3bar configuration and start your favorite bar instead.\r
1185 </p>\r
1186 </li>\r
1187 <li>\r
1188 <p>\r
1189 It follows the UNIX philosophy of "Make each program do one thing well".\r
1190    While i3 manages your windows well, i3bar is good at displaying a bar on\r
1191    each monitor (unless you configure it otherwise).\r
1192 </p>\r
1193 </li>\r
1194 <li>\r
1195 <p>\r
1196 It leads to two separate, clean codebases. If you want to understand i3, you\r
1197    don’t need to bother with the details of i3bar and vice versa.\r
1198 </p>\r
1199 </li>\r
1200 </ol></div>\r
1201 <div class="paragraph"><p>That said, i3bar is configured in the same configuration file as i3. This is\r
1202 because it is tightly coupled with i3 (in contrary to i3lock or i3status which\r
1203 are useful for people using other window managers). Therefore, it makes no\r
1204 sense to use a different configuration place when we already have a good\r
1205 configuration infrastructure in place.</p></div>\r
1206 <div class="paragraph"><p>Configuring your workspace bar starts with opening a <tt>bar</tt> block. You can have\r
1207 multiple bar blocks to use different settings for different outputs (monitors):</p></div>\r
1208 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1209 <div class="listingblock">\r
1210 <div class="content">\r
1211 <pre><tt>bar {\r
1212     status_command i3status\r
1213 }</tt></pre>\r
1214 </div></div>\r
1215 <div class="sect2">\r
1216 <h3 id="_i3bar_command">5.1. i3bar command</h3>\r
1217 <div class="paragraph"><p>By default i3 will just pass <tt>i3bar</tt> and let your shell handle the execution,\r
1218 searching your <tt>$PATH</tt> for a correct version.\r
1219 If you have a different <tt>i3bar</tt> somewhere or the binary is not in your <tt>$PATH</tt> you can\r
1220 tell i3 what to execute.</p></div>\r
1221 <div class="paragraph"><p>The specified command will be passed to <tt>sh -c</tt>, so you can use globbing and\r
1222 have to have correct quoting etc.</p></div>\r
1223 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1224 <div class="listingblock">\r
1225 <div class="content">\r
1226 <pre><tt>i3bar_command &lt;command&gt;</tt></pre>\r
1227 </div></div>\r
1228 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1229 <div class="listingblock">\r
1230 <div class="content">\r
1231 <pre><tt>bar {\r
1232     i3bar_command /home/user/bin/i3bar\r
1233 }</tt></pre>\r
1234 </div></div>\r
1235 </div>\r
1236 <div class="sect2">\r
1237 <h3 id="status_command">5.2. Statusline command</h3>\r
1238 <div class="paragraph"><p>i3bar can run a program and display every line of its <tt>stdout</tt> output on the\r
1239 right hand side of the bar. This is useful to display system information like\r
1240 your current IP address, battery status or date/time.</p></div>\r
1241 <div class="paragraph"><p>The specified command will be passed to <tt>sh -c</tt>, so you can use globbing and\r
1242 have to have correct quoting etc. Note that for signal handling, depending on\r
1243 your shell (users of dash(1) are known to be affected), you have to use the\r
1244 shell’s exec command so that signals are passed to your program, not to the\r
1245 shell.</p></div>\r
1246 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1247 <div class="listingblock">\r
1248 <div class="content">\r
1249 <pre><tt>status_command &lt;command&gt;</tt></pre>\r
1250 </div></div>\r
1251 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1252 <div class="listingblock">\r
1253 <div class="content">\r
1254 <pre><tt>bar {\r
1255     status_command i3status --config ~/.i3status.conf\r
1256 \r
1257     # For dash(1) users who want signal handling to work:\r
1258     status_command exec ~/.bin/my_status_command\r
1259 }</tt></pre>\r
1260 </div></div>\r
1261 </div>\r
1262 <div class="sect2">\r
1263 <h3 id="_display_mode">5.3. Display mode</h3>\r
1264 <div class="paragraph"><p>You can either have i3bar be visible permanently at one edge of the screen\r
1265 (<tt>dock</tt> mode) or make it show up when you press your modifier key (<tt>hide</tt> mode).\r
1266 It is also possible to force i3bar to always stay hidden (<tt>invisible</tt>\r
1267 mode). The modifier key can be configured using the <tt>modifier</tt> option.</p></div>\r
1268 <div class="paragraph"><p>The mode option can be changed during runtime through the <tt>bar mode</tt> command.\r
1269 On reload the mode will be reverted to its configured value.</p></div>\r
1270 <div class="paragraph"><p>The hide mode maximizes screen space that can be used for actual windows. Also,\r
1271 i3bar sends the <tt>SIGSTOP</tt> and <tt>SIGCONT</tt> signals to the statusline process to\r
1272 save battery power.</p></div>\r
1273 <div class="paragraph"><p>Invisible mode allows to permanently maximize screen space, as the bar is never\r
1274 shown. Thus, you can configure i3bar to not disturb you by popping up because\r
1275 of an urgency hint or because the modifier key is pressed.</p></div>\r
1276 <div class="paragraph"><p>In order to control whether i3bar is hidden or shown in hide mode, there exists\r
1277 the hidden_state option, which has no effect in dock mode or invisible mode. It\r
1278 indicates the current hidden_state of the bar: (1) The bar acts like in normal\r
1279 hide mode, it is hidden and is only unhidden in case of urgency hints or by\r
1280 pressing the modifier key (<tt>hide</tt> state), or (2) it is drawn on top of the\r
1281 currently visible workspace (<tt>show</tt> state).</p></div>\r
1282 <div class="paragraph"><p>Like the mode, the hidden_state can also be controlled through i3, this can be\r
1283 done by using the <tt>bar hidden_state</tt> command.</p></div>\r
1284 <div class="paragraph"><p>The default mode is dock mode; in hide mode, the default modifier is Mod4 (usually\r
1285 the windows key). The default value for the hidden_state is hide.</p></div>\r
1286 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1287 <div class="listingblock">\r
1288 <div class="content">\r
1289 <pre><tt>mode dock|hide|invisible\r
1290 hidden_state hide|show\r
1291 modifier &lt;Modifier&gt;</tt></pre>\r
1292 </div></div>\r
1293 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1294 <div class="listingblock">\r
1295 <div class="content">\r
1296 <pre><tt>bar {\r
1297     mode hide\r
1298     hidden_state hide\r
1299     modifier Mod1\r
1300 }</tt></pre>\r
1301 </div></div>\r
1302 <div class="paragraph"><p>Available modifiers are Mod1-Mod5, Shift, Control (see <tt>xmodmap(1)</tt>).</p></div>\r
1303 </div>\r
1304 <div class="sect2">\r
1305 <h3 id="_mouse_button_commands">5.4. Mouse button commands</h3>\r
1306 <div class="paragraph"><p>Specifies a command to run when a button was pressed on i3bar to override the\r
1307 default behavior. This is useful, e.g., for disabling the scroll wheel action\r
1308 or running scripts that implement custom behavior for these buttons.</p></div>\r
1309 <div class="paragraph"><p>A button is always named <tt>button&lt;n&gt;</tt>, where 1 to 5 are default buttons as follows and higher\r
1310 numbers can be special buttons on devices offering more buttons:</p></div>\r
1311 <div class="dlist"><dl>\r
1312 <dt class="hdlist1">\r
1313 button1\r
1314 </dt>\r
1315 <dd>\r
1316 <p>\r
1317     Left mouse button.\r
1318 </p>\r
1319 </dd>\r
1320 <dt class="hdlist1">\r
1321 button2\r
1322 </dt>\r
1323 <dd>\r
1324 <p>\r
1325     Middle mouse button.\r
1326 </p>\r
1327 </dd>\r
1328 <dt class="hdlist1">\r
1329 button3\r
1330 </dt>\r
1331 <dd>\r
1332 <p>\r
1333     Right mouse button.\r
1334 </p>\r
1335 </dd>\r
1336 <dt class="hdlist1">\r
1337 button4\r
1338 </dt>\r
1339 <dd>\r
1340 <p>\r
1341     Scroll wheel up.\r
1342 </p>\r
1343 </dd>\r
1344 <dt class="hdlist1">\r
1345 button5\r
1346 </dt>\r
1347 <dd>\r
1348 <p>\r
1349     Scroll wheel down.\r
1350 </p>\r
1351 </dd>\r
1352 </dl></div>\r
1353 <div class="paragraph"><p>Please note that the old <tt>wheel_up_cmd</tt> and <tt>wheel_down_cmd</tt> commands are deprecated\r
1354 and will be removed in a future release. We strongly recommend using the more general\r
1355 <tt>bindsym</tt> with <tt>button4</tt> and <tt>button5</tt> instead.</p></div>\r
1356 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1357 <div class="listingblock">\r
1358 <div class="content">\r
1359 <pre><tt>bindsym button&lt;n&gt; &lt;command&gt;</tt></pre>\r
1360 </div></div>\r
1361 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1362 <div class="listingblock">\r
1363 <div class="content">\r
1364 <pre><tt>bar {\r
1365     # disable clicking on workspace buttons\r
1366     bindsym button1 nop\r
1367     # execute custom script when scrolling downwards\r
1368     bindsym button5 exec ~/.i3/scripts/custom_wheel_down\r
1369 }</tt></pre>\r
1370 </div></div>\r
1371 </div>\r
1372 <div class="sect2">\r
1373 <h3 id="_bar_id">5.5. Bar ID</h3>\r
1374 <div class="paragraph"><p>Specifies the bar ID for the configured bar instance. If this option is missing,\r
1375 the ID is set to <em>bar-x</em>, where x corresponds to the position of the embedding\r
1376 bar block in the config file (<em>bar-0</em>, <em>bar-1</em>, &#8230;).</p></div>\r
1377 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1378 <div class="listingblock">\r
1379 <div class="content">\r
1380 <pre><tt>id &lt;bar_id&gt;</tt></pre>\r
1381 </div></div>\r
1382 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1383 <div class="listingblock">\r
1384 <div class="content">\r
1385 <pre><tt>bar {\r
1386     id bar-1\r
1387 }</tt></pre>\r
1388 </div></div>\r
1389 </div>\r
1390 <div class="sect2">\r
1391 <h3 id="i3bar_position">5.6. Position</h3>\r
1392 <div class="paragraph"><p>This option determines in which edge of the screen i3bar should show up.</p></div>\r
1393 <div class="paragraph"><p>The default is bottom.</p></div>\r
1394 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1395 <div class="listingblock">\r
1396 <div class="content">\r
1397 <pre><tt>position top|bottom</tt></pre>\r
1398 </div></div>\r
1399 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1400 <div class="listingblock">\r
1401 <div class="content">\r
1402 <pre><tt>bar {\r
1403     position top\r
1404 }</tt></pre>\r
1405 </div></div>\r
1406 </div>\r
1407 <div class="sect2">\r
1408 <h3 id="_output_s">5.7. Output(s)</h3>\r
1409 <div class="paragraph"><p>You can restrict i3bar to one or more outputs (monitors). The default is to\r
1410 handle all outputs. Restricting the outputs is useful for using different\r
1411 options for different outputs by using multiple <em>bar</em> blocks.</p></div>\r
1412 <div class="paragraph"><p>To make a particular i3bar instance handle multiple outputs, specify the output\r
1413 directive multiple times.</p></div>\r
1414 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1415 <div class="listingblock">\r
1416 <div class="content">\r
1417 <pre><tt>output &lt;output&gt;</tt></pre>\r
1418 </div></div>\r
1419 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1420 <div class="listingblock">\r
1421 <div class="content">\r
1422 <pre><tt># big monitor: everything\r
1423 bar {\r
1424     # The display is connected either via HDMI or via DisplayPort\r
1425     output HDMI2\r
1426     output DP2\r
1427     status_command i3status\r
1428 }\r
1429 \r
1430 # laptop monitor: bright colors and i3status with less modules.\r
1431 bar {\r
1432     output LVDS1\r
1433     status_command i3status --config ~/.i3status-small.conf\r
1434     colors {\r
1435         background #000000\r
1436         statusline #ffffff\r
1437     }\r
1438 }</tt></pre>\r
1439 </div></div>\r
1440 </div>\r
1441 <div class="sect2">\r
1442 <h3 id="_tray_output">5.8. Tray output</h3>\r
1443 <div class="paragraph"><p>i3bar by default provides a system tray area where programs such as\r
1444 NetworkManager, VLC, Pidgin, etc. can place little icons.</p></div>\r
1445 <div class="paragraph"><p>You can configure on which output (monitor) the icons should be displayed or\r
1446 you can turn off the functionality entirely.</p></div>\r
1447 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1448 <div class="listingblock">\r
1449 <div class="content">\r
1450 <pre><tt>tray_output none|primary|&lt;output&gt;</tt></pre>\r
1451 </div></div>\r
1452 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1453 <div class="listingblock">\r
1454 <div class="content">\r
1455 <pre><tt># disable system tray\r
1456 bar {\r
1457     tray_output none\r
1458 }\r
1459 \r
1460 # show tray icons on the primary monitor\r
1461 bar {\r
1462     tray_output primary\r
1463 }\r
1464 \r
1465 # show tray icons on the big monitor\r
1466 bar {\r
1467     tray_output HDMI2\r
1468 }</tt></pre>\r
1469 </div></div>\r
1470 <div class="paragraph"><p>Note that you might not have a primary output configured yet. To do so, run:</p></div>\r
1471 <div class="listingblock">\r
1472 <div class="content">\r
1473 <pre><tt>xrandr --output &lt;output&gt; --primary</tt></pre>\r
1474 </div></div>\r
1475 <div class="paragraph"><p>Note that when you use multiple bar configuration blocks, either specify\r
1476 <tt>tray_output primary</tt> in all of them or explicitly specify <tt>tray_output none</tt>\r
1477 in bars which should not display the tray, otherwise the different instances\r
1478 might race each other in trying to display tray icons.</p></div>\r
1479 </div>\r
1480 <div class="sect2">\r
1481 <h3 id="_tray_padding">5.9. Tray padding</h3>\r
1482 <div class="paragraph"><p>The tray is shown on the right-hand side of the bar. By default, a padding of 2\r
1483 pixels is used for the upper, lower and right-hand side of the tray area and\r
1484 between the individual icons.</p></div>\r
1485 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1486 <div class="listingblock">\r
1487 <div class="content">\r
1488 <pre><tt>tray_padding &lt;px&gt; [px]</tt></pre>\r
1489 </div></div>\r
1490 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1491 <div class="listingblock">\r
1492 <div class="content">\r
1493 <pre><tt># Obey Fitts's law\r
1494 tray_padding 0</tt></pre>\r
1495 </div></div>\r
1496 </div>\r
1497 <div class="sect2">\r
1498 <h3 id="_font">5.10. Font</h3>\r
1499 <div class="paragraph"><p>Specifies the font to be used in the bar. See <a href="#fonts">[fonts]</a>.</p></div>\r
1500 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1501 <div class="listingblock">\r
1502 <div class="content">\r
1503 <pre><tt>font &lt;font&gt;</tt></pre>\r
1504 </div></div>\r
1505 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1506 <div class="listingblock">\r
1507 <div class="content">\r
1508 <pre><tt>bar {\r
1509     font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1\r
1510     font pango:DejaVu Sans Mono 10\r
1511 }</tt></pre>\r
1512 </div></div>\r
1513 </div>\r
1514 <div class="sect2">\r
1515 <h3 id="_custom_separator_symbol">5.11. Custom separator symbol</h3>\r
1516 <div class="paragraph"><p>Specifies a custom symbol to be used for the separator as opposed to the vertical,\r
1517 one pixel thick separator.</p></div>\r
1518 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1519 <div class="listingblock">\r
1520 <div class="content">\r
1521 <pre><tt>separator_symbol &lt;symbol&gt;</tt></pre>\r
1522 </div></div>\r
1523 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1524 <div class="listingblock">\r
1525 <div class="content">\r
1526 <pre><tt>bar {\r
1527     separator_symbol ":|:"\r
1528 }</tt></pre>\r
1529 </div></div>\r
1530 </div>\r
1531 <div class="sect2">\r
1532 <h3 id="_workspace_buttons">5.12. Workspace buttons</h3>\r
1533 <div class="paragraph"><p>Specifies whether workspace buttons should be shown or not. This is useful if\r
1534 you want to display a statusline-only bar containing additional information.</p></div>\r
1535 <div class="paragraph"><p>The default is to show workspace buttons.</p></div>\r
1536 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1537 <div class="listingblock">\r
1538 <div class="content">\r
1539 <pre><tt>workspace_buttons yes|no</tt></pre>\r
1540 </div></div>\r
1541 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1542 <div class="listingblock">\r
1543 <div class="content">\r
1544 <pre><tt>bar {\r
1545     workspace_buttons no\r
1546 }</tt></pre>\r
1547 </div></div>\r
1548 </div>\r
1549 <div class="sect2">\r
1550 <h3 id="_strip_workspace_numbers">5.13. Strip workspace numbers</h3>\r
1551 <div class="paragraph"><p>Specifies whether workspace numbers should be displayed within the workspace\r
1552 buttons. This is useful if you want to have a named workspace that stays in\r
1553 order on the bar according to its number without displaying the number prefix.</p></div>\r
1554 <div class="paragraph"><p>When <tt>strip_workspace_numbers</tt> is set to <tt>yes</tt>, any workspace that has a name of\r
1555 the form "[n]:[NAME]" will display only the name. You could use this, for\r
1556 instance, to display Roman numerals rather than digits by naming your\r
1557 workspaces to "1:I", "2:II", "3:III", "4:IV", &#8230;</p></div>\r
1558 <div class="paragraph"><p>The default is to display the full name within the workspace button.</p></div>\r
1559 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1560 <div class="listingblock">\r
1561 <div class="content">\r
1562 <pre><tt>strip_workspace_numbers yes|no</tt></pre>\r
1563 </div></div>\r
1564 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1565 <div class="listingblock">\r
1566 <div class="content">\r
1567 <pre><tt>bar {\r
1568     strip_workspace_numbers yes\r
1569 }</tt></pre>\r
1570 </div></div>\r
1571 </div>\r
1572 <div class="sect2">\r
1573 <h3 id="_binding_mode_indicator">5.14. Binding Mode indicator</h3>\r
1574 <div class="paragraph"><p>Specifies whether the current binding mode indicator should be shown or not.\r
1575 This is useful if you want to hide the workspace buttons but still be able\r
1576 to see the current binding mode indicator.\r
1577 For an example of a <tt>mode</tt> definition, see <a href="#resizingconfig">[resizingconfig]</a>.</p></div>\r
1578 <div class="paragraph"><p>The default is to show the mode indicator.</p></div>\r
1579 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1580 <div class="listingblock">\r
1581 <div class="content">\r
1582 <pre><tt>binding_mode_indicator yes|no</tt></pre>\r
1583 </div></div>\r
1584 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1585 <div class="listingblock">\r
1586 <div class="content">\r
1587 <pre><tt>bar {\r
1588     binding_mode_indicator no\r
1589 }</tt></pre>\r
1590 </div></div>\r
1591 </div>\r
1592 <div class="sect2">\r
1593 <h3 id="_colors">5.15. Colors</h3>\r
1594 <div class="paragraph"><p>As with i3, colors are in HTML hex format (#rrggbb). The following colors can\r
1595 be configured at the moment:</p></div>\r
1596 <div class="dlist"><dl>\r
1597 <dt class="hdlist1">\r
1598 background\r
1599 </dt>\r
1600 <dd>\r
1601 <p>\r
1602         Background color of the bar.\r
1603 </p>\r
1604 </dd>\r
1605 <dt class="hdlist1">\r
1606 statusline\r
1607 </dt>\r
1608 <dd>\r
1609 <p>\r
1610         Text color to be used for the statusline.\r
1611 </p>\r
1612 </dd>\r
1613 <dt class="hdlist1">\r
1614 separator\r
1615 </dt>\r
1616 <dd>\r
1617 <p>\r
1618         Text color to be used for the separator.\r
1619 </p>\r
1620 </dd>\r
1621 <dt class="hdlist1">\r
1622 focused_workspace\r
1623 </dt>\r
1624 <dd>\r
1625 <p>\r
1626         Border, background and text color for a workspace button when the workspace\r
1627         has focus.\r
1628 </p>\r
1629 </dd>\r
1630 <dt class="hdlist1">\r
1631 active_workspace\r
1632 </dt>\r
1633 <dd>\r
1634 <p>\r
1635         Border, background and text color for a workspace button when the workspace\r
1636         is active (visible) on some output, but the focus is on another one.\r
1637         You can only tell this apart from the focused workspace when you are\r
1638         using multiple monitors.\r
1639 </p>\r
1640 </dd>\r
1641 <dt class="hdlist1">\r
1642 inactive_workspace\r
1643 </dt>\r
1644 <dd>\r
1645 <p>\r
1646         Border, background and text color for a workspace button when the workspace\r
1647         does not have focus and is not active (visible) on any output. This\r
1648         will be the case for most workspaces.\r
1649 </p>\r
1650 </dd>\r
1651 <dt class="hdlist1">\r
1652 urgent_workspace\r
1653 </dt>\r
1654 <dd>\r
1655 <p>\r
1656         Border, background and text color for a workspace button when the workspace\r
1657         contains a window with the urgency hint set.\r
1658 </p>\r
1659 </dd>\r
1660 <dt class="hdlist1">\r
1661 binding_mode\r
1662 </dt>\r
1663 <dd>\r
1664 <p>\r
1665         Border, background and text color for the binding mode indicator. If not used,\r
1666         the colors will be taken from <tt>urgent_workspace</tt>.\r
1667 </p>\r
1668 </dd>\r
1669 </dl></div>\r
1670 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1671 <div class="listingblock">\r
1672 <div class="content">\r
1673 <pre><tt>colors {\r
1674     background &lt;color&gt;\r
1675     statusline &lt;color&gt;\r
1676     separator &lt;color&gt;\r
1677 \r
1678     &lt;colorclass&gt; &lt;border&gt; &lt;background&gt; &lt;text&gt;\r
1679 }</tt></pre>\r
1680 </div></div>\r
1681 <div class="paragraph"><p><strong>Example (default colors)</strong>:</p></div>\r
1682 <div class="listingblock">\r
1683 <div class="content">\r
1684 <pre><tt>bar {\r
1685     colors {\r
1686         background #000000\r
1687         statusline #ffffff\r
1688         separator #666666\r
1689 \r
1690         focused_workspace  #4c7899 #285577 #ffffff\r
1691         active_workspace   #333333 #5f676a #ffffff\r
1692         inactive_workspace #333333 #222222 #888888\r
1693         urgent_workspace   #2f343a #900000 #ffffff\r
1694         binding_mode       #2f343a #900000 #ffffff\r
1695     }\r
1696 }</tt></pre>\r
1697 </div></div>\r
1698 </div>\r
1699 </div>\r
1700 </div>\r
1701 <div class="sect1">\r
1702 <h2 id="_list_of_commands">6. List of commands</h2>\r
1703 <div class="sectionbody">\r
1704 <div class="paragraph"><p>Commands are what you bind to specific keypresses. You can also issue commands\r
1705 at runtime without pressing a key by using the IPC interface. An easy way to\r
1706 do this is to use the <tt>i3-msg</tt> utility:</p></div>\r
1707 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1708 <div class="listingblock">\r
1709 <div class="content">\r
1710 <pre><tt># execute this on your shell to make the current container borderless\r
1711 i3-msg border none</tt></pre>\r
1712 </div></div>\r
1713 <div class="paragraph" id="command_chaining"><p>Commands can be chained by using <tt>;</tt> (a semicolon). So, to move a window to a\r
1714 specific workspace and immediately switch to that workspace, you can configure\r
1715 the following keybinding:</p></div>\r
1716 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1717 <div class="listingblock">\r
1718 <div class="content">\r
1719 <pre><tt>bindsym $mod+x move container to workspace 3; workspace 3</tt></pre>\r
1720 </div></div>\r
1721 <div class="paragraph" id="command_criteria"><p>Furthermore, you can change the scope of a command - that is, which containers\r
1722 should be affected by that command, by using various criteria. The criteria\r
1723 are specified before any command in a pair of square brackets and are separated\r
1724 by space.</p></div>\r
1725 <div class="paragraph"><p>When using multiple commands, separate them by using a <tt>,</tt> (a comma) instead of\r
1726 a semicolon. Criteria apply only until the next semicolon, so if you use a\r
1727 semicolon to separate commands, only the first one will be executed for the\r
1728 matched window(s).</p></div>\r
1729 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1730 <div class="listingblock">\r
1731 <div class="content">\r
1732 <pre><tt># if you want to kill all windows which have the class Firefox, use:\r
1733 bindsym $mod+x [class="Firefox"] kill\r
1734 \r
1735 # same thing, but case-insensitive\r
1736 bindsym $mod+x [class="(?i)firefox"] kill\r
1737 \r
1738 # kill only the About dialog from Firefox\r
1739 bindsym $mod+x [class="Firefox" window_role="About"] kill\r
1740 \r
1741 # enable floating mode and move container to workspace 4\r
1742 for_window [class="^evil-app$"] floating enable, move container to workspace 4</tt></pre>\r
1743 </div></div>\r
1744 <div class="paragraph"><p>The criteria which are currently implemented are:</p></div>\r
1745 <div class="dlist"><dl>\r
1746 <dt class="hdlist1">\r
1747 class\r
1748 </dt>\r
1749 <dd>\r
1750 <p>\r
1751         Compares the window class (the second part of WM_CLASS). Use the\r
1752         special value <tt><em>focused</em></tt> to match all windows having the same window\r
1753         class as the currently focused window.\r
1754 </p>\r
1755 </dd>\r
1756 <dt class="hdlist1">\r
1757 instance\r
1758 </dt>\r
1759 <dd>\r
1760 <p>\r
1761         Compares the window instance (the first part of WM_CLASS). Use the\r
1762         special value <tt><em>focused</em></tt> to match all windows having the same window\r
1763         instance as the currently focused window.\r
1764 </p>\r
1765 </dd>\r
1766 <dt class="hdlist1">\r
1767 window_role\r
1768 </dt>\r
1769 <dd>\r
1770 <p>\r
1771         Compares the window role (WM_WINDOW_ROLE). Use the special value\r
1772         <tt><em>focused</em></tt> to match all windows having the same window role as the\r
1773         currently focused window.\r
1774 </p>\r
1775 </dd>\r
1776 <dt class="hdlist1">\r
1777 window_type\r
1778 </dt>\r
1779 <dd>\r
1780 <p>\r
1781         Compare the window type (_NET_WM_WINDOW_TYPE). Possible values are\r
1782         <tt>normal</tt>, <tt>dialog</tt>, <tt>utility</tt>, <tt>toolbar</tt>, <tt>splash</tt>, <tt>menu</tt>, <tt>dropdown_menu</tt>,\r
1783         <tt>popup_menu</tt> and <tt>tooltip</tt>.\r
1784 </p>\r
1785 </dd>\r
1786 <dt class="hdlist1">\r
1787 id\r
1788 </dt>\r
1789 <dd>\r
1790 <p>\r
1791         Compares the X11 window ID, which you can get via <tt>xwininfo</tt> for example.\r
1792 </p>\r
1793 </dd>\r
1794 <dt class="hdlist1">\r
1795 title\r
1796 </dt>\r
1797 <dd>\r
1798 <p>\r
1799         Compares the X11 window title (_NET_WM_NAME or WM_NAME as fallback).\r
1800         Use the special value <tt><em>focused</em></tt> to match all windows having the\r
1801         same window title as the currently focused window.\r
1802 </p>\r
1803 </dd>\r
1804 <dt class="hdlist1">\r
1805 urgent\r
1806 </dt>\r
1807 <dd>\r
1808 <p>\r
1809         Compares the urgent state of the window. Can be "latest" or "oldest".\r
1810         Matches the latest or oldest urgent window, respectively.\r
1811         (The following aliases are also available: newest, last, recent, first)\r
1812 </p>\r
1813 </dd>\r
1814 <dt class="hdlist1">\r
1815 workspace\r
1816 </dt>\r
1817 <dd>\r
1818 <p>\r
1819         Compares the workspace name of the workspace the window belongs to. Use\r
1820         the special value <tt><em>focused</em></tt> to match all windows in the currently\r
1821         focused workspace.\r
1822 </p>\r
1823 </dd>\r
1824 <dt class="hdlist1">\r
1825 con_mark\r
1826 </dt>\r
1827 <dd>\r
1828 <p>\r
1829         Compares the mark set for this container, see <a href="#vim_like_marks">[vim_like_marks]</a>.\r
1830 </p>\r
1831 </dd>\r
1832 <dt class="hdlist1">\r
1833 con_id\r
1834 </dt>\r
1835 <dd>\r
1836 <p>\r
1837         Compares the i3-internal container ID, which you can get via the IPC\r
1838         interface. Handy for scripting.\r
1839 </p>\r
1840 </dd>\r
1841 </dl></div>\r
1842 <div class="paragraph"><p>The criteria <tt>class</tt>, <tt>instance</tt>, <tt>role</tt>, <tt>title</tt>, <tt>workspace</tt> and <tt>mark</tt> are\r
1843 actually regular expressions (PCRE). See <tt>pcresyntax(3)</tt> or <tt>perldoc perlre</tt> for\r
1844 information on how to use them.</p></div>\r
1845 <div class="sect2">\r
1846 <h3 id="exec">6.1. Executing applications (exec)</h3>\r
1847 <div class="paragraph"><p>What good is a window manager if you can’t actually start any applications?\r
1848 The exec command starts an application by passing the command you specify to a\r
1849 shell. This implies that you can use globbing (wildcards) and programs will be\r
1850 searched in your <tt>$PATH</tt>.</p></div>\r
1851 <div class="paragraph"><p>See <a href="#command_chaining">[command_chaining]</a> for details on the special meaning of <tt>;</tt> (semicolon)\r
1852 and <tt>,</tt> (comma): they chain commands together in i3, so you need to use quoted\r
1853 strings if they appear in your command.</p></div>\r
1854 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1855 <div class="listingblock">\r
1856 <div class="content">\r
1857 <pre><tt>exec [--no-startup-id] &lt;command&gt;</tt></pre>\r
1858 </div></div>\r
1859 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1860 <div class="listingblock">\r
1861 <div class="content">\r
1862 <pre><tt># Start the GIMP\r
1863 bindsym $mod+g exec gimp\r
1864 \r
1865 # Start the terminal emulator urxvt which is not yet startup-notification-aware\r
1866 bindsym $mod+Return exec --no-startup-id urxvt</tt></pre>\r
1867 </div></div>\r
1868 <div class="paragraph"><p>The <tt>--no-startup-id</tt> parameter disables startup-notification support for this\r
1869 particular exec command. With startup-notification, i3 can make sure that a\r
1870 window appears on the workspace on which you used the exec command. Also, it\r
1871 will change the X11 cursor to <tt>watch</tt> (a clock) while the application is\r
1872 launching. So, if an application is not startup-notification aware (most GTK\r
1873 and Qt using applications seem to be, though), you will end up with a watch\r
1874 cursor for 60 seconds.</p></div>\r
1875 </div>\r
1876 <div class="sect2">\r
1877 <h3 id="_splitting_containers">6.2. Splitting containers</h3>\r
1878 <div class="paragraph"><p>The split command makes the current window a split container. Split containers\r
1879 can contain multiple windows. Depending on the layout of the split container,\r
1880 new windows get placed to the right of the current one (splith) or new windows\r
1881 get placed below the current one (splitv).</p></div>\r
1882 <div class="paragraph"><p>If you apply this command to a split container with the same orientation,\r
1883 nothing will happen. If you use a different orientation, the split container’s\r
1884 orientation will be changed (if it does not have more than one window). Use\r
1885 <tt>layout toggle split</tt> to change the layout of any split container from splitv\r
1886 to splith or vice-versa.</p></div>\r
1887 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1888 <div class="listingblock">\r
1889 <div class="content">\r
1890 <pre><tt>split vertical|horizontal</tt></pre>\r
1891 </div></div>\r
1892 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
1893 <div class="listingblock">\r
1894 <div class="content">\r
1895 <pre><tt>bindsym $mod+v split vertical\r
1896 bindsym $mod+h split horizontal</tt></pre>\r
1897 </div></div>\r
1898 </div>\r
1899 <div class="sect2">\r
1900 <h3 id="_manipulating_layout">6.3. Manipulating layout</h3>\r
1901 <div class="paragraph"><p>Use <tt>layout toggle split</tt>, <tt>layout stacking</tt>, <tt>layout tabbed</tt>, <tt>layout splitv</tt>\r
1902 or <tt>layout splith</tt> to change the current container layout to splith/splitv,\r
1903 stacking, tabbed layout, splitv or splith, respectively.</p></div>\r
1904 <div class="paragraph"><p>To make the current window (!) fullscreen, use <tt>fullscreen enable</tt> (or\r
1905 <tt>fullscreen enable global</tt> for the global mode), to leave either fullscreen\r
1906 mode use <tt>fullscreen disable</tt>, and to toggle between these two states use\r
1907 <tt>fullscreen toggle</tt> (or <tt>fullscreen toggle global</tt>).</p></div>\r
1908 <div class="paragraph"><p>Likewise, to make the current window floating (or tiling again) use <tt>floating\r
1909 enable</tt> respectively <tt>floating disable</tt> (or <tt>floating toggle</tt>):</p></div>\r
1910 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
1911 <div class="listingblock">\r
1912 <div class="content">\r
1913 <pre><tt>layout default|tabbed|stacking|splitv|splith\r
1914 layout toggle [split|all]</tt></pre>\r
1915 </div></div>\r
1916 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
1917 <div class="listingblock">\r
1918 <div class="content">\r
1919 <pre><tt>bindsym $mod+s layout stacking\r
1920 bindsym $mod+l layout toggle split\r
1921 bindsym $mod+w layout tabbed\r
1922 \r
1923 # Toggle between stacking/tabbed/split:\r
1924 bindsym $mod+x layout toggle\r
1925 \r
1926 # Toggle between stacking/tabbed/splith/splitv:\r
1927 bindsym $mod+x layout toggle all\r
1928 \r
1929 # Toggle fullscreen\r
1930 bindsym $mod+f fullscreen toggle\r
1931 \r
1932 # Toggle floating/tiling\r
1933 bindsym $mod+t floating toggle</tt></pre>\r
1934 </div></div>\r
1935 </div>\r
1936 <div class="sect2">\r
1937 <h3 id="_focusing_moving_containers">6.4. Focusing containers</h3>\r
1938 <div class="paragraph"><p>To change focus, you can use the <tt>focus</tt> command. The following options are\r
1939 available:</p></div>\r
1940 <div class="dlist"><dl>\r
1941 <dt class="hdlist1">\r
1942 left|right|up|down\r
1943 </dt>\r
1944 <dd>\r
1945 <p>\r
1946         Sets focus to the nearest container in the given direction.\r
1947 </p>\r
1948 </dd>\r
1949 <dt class="hdlist1">\r
1950 parent\r
1951 </dt>\r
1952 <dd>\r
1953 <p>\r
1954         Sets focus to the parent container of the current container.\r
1955 </p>\r
1956 </dd>\r
1957 <dt class="hdlist1">\r
1958 child\r
1959 </dt>\r
1960 <dd>\r
1961 <p>\r
1962         The opposite of <tt>focus parent</tt>, sets the focus to the last focused\r
1963         child container.\r
1964 </p>\r
1965 </dd>\r
1966 <dt class="hdlist1">\r
1967 floating\r
1968 </dt>\r
1969 <dd>\r
1970 <p>\r
1971         Sets focus to the last focused floating container.\r
1972 </p>\r
1973 </dd>\r
1974 <dt class="hdlist1">\r
1975 tiling\r
1976 </dt>\r
1977 <dd>\r
1978 <p>\r
1979         Sets focus to the last focused tiling container.\r
1980 </p>\r
1981 </dd>\r
1982 <dt class="hdlist1">\r
1983 mode_toggle\r
1984 </dt>\r
1985 <dd>\r
1986 <p>\r
1987         Toggles between floating/tiling containers.\r
1988 </p>\r
1989 </dd>\r
1990 <dt class="hdlist1">\r
1991 output\r
1992 </dt>\r
1993 <dd>\r
1994 <p>\r
1995         Followed by a direction or an output name, this will focus the\r
1996         corresponding output.\r
1997 </p>\r
1998 </dd>\r
1999 </dl></div>\r
2000 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2001 <div class="listingblock">\r
2002 <div class="content">\r
2003 <pre><tt>focus left|right|down|up\r
2004 focus parent|child|floating|tiling|mode_toggle\r
2005 focus output left|right|up|down|&lt;output&gt;</tt></pre>\r
2006 </div></div>\r
2007 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2008 <div class="listingblock">\r
2009 <div class="content">\r
2010 <pre><tt># Focus container on the left, bottom, top, right\r
2011 bindsym $mod+j focus left\r
2012 bindsym $mod+k focus down\r
2013 bindsym $mod+l focus up\r
2014 bindsym $mod+semicolon focus right\r
2015 \r
2016 # Focus parent container\r
2017 bindsym $mod+u focus parent\r
2018 \r
2019 # Focus last floating/tiling container\r
2020 bindsym $mod+g focus mode_toggle\r
2021 \r
2022 # Focus the output right to the current one\r
2023 bindsym $mod+x focus output right\r
2024 \r
2025 # Focus the big output\r
2026 bindsym $mod+x focus output HDMI-2</tt></pre>\r
2027 </div></div>\r
2028 </div>\r
2029 <div class="sect2">\r
2030 <h3 id="_moving_containers">6.5. Moving containers</h3>\r
2031 <div class="paragraph"><p>Use the <tt>move</tt> command to move a container.</p></div>\r
2032 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2033 <div class="listingblock">\r
2034 <div class="content">\r
2035 <pre><tt># Moves the container into the given direction.\r
2036 # The optional pixel argument specifies how far the\r
2037 # container should be moved if it is floating and\r
2038 # defaults to 10 pixels.\r
2039 move &lt;left|right|down|up&gt; [&lt;px&gt; px]\r
2040 \r
2041 # Moves the container either to a specific location\r
2042 # or to the center of the screen. If 'absolute' is\r
2043 # used, it is moved to the center of all outputs.\r
2044 move [absolute] position [[&lt;px&gt; px] [&lt;px&gt; px]|center]\r
2045 \r
2046 # Moves the container to the current position of the\r
2047 # mouse cursor. Only affects floating containers.\r
2048 move position mouse</tt></pre>\r
2049 </div></div>\r
2050 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2051 <div class="listingblock">\r
2052 <div class="content">\r
2053 <pre><tt># Move container to the left, bottom, top, right\r
2054 bindsym $mod+j move left\r
2055 bindsym $mod+k move down\r
2056 bindsym $mod+l move up\r
2057 bindsym $mod+semicolon move right\r
2058 \r
2059 # Move container, but make floating containers\r
2060 # move more than the default\r
2061 bindsym $mod+j move left 20 px\r
2062 \r
2063 # Move floating container to the center of all outputs\r
2064 bindsym $mod+c move absolute position center\r
2065 \r
2066 # Move container to the current position of the cursor\r
2067 bindsym $mod+m move position mouse</tt></pre>\r
2068 </div></div>\r
2069 </div>\r
2070 <div class="sect2">\r
2071 <h3 id="_sticky_floating_windows">6.6. Sticky floating windows</h3>\r
2072 <div class="paragraph"><p>If you want a window to stick to the glass, i.e., have it stay on screen even\r
2073 if you switch to another workspace, you can use the <tt>sticky</tt> command. For\r
2074 example, this can be useful for notepads, a media player or a video chat\r
2075 window.</p></div>\r
2076 <div class="paragraph"><p>Note that while any window can be made sticky through this command, it will\r
2077 only take effect if the window is floating.</p></div>\r
2078 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2079 <div class="listingblock">\r
2080 <div class="content">\r
2081 <pre><tt>sticky enable|disable|toggle</tt></pre>\r
2082 </div></div>\r
2083 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2084 <div class="listingblock">\r
2085 <div class="content">\r
2086 <pre><tt># make a terminal sticky that was started as a notepad\r
2087 for_window [instance=notepad] sticky enable</tt></pre>\r
2088 </div></div>\r
2089 </div>\r
2090 <div class="sect2">\r
2091 <h3 id="_changing_named_workspaces_moving_to_workspaces">6.7. Changing (named) workspaces/moving to workspaces</h3>\r
2092 <div class="paragraph"><p>To change to a specific workspace, use the <tt>workspace</tt> command, followed by the\r
2093 number or name of the workspace. To move containers to specific workspaces, use\r
2094 <tt>move container to workspace</tt>.</p></div>\r
2095 <div class="paragraph"><p>You can also switch to the next and previous workspace with the commands\r
2096 <tt>workspace next</tt> and <tt>workspace prev</tt>, which is handy, for example, if you have\r
2097 workspace 1, 3, 4 and 9 and you want to cycle through them with a single key\r
2098 combination. To restrict those to the current output, use <tt>workspace\r
2099 next_on_output</tt> and <tt>workspace prev_on_output</tt>. Similarly, you can use <tt>move\r
2100 container to workspace next</tt>, <tt>move container to workspace prev</tt> to move a\r
2101 container to the next/previous workspace and <tt>move container to workspace current</tt>\r
2102 (the last one makes sense only when used with criteria).</p></div>\r
2103 <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
2104 RandR output.</p></div>\r
2105 <div class="paragraph"><p>Workspace names are parsed as\r
2106 <a href="https://developer.gnome.org/pango/stable/PangoMarkupFormat.html">Pango markup</a>\r
2107 by i3bar.</p></div>\r
2108 <div class="paragraph" id="back_and_forth"><p>To switch back to the previously focused workspace, use <tt>workspace\r
2109 back_and_forth</tt>; likewise, you can move containers to the previously focused\r
2110 workspace using <tt>move container to workspace back_and_forth</tt>.</p></div>\r
2111 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2112 <div class="listingblock">\r
2113 <div class="content">\r
2114 <pre><tt>workspace next|prev|next_on_output|prev_on_output\r
2115 workspace back_and_forth\r
2116 workspace &lt;name&gt;\r
2117 workspace number &lt;name&gt;\r
2118 \r
2119 move [window|container] [to] workspace &lt;name&gt;\r
2120 move [window|container] [to] workspace number &lt;name&gt;\r
2121 move [window|container] [to] workspace prev|next|current</tt></pre>\r
2122 </div></div>\r
2123 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2124 <div class="listingblock">\r
2125 <div class="content">\r
2126 <pre><tt>bindsym $mod+1 workspace 1\r
2127 bindsym $mod+2 workspace 2\r
2128 bindsym $mod+3 workspace 3:&lt;span foreground="red"&gt;vim&lt;/span&gt;\r
2129 ...\r
2130 \r
2131 bindsym $mod+Shift+1 move container to workspace 1\r
2132 bindsym $mod+Shift+2 move container to workspace 2\r
2133 ...\r
2134 \r
2135 # switch between the current and the previously focused one\r
2136 bindsym $mod+b workspace back_and_forth\r
2137 bindsym $mod+Shift+b move container to workspace back_and_forth\r
2138 \r
2139 # move the whole workspace to the next output\r
2140 bindsym $mod+x move workspace to output right\r
2141 \r
2142 # move firefox to current workspace\r
2143 bindsym $mod+F1 [class="Firefox"] move workspace current</tt></pre>\r
2144 </div></div>\r
2145 <div class="sect3">\r
2146 <h4 id="_named_workspaces">6.7.1. Named workspaces</h4>\r
2147 <div class="paragraph"><p>Workspaces are identified by their name. So, instead of using numbers in the\r
2148 workspace command, you can use an arbitrary name:</p></div>\r
2149 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
2150 <div class="listingblock">\r
2151 <div class="content">\r
2152 <pre><tt>bindsym $mod+1 workspace mail\r
2153 ...</tt></pre>\r
2154 </div></div>\r
2155 <div class="paragraph"><p>If you want the workspace to have a number <strong>and</strong> a name, just prefix the\r
2156 number, like this:</p></div>\r
2157 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
2158 <div class="listingblock">\r
2159 <div class="content">\r
2160 <pre><tt>bindsym $mod+1 workspace 1: mail\r
2161 bindsym $mod+2 workspace 2: www\r
2162 ...</tt></pre>\r
2163 </div></div>\r
2164 <div class="paragraph"><p>Note that the workspace will really be named "1: mail". i3 treats workspace\r
2165 names beginning with a number in a slightly special way. Normally, named\r
2166 workspaces are ordered the way they appeared. When they start with a number, i3\r
2167 will order them numerically. Also, you will be able to use <tt>workspace number 1</tt>\r
2168 to switch to the workspace which begins with number 1, regardless of which name\r
2169 it has. This is useful in case you are changing the workspace’s name\r
2170 dynamically. To combine both commands you can use <tt>workspace number 1: mail</tt> to\r
2171 specify a default name if there&#8217;s currently no workspace starting with a "1".</p></div>\r
2172 </div>\r
2173 <div class="sect3">\r
2174 <h4 id="_renaming_workspaces">6.7.2. Renaming workspaces</h4>\r
2175 <div class="paragraph"><p>You can rename workspaces. This might be useful to start with the default\r
2176 numbered workspaces, do your work, and rename the workspaces afterwards to\r
2177 reflect what’s actually on them. You can also omit the old name to rename\r
2178 the currently focused workspace. This is handy if you want to use the\r
2179 rename command with <tt>i3-input</tt>.</p></div>\r
2180 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2181 <div class="listingblock">\r
2182 <div class="content">\r
2183 <pre><tt>rename workspace &lt;old_name&gt; to &lt;new_name&gt;\r
2184 rename workspace to &lt;new_name&gt;</tt></pre>\r
2185 </div></div>\r
2186 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2187 <div class="listingblock">\r
2188 <div class="content">\r
2189 <pre><tt>i3-msg 'rename workspace 5 to 6'\r
2190 i3-msg 'rename workspace 1 to "1: www"'\r
2191 i3-msg 'rename workspace "1: www" to "10: www"'\r
2192 i3-msg 'rename workspace to "2: mail"'\r
2193 bindsym $mod+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: '</tt></pre>\r
2194 </div></div>\r
2195 </div>\r
2196 </div>\r
2197 <div class="sect2">\r
2198 <h3 id="_moving_workspaces_to_a_different_screen">6.8. Moving workspaces to a different screen</h3>\r
2199 <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
2200 RandR output.</p></div>\r
2201 </div>\r
2202 <div class="sect2">\r
2203 <h3 id="_moving_containers_workspaces_to_randr_outputs">6.9. Moving containers/workspaces to RandR outputs</h3>\r
2204 <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
2205 <tt>VGA1</tt>) or to a RandR output identified by a specific direction (like <tt>left</tt>,\r
2206 <tt>right</tt>, <tt>up</tt> or <tt>down</tt>), there are two commands:</p></div>\r
2207 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2208 <div class="listingblock">\r
2209 <div class="content">\r
2210 <pre><tt>move container to output left|right|down|up|&lt;output&gt;\r
2211 move workspace to output left|right|down|up|&lt;output&gt;</tt></pre>\r
2212 </div></div>\r
2213 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2214 <div class="listingblock">\r
2215 <div class="content">\r
2216 <pre><tt># Move the current workspace to the next output\r
2217 # (effectively toggles when you only have two outputs)\r
2218 bindsym $mod+x move workspace to output right\r
2219 \r
2220 # Put this window on the presentation output.\r
2221 bindsym $mod+x move container to output VGA1</tt></pre>\r
2222 </div></div>\r
2223 </div>\r
2224 <div class="sect2">\r
2225 <h3 id="_moving_containers_workspaces_to_marks">6.10. Moving containers/workspaces to marks</h3>\r
2226 <div class="paragraph"><p>To move a container to another container with a specific mark (see <a href="#vim_like_marks">[vim_like_marks]</a>),\r
2227 you can use the following command.</p></div>\r
2228 <div class="paragraph"><p>The window will be moved right after the marked container in the tree, i.e., it ends up\r
2229 in the same position as if you had opened a new window when the marked container was\r
2230 focused. If the mark is on a split container, the window will appear as a new child\r
2231 after the currently focused child within that container.</p></div>\r
2232 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2233 <div class="listingblock">\r
2234 <div class="content">\r
2235 <pre><tt>move window|container to mark &lt;mark&gt;</tt></pre>\r
2236 </div></div>\r
2237 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
2238 <div class="listingblock">\r
2239 <div class="content">\r
2240 <pre><tt>for_window [instance="tabme"] move window to mark target</tt></pre>\r
2241 </div></div>\r
2242 </div>\r
2243 <div class="sect2">\r
2244 <h3 id="resizingconfig">6.11. Resizing containers/windows</h3>\r
2245 <div class="paragraph"><p>If you want to resize containers/windows using your keyboard, you can use the\r
2246 <tt>resize</tt> command:</p></div>\r
2247 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2248 <div class="listingblock">\r
2249 <div class="content">\r
2250 <pre><tt>resize grow|shrink &lt;direction&gt; [&lt;px&gt; px [or &lt;ppt&gt; ppt]]\r
2251 resize set &lt;width&gt; [px] &lt;height&gt; [px]</tt></pre>\r
2252 </div></div>\r
2253 <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
2254 less specific and use <tt>width</tt> or <tt>height</tt>, in which case i3 will take/give\r
2255 space from all the other containers. The optional pixel argument specifies by\r
2256 how many pixels a <strong>floating container</strong> should be grown or shrunk (the default\r
2257 is 10 pixels). The ppt argument means percentage points and specifies by how\r
2258 many percentage points a <strong>tiling container</strong> should be grown or shrunk (the\r
2259 default is 10 percentage points). Note that <tt>resize set</tt> will only work for\r
2260 floating containers.</p></div>\r
2261 <div class="paragraph"><p>I recommend using the resize command inside a so called <tt>mode</tt>:</p></div>\r
2262 <div class="listingblock">\r
2263 <div class="title">Example: Configuration file, defining a mode for resizing</div>\r
2264 <div class="content">\r
2265 <pre><tt>mode "resize" {\r
2266         # These bindings trigger as soon as you enter the resize mode\r
2267 \r
2268         # Pressing left will shrink the window’s width.\r
2269         # Pressing right will grow the window’s width.\r
2270         # Pressing up will shrink the window’s height.\r
2271         # Pressing down will grow the window’s height.\r
2272         bindsym j           resize shrink width 10 px or 10 ppt\r
2273         bindsym k           resize grow height 10 px or 10 ppt\r
2274         bindsym l           resize shrink height 10 px or 10 ppt\r
2275         bindsym semicolon   resize grow width 10 px or 10 ppt\r
2276 \r
2277         # same bindings, but for the arrow keys\r
2278         bindsym Left        resize shrink width 10 px or 10 ppt\r
2279         bindsym Down        resize grow height 10 px or 10 ppt\r
2280         bindsym Up          resize shrink height 10 px or 10 ppt\r
2281         bindsym Right       resize grow width 10 px or 10 ppt\r
2282 \r
2283         # back to normal: Enter or Escape\r
2284         bindsym Return mode "default"\r
2285         bindsym Escape mode "default"\r
2286 }\r
2287 \r
2288 # Enter resize mode\r
2289 bindsym $mod+r mode "resize"</tt></pre>\r
2290 </div></div>\r
2291 <div class="paragraph"><p><strong>Example 2 - setting urxvt size to 640x480:</strong></p></div>\r
2292 <div class="listingblock">\r
2293 <div class="content">\r
2294 <pre><tt>for_window [class="urxvt"] resize set 640 480</tt></pre>\r
2295 </div></div>\r
2296 </div>\r
2297 <div class="sect2">\r
2298 <h3 id="_jumping_to_specific_windows">6.12. Jumping to specific windows</h3>\r
2299 <div class="paragraph"><p>Often when in a multi-monitor environment, you want to quickly jump to a\r
2300 specific window. For example, while working on workspace 3 you may want to\r
2301 jump to your mail client to email your boss that you’ve achieved some\r
2302 important goal. Instead of figuring out how to navigate to your mail client,\r
2303 it would be more convenient to have a shortcut. You can use the <tt>focus</tt> command\r
2304 with criteria for that.</p></div>\r
2305 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2306 <div class="listingblock">\r
2307 <div class="content">\r
2308 <pre><tt>[class="class"] focus\r
2309 [title="title"] focus</tt></pre>\r
2310 </div></div>\r
2311 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2312 <div class="listingblock">\r
2313 <div class="content">\r
2314 <pre><tt># Get me to the next open VIM instance\r
2315 bindsym $mod+a [class="urxvt" title="VIM"] focus</tt></pre>\r
2316 </div></div>\r
2317 </div>\r
2318 <div class="sect2">\r
2319 <h3 id="_vim_like_marks_mark_goto">6.13. VIM-like marks (mark/goto)</h3>\r
2320 <div class="paragraph" id="vim_like_marks"><p>This feature is like the jump feature: It allows you to directly jump to a\r
2321 specific window (this means switching to the appropriate workspace and setting\r
2322 focus to the windows). However, you can directly mark a specific window with\r
2323 an arbitrary label and use it afterwards. You can unmark the label in the same\r
2324 way, using the unmark command. If you don&#8217;t specify a label, unmark removes all\r
2325 marks. You do not need to ensure that your windows have unique classes or\r
2326 titles, and you do not need to change your configuration file.</p></div>\r
2327 <div class="paragraph"><p>As the command needs to include the label with which you want to mark the\r
2328 window, you cannot simply bind it to a key.  <tt>i3-input</tt> is a tool created\r
2329 for this purpose: It lets you input a command and sends the command to i3. It\r
2330 can also prefix this command and display a custom prompt for the input dialog.</p></div>\r
2331 <div class="paragraph"><p>The additional <tt>--toggle</tt> option will remove the mark if the window already has\r
2332 this mark, add it if the window has none or replace the current mark if it has\r
2333 another mark.</p></div>\r
2334 <div class="paragraph"><p>Refer to <tt>show_marks</tt> if you don&#8217;t want marks to be shown in the window decoration.</p></div>\r
2335 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2336 <div class="listingblock">\r
2337 <div class="content">\r
2338 <pre><tt>mark [--toggle] &lt;identifier&gt;\r
2339 [con_mark="identifier"] focus\r
2340 unmark &lt;identifier&gt;</tt></pre>\r
2341 </div></div>\r
2342 <div class="paragraph"><p><strong>Example (in a terminal)</strong>:</p></div>\r
2343 <div class="listingblock">\r
2344 <div class="content">\r
2345 <pre><tt>$ i3-msg mark irssi\r
2346 $ i3-msg '[con_mark="irssi"] focus'\r
2347 $ i3-msg unmark irssi</tt></pre>\r
2348 </div></div>\r
2349 </div>\r
2350 <div class="sect2">\r
2351 <h3 id="_window_title_format">6.14. Window title format</h3>\r
2352 <div class="paragraph"><p>By default, i3 will simply print the X11 window title. Using <tt>title_format</tt>,\r
2353 this can be customized by setting the format to the desired output. This\r
2354 directive supports\r
2355 <a href="https://developer.gnome.org/pango/stable/PangoMarkupFormat.html">Pango markup</a>\r
2356 and the following placeholders which will be replaced:</p></div>\r
2357 <div class="dlist"><dl>\r
2358 <dt class="hdlist1">\r
2359 <tt>%title</tt>\r
2360 </dt>\r
2361 <dd>\r
2362 <p>\r
2363     The X11 window title (_NET_WM_NAME or WM_NAME as fallback).\r
2364 <tt>%class</tt>:\r
2365     The X11 window class (second part of WM_CLASS). This corresponds to the\r
2366     <tt>class</tt> criterion, see <a href="#command_criteria">[command_criteria]</a>.\r
2367 <tt>%instance</tt>:\r
2368     The X11 window instance (first part of WM_CLASS). This corresponds to the\r
2369     <tt>instance</tt> criterion, see <a href="#command_criteria">[command_criteria]</a>.\r
2370 </p>\r
2371 </dd>\r
2372 </dl></div>\r
2373 <div class="paragraph"><p>Using the <a href="#for_window">[for_window]</a> directive, you can set the title format for any window\r
2374 based on <a href="#command_criteria">[command_criteria]</a>.</p></div>\r
2375 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2376 <div class="listingblock">\r
2377 <div class="content">\r
2378 <pre><tt>title_format &lt;format&gt;</tt></pre>\r
2379 </div></div>\r
2380 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2381 <div class="listingblock">\r
2382 <div class="content">\r
2383 <pre><tt># give the focused window a prefix\r
2384 bindsym $mod+p title_format "Important | %title"\r
2385 \r
2386 # print all window titles bold\r
2387 for_window [class=".*"] title_format "&lt;b&gt;%title&lt;/b&gt;"\r
2388 \r
2389 # print window titles of firefox windows red\r
2390 for_window [class="(?i)firefox"] title_format "&lt;span foreground='red'&gt;%title&lt;/span&gt;"</tt></pre>\r
2391 </div></div>\r
2392 </div>\r
2393 <div class="sect2">\r
2394 <h3 id="_changing_border_style">6.15. Changing border style</h3>\r
2395 <div class="paragraph"><p>To change the border of the current client, you can use <tt>border normal</tt> to use the normal\r
2396 border (including window title), <tt>border pixel 1</tt> to use a 1-pixel border (no window title)\r
2397 and <tt>border none</tt> to make the client borderless.</p></div>\r
2398 <div class="paragraph"><p>There is also <tt>border toggle</tt> which will toggle the different border styles.</p></div>\r
2399 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2400 <div class="listingblock">\r
2401 <div class="content">\r
2402 <pre><tt>border normal|pixel [&lt;n&gt;]\r
2403 border none|toggle\r
2404 \r
2405 # legacy syntax, equivalent to "border pixel 1"\r
2406 border 1pixel</tt></pre>\r
2407 </div></div>\r
2408 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2409 <div class="listingblock">\r
2410 <div class="content">\r
2411 <pre><tt># use window title, but no border\r
2412 bindsym $mod+t border normal 0\r
2413 # use no window title and a thick border\r
2414 bindsym $mod+y border pixel 3\r
2415 # use neither window title nor border\r
2416 bindsym $mod+u border none</tt></pre>\r
2417 </div></div>\r
2418 </div>\r
2419 <div class="sect2">\r
2420 <h3 id="shmlog">6.16. Enabling shared memory logging</h3>\r
2421 <div class="paragraph"><p>As described in <a href="http://i3wm.org/docs/debugging.html">http://i3wm.org/docs/debugging.html</a>, i3 can log to a shared\r
2422 memory buffer, which you can dump using <tt>i3-dump-log</tt>. The <tt>shmlog</tt> command\r
2423 allows you to enable or disable the shared memory logging at runtime.</p></div>\r
2424 <div class="paragraph"><p>Note that when using <tt>shmlog &lt;size_in_bytes&gt;</tt>, the current log will be\r
2425 discarded and a new one will be started.</p></div>\r
2426 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2427 <div class="listingblock">\r
2428 <div class="content">\r
2429 <pre><tt>shmlog &lt;size_in_bytes&gt;\r
2430 shmlog on|off|toggle</tt></pre>\r
2431 </div></div>\r
2432 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2433 <div class="listingblock">\r
2434 <div class="content">\r
2435 <pre><tt># Enable/disable logging\r
2436 bindsym $mod+x shmlog toggle\r
2437 \r
2438 # or, from a terminal:\r
2439 # increase the shared memory log buffer to 50 MiB\r
2440 i3-msg shmlog $((50*1024*1024))</tt></pre>\r
2441 </div></div>\r
2442 </div>\r
2443 <div class="sect2">\r
2444 <h3 id="_enabling_debug_logging">6.17. Enabling debug logging</h3>\r
2445 <div class="paragraph"><p>The <tt>debuglog</tt> command allows you to enable or disable debug logging at\r
2446 runtime. Debug logging is much more verbose than non-debug logging. This\r
2447 command does not activate shared memory logging (shmlog), and as such is most\r
2448 likely useful in combination with the above-described <a href="#shmlog">[shmlog]</a> command.</p></div>\r
2449 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2450 <div class="listingblock">\r
2451 <div class="content">\r
2452 <pre><tt>debuglog on|off|toggle</tt></pre>\r
2453 </div></div>\r
2454 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2455 <div class="listingblock">\r
2456 <div class="content">\r
2457 <pre><tt># Enable/disable logging\r
2458 bindsym $mod+x debuglog toggle</tt></pre>\r
2459 </div></div>\r
2460 </div>\r
2461 <div class="sect2">\r
2462 <h3 id="_reloading_restarting_exiting">6.18. Reloading/Restarting/Exiting</h3>\r
2463 <div class="paragraph"><p>You can make i3 reload its configuration file with <tt>reload</tt>. You can also\r
2464 restart i3 inplace with the <tt>restart</tt> command to get it out of some weird state\r
2465 (if that should ever happen) or to perform an upgrade without having to restart\r
2466 your X session. To exit i3 properly, you can use the <tt>exit</tt> command,\r
2467 however you don’t need to (simply killing your X session is fine as well).</p></div>\r
2468 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2469 <div class="listingblock">\r
2470 <div class="content">\r
2471 <pre><tt>bindsym $mod+Shift+r restart\r
2472 bindsym $mod+Shift+w reload\r
2473 bindsym $mod+Shift+e exit</tt></pre>\r
2474 </div></div>\r
2475 </div>\r
2476 <div class="sect2">\r
2477 <h3 id="_scratchpad">6.19. Scratchpad</h3>\r
2478 <div class="paragraph"><p>There are two commands to use any existing window as scratchpad window. <tt>move\r
2479 scratchpad</tt> will move a window to the scratchpad workspace. This will make it\r
2480 invisible until you show it again. There is no way to open that workspace.\r
2481 Instead, when using <tt>scratchpad show</tt>, the window will be shown again, as a\r
2482 floating window, centered on your current workspace (using <tt>scratchpad show</tt> on\r
2483 a visible scratchpad window will make it hidden again, so you can have a\r
2484 keybinding to toggle). Note that this is just a normal floating window, so if\r
2485 you want to "remove it from scratchpad", you can simple make it tiling again\r
2486 (<tt>floating toggle</tt>).</p></div>\r
2487 <div class="paragraph"><p>As the name indicates, this is useful for having a window with your favorite\r
2488 editor always at hand. However, you can also use this for other permanently\r
2489 running applications which you don’t want to see all the time: Your music\r
2490 player, alsamixer, maybe even your mail client…?</p></div>\r
2491 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2492 <div class="listingblock">\r
2493 <div class="content">\r
2494 <pre><tt>move scratchpad\r
2495 \r
2496 scratchpad show</tt></pre>\r
2497 </div></div>\r
2498 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2499 <div class="listingblock">\r
2500 <div class="content">\r
2501 <pre><tt># Make the currently focused window a scratchpad\r
2502 bindsym $mod+Shift+minus move scratchpad\r
2503 \r
2504 # Show the first scratchpad window\r
2505 bindsym $mod+minus scratchpad show\r
2506 \r
2507 # Show the sup-mail scratchpad window, if any.\r
2508 bindsym mod4+s [title="^Sup ::"] scratchpad show</tt></pre>\r
2509 </div></div>\r
2510 </div>\r
2511 <div class="sect2">\r
2512 <h3 id="_nop">6.20. Nop</h3>\r
2513 <div class="paragraph"><p>There is a no operation command <tt>nop</tt> which allows you to override default\r
2514 behavior. This can be useful for, e.g., disabling a focus change on clicks with\r
2515 the middle mouse button.</p></div>\r
2516 <div class="paragraph"><p>The optional <tt>comment</tt> argument is ignored, but will be printed to the log file\r
2517 for debugging purposes.</p></div>\r
2518 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2519 <div class="listingblock">\r
2520 <div class="content">\r
2521 <pre><tt>nop [&lt;comment&gt;]</tt></pre>\r
2522 </div></div>\r
2523 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
2524 <div class="listingblock">\r
2525 <div class="content">\r
2526 <pre><tt># Disable focus change for clicks on titlebars\r
2527 # with the middle mouse button\r
2528 bindsym button2 nop</tt></pre>\r
2529 </div></div>\r
2530 </div>\r
2531 <div class="sect2">\r
2532 <h3 id="_i3bar_control">6.21. i3bar control</h3>\r
2533 <div class="paragraph"><p>There are two options in the configuration of each i3bar instance that can be\r
2534 changed during runtime by invoking a command through i3. The commands <tt>bar\r
2535 hidden_state</tt> and <tt>bar mode</tt> allow setting the current hidden_state\r
2536 respectively mode option of each bar. It is also possible to toggle between\r
2537 hide state and show state as well as between dock mode and hide mode. Each\r
2538 i3bar instance can be controlled individually by specifying a bar_id, if none\r
2539 is given, the command is executed for all bar instances.</p></div>\r
2540 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
2541 <div class="listingblock">\r
2542 <div class="content">\r
2543 <pre><tt>bar hidden_state hide|show|toggle [&lt;bar_id&gt;]\r
2544 \r
2545 bar mode dock|hide|invisible|toggle [&lt;bar_id&gt;]</tt></pre>\r
2546 </div></div>\r
2547 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
2548 <div class="listingblock">\r
2549 <div class="content">\r
2550 <pre><tt># Toggle between hide state and show state\r
2551 bindsym $mod+m bar hidden_state toggle\r
2552 \r
2553 # Toggle between dock mode and hide mode\r
2554 bindsym $mod+n bar mode toggle\r
2555 \r
2556 # Set the bar instance with id 'bar-1' to switch to hide mode\r
2557 bindsym $mod+b bar mode hide bar-1\r
2558 \r
2559 # Set the bar instance with id 'bar-1' to always stay hidden\r
2560 bindsym $mod+Shift+b bar mode invisible bar-1</tt></pre>\r
2561 </div></div>\r
2562 </div>\r
2563 </div>\r
2564 </div>\r
2565 <div class="sect1">\r
2566 <h2 id="multi_monitor">7. Multiple monitors</h2>\r
2567 <div class="sectionbody">\r
2568 <div class="paragraph"><p>As you can see in the goal list on the website, i3 was specifically developed\r
2569 with support for multiple monitors in mind. This section will explain how to\r
2570 handle multiple monitors.</p></div>\r
2571 <div class="paragraph"><p>When you have only one monitor, things are simple. You usually start with\r
2572 workspace 1 on your monitor and open new ones as you need them.</p></div>\r
2573 <div class="paragraph"><p>When you have more than one monitor, each monitor will get an initial\r
2574 workspace.  The first monitor gets 1, the second gets 2 and a possible third\r
2575 would get 3. When you switch to a workspace on a different monitor, i3 will\r
2576 switch to that monitor and then switch to the workspace. This way, you don’t\r
2577 need shortcuts to switch to a specific monitor, and you don’t need to remember\r
2578 where you put which workspace. New workspaces will be opened on the currently\r
2579 active monitor.  It is not possible to have a monitor without a workspace.</p></div>\r
2580 <div class="paragraph"><p>The idea of making workspaces global is based on the observation that most\r
2581 users have a very limited set of workspaces on their additional monitors.\r
2582 They are often used for a specific task (browser, shell) or for monitoring\r
2583 several things (mail, IRC, syslog, …). Thus, using one workspace on one monitor\r
2584 and "the rest" on the other monitors often makes sense. However, as you can\r
2585 create an unlimited number of workspaces in i3 and tie them to specific\r
2586 screens, you can have the "traditional" approach of having X workspaces per\r
2587 screen by changing your configuration (using modes, for example).</p></div>\r
2588 <div class="sect2">\r
2589 <h3 id="_configuring_your_monitors">7.1. Configuring your monitors</h3>\r
2590 <div class="paragraph"><p>To help you get going if you have never used multiple monitors before, here is\r
2591 a short overview of the xrandr options which will probably be of interest to\r
2592 you. It is always useful to get an overview of the current screen configuration.\r
2593 Just run "xrandr" and you will get an output like the following:</p></div>\r
2594 <div class="listingblock">\r
2595 <div class="content">\r
2596 <pre><tt>$ xrandr\r
2597 Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192\r
2598 VGA1 disconnected (normal left inverted right x axis y axis)\r
2599 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm\r
2600    1280x800       60.0*+   50.0\r
2601    1024x768       85.0     75.0     70.1     60.0\r
2602    832x624        74.6\r
2603    800x600        85.1     72.2     75.0     60.3     56.2\r
2604    640x480        85.0     72.8     75.0     59.9\r
2605    720x400        85.0\r
2606    640x400        85.1\r
2607    640x350        85.1</tt></pre>\r
2608 </div></div>\r
2609 <div class="paragraph"><p>Several things are important here: You can see that <tt>LVDS1</tt> is connected (of\r
2610 course, it is the internal flat panel) but <tt>VGA1</tt> is not. If you have a monitor\r
2611 connected to one of the ports but xrandr still says "disconnected", you should\r
2612 check your cable, monitor or graphics driver.</p></div>\r
2613 <div class="paragraph"><p>The maximum resolution you can see at the end of the first line is the maximum\r
2614 combined resolution of your monitors. By default, it is usually too low and has\r
2615 to be increased by editing <tt>/etc/X11/xorg.conf</tt>.</p></div>\r
2616 <div class="paragraph"><p>So, say you connected VGA1 and want to use it as an additional screen:</p></div>\r
2617 <div class="listingblock">\r
2618 <div class="content">\r
2619 <pre><tt>xrandr --output VGA1 --auto --left-of LVDS1</tt></pre>\r
2620 </div></div>\r
2621 <div class="paragraph"><p>This command makes xrandr try to find the native resolution of the device\r
2622 connected to <tt>VGA1</tt> and configures it to the left of your internal flat panel.\r
2623 When running "xrandr" again, the output looks like this:</p></div>\r
2624 <div class="listingblock">\r
2625 <div class="content">\r
2626 <pre><tt>$ xrandr\r
2627 Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 8192 x 8192\r
2628 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm\r
2629    1280x1024      60.0*+   75.0\r
2630    1280x960       60.0\r
2631    1152x864       75.0\r
2632    1024x768       75.1     70.1     60.0\r
2633    832x624        74.6\r
2634    800x600        72.2     75.0     60.3     56.2\r
2635    640x480        72.8     75.0     66.7     60.0\r
2636    720x400        70.1\r
2637 LVDS1 connected 1280x800+1280+0 (normal left inverted right x axis y axis) 261mm x 163mm\r
2638    1280x800       60.0*+   50.0\r
2639    1024x768       85.0     75.0     70.1     60.0\r
2640    832x624        74.6\r
2641    800x600        85.1     72.2     75.0     60.3     56.2\r
2642    640x480        85.0     72.8     75.0     59.9\r
2643    720x400        85.0\r
2644    640x400        85.1\r
2645    640x350        85.1</tt></pre>\r
2646 </div></div>\r
2647 <div class="paragraph"><p>Please note that i3 uses exactly the same API as xrandr does, so it will see\r
2648 only what you can see in xrandr.</p></div>\r
2649 <div class="paragraph"><p>See also <a href="#presentations">[presentations]</a> for more examples of multi-monitor setups.</p></div>\r
2650 </div>\r
2651 <div class="sect2">\r
2652 <h3 id="_interesting_configuration_for_multi_monitor_environments">7.2. Interesting configuration for multi-monitor environments</h3>\r
2653 <div class="paragraph"><p>There are several things to configure in i3 which may be interesting if you\r
2654 have more than one monitor:</p></div>\r
2655 <div class="olist arabic"><ol class="arabic">\r
2656 <li>\r
2657 <p>\r
2658 You can specify which workspace should be put on which screen. This\r
2659    allows you to have a different set of workspaces when starting than just\r
2660    1 for the first monitor, 2 for the second and so on. See\r
2661    <a href="#workspace_screen">[workspace_screen]</a>.\r
2662 </p>\r
2663 </li>\r
2664 <li>\r
2665 <p>\r
2666 If you want some applications to generally open on the bigger screen\r
2667    (MPlayer, Firefox, …), you can assign them to a specific workspace, see\r
2668    <a href="#assign_workspace">[assign_workspace]</a>.\r
2669 </p>\r
2670 </li>\r
2671 <li>\r
2672 <p>\r
2673 If you have many workspaces on many monitors, it might get hard to keep\r
2674    track of which window you put where. Thus, you can use vim-like marks to\r
2675    quickly switch between windows. See <a href="#vim_like_marks">[vim_like_marks]</a>.\r
2676 </p>\r
2677 </li>\r
2678 <li>\r
2679 <p>\r
2680 For information on how to move existing workspaces between monitors,\r
2681    see <a href="#_moving_containers_workspaces_to_randr_outputs">[_moving_containers_workspaces_to_randr_outputs]</a>.\r
2682 </p>\r
2683 </li>\r
2684 </ol></div>\r
2685 </div>\r
2686 </div>\r
2687 </div>\r
2688 <div class="sect1">\r
2689 <h2 id="_i3_and_the_rest_of_your_software_world">8. i3 and the rest of your software world</h2>\r
2690 <div class="sectionbody">\r
2691 <div class="sect2">\r
2692 <h3 id="_displaying_a_status_line">8.1. Displaying a status line</h3>\r
2693 <div class="paragraph"><p>A very common thing amongst users of exotic window managers is a status line at\r
2694 some corner of the screen. It is an often superior replacement to the widget\r
2695 approach you have in the task bar of a traditional desktop environment.</p></div>\r
2696 <div class="paragraph"><p>If you don’t already have your favorite way of generating such a status line\r
2697 (self-written scripts, conky, …), then i3status is the recommended tool for\r
2698 this task. It was written in C with the goal of using as few syscalls as\r
2699 possible to reduce the time your CPU is woken up from sleep states. Because\r
2700 i3status only spits out text, you need to combine it with some other tool, like\r
2701 i3bar. See <a href="#status_command">[status_command]</a> for how to display i3status in i3bar.</p></div>\r
2702 <div class="paragraph"><p>Regardless of which application you use to display the status line, you\r
2703 want to make sure that it registers as a dock window using EWMH hints. i3 will\r
2704 position the window either at the top or at the bottom of the screen, depending\r
2705 on which hint the application sets. With i3bar, you can configure its position,\r
2706 see <a href="#i3bar_position">[i3bar_position]</a>.</p></div>\r
2707 </div>\r
2708 <div class="sect2">\r
2709 <h3 id="_giving_presentations_multi_monitor">8.2. Giving presentations (multi-monitor)</h3>\r
2710 <div class="paragraph"><p>When giving a presentation, you typically want the audience to see what you see\r
2711 on your screen and then go through a series of slides (if the presentation is\r
2712 simple). For more complex presentations, you might want to have some notes\r
2713 which only you can see on your screen, while the audience can only see the\r
2714 slides.</p></div>\r
2715 <div class="sect3">\r
2716 <h4 id="presentations">8.2.1. Case 1: everybody gets the same output</h4>\r
2717 <div class="paragraph"><p>This is the simple case. You connect your computer to the video projector,\r
2718 turn on both (computer and video projector) and configure your X server to\r
2719 clone the internal flat panel of your computer to the video output:</p></div>\r
2720 <div class="listingblock">\r
2721 <div class="content">\r
2722 <pre><tt>xrandr --output VGA1 --mode 1024x768 --same-as LVDS1</tt></pre>\r
2723 </div></div>\r
2724 <div class="paragraph"><p>i3 will then use the lowest common subset of screen resolutions, the rest of\r
2725 your screen will be left untouched (it will show the X background). So, in\r
2726 our example, this would be 1024x768 (my notebook has 1280x800).</p></div>\r
2727 </div>\r
2728 <div class="sect3">\r
2729 <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
2730 <div class="paragraph"><p>This case is a bit harder. First of all, you should configure the VGA output\r
2731 somewhere near your internal flat panel, say right of it:</p></div>\r
2732 <div class="listingblock">\r
2733 <div class="content">\r
2734 <pre><tt>xrandr --output VGA1 --mode 1024x768 --right-of LVDS1</tt></pre>\r
2735 </div></div>\r
2736 <div class="paragraph"><p>Now, i3 will put a new workspace (depending on your settings) on the new screen\r
2737 and you are in multi-monitor mode (see <a href="#multi_monitor">[multi_monitor]</a>).</p></div>\r
2738 <div class="paragraph"><p>Because i3 is not a compositing window manager, there is no ability to\r
2739 display a window on two screens at the same time. Instead, your presentation\r
2740 software needs to do this job (that is, open a window on each screen).</p></div>\r
2741 </div>\r
2742 </div>\r
2743 </div>\r
2744 </div>\r
2745 </div>\r
2746 <div id="footnotes"><hr /></div>\r
2747 <div id="footer" lang="de">\r
2748 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>\r
2749 </div>\r
2750 </body>\r
2751 </html>\r