X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=docs%2Fuserguide.html;h=773cec0caade8c65e4bed70c992e104e67075536;hb=0c07521be2961837efd61a992d35cc8f6f44ccdc;hp=d98a8c5193b4ab58ad20ca589b26e32acd652220;hpb=d049fd68707996f65f358367c43fdde2b9d7e2b8;p=i3%2Fi3.github.io diff --git a/docs/userguide.html b/docs/userguide.html index d98a8c5..773cec0 100644 --- a/docs/userguide.html +++ b/docs/userguide.html @@ -4,7 +4,7 @@ - + i3: i3 User’s Guide @@ -32,9 +32,9 @@ document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes(); a

i3 User’s Guide

Michael Stapelberg
<michael@i3wm.org>
-
-
Table of Contents
- +
+
Table of Contents
+
@@ -312,9 +312,11 @@ vertically split terminals on the right, focus is on the bottom right one. When you open a new terminal, it will open below the current one.

So, how can you open a new terminal window to the right of the current one? The solution is to use focus parent, which will focus the Parent Container of -the current Container. In this case, you would focus the Vertical Split -Container which is inside the horizontally oriented workspace. Thus, now new -windows will be opened to the right of the Vertical Split Container:

+the current Container. In default configuration, use $mod+a to navigate one +Container up the tree (you can repeat this multiple times until you get to the +Workspace Container). In this case, you would focus the Vertical Split Container +which is inside the horizontally oriented workspace. Thus, now new windows will be +opened to the right of the Vertical Split Container:

shot3 @@ -651,7 +653,17 @@ start.

-

4.10. Default border style for new windows

+

4.10. Window title alignment

+

This option determines the window title’s text alignment. +Default is left

+

Syntax:

+
+
+
title_align left|center|right
+
+
+
+

4.11. Default border style for new windows

This option determines which border style new windows will have. The default is normal. Note that default_floating_border applies only to windows which are starting out as floating windows, e.g., dialog windows, but not windows that are floated later on.

@@ -683,7 +695,7 @@ default_border pixel 3
-

4.11. Hiding borders adjacent to the screen edges

+

4.12. Hiding borders adjacent to the screen edges

You can hide container borders adjacent to the screen edges using hide_edge_borders. This is useful if you are using scrollbars, or do not want to waste even two pixels in displayspace. The "smart" setting hides borders on @@ -701,7 +713,7 @@ multiple windows visible. Default is none.

-

4.12. Arbitrary commands for specific windows (for_window)

+

4.13. Arbitrary commands for specific windows (for_window)

With the for_window command, you can let i3 execute any command when it encounters a specific window. This can be used to set windows to floating or to change their border style, for example.

@@ -727,7 +739,7 @@ for_window [title="x200: ~/work"] floating enable

The valid criteria are the same as those for commands, see [command_criteria].

-

4.13. Don’t focus window upon opening

+

4.14. Don’t focus window upon opening

When a new window appears, it will be focused. The no_focus directive allows preventing this from happening and must be used in combination with [command_criteria].

Note that this does not apply to all cases, e.g., when feeding data into a running application @@ -748,7 +760,7 @@ combination with workspace_layout.

-

4.14. Variables

+

4.15. Variables

As you learned in the section about keyboard bindings, you will have to configure lots of bindings containing modifier keys. If you want to save yourself some typing and be able to change the modifier you use later, @@ -774,14 +786,15 @@ it before starting i3 (for example in your ~/.xsession file).

loaded from the X resource database.

-

4.15. X resources

+

4.16. X resources

[variables] can also be created using a value configured in the X resource database. This is useful, for example, to avoid configuring color values within the i3 configuration. Instead, the values can be configured, once, in the X resource database to achieve an easily maintainable, consistent color theme across many X applications.

Defining a resource will load this resource from the resource database and -assign its value to the specified variable. A fallback must be specified in +assign its value to the specified variable. This is done verbatim and the value +must therefore be in the format that i3 uses. A fallback must be specified in case the resource cannot be loaded from the database.

Syntax:

