From 0a716379dbf172d480de4a7fba89dc9c79d6a204 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Sep 2017 07:56:12 +0200 Subject: [PATCH] update docs for 4.14 --- _docs/debugging | 2 +- _docs/hacking-howto | 44 ++++++- _docs/ipc | 34 +++-- _docs/layout-saving | 24 ++++ _docs/testsuite | 54 +++++++- _docs/userguide | 149 +++++++++++++++++++--- docs/debugging.html | 2 +- docs/hacking-howto.html | 77 ++++++++++-- docs/ipc.html | 56 +++++++-- docs/layout-saving.html | 23 ++++ docs/testsuite.html | 55 +++++++- docs/userguide.html | 269 ++++++++++++++++++++++++++++------------ 12 files changed, 656 insertions(+), 133 deletions(-) diff --git a/_docs/debugging b/_docs/debugging index e4c4fa9..925618a 100644 --- a/_docs/debugging +++ b/_docs/debugging @@ -10,7 +10,7 @@ Thank you for being interested in debugging i3. It really means something to us to get your bug fixed. If you have any questions about the process and/or need further help, do not hesitate to contact us! -== Verify you are using i3 ≥ 4.13 +== Verify you are using i3 ≥ 4.14 Only the latest major version of i3 is supported. To verify which version you are running, use: diff --git a/_docs/hacking-howto b/_docs/hacking-howto index 74a690e..52436da 100644 --- a/_docs/hacking-howto +++ b/_docs/hacking-howto @@ -119,9 +119,6 @@ src/config.c:: Contains all functions handling the configuration file (calling the parser src/config_parser.c) with the correct path, switching key bindings mode). -src/debug.c:: -Contains debugging functions to print unhandled X events. - src/ewmh.c:: Functions to get/set certain EWMH properties easily. @@ -993,6 +990,47 @@ New features are only found in the “next” branch. Therefore, if you are work on a new feature, use the “next” branch. If you are working on a bugfix, use the “next” branch, too, but make sure your code also works on “master”. +=== How to build? + +You can build i3 like you build any other software package which uses autotools. +Here’s a memory refresher: + + $ autoreconf -fi + $ mkdir -p build && cd build + $ ../configure + $ make -j8 + +(The autoreconf -fi step is unnecessary if you are building from a release tarball, + but shouldn’t hurt either.) + +==== Build system features + +* We use the AX_ENABLE_BUILDDIR macro to enforce builds happening in a separate + directory. This is a prerequisite for the AX_EXTEND_SRCDIR macro and building + in a separate directory is common practice anyway. In case this causes any + trouble when packaging i3 for your distribution, please open an issue. + +* “make check” runs the i3 testsuite. See docs/testsuite for details. + +* “make distcheck” (runs testsuite on “make dist” result, tiny bit quicker + feedback cycle than waiting for the travis build to catch the issue). + +* “make uninstall” (occasionally requested by users who compile from source) + +* “make” will build manpages/docs by default if the tools are installed. + Conversely, manpages/docs are not tried to be built for users who don’t want + to install all these dependencies to get started hacking on i3. + +* non-release builds will enable address sanitizer by default. Use the + --disable-sanitizers configure option to turn off all sanitizers, and see + --help for available sanitizers. + +* Support for pre-compiled headers (PCH) has been dropped for now in the + interest of simplicity. If you need support for PCH, please open an issue. + +* Coverage reports are now generated using “make check-code-coverage”, which + requires specifying --enable-code-coverage when calling configure. + == Thought experiments In this section, we collect thought experiments, so that we don’t forget our diff --git a/_docs/ipc b/_docs/ipc index fda289a..6572357 100644 --- a/_docs/ipc +++ b/_docs/ipc @@ -232,6 +232,8 @@ name (string):: The name of this output (as seen in +xrandr(1)+). Encoded in UTF-8. active (boolean):: Whether this output is currently active (has a valid mode). +primary (boolean):: + Whether this output is currently the primary output. current_workspace (string):: The name of the current workspace that is visible on this output. +null+ if the output is not active. @@ -262,7 +264,7 @@ rect (map):: "y": 0, "width": 1280, "height": 1024 - }, + } } ] ------------------- @@ -390,7 +392,7 @@ JSON dump: "y": 0, "width": 1280, "height": 0 - }, + } }, { @@ -671,6 +673,8 @@ barconfig_update (4):: binding (5):: Sent when a configured command binding is triggered with the keyboard or mouse +shutdown (6):: + Sent when the ipc shuts down because of a restart or exit by user command *Example:* -------------------------------------------------------------------- @@ -694,9 +698,9 @@ if ($is_event) { This event consists of a single serialized map containing a property +change (string)+ which indicates the type of the change ("focus", "init", -"empty", "urgent"). A +current (object)+ property will be present with the -affected workspace whenever the type of event affects a workspace (otherwise, -it will be +null). +"empty", "urgent", "reload", "rename", "restored", "move"). A ++current (object)+ property will be present with the affected workspace +whenever the type of event affects a workspace (otherwise, it will be +null). When the change is "focus", an +old (object)+ property will be present with the previous workspace. When the first switch occurs (when i3 focuses the @@ -791,7 +795,7 @@ same as a +GET_BAR_CONFIG+ reply for the bar with the given id. === binding event This event consists of a single serialized map reporting on the details of a -binding that ran a command because of user input. The +change (sring)+ field +binding that ran a command because of user input. The +change (string)+ field indicates what sort of binding event was triggered (right now it will always be +"run"+ but may be expanded in the future). @@ -829,6 +833,20 @@ input_type (string):: } --------------------------- +=== shutdown event + +This event is triggered when the connection to the ipc is about to shutdown +because of a user action such as a +restart+ or +exit+ command. The +change +(string)+ field indicates why the ipc is shutting down. It can be either ++"restart"+ or +"exit"+. + +*Example:* +--------------------------- +{ + "change": "restart" +} +--------------------------- + == See also (existing libraries) [[libraries]] @@ -843,7 +861,7 @@ C:: C++:: * https://github.com/drmgc/i3ipcpp Go:: - * https://github.com/proxypoke/i3ipc + * https://github.com/mdirkse/i3ipc-go JavaScript:: * https://github.com/acrisci/i3ipc-gjs Lua:: @@ -859,3 +877,5 @@ Ruby:: * https://github.com/badboy/i3-ipc (not maintained) Rust:: * https://github.com/tmerr/i3ipc-rs +OCaml:: + * https://github.com/Armael/ocaml-i3ipc diff --git a/_docs/layout-saving b/_docs/layout-saving index 5897036..6ca08fa 100644 --- a/_docs/layout-saving +++ b/_docs/layout-saving @@ -259,3 +259,27 @@ container: ] } -------------------------------------------------------------------------------- + +=== Placeholders using window title matches don't swallow the window + +If you use the +title+ attribute to match a window and find that it doesn't +work or only works sometimes, the reason might be that the application sets the +title only after making the window visible. This will be especially true for +programs running inside terminal emulators, e.g., +urxvt -e irssi+ when +matching on +title: "irssi"+. + +One way to deal with this is to not rely on the title, but instead use, e.g., +the +instance+ attribute and running the program to set this window instance to +that value: + +-------------------------------------------------------------------------------- +# Run irssi via +# urxvt -name "irssi-container" -e irssi + +"swallows": [ + { + "class": "URxvt", + "instance": "irssi-container" + } +] +-------------------------------------------------------------------------------- diff --git a/_docs/testsuite b/_docs/testsuite index 71c6a42..795be04 100644 --- a/_docs/testsuite +++ b/_docs/testsuite @@ -82,6 +82,8 @@ The tests additionally require +Xephyr(1)+ to run a nested X server. Install $ cd ~/i3/testcases $ sudo apt-get install cpanminus $ sudo cpanm . +$ cd ~/i3/AnyEvent-I3 +$ sudo cpanm . -------------------------------------------------------------------------------- If you don’t want to use cpanminus for some reason, the same works with cpan: @@ -90,6 +92,8 @@ If you don’t want to use cpanminus for some reason, the same works with cpan: -------------------------------------------------------------------------------- $ cd ~/i3/testcases $ sudo cpan . +$ cd ~/i3/AnyEvent-I3 +$ sudo cpan . -------------------------------------------------------------------------------- In case you don’t have root permissions, you can also install into your home @@ -112,9 +116,20 @@ the tests without an X session with Xvfb, such as with +xvfb-run ./complete-run+. This will also speed up the tests significantly especially on machines without a powerful video card. -.Example invocation of complete-run.pl+ +.Example invocation of +complete-run.pl+ --------------------------------------- -$ cd ~/i3/testcases +$ cd ~/i3 + +$ autoreconf -fi + +$ mkdir -p build && cd build + +$ ../configure + +$ make -j8 +# output omitted because it is very long + +$ cd testcases $ ./complete-run.pl # output omitted because it is very long @@ -160,6 +175,41 @@ $ ./complete-run.pl --parallel=1 --keep-xserver-output This will show the output of Xephyr, which is the X server implementation we use for testing. +===== make command: +make check+ +Make check runs the i3 testsuite. +You can still use ./testcases/complete-run.pl to get the interactive progress output. + +.Example invocation of +make check+ +--------------------------------------- +$ cd ~/i3 + +$ autoreconf -fi + +$ mkdir -p build && cd build + +$ ../configure + +$ make -j8 +# output omitted because it is very long + +$ make check +# output omitted because it is very long +PASS: testcases/complete-run.pl +============================================================================ +Testsuite summary for i3 4.13 +============================================================================ +# TOTAL: 1 +# PASS: 1 +# SKIP: 0 +# XFAIL: 0 +# FAIL: 0 +# XPASS: 0 +# ERROR: 0 +============================================================================ + +$ less test-suite.log +---------------------------------------- + ==== Coverage testing Coverage testing is possible with +lcov+, the front-end for GCC's coverage diff --git a/_docs/userguide b/_docs/userguide index acdc0a5..0d5de3b 100644 --- a/_docs/userguide +++ b/_docs/userguide @@ -297,6 +297,15 @@ 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 @@ -412,9 +421,9 @@ button in the scope of the clicked container (see <>). You can configure mouse bindings in a similar way to key bindings. *Syntax*: -------------------------------------------------------------------------------- -bindsym [--release] [--border] [--whole-window] [+]button command -------------------------------------------------------------------------------- +---------------------------------------------------------------------------------------------------- +bindsym [--release] [--border] [--whole-window] [--exclude-titlebar] [+]button command +---------------------------------------------------------------------------------------------------- By default, the binding will only run when you click on the titlebar of the window. If the +--release+ flag is given, it will run when the mouse button @@ -424,6 +433,9 @@ If the +--whole-window+ flag is given, the binding will also run when any part of the window is clicked, with the exception of the border. To have a bind run when the border is clicked, specify the +--border+ flag. +If the +--exclude-titlebar+ flag is given, the titlebar will not be considered +for the keybinding. + *Examples*: -------------------------------- # The middle button over a titlebar kills the window @@ -479,7 +491,7 @@ mode *Example*: ------------------------------------------------------------------------ -# Press $mod+o followed by either f, t, Esc or Return to launch firefox, +# Press $mod+o followed by either f, t, Escape or Return to launch firefox, # thunderbird or return to the default mode, respectively. set $mode_launcher Launch: [f]irefox [t]hunderbird bindsym $mod+o mode "$mode_launcher" @@ -488,7 +500,7 @@ mode "$mode_launcher" { bindsym f exec firefox bindsym t exec thunderbird - bindsym Esc mode "default" + bindsym Escape mode "default" bindsym Return mode "default" } ------------------------------------------------------------------------ @@ -946,12 +958,12 @@ the next section. === Focus follows mouse -By default, window focus follows your mouse movements. 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 completely), you might want to disable 'focus -follows mouse' and control focus only by using your keyboard. The mouse will -still be useful inside the currently active window (for example to click on -links in your browser window). +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 +completely), you might want to disable 'focus follows mouse' and control focus +only by using your keyboard. The mouse will still be useful inside the +currently active window (for example to click on links in your browser window). *Syntax*: -------------------------- @@ -1127,9 +1139,9 @@ none:: [[show_marks]] === Drawing marks on window decoration -If activated, 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. +If activated, marks (see <>) 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. The default for this option is +yes+. @@ -1378,7 +1390,7 @@ directive multiple times. *Syntax*: --------------- -output +output primary| --------------- *Example*: @@ -1400,7 +1412,19 @@ bar { statusline #ffffff } } + +# show bar on the primary monitor and on HDMI2 +bar { + output primary + output HDMI2 + status_command i3status +} + ------------------------------- +Note that you might not have a primary output configured yet. To do so, run: +------------------------- +xrandr --output --primary +------------------------- === Tray output @@ -1802,7 +1826,8 @@ The +toggle+ option will toggle the orientation of the split container if it contains a single window. Otherwise it makes the current window a split container with opposite orientation compared to the parent container. Use +layout toggle split+ to change the layout of any split container from -splitv to splith or vice-versa. +splitv to splith or vice-versa. You can also define a custom sequence of layouts +to cycle through with +layout toggle+, see <>. *Syntax*: -------------------------------- @@ -1822,6 +1847,11 @@ Use +layout toggle split+, +layout stacking+, +layout tabbed+, +layout splitv+ or +layout splith+ to change the current container layout to splith/splitv, stacking, tabbed layout, splitv or splith, respectively. +Specify up to four layouts after +layout toggle+ to cycle through them. Every +time the command is executed, the layout specified after the currently active +one will be applied. If the currently active layout is not in the list, the +first layout in the list will be activated. + To make the current window (!) fullscreen, use +fullscreen enable+ (or +fullscreen enable global+ for the global mode), to leave either fullscreen mode use +fullscreen disable+, and to toggle between these two states use @@ -1834,6 +1864,7 @@ enable+ respectively +floating disable+ (or +floating toggle+): -------------------------------------------- layout default|tabbed|stacking|splitv|splith layout toggle [split|all] +layout toggle [split|tabbed|stacking|splitv|splith] [split|tabbed|stacking|splitv|splith]… -------------------------------------------- *Examples*: @@ -1848,6 +1879,15 @@ bindsym $mod+x layout toggle # Toggle between stacking/tabbed/splith/splitv: bindsym $mod+x layout toggle all +# Toggle between stacking/tabbed/splith: +bindsym $mod+x layout toggle stacking tabbed splith + +# Toggle between splitv/tabbed +bindsym $mod+x layout toggle splitv tabbed + +# Toggle between last split layout/tabbed/stacking +bindsym $mod+x layout toggle split tabbed stacking + # Toggle fullscreen bindsym $mod+f fullscreen toggle @@ -1882,7 +1922,7 @@ output:: ---------------------------------------------- focus left|right|down|up focus parent|child|floating|tiling|mode_toggle -focus output left|right|up|down| +focus output left|right|up|down|primary| ---------------------------------------------- *Examples*: @@ -1904,8 +1944,17 @@ bindsym $mod+x focus output right # Focus the big output bindsym $mod+x focus output HDMI-2 + +# Focus the primary output +bindsym $mod+x focus output primary ------------------------------------------------- +------------------------------- +Note that you might not have a primary output configured yet. To do so, run: +------------------------- +xrandr --output --primary +------------------------- + === Moving containers Use the +move+ command to move a container. @@ -1921,7 +1970,8 @@ move [ 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 [[ px] [ px]|center] +move [absolute] position [px] [px] +move [absolute] position center # Moves the container to the current position of the # mouse cursor. Only affects floating containers. @@ -1947,6 +1997,39 @@ bindsym $mod+c move absolute position center bindsym $mod+m move position mouse ------------------------------------------------------- +=== Swapping containers + +Two containers can be swapped (i.e., move to each other's position) by using +the +swap+ command. They will assume the position and geometry of the container +they are swapped with. + +The first container to participate in the swapping can be selected through the +normal command criteria process with the focused window being the usual +fallback if no criteria are specified. The second container can be selected +using one of the following methods: + ++id+:: The X11 window ID of a client window. ++con_id+:: The i3 container ID of a container. ++mark+:: A container with the specified mark, see <>. + +Note that swapping does not work with all containers. Most notably, swapping +floating containers or containers that have a parent-child relationship to one +another does not work. + +*Syntax*: +---------------------------------------- +swap container with id|con_id|mark +---------------------------------------- + +*Examples*: +----------------------------------------------------------------- +# Swaps the focused container with the container marked »swapee«. +swap container with mark swapee + +# Swaps container marked »A« and »B« +[con_mark="^A$"] swap container with mark B +----------------------------------------------------------------- + === Sticky floating windows If you want a window to stick to the glass, i.e., have it stay on screen even @@ -2089,6 +2172,23 @@ i3-msg 'rename workspace to "2: mail"' bindsym $mod+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: ' -------------------------------------------------------------------------- +If you want to rename workspaces on demand while keeping the navigation stable, +you can use a setup like this: + +*Example*: +------------------------- +bindsym $mod+1 workspace number "1: www" +bindsym $mod+2 workspace number "2: mail" +... +------------------------- + +If a workspace does not exist, the command +workspace number "1: mail"+ will +create workspace "1: mail". + +If a workspace with number 1 does already exist, the command will switch to this +workspace and ignore the text part. So even when the workspace has been renamed +to "1: web", the above command will still switch to it. + === Moving workspaces to a different screen See <> for how to move a container/workspace to a different @@ -2104,8 +2204,8 @@ To move a container to another RandR output (addressed by names like +LVDS1+ or *Syntax*: ------------------------------------------------------------ -move container to output left|right|down|up|current| -move workspace to output left|right|down|up|current| +move container to output left|right|down|up|current|primary| +move workspace to output left|right|down|up|current|primary| ------------------------------------------------------------ *Examples*: @@ -2116,8 +2216,17 @@ bindsym $mod+x move workspace to output right # Put this window on the presentation output. bindsym $mod+x move container to output VGA1 + +# Put this window on the primary output. +bindsym $mod+x move container to output primary -------------------------------------------------------- +------------------------------- +Note that you might not have a primary output configured yet. To do so, run: +------------------------- +xrandr --output --primary +------------------------- + === Moving containers/windows to marks To move a container to another container with a specific mark (see <>), diff --git a/docs/debugging.html b/docs/debugging.html index 88d37e2..47e90fc 100644 --- a/docs/debugging.html +++ b/docs/debugging.html @@ -44,7 +44,7 @@ process and/or need further help, do not hesitate to contact us!

-

1. Verify you are using i3 ≥ 4.13

+

1. Verify you are using i3 ≥ 4.14

Only the latest major version of i3 is supported. To verify which version you are running, use:

diff --git a/docs/hacking-howto.html b/docs/hacking-howto.html index 791b6af..606fad6 100644 --- a/docs/hacking-howto.html +++ b/docs/hacking-howto.html @@ -240,14 +240,6 @@ src/config_parser.c) with the correct path, switching key bindings mode).

