X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=docs%2Fuserguide;h=2746f24e346c5decdf83b6118d7b673a05e7dbb1;hb=65eb54c0ba73dea6d01a2cb42c3c9b40df8c6820;hp=820f539521a53531f756e250459bce8f98886221;hpb=ee66a8bcde5adc0890b5a8d02705c48dfa1b7cb5;p=i3%2Fi3 diff --git a/docs/userguide b/docs/userguide index 820f5395..2746f24e 100644 --- a/docs/userguide +++ b/docs/userguide @@ -1,16 +1,16 @@ i3 User’s Guide =============== Michael Stapelberg -March 2013 This document contains all the information you need to configure and use the i3 -window manager. If it does not, please check http://faq.i3wm.org/ first, then -contact us on IRC (preferred) or post your question(s) on the mailing list. +window manager. If it does not, please check https://www.reddit.com/r/i3wm/ +first, then contact us on IRC (preferred) or post your question(s) on the +mailing list. == Default keybindings For the "too long; didn’t read" people, here is an overview of the default -keybindings (click to see the full size image): +keybindings (click to see the full-size image): *Keys to use with $mod (Alt):* @@ -23,18 +23,26 @@ image:keyboard-layer2.png["Keys to use with Shift+$mod",width=600,link="keyboard The red keys are the modifiers you need to press (by default), the blue keys are your homerow. +Note that when starting i3 without a config file, i3-config-wizard will offer +you to create a config file in which the key positions (!) match what you see +in the image above, regardless of the keyboard layout you are using. If you +prefer to use a config file where the key letters match what you are seeing +above, just decline i3-config-wizard’s offer and base your config on ++/etc/i3/config+. + == Using i3 Throughout this guide, the keyword +$mod+ will be used to refer to the -configured modifier. This is the Alt key (Mod1) by default, with the Windows -key (Mod4) being a popular alternative. +configured modifier. This is the Alt key (+Mod1+) by default, with the Windows +key (+Mod4+) being a popular alternative that largely prevents conflicts with +application-defined shortcuts. === Opening terminals and moving around One very basic operation is opening a new terminal. By default, the keybinding -for this is $mod+Enter, that is Alt+Enter in the default configuration. By -pressing $mod+Enter, a new terminal will be opened. It will fill the whole -space available on your screen. +for this is +$mod+Enter+, that is Alt+Enter (+Mod1+Enter+) in the default +configuration. By pressing +$mod+Enter+, a new terminal will be opened. It +will fill the whole space available on your screen. image:single_terminal.png[Single terminal] @@ -48,9 +56,9 @@ image:two_terminals.png[Two terminals] To move the focus between the two terminals, you can use the direction keys which you may know from the editor +vi+. However, in i3, your homerow is used for these keys (in +vi+, the keys are shifted to the left by one for -compatibility with most keyboard layouts). Therefore, +$mod+J+ is left, +$mod+K+ -is down, +$mod+L+ is up and `$mod+;` is right. So, to switch between the -terminals, use +$mod+K+ or +$mod+L+. Of course, you can also use the arrow keys. +compatibility with most keyboard layouts). Therefore, +$mod+j+ is left, +$mod+k+ +is down, +$mod+l+ is up and `$mod+;` is right. So, to switch between the +terminals, use +$mod+k+ or +$mod+l+. Of course, you can also use the arrow keys. At the moment, your workspace is split (it contains two terminals) in a specific direction (horizontal by default). Every window can be split @@ -107,7 +115,7 @@ create a keybinding for starting the application directly. See the section === Closing windows If an application does not provide a mechanism for closing (most applications -provide a menu, the escape key or a shortcut like +Control+W+ to close), you +provide a menu, the escape key or a shortcut like +Control+w+ to close), you can press +$mod+Shift+q+ to kill a window. For applications which support the WM_DELETE protocol, this will correctly close the application (saving any modifications or doing other cleanup). If the application doesn’t support @@ -142,8 +150,10 @@ it does not yet exist. The easiest way to resize a container is by using the mouse: Grab the border and move it to the wanted size. -See <> for how to configure i3 to be able to resize -columns/rows with your keyboard. +You can also use <> to define a mode for resizing via the +keyboard. To see an example for this, look at the +https://github.com/i3/i3/blob/next/etc/config.keycodes[default config] provided +by i3. === Restarting i3 inplace @@ -170,7 +180,8 @@ around. By grabbing the borders and moving them you can resize the window. You can also do that by using the <>. Another way to resize floating windows using the mouse is to right-click on the titlebar and drag. -For resizing floating windows with your keyboard, see <>. +For resizing floating windows with your keyboard, see the resizing binding mode +provided by the i3 https://github.com/i3/i3/blob/next/etc/config.keycodes[default config]. Floating windows are always on top of tiling windows. @@ -185,7 +196,7 @@ out to be complicated to use (snapping), understand and implement. === The tree consists of Containers -The building blocks of our tree are so called +Containers+. A +Container+ can +The building blocks of our tree are so-called +Containers+. A +Container+ can host a window (meaning an X11 window, one that you can actually see and use, like a browser). Alternatively, it could contain one or more +Containers+. A simple example is the workspace: When you start i3 with a single monitor, a @@ -195,9 +206,8 @@ like this: image::tree-layout2.png["layout2",float="right"] image::tree-shot4.png["shot4",title="Two terminals on standard workspace"] -=== Orientation and Split Containers - [[OrientationSplit]] +=== Orientation and Split Containers It is only natural to use so-called +Split Containers+ in order to build a layout when using a tree as data structure. In i3, every +Container+ has an @@ -256,8 +266,9 @@ workspace node’s orientation will be changed to +vertical+. The terminal windo you moved down is directly attached to the workspace and appears on the bottom of the screen. A new (horizontal) container was created to accommodate the other two terminal windows. You will notice this when switching to tabbed mode -(for example). You would end up having one tab called "another container" and -the other one being the terminal window you moved down. +(for example). You would end up having one tab with a representation of the split +container (e.g., "H[urxvt firefox]") and the other one being the terminal window +you moved down. [[configuring]] == Configuring i3 @@ -280,12 +291,21 @@ with a text editor. On first start (and on all following starts, unless you have a configuration file), i3 will offer you to create a configuration file. You can tell the -wizard to use either Alt (Mod1) or Windows (Mod4) as modifier in the config +wizard to use either Alt (+Mod1+) or Windows (+Mod4+) as modifier in the config file. Also, the created config file will use the key symbols of your current keyboard layout. To start the wizard, use the command +i3-config-wizard+. Please note that you must not have +~/.i3/config+, otherwise the wizard will exit. +Since i3 4.0, a new configuration format is used. i3 will try to automatically +detect the format version of a config file based on a few different keywords, +but if you want to make sure that your config is read with the new format, +include the following line in your config file: + +--------------------- +# i3 config file (v4) +--------------------- + === Comments It is possible and recommended to use comments in your configuration file to @@ -298,7 +318,6 @@ a # and can only be used at the beginning of a line: ------------------- [[fonts]] - === Fonts i3 has support for both X core fonts and FreeType fonts (through Pango) to @@ -319,7 +338,7 @@ and fall back to a working font. *Syntax*: ------------------------------ font -font pango:[family list] [style options] [size] +font pango: [