@@ -801,17 +814,25 @@ set_from_resource $black i3wm.color0 #000000
-

4.16. Automatically putting clients on specific workspaces

+

4.17. Automatically putting clients on specific workspaces

To automatically make a specific window show up on a specific workspace, you can use an assignment. You can match windows by using any criteria, -see [command_criteria]. It is recommended that you match on window classes -(and instances, when appropriate) instead of window titles whenever possible -because some applications first create their window, and then worry about -setting the correct title. Firefox with Vimperator comes to mind. The window -starts up being named Firefox, and only when Vimperator is loaded does the -title change. As i3 will get the title as soon as the application maps the -window (mapping means actually displaying it on the screen), you’d need to have -to match on Firefox in this case.

+see [command_criteria]. The difference between assign and +for_window <criteria> move to workspace is that the former will only be +executed when the application maps the window (mapping means actually displaying +it on the screen) but the latter will be executed whenever a window changes its +properties to something that matches the specified criteria.

+

Thus, it is recommended that you match on window classes (and instances, when +appropriate) instead of window titles whenever possible because some +applications first create their window, and then worry about setting the correct +title. Firefox with Vimperator comes to mind. The window starts up being named +Firefox, and only when Vimperator is loaded does the title change. As i3 will +get the title as soon as the application maps the window, you’d need to have to +match on Firefox in this case. +Another known issue is with Spotify, which doesn’t set the class hints when +mapping the window, meaning you’ll have to use a for_window rule to assign +Spotify to a specific workspace. +Finally, using assign [tiling] and assign [floating] is not supported.

You can also assign a window to show up on a specific output. You can use RandR names such as VGA1 or names relative to the output with the currently focused workspace such as left and down.

@@ -891,7 +912,7 @@ exec --no-startup-id i3-msg 'workspace 3; exec iceweasel; workspace 1'
-

4.17. Automatically starting applications on i3 startup

+

4.18. Automatically starting applications on i3 startup

By using the exec keyword outside a keybinding, you can configure which commands will be performed by i3 on initial startup. exec commands will not run when restarting i3, if you need a command to run @@ -918,7 +939,7 @@ exec --no-startup-id urxvt

The flag --no-startup-id is explained in [exec].

-

4.18. Automatically putting workspaces on specific screens

+

4.19. Automatically putting workspaces on specific screens

If you assign clients to workspaces, it might be handy to put the workspaces on specific screens. Also, the assignment of workspaces to screens will determine which workspace i3 uses for a new screen when adding screens @@ -927,7 +948,7 @@ the second screen and so on).

Syntax:

-
workspace <workspace> output <output>
+
workspace <workspace> output <output1> [output2]…

The output is the name of the RandR output you attach your screen to. On a laptop, you might have VGA1 and LVDS1 as output names. You can see the @@ -942,17 +963,19 @@ monitor name is “Dell UP2414Q”.

(Note that even if you specify the name of an output which doesn’t span the entire monitor, i3 will still use the entire area of the containing monitor rather than that of just the output’s.)

+

You can specify multiple outputs. The first available will be used.

If you use named workspaces, they must be quoted:

Examples:

workspace 1 output LVDS1
-workspace 5 output VGA1
+workspace 2 output primary
+workspace 5 output VGA1 LVDS1
 workspace "2: vim" output VGA1
-

4.19. Changing colors

+

4.20. Changing colors

You can change all colors which i3 uses to draw the window decorations.

Syntax:

@@ -1038,7 +1061,7 @@ single windows within a split container, which are otherwise indistinguishable from single windows outside of a split container.

-

4.20. Interprocess communication

+

4.21. Interprocess communication

i3 uses Unix sockets to provide an IPC interface. This allows third-party programs to get information from i3, such as the current workspaces (to display a workspace bar), and to control i3.

@@ -1057,10 +1080,10 @@ user can create that directory.

ipc-socket ~/.i3/i3-ipc.sock

You can then use the i3-msg application to perform any command listed in -the next section.

+[list_of_commands].

-

4.21. Focus follows mouse

+

4.22. Focus follows mouse