-src/debug.c -
-
-

-Contains debugging functions to print unhandled X events. -

-
-
src/ewmh.c
@@ -1529,6 +1521,75 @@ of the latest release, plus any bugfixes that were applied since that release.
+
+

20.3. How to build?

+

You can build i3 like you build any other software package which uses autotools. +Here’s a memory refresher:

+
+
+
$ autoreconf -fi
+$ mkdir -p build && cd build
+$ ../configure
+$ make -j8
+
+

(The autoreconf -fi step is unnecessary if you are building from a release tarball, + but shouldn’t hurt either.)

+
+

20.3.1. Build system features

+
    +
  • +

    +We use the AX_ENABLE_BUILDDIR macro to enforce builds happening in a separate + directory. This is a prerequisite for the AX_EXTEND_SRCDIR macro and building + in a separate directory is common practice anyway. In case this causes any + trouble when packaging i3 for your distribution, please open an issue. +

    +
  • +
  • +

    +“make check” runs the i3 testsuite. See docs/testsuite for details. +

    +
  • +
  • +

    +“make distcheck” (runs testsuite on “make dist” result, tiny bit quicker + feedback cycle than waiting for the travis build to catch the issue). +

    +
  • +
  • +

    +“make uninstall” (occasionally requested by users who compile from source) +

    +
  • +
  • +

    +“make” will build manpages/docs by default if the tools are installed. + Conversely, manpages/docs are not tried to be built for users who don’t want + to install all these dependencies to get started hacking on i3. +

    +
  • +
  • +

    +non-release builds will enable address sanitizer by default. Use the + --disable-sanitizers configure option to turn off all sanitizers, and see + --help for available sanitizers. +

    +
  • +
  • +

    +Support for pre-compiled headers (PCH) has been dropped for now in the + interest of simplicity. If you need support for PCH, please open an issue. +

    +
  • +
  • +

    +Coverage reports are now generated using “make check-code-coverage”, which + requires specifying --enable-code-coverage when calling configure. +

    +
  • +
+
+
diff --git a/docs/ipc.html b/docs/ipc.html index 39f6182..8780aed 100644 --- a/docs/ipc.html +++ b/docs/ipc.html @@ -440,6 +440,14 @@ active (boolean)

+primary (boolean) +
+
+

+ Whether this output is currently the primary output. +

+
+
current_workspace (string)
@@ -482,7 +490,7 @@ rect (map) "y": 0, "width": 1280, "height": 1024 - }, + } } ]
@@ -746,7 +754,7 @@ VGA1 "y": 0, "width": 1280, "height": 0 - }, + } }, { @@ -1222,6 +1230,14 @@ binding (5) mouse

+
+shutdown (6) +
+
+

+ Sent when the ipc shuts down because of a restart or exit by user command +

+

Example:

@@ -1246,9 +1262,9 @@ if ($is_event) {

4.3. workspace event

This event consists of a single serialized map containing a property change (string) which indicates the type of the change ("focus", "init", -"empty", "urgent"). A current (object) property will be present with the -affected workspace whenever the type of event affects a workspace (otherwise, -it will be +null).

+"empty", "urgent", "reload", "rename", "restored", "move"). A +current (object) property will be present with the affected workspace +whenever the type of event affects a workspace (otherwise, it will be +null).

When the change is "focus", an old (object) property will be present with the previous workspace. When the first switch occurs (when i3 focuses the workspace visible at the beginning) there is no previous workspace, and the @@ -1378,7 +1394,7 @@ same as a GET_BAR_CONFIG reply for the bar with the given id.

4.8. binding event

This event consists of a single serialized map reporting on the details of a -binding that ran a command because of user input. The change (sring) field +binding that ran a command because of user input. The change (string) field indicates what sort of binding event was triggered (right now it will always be "run" but may be expanded in the future).

The binding (object) field contains details about the binding that was run:

@@ -1446,6 +1462,20 @@ input_type (string) }
+
+