By default, window focus follows your mouse movements as the mouse crosses window borders. However, if you have a setup where your mouse usually is in your way (like a touchpad on your laptop which you do not want to disable @@ -1079,7 +1102,7 @@ currently active window (for example to click on links in your browser window).<

-

4.22. Mouse warping

+

4.23. Mouse warping

By default, when switching focus to a window on a different output (e.g. focusing a window on workspace 3 on output VGA-1, coming from workspace 2 on LVDS-1), the mouse cursor is warped to the center of that window.

@@ -1098,7 +1121,7 @@ behavior described above.

-

4.23. Popups during fullscreen mode

+

4.24. Popups during fullscreen mode

When you are in fullscreen mode, some applications still open popup windows (take Xpdf for example). This is because these applications may not be aware that they are in fullscreen mode (they do not check the corresponding hint). @@ -1135,7 +1158,7 @@ Leave fullscreen mode.

-

4.24. Focus wrapping

+

4.25. Focus wrapping

By default, when in a container with several windows or child containers, the opposite window will be focused when trying to move the focus over the edge of a container (and there are no other containers in that direction) — the focus @@ -1168,7 +1191,7 @@ focus_wrapping force

-

4.25. Forcing Xinerama

+

4.26. Forcing Xinerama

As explained in-depth in https://i3wm.org/docs/multi-monitor.html, some X11 video drivers (especially the nVidia binary driver) only provide support for Xinerama instead of RandR. In such a situation, i3 must be told to use the @@ -1191,7 +1214,7 @@ that’s it).

Xinerama, instead they are counted up, starting at 0: xinerama-0, xinerama-1, …

-

4.26. Automatic back-and-forth when switching to the current workspace

+

4.27. Automatic back-and-forth when switching to the current workspace

This configuration directive enables automatic workspace back_and_forth (see [back_and_forth]) when switching to the workspace that is currently focused.

For instance: Assume you are on workspace "1: www" and switch to "2: IM" using @@ -1209,7 +1232,7 @@ came from now, you can just press $mod+2 again to switch back to "1: www".

-

4.27. Delaying urgency hint reset on workspace change

+

4.28. Delaying urgency hint reset on workspace change

If an application on another workspace sets an urgency hint, switching to this workspace may lead to immediate focus of the application, which also means the window decoration color would be immediately reset to client.focused. This @@ -1231,7 +1254,7 @@ value to 0 disables this feature.

-

4.28. Focus on window activation

+

4.29. Focus on window activation

If a window is activated, e.g., via google-chrome www.google.com, it may request to take focus. Since this may not preferable, different reactions can be configured.

Note that this may not affect windows that are being opened. To prevent new windows @@ -1279,7 +1302,7 @@ none

-

4.29. Drawing marks on window decoration

+

4.30. Drawing marks on window decoration

If activated, marks (see [vim_like_marks]) on windows are drawn in their window decoration. However, any mark starting with an underscore in its name (_) will not be drawn even if this option is activated.

@@ -1296,7 +1319,7 @@ not be drawn even if this option is activated.

-

4.30. Line continuation

+

4.31. Line continuation

Config files support line continuation, meaning when you end a line in a backslash character (\), the line-break will be ignored by the parser. This feature can be used to create more readable configuration files. @@ -1709,7 +1732,7 @@ you want to display a statusline-only bar containing additional information.

-

5.13. Strip workspace numbers

+

5.13. Strip workspace numbers/name

Specifies whether workspace numbers should be displayed within the workspace buttons. This is useful if you want to have a named workspace that stays in order on the bar according to its number without displaying the number prefix.

@@ -1717,11 +1740,14 @@ order on the bar according to its number without displaying the number prefix.
+

When strip_workspace_name is set to yes, any workspace that has a name of +the form "[n]:[NAME]" will display only the number.

The default is to display the full name within the workspace button.

Syntax:

-
strip_workspace_numbers yes|no
+
strip_workspace_numbers yes|no
+strip_workspace_name yes|no

Example:

@@ -1888,7 +1914,7 @@ binding_mode
-

6. List of commands

+

6. List of commands

Commands are what you bind to specific keypresses. You can also issue commands at runtime without pressing a key by using the IPC interface. An easy way to @@ -2307,10 +2333,13 @@ bindsym $mod+x focus output primary # defaults to 10 pixels. move <left|right|down|up> [<px> px] -# Moves the container either to a specific location -# or to the center of the screen. If 'absolute' is -# used, it is moved to the center of all outputs. -move [absolute] position <pos_x> [px] <pos_y> [px] +# Moves the container to the specified pos_x and pos_y +# coordinates on the screen. +move position <pos_x> [px] <pos_y> [px] + +# Moves the container to the center of the screen. +# If 'absolute' is used, it is moved to the center of +# all outputs. move [absolute] position center # Moves the container to the current position of the @@ -2414,8 +2443,8 @@ for_window [instance=notepad] sticky enable

6.8. Changing (named) workspaces/moving to workspaces

To change to a specific workspace, use the workspace command, followed by the number or name of the workspace. Pass the optional flag ---no-auto-back-and-forth to disable [back_and_forth] for this specific call -only.

+--no-auto-back-and-forth to disable [workspace_auto_back_and_forth] for this +specific call only.

To move containers to specific workspaces, use move container to workspace.

You can also switch to the next and previous workspace with the commands workspace next and workspace prev, which is handy, for example, if you have @@ -2542,7 +2571,7 @@ to "1: web", the above command will still switch to it.

RandR output.

-

6.10. Moving containers/workspaces to RandR outputs

+

6.10. Moving containers/workspaces to RandR outputs

To move a container to another RandR output (addressed by names like LVDS1 or VGA1) or to a RandR output identified by a specific direction (like left, right, up or down), there are two commands:

@@ -2598,18 +2627,19 @@ after the currently focused child within that container.

resize grow|shrink <direction> [<px> px [or <ppt> ppt]]
-resize set <width> [px | ppt] <height> [px | ppt]
+resize set [width] <width> [px | ppt] +resize set height <height> [px | ppt] +resize set [width] <width> [px | ppt] [height] <height> [px | ppt]

Direction can either be one of up, down, left or right. Or you can be -less specific and use width or height, in which case i3 will take/give -space from all the other containers. The optional pixel argument specifies by -how many pixels a floating container should be grown or shrunk (the default -is 10 pixels). The ppt argument means percentage points and specifies by how -many percentage points a tiling container should be grown or shrunk (the -default is 10 percentage points).

-

Notes about resize set: a value of 0 for <width> or <height> means "do -not resize in this direction", and resizing a tiling container by px is not -implemented.

+less specific and use width or height, in which case i3 will take/give space +from all the other containers. The optional pixel argument specifies by how many +pixels a container should be grown or shrunk (the default is 10 pixels). The +optional ppt argument means "percentage points", and if specified it indicates +that a tiling container should be grown or shrunk by that many points, instead +of by the px value.

+

Note about resize set: a value of 0 for <width> or <height> means "do not +resize in this direction".

It is recommended to define bindings for resizing in a dedicated binding mode. See [binding_modes] and the example in the i3 default config for more @@ -2747,15 +2777,17 @@ for_window [class="(?i)firefox"] title_format "<span foreground='red'>%tit

To change the border of the current client, you can use border normal to use the normal border (including window title), border pixel 1 to use a 1-pixel border (no window title) and border none to make the client borderless.

-

There is also border toggle which will toggle the different border styles.

+

There is also border toggle which will toggle the different border styles. The +optional pixel argument can be used to specify the border width when switching +to the normal and pixel styles.

Note that "pixel" refers to logical pixel. On HiDPI displays, a logical pixel may be represented by multiple physical pixels, so pixel 1 might not necessarily translate into a single pixel row wide border.

Syntax:

-
border normal|pixel [<n>]
-border none|toggle
+
border normal|pixel|toggle [<n>]
+border none
 
 # legacy syntax, equivalent to "border pixel 1"
 border 1pixel
@@ -3100,7 +3132,9 @@ software needs to do this job (that is, open a window on each screen).