4.9. shutdown event

+

This event is triggered when the connection to the ipc is about to shutdown +because of a user action such as a restart or exit command. The change +(string) field indicates why the ipc is shutting down. It can be either +"restart" or "exit".

+

Example:

+
+
+
{
+ "change": "restart"
+}
+
+
@@ -1491,7 +1521,7 @@ Go @@ -1583,6 +1613,18 @@ Rust
+
+OCaml +
+
+ +
diff --git a/docs/layout-saving.html b/docs/layout-saving.html index ed61533..d699715 100644 --- a/docs/layout-saving.html +++ b/docs/layout-saving.html @@ -301,6 +301,29 @@ container:

} +
+

4.2. Placeholders using window title matches don’t swallow the window

+

If you use the title attribute to match a window and find that it doesn’t +work or only works sometimes, the reason might be that the application sets the +title only after making the window visible. This will be especially true for +programs running inside terminal emulators, e.g., urxvt -e irssi when +matching on title: "irssi".

+

One way to deal with this is to not rely on the title, but instead use, e.g., +the instance attribute and running the program to set this window instance to +that value:

+
+
+
# Run irssi via
+# urxvt -name "irssi-container" -e irssi
+
+"swallows": [
+    {
+        "class": "URxvt",
+        "instance": "irssi-container"
+    }
+]
+
+
diff --git a/docs/testsuite.html b/docs/testsuite.html index 9fa9202..3563125 100644 --- a/docs/testsuite.html +++ b/docs/testsuite.html @@ -146,6 +146,8 @@ used to install the testsuite. Many users prefer to use the more modern
$ cd ~/i3/testcases
 $ sudo apt-get install cpanminus
+$ sudo cpanm .
+$ cd ~/i3/AnyEvent-I3
 $ sudo cpanm .

If you don’t want to use cpanminus for some reason, the same works with cpan:

@@ -153,6 +155,8 @@ $ sudo cpanm .
Installing testsuite dependencies using cpan
$ cd ~/i3/testcases
+$ sudo cpan .
+$ cd ~/i3/AnyEvent-I3
 $ sudo cpan .

In case you don’t have root permissions, you can also install into your home @@ -174,9 +178,20 @@ the tests without an X session with Xvfb, such as with xvfb-run ./complete-run. This will also speed up the tests significantly especially on machines without a powerful video card.

-
Example invocation of complete-run.pl+
+
Example invocation of complete-run.pl
-
$ cd ~/i3/testcases
+
$ cd ~/i3
+
+$ autoreconf -fi
+
+$ mkdir -p build && cd build
+
+$ ../configure
+
+$ make -j8
+# output omitted because it is very long
+
+$ cd testcases
 
 $ ./complete-run.pl
 # output omitted because it is very long
@@ -219,6 +234,42 @@ $ less latest/i3-log-for-04-floating.t

This will show the output of Xephyr, which is the X server implementation we use for testing.

+
+
make command: make check
+

Make check runs the i3 testsuite. +You can still use ./testcases/complete-run.pl to get the interactive progress output.

+
+
Example invocation of make check
+
+
$ cd ~/i3
+
+$ autoreconf -fi
+
+$ mkdir -p build && cd build
+
+$ ../configure
+
+$ make -j8
+# output omitted because it is very long
+
+$ make check
+# output omitted because it is very long
+PASS: testcases/complete-run.pl
+============================================================================
+Testsuite summary for i3 4.13
+============================================================================
+# TOTAL: 1
+# PASS:  1
+# SKIP:  0
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
+# ERROR: 0
+============================================================================
+
+$ less test-suite.log
+
+

3.2.2. Coverage testing

diff --git a/docs/userguide.html b/docs/userguide.html index e6afdf2..7362e00 100644 --- a/docs/userguide.html +++ b/docs/userguide.html @@ -363,6 +363,14 @@ 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)
+

4.1. Comments

It is possible and recommended to use comments in your configuration file to @@ -490,7 +498,7 @@ can configure mouse bindings in a similar way to key bindings.

Syntax:

-
bindsym [--release] [--border] [--whole-window] [<Modifiers>+]button<n> command
+
bindsym [--release] [--border] [--whole-window] [--exclude-titlebar] [<Modifiers>+]button<n> command

By default, the binding will only run when you click on the titlebar of the window. If the --release flag is given, it will run when the mouse button @@ -498,6 +506,8 @@ is released.

If the --whole-window flag is given, the binding will also run when any part of the window is clicked, with the exception of the border. To have a bind run when the border is clicked, specify the --border flag.

+

If the --exclude-titlebar flag is given, the titlebar will not be considered +for the keybinding.

Examples:

@@ -549,7 +559,7 @@ mode <name>

Example:

-
# Press $mod+o followed by either f, t, Esc or Return to launch firefox,
+
# Press $mod+o followed by either f, t, Escape or Return to launch firefox,
 # thunderbird or return to the default mode, respectively.
 set $mode_launcher Launch: [f]irefox [t]hunderbird
 bindsym $mod+o mode "$mode_launcher"
@@ -558,7 +568,7 @@ mode "$mode_launcher" {
     bindsym f exec firefox
     bindsym t exec thunderbird
 
-    bindsym Esc mode "default"
+    bindsym Escape mode "default"
     bindsym Return mode "default"
 }
@@ -1018,12 +1028,12 @@ the next section.

4.21. Focus follows mouse

-

By default, window focus follows your mouse movements. 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 completely), you might want to disable focus -follows mouse and control focus only by using your keyboard. The mouse will -still be useful inside the currently active window (for example to click on -links in your browser window).

+

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 +completely), you might want to disable focus follows mouse and control focus +only by using your keyboard. The mouse will still be useful inside the +currently active window (for example to click on links in your browser window).

Syntax:

@@ -1226,9 +1236,9 @@ none

4.29. Drawing marks on window decoration

-

If activated, 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.

+

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.

The default for this option is yes.

Syntax:

@@ -1504,7 +1514,7 @@ directive multiple times.

Syntax:

-
output <output>
+
output primary|<output>

Example:

@@ -1525,8 +1535,20 @@ bar { background #000000 statusline #ffffff } +} + +# show bar on the primary monitor and on HDMI2 +bar { + output primary + output HDMI2 + status_command i3status }
+

Note that you might not have a primary output configured yet. To do so, run:

+
+
+
xrandr --output <output> --primary
+

5.8. Tray output

@@ -2047,7 +2069,8 @@ The toggle option will toggle the orientation of the split container if contains a single window. Otherwise it makes the current window a split container with opposite orientation compared to the parent container. Use layout toggle split to change the layout of any split container from -splitv to splith or vice-versa.

+splitv to splith or vice-versa. You can also define a custom sequence of layouts +to cycle through with layout toggle, see [manipulating_layout].

Syntax:

@@ -2066,6 +2089,10 @@ bindsym $mod+t split toggle

Use layout toggle split, layout stacking, layout tabbed, layout splitv or layout splith to change the current container layout to splith/splitv, stacking, tabbed layout, splitv or splith, respectively.

+

Specify up to four layouts after layout toggle to cycle through them. Every +time the command is executed, the layout specified after the currently active +one will be applied. If the currently active layout is not in the list, the +first layout in the list will be activated.

To make the current window (!) fullscreen, use fullscreen enable (or fullscreen enable global for the global mode), to leave either fullscreen mode use fullscreen disable, and to toggle between these two states use @@ -2076,7 +2103,8 @@ enable respectively floating disable (or floating toggle)

layout default|tabbed|stacking|splitv|splith
-layout toggle [split|all]
+layout toggle [split|all] +layout toggle [split|tabbed|stacking|splitv|splith] [split|tabbed|stacking|splitv|splith]…

Examples:

@@ -2091,6 +2119,15 @@ bindsym $mod+x layout toggle # Toggle between stacking/tabbed/splith/splitv: bindsym $mod+x layout toggle all +# Toggle between stacking/tabbed/splith: +bindsym $mod+x layout toggle stacking tabbed splith + +# Toggle between splitv/tabbed +bindsym $mod+x layout toggle splitv tabbed + +# Toggle between last split layout/tabbed/stacking +bindsym $mod+x layout toggle split tabbed stacking + # Toggle fullscreen bindsym $mod+f fullscreen toggle @@ -2167,7 +2204,7 @@ output
focus left|right|down|up
 focus parent|child|floating|tiling|mode_toggle
-focus output left|right|up|down|<output>
+focus output left|right|up|down|primary|<output>

Examples:

@@ -2188,52 +2225,93 @@ bindsym $mod+g focus mode_toggle bindsym $mod+x focus output right # Focus the big output -bindsym $mod+x focus output HDMI-2 +bindsym $mod+x focus output HDMI-2 + +# Focus the primary output +bindsym $mod+x focus output primary
-
-
-

6.5. Moving containers

-

Use the move command to move a container.

-

Syntax:

-
# Moves the container into the given direction.
+
Note that you might not have a primary output configured yet. To do so, run:
+
+

xrandr --output <output> --primary

+
+
+
=== Moving containers
+
+Use the +move+ command to move a container.
+
+*Syntax*:
+
+

# Moves the container into the given direction. # The optional pixel argument specifies how far the # container should be moved if it is floating and # 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 +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 [[<px> px] [<px> px]|center] - -# Moves the container to the current position of the +move [absolute] position <pos_x> [px] <pos_y> [px] +move [absolute] position center

+

# Moves the container to the current position of the # mouse cursor. Only affects floating containers. -move position mouse -

-

Examples:

+move position mouse

-
# Move container to the left, bottom, top, right
+
*Examples*:
+
+

# Move container to the left, bottom, top, right bindsym $mod+j move left bindsym $mod+k move down bindsym $mod+l move up -bindsym $mod+semicolon move right - -# Move container, but make floating containers +bindsym $mod+semicolon move right

+

# Move container, but make floating containers # move more than the default -bindsym $mod+j move left 20 px +bindsym $mod+j move left 20 px

+

# Move floating container to the center of all outputs +bindsym $mod+c move absolute position center

+

# Move container to the current position of the cursor +bindsym $mod+m move position mouse

+
+
+
=== Swapping containers
+
+Two containers can be swapped (i.e., move to each other's position) by using
+the +swap+ command. They will assume the position and geometry of the container
+they are swapped with.
+
+The first container to participate in the swapping can be selected through the
+normal command criteria process with the focused window being the usual
+fallback if no criteria are specified. The second container can be selected
+using one of the following methods:
 
-# Move floating container to the center of all outputs
-bindsym $mod+c move absolute position center
++id+:: The X11 window ID of a client window.
++con_id+:: The i3 container ID of a container.
++mark+:: A container with the specified mark, see <<vim_like_marks>>.
 
-# Move container to the current position of the cursor
-bindsym $mod+m move position mouse
+Note that swapping does not work with all containers. Most notably, swapping +floating containers or containers that have a parent-child relationship to one +another does not work. + +*Syntax*:
+ + +
+

7. swap container with id|con_id|mark <arg>

+
+

Examples:

+
+
+
# Swaps the focused container with the container marked »swapee«.
+swap container with mark swapee
+
+# Swaps container marked »A« and »B«
+[con_mark="^A$"] swap container with mark B
+
-

6.6. Sticky floating windows

+

7.1. Sticky floating windows

If you want a window to stick to the glass, i.e., have it stay on screen even if you switch to another workspace, you can use the sticky command. For example, this can be useful for notepads, a media player or a video chat @@ -2253,7 +2331,7 @@ for_window [instance=notepad] sticky enable

-

6.7. Changing (named) workspaces/moving to workspaces

+

7.2. 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 @@ -2313,7 +2391,7 @@ bindsym $mod+x move workspace to output right bindsym $mod+F1 [class="Firefox"] move workspace current

-

6.7.1. Named workspaces

+

7.2.1. Named workspaces

Workspaces are identified by their name. So, instead of using numbers in the workspace command, you can use an arbitrary name:

Example:

@@ -2341,7 +2419,7 @@ dynamically. To combine both commands you can use workspace number 1: mail
-

6.7.2. Renaming workspaces

+

7.2.2. Renaming workspaces

You can rename workspaces. This might be useful to start with the default numbered workspaces, do your work, and rename the workspaces afterwards to reflect what’s actually on them. You can also omit the old name to rename @@ -2362,23 +2440,37 @@ i3-msg 'rename workspace "1: www" to "10: www"' i3-msg 'rename workspace to "2: mail"' bindsym $mod+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: '

+

If you want to rename workspaces on demand while keeping the navigation stable, +you can use a setup like this:

+

Example:

+
+
+
bindsym $mod+1 workspace number "1: www"
+bindsym $mod+2 workspace number "2: mail"
+...
+
+

If a workspace does not exist, the command workspace number "1: mail" will +create workspace "1: mail".

+

If a workspace with number 1 does already exist, the command will switch to this +workspace and ignore the text part. So even when the workspace has been renamed +to "1: web", the above command will still switch to it.

-

6.8. Moving workspaces to a different screen

+

7.3. Moving workspaces to a different screen

See [move_to_outputs] for how to move a container/workspace to a different RandR output.

-

6.9. Moving containers/workspaces to RandR outputs

+

7.4. 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:

Syntax:

-
move container to output left|right|down|up|current|<output>
-move workspace to output left|right|down|up|current|<output>
+
move container to output left|right|down|up|current|primary|<output>
+move workspace to output left|right|down|up|current|primary|<output>

Examples:

@@ -2388,30 +2480,43 @@ move workspace to output left|right|down|up|current|<output> bindsym $mod+x move workspace to output right # Put this window on the presentation output. -bindsym $mod+x move container to output VGA1 +bindsym $mod+x move container to output VGA1 + +# Put this window on the primary output. +bindsym $mod+x move container to output primary
- -
-

6.10. Moving containers/windows to marks

-

To move a container to another container with a specific mark (see [vim_like_marks]), -you can use the following command.

-

The window will be moved right after the marked container in the tree, i.e., it ends up -in the same position as if you had opened a new window when the marked container was -focused. If the mark is on a split container, the window will appear as a new child -after the currently focused child within that container.

-

Syntax:

-
move window|container to mark <mark>
+
Note that you might not have a primary output configured yet. To do so, run:
+

xrandr --output <output> --primary

+
+
+
=== Moving containers/windows to marks
+
+To move a container to another container with a specific mark (see <<vim_like_marks>>),
+you can use the following command.
+
+The window will be moved right after the marked container in the tree, i.e., it ends up
+in the same position as if you had opened a new window when the marked container was
+focused. If the mark is on a split container, the window will appear as a new child
+after the currently focused child within that container.
+
+*Syntax*:
+
+
+ + +
+

8. move window|container to mark <mark>

+

Example:

for_window [instance="tabme"] move window to mark target
-
-

6.11. Resizing containers/windows

+

8.1. Resizing containers/windows

If you want to resize containers/windows using your keyboard, you can use the resize command:

Syntax:

@@ -2439,7 +2544,7 @@ context.

-

6.12. Jumping to specific windows

+

8.2. Jumping to specific windows

Often when in a multi-monitor environment, you want to quickly jump to a specific window. For example, while working on workspace 3 you may want to jump to your mail client to email your boss that you’ve achieved some @@ -2460,7 +2565,7 @@ bindsym $mod+a [class="urxvt" title="VIM"] focus

-

6.13. VIM-like marks (mark/goto)

+

8.3. VIM-like marks (mark/goto)

This feature is like the jump feature: It allows you to directly jump to a specific window (this means switching to the appropriate workspace and setting focus to the windows). However, you can directly mark a specific window with @@ -2503,7 +2608,7 @@ unmark irssi

-

6.14. Window title format

+

8.4. Window title format

By default, i3 will simply print the X11 window title. Using title_format, this can be customized by setting the format to the desired output. This directive supports @@ -2561,7 +2666,7 @@ for_window [class="(?i)firefox"] title_format "<span foreground='red'>%tit

-

6.15. Changing border style

+

8.5. Changing border style

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.

@@ -2590,7 +2695,7 @@ bindsym $mod+u border none
-

6.16. Enabling shared memory logging

+

8.6. Enabling shared memory logging

As described in http://i3wm.org/docs/debugging.html, i3 can log to a shared memory buffer, which you can dump using i3-dump-log. The shmlog command allows you to enable or disable the shared memory logging at runtime.

@@ -2614,7 +2719,7 @@ i3-msg shmlog $((50*1024*1024))
-

6.17. Enabling debug logging

+

8.7. Enabling debug logging

The debuglog command allows you to enable or disable debug logging at runtime. Debug logging is much more verbose than non-debug logging. This command does not activate shared memory logging (shmlog), and as such is most @@ -2632,7 +2737,7 @@ bindsym $mod+x debuglog toggle

-

6.18. Reloading/Restarting/Exiting

+

8.8. Reloading/Restarting/Exiting

You can make i3 reload its configuration file with reload. You can also restart i3 inplace with the restart command to get it out of some weird state (if that should ever happen) or to perform an upgrade without having to restart @@ -2647,7 +2752,7 @@ bindsym $mod+Shift+e exit

-

6.19. Scratchpad

+

8.9. Scratchpad

There are two commands to use any existing window as scratchpad window. move scratchpad will move a window to the scratchpad workspace. This will make it invisible until you show it again. There is no way to open that workspace. @@ -2682,7 +2787,7 @@ bindsym mod4+s [title="^Sup ::"] scratchpad show

-

6.20. Nop

+

8.10. Nop

There is a no operation command nop which allows you to override default behavior. This can be useful for, e.g., disabling a focus change on clicks with the middle mouse button.

@@ -2702,7 +2807,7 @@ bindsym button2 nop
-

6.21. i3bar control

+

8.11. i3bar control

There are two options in the configuration of each i3bar instance that can be changed during runtime by invoking a command through i3. The commands bar hidden_state and bar mode allow setting the current hidden_state @@ -2736,7 +2841,7 @@ bindsym $mod+Shift+b bar mode invisible bar-1

-

7. Multiple monitors

+

9. Multiple monitors

As you can see in the goal list on the website, i3 was specifically developed with support for multiple monitors in mind. This section will explain how to @@ -2759,7 +2864,7 @@ create an unlimited number of workspaces in i3 and tie them to specific screens, you can have the "traditional" approach of having X workspaces per screen by changing your configuration (using modes, for example).

-

7.1. Configuring your monitors

+

9.1. Configuring your monitors

To help you get going if you have never used multiple monitors before, here is a short overview of the xrandr options which will probably be of interest to you. It is always useful to get an overview of the current screen configuration. @@ -2822,7 +2927,7 @@ only what you can see in xrandr.

See also [presentations] for more examples of multi-monitor setups.

-

7.2. Interesting configuration for multi-monitor environments

+

9.2. Interesting configuration for multi-monitor environments

There are several things to configure in i3 which may be interesting if you have more than one monitor:

    @@ -2859,10 +2964,10 @@ For information on how to move existing workspaces between monitors,
-

8. i3 and the rest of your software world

+

10. i3 and the rest of your software world

-

8.1. Displaying a status line

+

10.1. Displaying a status line

A very common thing amongst users of exotic window managers is a status line at some corner of the screen. It is an often superior replacement to the widget approach you have in the task bar of a traditional desktop environment.

@@ -2879,14 +2984,14 @@ on which hint the application sets. With i3bar, you can configure its position, see [i3bar_position].

-

8.2. Giving presentations (multi-monitor)

+

10.2. Giving presentations (multi-monitor)

When giving a presentation, you typically want the audience to see what you see on your screen and then go through a series of slides (if the presentation is simple). For more complex presentations, you might want to have some notes which only you can see on your screen, while the audience can only see the slides.

-

8.2.1. Case 1: everybody gets the same output

+

10.2.1. Case 1: everybody gets the same output

This is the simple case. You connect your computer to the video projector, turn on both (computer and video projector) and configure your X server to clone the internal flat panel of your computer to the video output:

@@ -2899,7 +3004,7 @@ your screen will be left untouched (it will show the X background). So, in our example, this would be 1024x768 (my notebook has 1280x800).

-

8.2.2. Case 2: you can see more than your audience

+

10.2.2. Case 2: you can see more than your audience

This case is a bit harder. First of all, you should configure the VGA output somewhere near your internal flat panel, say right of it:

-- 2.39.2