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.14
+== Verify you are using i3 ≥ 4.14.1
Only the latest major version of i3 is supported. To verify which version
you are running, use:
4.7-85-g9c15b95 (development version)::
Your version is 85 commits newer than 4.7, and the git revision of your
-version is +9c15b95+. Go to http://code.i3wm.org/i3/commit/?h=next and see if
-the line "commit" starts with the same revision. If so, you are using the
+version is +9c15b95+. Go to https://github.com/i3/i3/commits/next and see if
+the most recent commit starts with the same revision. If so, you are using the
latest version.
Development versions of i3 have logging enabled by default and are compiled
crashed, the logfile provides all information necessary to debug the problem.
To upload a compressed version of the logfile (for a bugreport), use:
-------------------------------------------------------------------------------
-DISPLAY=:0 i3-dump-log | bzip2 -c | curl --data-binary @- http://logs.i3wm.org
-------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+DISPLAY=:0 i3-dump-log | bzip2 -c | curl --data-binary @- https://logs.i3wm.org
+-------------------------------------------------------------------------------
This command does not depend on i3 (it also works while i3 displays
the crash dialog), but it requires a working X11 connection.
information might be necessary to completely diagnose the problem.
When debugging with us in IRC, be prepared to use a so called nopaste service
-such as http://nopaste.info or http://pastebin.com because pasting large
-amounts of text in IRC sometimes leads to incomplete lines (servers have line
-length limitations) or flood kicks.
+such as https://pastebin.com because pasting large amounts of text in IRC
+sometimes leads to incomplete lines (servers have line length limitations) or
+flood kicks.
== Debugging i3bar
you understand why things are like they are. If it does not mention something
you find necessary, please do not hesitate to contact me.
+== Building i3
+
+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.
+
+== Using git / sending patches
+
+For a short introduction into using git, see
+https://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy
+or, for more documentation, see https://git-scm.com/documentation
+
+Please talk to us before working on new features to see whether they will be
+accepted. A good way for this is to open an issue and asking for opinions on it.
+Even for accepted features, this can be a good way to refine an idea upfront. However,
+we don't want to see certain features in i3, e.g., switching window focus in an
+Alt+Tab like way.
+
+When working on bugfixes, please make sure you mention that you are working on
+it in the corresponding bug report at https://github.com/i3/i3/issues. In case
+there is no bug report yet, please create one.
+
+After you are done, please submit your work for review as a pull request at
+https://github.com/i3/i3.
+
+Do not send emails to the mailing list or any author directly, and don’t submit
+them in the bugtracker, since all reviews should be done in public at
+https://github.com/i3/i3. In order to make your review go as fast as possible, you
+could have a look at previous reviews and see what the common mistakes are.
+
+=== Which branch to use?
+
+Work on i3 generally happens in two branches: “master” and “next” (the latter
+being the default branch, the one that people get when they check out the git
+repository).
+
+The contents of “master” are always stable. That is, it contains the source code
+of the latest release, plus any bugfixes that were applied since that release.
+
+New features are only found in the “next” branch. Therefore, if you are working
+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”.
+
== Window Managers
A window manager is not necessarily needed to run X, but it is usually used in
To get an impression of how different layouts are represented, just play around
and look at the data structures -- they are exposed as a JSON hash. See
-http://i3wm.org/docs/ipc.html#_tree_reply for documentation on that and an
+https://i3wm.org/docs/ipc.html#_tree_reply for documentation on that and an
example.
== Files
not relative to workspace boundaries, so you must correct their coordinates
or those containers will show up in the wrong workspace or not at all.
-== Using git / sending patches
-
-=== Introduction
-
-For a short introduction into using git, see
-http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy
-or, for more documentation, see http://git-scm.com/documentation
-
-Please talk to us before working on new features to see whether they will be
-accepted. A good way for this is to open an issue and asking for opinions on it.
-Even for accepted features, this can be a good way to refine an idea upfront. However,
-we don't want to see certain features in i3, e.g., switching window focus in an
-Alt+Tab like way.
-
-When working on bugfixes, please make sure you mention that you are working on
-it in the corresponding bug report at https://github.com/i3/i3/issues. In case
-there is no bug report yet, please create one.
-
-After you are done, please submit your work for review as a pull request at
-https://github.com/i3/i3.
-
-Do not send emails to the mailing list or any author directly, and don’t submit
-them in the bugtracker, since all reviews should be done in public at
-https://github.com/i3/i3. In order to make your review go as fast as possible, you
-could have a look at previous reviews and see what the common mistakes are.
-
-=== Which branch to use?
-
-Work on i3 generally happens in two branches: “master” and “next” (the latter
-being the default branch, the one that people get when they check out the git
-repository).
-
-The contents of “master” are always stable. That is, it contains the source code
-of the latest release, plus any bugfixes that were applied since that release.
-
-New features are only found in the “next” branch. Therefore, if you are working
-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
You can find an example of a shell script which can be used as your
+status_command+ in the bar configuration at
-http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next
+https://github.com/i3/i3/blob/next/contrib/trivial-bar-script.sh
=== Header in detail
IPC interface (interprocess communication)
==========================================
Michael Stapelberg <michael@i3wm.org>
-October 2014
+September 2017
This document describes how to interface with i3 from a separate process. This
is useful for example to remote-control i3 (to write test cases for example) or
in the IPC API is done which breaks compatibility (we hope that we don’t need
to do that).
-Currently implemented message types are the following:
-
-COMMAND (0)::
- The payload of the message is a command for i3 (like the commands you
- can bind to keys in the configuration file) and will be executed
- directly after receiving it.
-GET_WORKSPACES (1)::
- Gets the current workspaces. The reply will be a JSON-encoded list of
- workspaces (see the reply section).
-SUBSCRIBE (2)::
- Subscribes your connection to certain events. See <<events>> for a
- description of this message and the concept of events.
-GET_OUTPUTS (3)::
- Gets the current outputs. The reply will be a JSON-encoded list of outputs
- (see the reply section).
-GET_TREE (4)::
- Gets the layout tree. i3 uses a tree as data structure which includes
- every container. The reply will be the JSON-encoded tree (see the reply
- section).
-GET_MARKS (5)::
- Gets a list of marks (identifiers for containers to easily jump to them
- later). The reply will be a JSON-encoded list of window marks (see
- reply section).
-GET_BAR_CONFIG (6)::
- Gets the configuration (as JSON map) of the workspace bar with the
- given ID. If no ID is provided, an array with all configured bar IDs is
- returned instead.
-GET_VERSION (7)::
- Gets the version of i3. The reply will be a JSON-encoded dictionary
- with the major, minor, patch and human-readable version.
-GET_BINDING_MODES (8)::
- Gets a list of currently configured binding modes.
+.Currently implemented message types
+[options="header",cols="^10%,^20%,^20%,^50%"]
+|======================================================
+| Type (numeric) | Type (name) | Reply type | Purpose
+| 0 | +RUN_COMMAND+ | <<_command_reply,COMMAND>> | Run the payload as an i3 command (like the commands you can bind to keys).
+| 1 | +GET_WORKSPACES+ | <<_workspaces_reply,WORKSPACES>> | Get the list of current workspaces.
+| 2 | +SUBSCRIBE+ | <<_subscribe_reply,SUBSCRIBE>> | Subscribe this IPC connection to the event types specified in the message payload. See <<events>>.
+| 3 | +GET_OUTPUTS+ | <<_outputs_reply,OUTPUTS>> | Get the list of current outputs.
+| 4 | +GET_TREE+ | <<_tree_reply,TREE>> | Get the i3 layout tree.
+| 5 | +GET_MARKS+ | <<_marks_reply,MARKS>> | Gets the names of all currently set marks.
+| 6 | +GET_BAR_CONFIG+ | <<_bar_config_reply,BAR_CONFIG>> | Gets the specified bar configuration or the names of all bar configurations if payload is empty.
+| 7 | +GET_VERSION+ | <<_version_reply,VERSION>> | Gets the i3 version.
+| 8 | +GET_BINDING_MODES+ | <<_binding_modes_reply,BINDING_MODES>> | Gets the names of all currently configured binding modes.
+| 9 | +GET_CONFIG+ | <<_config_reply,CONFIG>> | Returns the last loaded i3 config.
+|======================================================
So, a typical message could look like this:
--------------------------------------------------
The following reply types are implemented:
COMMAND (0)::
- Confirmation/Error code for the COMMAND message.
+ Confirmation/Error code for the RUN_COMMAND message.
WORKSPACES (1)::
Reply to the GET_WORKSPACES message.
SUBSCRIBE (2)::
Reply to the GET_VERSION message.
BINDING_MODES (8)::
Reply to the GET_BINDING_MODES message.
+GET_CONFIG (9)::
+ Reply to the GET_CONFIG message.
+[[_command_reply]]
=== COMMAND reply
The reply consists of a list of serialized maps for each command that was
[{ "success": true }]
-------------------
+[[_workspaces_reply]]
=== WORKSPACES reply
The reply consists of a serialized list of workspaces. Each workspace has the
]
-------------------
+[[_subscribe_reply]]
=== SUBSCRIBE reply
The reply consists of a single serialized map. The only property is
{ "success": true }
-------------------
+[[_outputs_reply]]
=== OUTPUTS reply
The reply consists of a serialized list of outputs. Each output has the
]
-------------------
+[[_tree_reply]]
=== TREE reply
The reply consists of a serialized tree. Each node in the tree (representing
containers. This ID corresponds to what xwininfo(1) and other
X11-related tools display (usually in hex).
urgent (bool)::
- Whether this container (window or workspace) has the urgency hint set.
+ Whether this container (window, split container, floating container or
+ workspace) has the urgency hint set, directly or indirectly. All parent
+ containers up until the workspace container will be marked urgent if they
+ have at least one urgent child.
focused (bool)::
Whether this container is currently focused.
+focus (array of integer)::
+ List of child node IDs (see +nodes+, +floating_nodes+ and +id+) in focus
+ order. Traversing the tree by following the first entry in this array
+ will result in eventually reaching the one node with +focused+ set to
+ true.
+nodes (array of node)::
+ The tiling (i.e. non-floating) child containers of this node.
+floating_nodes (array of node)::
+ The floating child containers of this node. Only non-empty on nodes with
+ type +workspace+.
Please note that in the following example, I have left out some keys/values
which are not relevant for the type of the node. Otherwise, the example would
}
------------------------
+[[_marks_reply]]
=== MARKS reply
The reply consists of a single array of strings for each container that has a
If no window has a mark the response will be the empty array [].
+[[_bar_config_reply]]
=== BAR_CONFIG reply
This can be used by third-party workspace bars (especially i3bar, but others
}
--------------
+[[_version_reply]]
=== VERSION reply
The reply consists of a single JSON dictionary with the following keys:
}
-------------------
+[[_binding_modes_reply]]
=== BINDING_MODES reply
The reply consists of an array of all currently configured binding modes.
["default", "resize"]
---------------------
+[[_config_reply]]
+=== CONFIG reply
+
+The config reply is a map which currently only contains the "config" member,
+which is a string containing the config file as loaded by i3 most recently.
+
+*Example:*
+-------------------
+{ "config": "font pango:monospace 8\nbindsym Mod4+q exit\n" }
+-------------------
+
+
== Events
[[events]]
* https://github.com/tmerr/i3ipc-rs
OCaml::
* https://github.com/Armael/ocaml-i3ipc
+
+== Appendix A: Detecting byte order in memory-safe languages
+
+Some programming languages such as Go don’t offer a way to serialize data in the
+native byte order of the machine they’re running on without resorting to tricks
+involving the +unsafe+ package.
+
+The following technique can be used (and will not be broken by changes to i3) to
+detect the byte order i3 is using:
+
+1. The byte order dependent fields of an IPC message are message type and
+ payload length.
+
+ * The message type +RUN_COMMAND+ (0) is the same in big and little endian, so
+ we can use it in either byte order to elicit a reply from i3.
+
+ * The payload length 65536 + 256 (+0x00 01 01 00+) is the same in big and
+ little endian, and also small enough to not worry about memory allocations
+ of that size. We must use payloads of length 65536 + 256 in every message
+ we send, so that i3 will be able to read the entire message regardless of
+ the byte order it uses.
+
+2. Send a big endian encoded message of type +SUBSCRIBE+ (2) with payload `[]`
+ followed by 65536 + 256 - 2 +SPACE+ (ASCII 0x20) bytes.
+
+ * If i3 is running in big endian, this message is treated as a noop,
+ resulting in a +SUBSCRIBE+ reply with payload `{"success":true}`
+ footnote:[A small payload is important: that way, we circumvent dealing
+ with UNIX domain socket buffer sizes, whose size depends on the
+ implementation/operating system. Exhausting such a buffer results in an i3
+ deadlock unless you concurrently read and write, which — depending on the
+ programming language — makes the technique much more complicated.].
+
+ * If i3 is running in little endian, this message is read in its entirety due
+ to the byte order independent payload length, then
+ https://github.com/i3/i3/blob/d726d09d496577d1c337a4b97486f2c9fbc914f1/src/ipc.c#L1188[silently
+ discarded] due to the unknown message type.
+
+3. Send a byte order independent message, i.e. type +RUN_COMMAND+ (0) with
+ payload +nop byte order detection. padding:+, padded to 65536 + 256 bytes
+ with +a+ (ASCII 0x61) bytes. i3 will reply to this message with a reply of
+ type +COMMAND+ (0).
+
+ * The human-readable prefix is in there to not confuse readers of the i3 log.
+
+ * This messages serves as a synchronization primitive so that we know whether
+ i3 discarded the +SUBSCRIBE+ message or didn’t answer it yet.
+
+4. Receive a message header from i3, decoding the message type as big endian.
+
+ * If the message’s reply type is +COMMAND+ (0), i3 is running in little
+ endian (because the +SUBSCRIBE+ message was discarded). Decode the message
+ payload length as little endian, receive the message payload.
+
+ * If the message’s reply type is anything else, i3 is running in big endian
+ (because our big endian encoded +SUBSCRIBE+ message was answered). Decode
+ the message payload length in big endian, receive the message
+ payload. Then, receive the pending +COMMAND+ message reply in big endian.
+
+5. From here on out, send/receive all messages using the detected byte order.
Note: Swallowing windows into unsatisfied placeholder windows takes precedence
over
-link:http://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces[assignment
+link:https://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces[assignment
rules]. For example, if you assign all Emacs windows to workspace 1 in your i3
configuration file, but there is a placeholder window on workspace 2 which
matches Emacs as well, your newly started Emacs window will end up in the
image:layout-saving-1.png["Restored layout",width=400,link="layout-saving-1.png"]
The structure of this JSON file looks a lot like the +TREE+ reply, see
-http://build.i3wm.org/docs/ipc.html#_tree_reply for documentation on that. Some
+https://build.i3wm.org/docs/ipc.html#_tree_reply for documentation on that. Some
properties are excluded because they are not relevant when restoring a layout.
Most importantly, look at the "swallows" section of each window. This is where
easier. In case you are writing a more elaborate tool for manipulating these
layouts, you can either use a JSON parser that supports these deviations (for
example libyajl), transform the layout file to a JSON-conforming file, or
-link:http://cr.i3wm.org/[submit a patch] to make +i3-save-tree(1)+ optionally
-output standard-conforming JSON.
+link:https://github.com/i3/i3/blob/next/.github/CONTRIBUTING.md[submit a patch]
+to make +i3-save-tree(1)+ optionally output standard-conforming JSON.
== Troubleshooting
http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
2. The latest Perl documentation of the "i3test" (general testcase setup) and
"i3test::Test" (additional test instructions) modules:
- http://build.i3wm.org/docs/lib-i3test.html respectively
- http://build.i3wm.org/docs/lib-i3test-test.html
+ https://build.i3wm.org/docs/lib-i3test.html respectively
+ https://build.i3wm.org/docs/lib-i3test-test.html
3. The latest documentation on i3’s IPC interface:
- http://build.i3wm.org/docs/ipc.html
+ https://build.i3wm.org/docs/ipc.html
== Implementation
+cpanminus+ instead, though (because it asks no questions and just works):
The tests additionally require +Xephyr(1)+ to run a nested X server. Install
-+xserver-xephyr+ on Debian or +xorg-xserver-xephyr+ on Arch Linux.
++xserver-xephyr+ on Debian or +xorg-server-xephyr+ on Arch Linux.
.Installing testsuite dependencies using cpanminus (preferred)
--------------------------------------------------------------------------------
$ sudo apt-get install cpanminus
$ sudo cpanm .
$ cd ~/i3/AnyEvent-I3
+$ sudo cpanm Module::Install
$ sudo cpanm .
--------------------------------------------------------------------------------
$ cd ~/i3/testcases
$ sudo cpan .
$ cd ~/i3/AnyEvent-I3
+$ sudo cpan Module::Install
$ sudo cpan .
--------------------------------------------------------------------------------
In case you don’t have root permissions, you can also install into your home
-directory, see http://michael.stapelberg.de/cpan/
+directory, see https://michael.stapelberg.de/cpan/
=== Mechanisms
terminating it cleanly and (most importantly) for modifying and getting the
current state (layout tree).
-See [http://i3wm.org/docs/ipc.html] for documentation on the IPC interface.
+See [https://i3wm.org/docs/ipc.html] for documentation on the IPC interface.
==== X11::XCB
second part is the class ("URxvt" in this example).
Should you have any problems with assignments, make sure to check the i3
-logfile first (see http://i3wm.org/docs/debugging.html). It includes more
+logfile first (see https://i3wm.org/docs/debugging.html). It includes more
details about the matching process and the window’s actual class, instance and
title when starting up.
laptop, you might have VGA1 and LVDS1 as output names. You can see the
available outputs by running +xrandr --current+.
+If your X server supports RandR 1.5 or newer, i3 will use RandR monitor objects
+instead of output objects. Run +xrandr --listmonitors+ to see a list. Usually,
+a monitor object contains exactly one output, and has the same name as the
+output; but should that not be the case, you may specify the name of either the
+monitor or the output in i3's configuration. For example, the Dell UP2414Q uses
+two scalers internally, so its output names might be “DP1” and “DP2”, but the
+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.)
+
If you use named workspaces, they must be quoted:
*Examples*:
=== Forcing Xinerama
-As explained in-depth in <http://i3wm.org/docs/multi-monitor.html>, some X11
+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
inferior Xinerama API explicitly and therefore don’t provide support for
bindsym $mod+x focus output primary
-------------------------------------------------
--------------------------------
Note that you might not have a primary output configured yet. To do so, run:
-------------------------
xrandr --output <output> --primary
[[shmlog]]
=== Enabling shared memory logging
-As described in http://i3wm.org/docs/debugging.html, i3 can log to a shared
+As described in https://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.
+i3-wsbar+ used to be the reference implementation before we had +i3bar+.
Nowadays, it is not shipped with release tarballs, but you can still get it at
-http://code.stapelberg.de/git/i3/tree/contrib/i3-wsbar
+https://github.com/i3/i3/blob/next/contrib/i3-wsbar
=== The big picture
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_verify_you_are_using_i3_4_14">1. Verify you are using i3 ≥ 4.14</h2>\r
+<h2 id="_verify_you_are_using_i3_4_14_1">1. Verify you are using i3 ≥ 4.14.1</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Only the latest major version of i3 is supported. To verify which version\r
you are running, use:</p></div>\r
<dd>\r
<p>\r
Your version is 85 commits newer than 4.7, and the git revision of your\r
-version is <tt>9c15b95</tt>. Go to <a href="http://code.i3wm.org/i3/commit/?h=next">http://code.i3wm.org/i3/commit/?h=next</a> and see if\r
-the line "commit" starts with the same revision. If so, you are using the\r
+version is <tt>9c15b95</tt>. Go to <a href="https://github.com/i3/i3/commits/next">https://github.com/i3/i3/commits/next</a> and see if\r
+the most recent commit starts with the same revision. If so, you are using the\r
latest version.\r
</p>\r
</dd>\r
<div class="paragraph"><p>To upload a compressed version of the logfile (for a bugreport), use:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>DISPLAY=:0 i3-dump-log | bzip2 -c | curl --data-binary @- http://logs.i3wm.org</tt></pre>\r
+<pre><tt>DISPLAY=:0 i3-dump-log | bzip2 -c | curl --data-binary @- https://logs.i3wm.org</tt></pre>\r
</div></div>\r
<div class="paragraph"><p>This command does not depend on i3 (it also works while i3 displays\r
the crash dialog), but it requires a working X11 connection.</p></div>\r
you found the section which clearly highlights the problem, additional\r
information might be necessary to completely diagnose the problem.</p></div>\r
<div class="paragraph"><p>When debugging with us in IRC, be prepared to use a so called nopaste service\r
-such as <a href="http://nopaste.info">http://nopaste.info</a> or <a href="http://pastebin.com">http://pastebin.com</a> because pasting large\r
-amounts of text in IRC sometimes leads to incomplete lines (servers have line\r
-length limitations) or flood kicks.</p></div>\r
+such as <a href="https://pastebin.com">https://pastebin.com</a> because pasting large amounts of text in IRC\r
+sometimes leads to incomplete lines (servers have line length limitations) or\r
+flood kicks.</p></div>\r
</div>\r
</div>\r
<div class="sect1">\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_window_managers">1. Window Managers</h2>\r
+<h2 id="_building_i3">1. Building i3</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>You can build i3 like you build any other software package which uses autotools.\r
+Here’s a memory refresher:</p></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ autoreconf -fi\r
+$ mkdir -p build && cd build\r
+$ ../configure\r
+$ make -j8</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>(The autoreconf -fi step is unnecessary if you are building from a release tarball,\r
+ but shouldn’t hurt either.)</p></div>\r
+<div class="sect2">\r
+<h3 id="_build_system_features">1.1. Build system features</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+We use the AX_ENABLE_BUILDDIR macro to enforce builds happening in a separate\r
+ directory. This is a prerequisite for the AX_EXTEND_SRCDIR macro and building\r
+ in a separate directory is common practice anyway. In case this causes any\r
+ trouble when packaging i3 for your distribution, please open an issue.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+“make check” runs the i3 testsuite. See docs/testsuite for details.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+“make distcheck” (runs testsuite on “make dist” result, tiny bit quicker\r
+ feedback cycle than waiting for the travis build to catch the issue).\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+“make uninstall” (occasionally requested by users who compile from source)\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+“make” will build manpages/docs by default if the tools are installed.\r
+ Conversely, manpages/docs are not tried to be built for users who don’t want\r
+ to install all these dependencies to get started hacking on i3.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+non-release builds will enable address sanitizer by default. Use the\r
+ --disable-sanitizers configure option to turn off all sanitizers, and see\r
+ --help for available sanitizers.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Support for pre-compiled headers (PCH) has been dropped for now in the\r
+ interest of simplicity. If you need support for PCH, please open an issue.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Coverage reports are now generated using “make check-code-coverage”, which\r
+ requires specifying --enable-code-coverage when calling configure.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
+<h2 id="_using_git_sending_patches">2. Using git / sending patches</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>For a short introduction into using git, see\r
+<a href="https://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy">https://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy</a>\r
+or, for more documentation, see <a href="https://git-scm.com/documentation">https://git-scm.com/documentation</a></p></div>\r
+<div class="paragraph"><p>Please talk to us before working on new features to see whether they will be\r
+accepted. A good way for this is to open an issue and asking for opinions on it.\r
+Even for accepted features, this can be a good way to refine an idea upfront. However,\r
+we don’t want to see certain features in i3, e.g., switching window focus in an\r
+Alt+Tab like way.</p></div>\r
+<div class="paragraph"><p>When working on bugfixes, please make sure you mention that you are working on\r
+it in the corresponding bug report at <a href="https://github.com/i3/i3/issues">https://github.com/i3/i3/issues</a>. In case\r
+there is no bug report yet, please create one.</p></div>\r
+<div class="paragraph"><p>After you are done, please submit your work for review as a pull request at\r
+<a href="https://github.com/i3/i3">https://github.com/i3/i3</a>.</p></div>\r
+<div class="paragraph"><p>Do not send emails to the mailing list or any author directly, and don’t submit\r
+them in the bugtracker, since all reviews should be done in public at\r
+<a href="https://github.com/i3/i3">https://github.com/i3/i3</a>. In order to make your review go as fast as possible, you\r
+could have a look at previous reviews and see what the common mistakes are.</p></div>\r
+<div class="sect2">\r
+<h3 id="_which_branch_to_use">2.1. Which branch to use?</h3>\r
+<div class="paragraph"><p>Work on i3 generally happens in two branches: “master” and “next” (the latter\r
+being the default branch, the one that people get when they check out the git\r
+repository).</p></div>\r
+<div class="paragraph"><p>The contents of “master” are always stable. That is, it contains the source code\r
+of the latest release, plus any bugfixes that were applied since that release.</p></div>\r
+<div class="paragraph"><p>New features are only found in the “next” branch. Therefore, if you are working\r
+on a new feature, use the “next” branch. If you are working on a bugfix, use the\r
+“next” branch, too, but make sure your code also works on “master”.</p></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
+<h2 id="_window_managers">3. Window Managers</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>A window manager is not necessarily needed to run X, but it is usually used in\r
combination with X to facilitate some things. The window manager’s job is to\r
<div class="paragraph"><p>In the following chapters, each of these tasks and their implementation details\r
will be discussed.</p></div>\r
<div class="sect2">\r
-<h3 id="_tiling_window_managers">1.1. Tiling window managers</h3>\r
+<h3 id="_tiling_window_managers">3.1. Tiling window managers</h3>\r
<div class="paragraph"><p>Traditionally, there are two approaches to managing windows: The most common\r
one nowadays is floating, which means the user can freely move/resize the\r
windows. The other approach is called tiling, which means that your window\r
the layout you need at the moment.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_the_layout_tree">1.2. The layout tree</h3>\r
+<h3 id="_the_layout_tree">3.2. The layout tree</h3>\r
<div class="paragraph"><p>The data structure which i3 uses to keep track of your windows is a tree. Every\r
node in the tree is a container (type <tt>Con</tt>). Some containers represent actual\r
windows (every container with a <tt>window != NULL</tt>), some represent split\r
workspace, the split container we are talking about is the workspace.</p></div>\r
<div class="paragraph"><p>To get an impression of how different layouts are represented, just play around\r
and look at the data structures — they are exposed as a JSON hash. See\r
-<a href="http://i3wm.org/docs/ipc.html#_tree_reply">http://i3wm.org/docs/ipc.html#_tree_reply</a> for documentation on that and an\r
+<a href="https://i3wm.org/docs/ipc.html#_tree_reply">https://i3wm.org/docs/ipc.html#_tree_reply</a> for documentation on that and an\r
example.</p></div>\r
</div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_files">2. Files</h2>\r
+<h2 id="_files">4. Files</h2>\r
<div class="sectionbody">\r
<div class="dlist"><dl>\r
<dt class="hdlist1">\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_data_structures">3. Data structures</h2>\r
+<h2 id="_data_structures">5. Data structures</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>See include/data.h for documented data structures. The most important ones are\r
explained right here.</p></div>\r
</ol></div>\r
<div class="paragraph"><p>The data type is <tt>Con</tt>, in all cases.</p></div>\r
<div class="sect2">\r
-<h3 id="_x11_root_window">3.1. X11 root window</h3>\r
+<h3 id="_x11_root_window">5.1. X11 root window</h3>\r
<div class="paragraph"><p>The X11 root window is a single window per X11 display (a display is identified\r
by <tt>:0</tt> or <tt>:1</tt> etc.). The root window is what you draw your background image\r
on. It spans all the available outputs, e.g. <tt>VGA1</tt> is a specific part of the\r
root window and <tt>LVDS1</tt> is a specific part of the root window.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_output_container">3.2. Output container</h3>\r
+<h3 id="_output_container">5.2. Output container</h3>\r
<div class="paragraph"><p>Every active output obtained through RandR is represented by one output\r
container. Outputs are considered active when a mode is configured (meaning\r
something is actually displayed on the output) and the output is not a clone.</p></div>\r
currently on.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_content_container">3.3. Content container</h3>\r
+<h3 id="_content_container">5.3. Content container</h3>\r
<div class="paragraph"><p>Each output has multiple children. Two of them are dock containers which hold\r
dock clients. The other one is the content container, which holds the actual\r
content (workspaces) of this output.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_workspace">3.4. Workspace</h3>\r
+<h3 id="_workspace">5.4. Workspace</h3>\r
<div class="paragraph"><p>A workspace is identified by its name. Basically, you could think of\r
workspaces as different desks in your office, if you like the desktop\r
metaphor. They just contain different sets of windows and are completely\r
desktops”.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_split_container">3.5. Split container</h3>\r
+<h3 id="_split_container">5.5. Split container</h3>\r
<div class="paragraph"><p>A split container is a container which holds an arbitrary amount of split\r
containers or X11 window containers. It has an orientation (horizontal or\r
vertical) and a layout.</p></div>\r
containers) can have different border styles.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_x11_window_container">3.6. X11 window container</h3>\r
+<h3 id="_x11_window_container">5.6. X11 window container</h3>\r
<div class="paragraph"><p>An X11 window container holds exactly one X11 window. These are the leaf nodes\r
of the layout tree, they cannot have any children.</p></div>\r
</div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_list_queue_macros">4. List/queue macros</h2>\r
+<h2 id="_list_queue_macros">6. List/queue macros</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>i3 makes heavy use of the list macros defined in BSD operating systems. To\r
ensure that the operating system on which i3 is compiled has all the expected\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_naming_conventions">5. Naming conventions</h2>\r
+<h2 id="_naming_conventions">7. Naming conventions</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>There is a row of standard variables used in many events. The following names\r
should be chosen for those:</p></div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_startup_src_mainx_c_main">6. Startup (src/mainx.c, main())</h2>\r
+<h2 id="_startup_src_mainx_c_main">8. Startup (src/mainx.c, main())</h2>\r
<div class="sectionbody">\r
<div class="ulist"><ul>\r
<li>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_keybindings">7. Keybindings</h2>\r
+<h2 id="_keybindings">9. Keybindings</h2>\r
<div class="sectionbody">\r
<div class="sect2">\r
-<h3 id="_grabbing_the_bindings">7.1. Grabbing the bindings</h3>\r
+<h3 id="_grabbing_the_bindings">9.1. Grabbing the bindings</h3>\r
<div class="paragraph"><p>Grabbing the bindings is quite straight-forward. You pass X your combination of\r
modifiers and the keycode you want to grab and whether you want to grab them\r
actively or passively. Most bindings (everything except for bindings using\r
will handle the event, if not, it will replay the event.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_handling_a_keypress">7.2. Handling a keypress</h3>\r
+<h3 id="_handling_a_keypress">9.2. Handling a keypress</h3>\r
<div class="paragraph"><p>As mentioned in "Grabbing the bindings", upon a keypress event, i3 first gets\r
the correct state.</p></div>\r
<div class="paragraph"><p>Then, it looks through all bindings and gets the one which matches the received\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_manage_windows_src_main_c_manage_window_and_reparent_window">8. Manage windows (src/main.c, manage_window() and reparent_window())</h2>\r
+<h2 id="_manage_windows_src_main_c_manage_window_and_reparent_window">10. Manage windows (src/main.c, manage_window() and reparent_window())</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p><tt>manage_window()</tt> does some checks to decide whether the window should be\r
managed at all:</p></div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_what_happens_when_an_application_is_started">9. What happens when an application is started?</h2>\r
+<h2 id="_what_happens_when_an_application_is_started">11. What happens when an application is started?</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>i3 does not care about applications. All it notices is when new windows are\r
mapped (see <tt>src/handlers.c</tt>, <tt>handle_map_request()</tt>). The window is then\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_net_wm_state">10. _NET_WM_STATE</h2>\r
+<h2 id="_net_wm_state">12. _NET_WM_STATE</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Only the _NET_WM_STATE_FULLSCREEN and _NET_WM_STATE_DEMANDS_ATTENTION atoms\r
are handled.</p></div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_wm_name">11. WM_NAME</h2>\r
+<h2 id="_wm_name">13. WM_NAME</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>When the WM_NAME property of a window changes, its decoration (containing the\r
title) is re-rendered. Note that WM_NAME is in COMPOUND_TEXT encoding which is\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_net_wm_name">12. _NET_WM_NAME</h2>\r
+<h2 id="_net_wm_name">14. _NET_WM_NAME</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Like WM_NAME, this atom contains the title of a window. However, _NET_WM_NAME\r
is encoded in UTF-8. i3 will recode it to UCS-2 in order to be able to pass it\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_size_hints">13. Size hints</h2>\r
+<h2 id="_size_hints">15. Size hints</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Size hints specify the minimum/maximum size for a given window as well as its\r
aspect ratio. This is important for clients like mplayer, who only set the\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_rendering_src_layout_c_render_layout_and_render_container">14. Rendering (src/layout.c, render_layout() and render_container())</h2>\r
+<h2 id="_rendering_src_layout_c_render_layout_and_render_container">16. Rendering (src/layout.c, render_layout() and render_container())</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Rendering in i3 version 4 is the step which assigns the correct sizes for\r
borders, decoration windows, child windows and the stacking order of all\r
about the different rendering steps, in the order of "top of the tree" (root\r
container) to the bottom.</p></div>\r
<div class="sect2">\r
-<h3 id="_rendering_the_root_container">14.1. Rendering the root container</h3>\r
+<h3 id="_rendering_the_root_container">16.1. Rendering the root container</h3>\r
<div class="paragraph"><p>The i3 root container (<tt>con->type == CT_ROOT</tt>) represents the X11 root window.\r
It contains one child container for every output (like LVDS1, VGA1, …), which\r
is available on your computer.</p></div>\r
only called for the global fullscreen window.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_rendering_an_output">14.2. Rendering an output</h3>\r
+<h3 id="_rendering_an_output">16.2. Rendering an output</h3>\r
<div class="paragraph"><p>Output containers (<tt>con->layout == L_OUTPUT</tt>) represent a hardware output like\r
LVDS1, VGA1, etc. An output container has three children (at the moment): One\r
content container (having workspaces as children) and the top/bottom dock area\r
</ol></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_rendering_a_workspace_or_split_container">14.3. Rendering a workspace or split container</h3>\r
+<h3 id="_rendering_a_workspace_or_split_container">16.3. Rendering a workspace or split container</h3>\r
<div class="paragraph"><p>From here on, there really is no difference anymore. All containers are of\r
<tt>con->type == CT_CON</tt> (whether workspace or split container) and some of them\r
have a <tt>con->window</tt>, meaning they represent an actual window instead of a\r
split container.</p></div>\r
<div class="sect3">\r
-<h4 id="_default_layout">14.3.1. Default layout</h4>\r
+<h4 id="_default_layout">16.3.1. Default layout</h4>\r
<div class="paragraph"><p>In default layout, containers are placed horizontally or vertically next to\r
each other (depending on the <tt>con->orientation</tt>). If a child is a leaf node (as\r
opposed to a split container) and has border style "normal", appropriate space\r
will be reserved for its window decoration.</p></div>\r
</div>\r
<div class="sect3">\r
-<h4 id="_stacked_layout">14.3.2. Stacked layout</h4>\r
+<h4 id="_stacked_layout">16.3.2. Stacked layout</h4>\r
<div class="paragraph"><p>In stacked layout, only the focused window is actually shown (this is achieved\r
by calling <tt>x_raise_con()</tt> in reverse focus order at the end of <tt>render_con()</tt>).</p></div>\r
<div class="paragraph"><p>The available space for the focused window is the size of the container minus\r
the stacked container.</p></div>\r
</div>\r
<div class="sect3">\r
-<h4 id="_tabbed_layout">14.3.3. Tabbed layout</h4>\r
+<h4 id="_tabbed_layout">16.3.3. Tabbed layout</h4>\r
<div class="paragraph"><p>Tabbed layout works precisely like stacked layout, but the window decoration\r
position/size is different: They are placed next to each other on a single line\r
(fixed height).</p></div>\r
</div>\r
<div class="sect3">\r
-<h4 id="_dock_area_layout">14.3.4. Dock area layout</h4>\r
+<h4 id="_dock_area_layout">16.3.4. Dock area layout</h4>\r
<div class="paragraph"><p>This is a special case. Users cannot choose the dock area layout, but it will be\r
set for the dock area containers. In the dockarea layout (at the moment!),\r
windows will be placed above each other.</p></div>\r
</div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_rendering_a_window">14.4. Rendering a window</h3>\r
+<h3 id="_rendering_a_window">16.4. Rendering a window</h3>\r
<div class="paragraph"><p>A window’s size and position will be determined in the following way:</p></div>\r
<div class="olist arabic"><ol class="arabic">\r
<li>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_pushing_updates_to_x11_drawing">15. Pushing updates to X11 / Drawing</h2>\r
+<h2 id="_pushing_updates_to_x11_drawing">17. Pushing updates to X11 / Drawing</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>A big problem with i3 before version 4 was that we just sent requests to X11\r
anywhere in the source code. This was bad because nobody could understand the\r
</li>\r
</ol></div>\r
<div class="sect2">\r
-<h3 id="_pushing_state_to_x11">15.1. Pushing state to X11</h3>\r
+<h3 id="_pushing_state_to_x11">17.1. Pushing state to X11</h3>\r
<div class="paragraph"><p>In general, the function <tt>x_push_changes</tt> should be called to push state\r
changes. Only when the scope of the state change is clearly defined (for\r
example only the title of a window) and its impact is known beforehand, one can\r
<tt>WM_STATE_WITHDRAWN</tt>.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_drawing_window_decorations_borders_backgrounds">15.2. Drawing window decorations/borders/backgrounds</h3>\r
+<h3 id="_drawing_window_decorations_borders_backgrounds">17.2. Drawing window decorations/borders/backgrounds</h3>\r
<div class="paragraph"><p><tt>x_draw_decoration</tt> draws window decorations. It is run for every leaf\r
container (representing an actual X11 window) and for every non-leaf container\r
which is in a stacked/tabbed container (because stacked/tabbed containers\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_user_commands_parser_specs_commands_spec">16. User commands (parser-specs/commands.spec)</h2>\r
+<h2 id="_user_commands_parser_specs_commands_spec">18. User commands (parser-specs/commands.spec)</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>In the configuration file and when using i3 interactively (with <tt>i3-msg</tt>, for\r
example), you use commands to make i3 do things, like focus a different window,\r
in which the parser will transition into, or the keyword <em>call</em>, followed by\r
the name of a function (and optionally a state).</p></div>\r
<div class="sect2">\r
-<h3 id="_example_the_workspace_state">16.1. Example: The WORKSPACE state</h3>\r
+<h3 id="_example_the_workspace_state">18.1. Example: The WORKSPACE state</h3>\r
<div class="paragraph"><p>Let’s have a look at the WORKSPACE state, which is a good example of all\r
features. This is its definition:</p></div>\r
<div class="listingblock">\r
</dl></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_introducing_a_new_command">16.2. Introducing a new command</h3>\r
+<h3 id="_introducing_a_new_command">18.2. Introducing a new command</h3>\r
<div class="paragraph"><p>The following steps have to be taken in order to properly introduce a new\r
command (or possibly extend an existing command):</p></div>\r
<div class="olist arabic"><ol class="arabic">\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_moving_containers">17. Moving containers</h2>\r
+<h2 id="_moving_containers">19. Moving containers</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>The movement code is pretty delicate. You need to consider all cases before\r
making any changes or before being able to fully understand how it works.</p></div>\r
<div class="sect2">\r
-<h3 id="_case_1_moving_inside_the_same_container">17.1. Case 1: Moving inside the same container</h3>\r
+<h3 id="_case_1_moving_inside_the_same_container">19.1. Case 1: Moving inside the same container</h3>\r
<div class="paragraph"><p>The reference layout for this case is a single workspace in horizontal\r
orientation with two containers on it. Focus is on the left container (1).</p></div>\r
<div class="tableblock">\r
of the current one and swaps both containers.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_case_2_move_a_container_into_a_split_container">17.2. Case 2: Move a container into a split container</h3>\r
+<h3 id="_case_2_move_a_container_into_a_split_container">19.2. Case 2: Move a container into a split container</h3>\r
<div class="paragraph"><p>The reference layout for this case is a horizontal workspace with two\r
containers. The right container is a v-split with two containers. Focus is on\r
the left container (1).</p></div>\r
be flattened.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_case_3_moving_to_non_existent_top_bottom">17.3. Case 3: Moving to non-existent top/bottom</h3>\r
+<h3 id="_case_3_moving_to_non_existent_top_bottom">19.3. Case 3: Moving to non-existent top/bottom</h3>\r
<div class="paragraph"><p>Like in case 1, the reference layout for this case is a single workspace in\r
horizontal orientation with two containers on it. Focus is on the left\r
container:</p></div>\r
flattened.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_case_4_moving_to_existent_top_bottom">17.4. Case 4: Moving to existent top/bottom</h3>\r
+<h3 id="_case_4_moving_to_existent_top_bottom">19.4. Case 4: Moving to existent top/bottom</h3>\r
<div class="paragraph"><p>The reference layout for this case is a vertical workspace with two containers.\r
The bottom one is a h-split containing two containers (1 and 2). Focus is on\r
the bottom left container (1).</p></div>\r
is in vertical orientation.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_case_5_moving_in_one_child_h_split">17.5. Case 5: Moving in one-child h-split</h3>\r
+<h3 id="_case_5_moving_in_one_child_h_split">19.5. Case 5: Moving in one-child h-split</h3>\r
<div class="paragraph"><p>The reference layout for this case is a horizontal workspace with two\r
containers having a v-split on the left side with a one-child h-split on the\r
bottom. Focus is on the bottom left container (2(h)):</p></div>\r
4.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_case_6_floating_containers">17.6. Case 6: Floating containers</h3>\r
+<h3 id="_case_6_floating_containers">19.6. Case 6: Floating containers</h3>\r
<div class="paragraph"><p>The reference layout for this case is a horizontal workspace with two\r
containers plus one floating h-split container. Focus is on the floating\r
container.</p></div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_click_handling">18. Click handling</h2>\r
+<h2 id="_click_handling">20. Click handling</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Without much ado, here is the list of cases which need to be considered:</p></div>\r
<div class="ulist"><ul>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_gotchas">19. Gotchas</h2>\r
+<h2 id="_gotchas">21. Gotchas</h2>\r
<div class="sectionbody">\r
<div class="ulist"><ul>\r
<li>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_using_git_sending_patches">20. Using git / sending patches</h2>\r
-<div class="sectionbody">\r
-<div class="sect2">\r
-<h3 id="_introduction">20.1. Introduction</h3>\r
-<div class="paragraph"><p>For a short introduction into using git, see\r
-<a href="http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy">http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy</a>\r
-or, for more documentation, see <a href="http://git-scm.com/documentation">http://git-scm.com/documentation</a></p></div>\r
-<div class="paragraph"><p>Please talk to us before working on new features to see whether they will be\r
-accepted. A good way for this is to open an issue and asking for opinions on it.\r
-Even for accepted features, this can be a good way to refine an idea upfront. However,\r
-we don’t want to see certain features in i3, e.g., switching window focus in an\r
-Alt+Tab like way.</p></div>\r
-<div class="paragraph"><p>When working on bugfixes, please make sure you mention that you are working on\r
-it in the corresponding bug report at <a href="https://github.com/i3/i3/issues">https://github.com/i3/i3/issues</a>. In case\r
-there is no bug report yet, please create one.</p></div>\r
-<div class="paragraph"><p>After you are done, please submit your work for review as a pull request at\r
-<a href="https://github.com/i3/i3">https://github.com/i3/i3</a>.</p></div>\r
-<div class="paragraph"><p>Do not send emails to the mailing list or any author directly, and don’t submit\r
-them in the bugtracker, since all reviews should be done in public at\r
-<a href="https://github.com/i3/i3">https://github.com/i3/i3</a>. In order to make your review go as fast as possible, you\r
-could have a look at previous reviews and see what the common mistakes are.</p></div>\r
-</div>\r
-<div class="sect2">\r
-<h3 id="_which_branch_to_use">20.2. Which branch to use?</h3>\r
-<div class="paragraph"><p>Work on i3 generally happens in two branches: “master” and “next” (the latter\r
-being the default branch, the one that people get when they check out the git\r
-repository).</p></div>\r
-<div class="paragraph"><p>The contents of “master” are always stable. That is, it contains the source code\r
-of the latest release, plus any bugfixes that were applied since that release.</p></div>\r
-<div class="paragraph"><p>New features are only found in the “next” branch. Therefore, if you are working\r
-on a new feature, use the “next” branch. If you are working on a bugfix, use the\r
-“next” branch, too, but make sure your code also works on “master”.</p></div>\r
-</div>\r
-<div class="sect2">\r
-<h3 id="_how_to_build">20.3. How to build?</h3>\r
-<div class="paragraph"><p>You can build i3 like you build any other software package which uses autotools.\r
-Here’s a memory refresher:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>$ autoreconf -fi\r
-$ mkdir -p build && cd build\r
-$ ../configure\r
-$ make -j8</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>(The autoreconf -fi step is unnecessary if you are building from a release tarball,\r
- but shouldn’t hurt either.)</p></div>\r
-<div class="sect3">\r
-<h4 id="_build_system_features">20.3.1. Build system features</h4>\r
-<div class="ulist"><ul>\r
-<li>\r
-<p>\r
-We use the AX_ENABLE_BUILDDIR macro to enforce builds happening in a separate\r
- directory. This is a prerequisite for the AX_EXTEND_SRCDIR macro and building\r
- in a separate directory is common practice anyway. In case this causes any\r
- trouble when packaging i3 for your distribution, please open an issue.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-“make check” runs the i3 testsuite. See docs/testsuite for details.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-“make distcheck” (runs testsuite on “make dist” result, tiny bit quicker\r
- feedback cycle than waiting for the travis build to catch the issue).\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-“make uninstall” (occasionally requested by users who compile from source)\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-“make” will build manpages/docs by default if the tools are installed.\r
- Conversely, manpages/docs are not tried to be built for users who don’t want\r
- to install all these dependencies to get started hacking on i3.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-non-release builds will enable address sanitizer by default. Use the\r
- --disable-sanitizers configure option to turn off all sanitizers, and see\r
- --help for available sanitizers.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-Support for pre-compiled headers (PCH) has been dropped for now in the\r
- interest of simplicity. If you need support for PCH, please open an issue.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-Coverage reports are now generated using “make check-code-coverage”, which\r
- requires specifying --enable-code-coverage when calling configure.\r
-</p>\r
-</li>\r
-</ul></div>\r
-</div>\r
-</div>\r
-</div>\r
-</div>\r
-<div class="sect1">\r
-<h2 id="_thought_experiments">21. Thought experiments</h2>\r
+<h2 id="_thought_experiments">22. Thought experiments</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>In this section, we collect thought experiments, so that we don’t forget our\r
thoughts about specific topics. They are not necessary to get into hacking i3,\r
before asking us why things are the way they are or why we don’t implement\r
things.</p></div>\r
<div class="sect2">\r
-<h3 id="_using_cgroups_per_workspace">21.1. Using cgroups per workspace</h3>\r
+<h3 id="_using_cgroups_per_workspace">22.1. Using cgroups per workspace</h3>\r
<div class="paragraph"><p>cgroups (control groups) are a linux-only feature which provides the ability to\r
group multiple processes. For each group, you can individually set resource\r
limits, like allowed memory usage. Furthermore, and more importantly for our\r
\n.</p></div>\r
<div class="paragraph"><p>You can find an example of a shell script which can be used as your\r
<tt>status_command</tt> in the bar configuration at\r
-<a href="http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next">http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next</a></p></div>\r
+<a href="https://github.com/i3/i3/blob/next/contrib/trivial-bar-script.sh">https://github.com/i3/i3/blob/next/contrib/trivial-bar-script.sh</a></p></div>\r
<div class="sect2">\r
<h3 id="_header_in_detail">2.1. Header in detail</h3>\r
<div class="dlist"><dl>\r
<h1>IPC interface (interprocess communication)</h1>\r
<span id="author">Michael Stapelberg</span><br />\r
<span id="email"><tt><<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>></tt></span><br />\r
-<span id="revdate">October 2014</span>\r
+<span id="revdate">September 2017</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div class="paragraph"><p>The magic string currently is "i3-ipc" and will only be changed when a change\r
in the IPC API is done which breaks compatibility (we hope that we don’t need\r
to do that).</p></div>\r
-<div class="paragraph"><p>Currently implemented message types are the following:</p></div>\r
-<div class="dlist"><dl>\r
-<dt class="hdlist1">\r
-COMMAND (0)\r
-</dt>\r
-<dd>\r
-<p>\r
- The payload of the message is a command for i3 (like the commands you\r
- can bind to keys in the configuration file) and will be executed\r
- directly after receiving it.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_WORKSPACES (1)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets the current workspaces. The reply will be a JSON-encoded list of\r
- workspaces (see the reply section).\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-SUBSCRIBE (2)\r
-</dt>\r
-<dd>\r
-<p>\r
- Subscribes your connection to certain events. See <a href="#events">[events]</a> for a\r
- description of this message and the concept of events.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_OUTPUTS (3)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets the current outputs. The reply will be a JSON-encoded list of outputs\r
- (see the reply section).\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_TREE (4)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets the layout tree. i3 uses a tree as data structure which includes\r
- every container. The reply will be the JSON-encoded tree (see the reply\r
- section).\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_MARKS (5)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets a list of marks (identifiers for containers to easily jump to them\r
- later). The reply will be a JSON-encoded list of window marks (see\r
- reply section).\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_BAR_CONFIG (6)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets the configuration (as JSON map) of the workspace bar with the\r
- given ID. If no ID is provided, an array with all configured bar IDs is\r
- returned instead.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_VERSION (7)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets the version of i3. The reply will be a JSON-encoded dictionary\r
- with the major, minor, patch and human-readable version.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-GET_BINDING_MODES (8)\r
-</dt>\r
-<dd>\r
-<p>\r
- Gets a list of currently configured binding modes.\r
-</p>\r
-</dd>\r
-</dl></div>\r
+<div class="tableblock">\r
+<table rules="all"\r
+width="100%"\r
+frame="border"\r
+cellspacing="0" cellpadding="4">\r
+<caption class="title">Table 1. Currently implemented message types</caption>\r
+<col width="10%" />\r
+<col width="20%" />\r
+<col width="20%" />\r
+<col width="50%" />\r
+<thead>\r
+<tr>\r
+<th align="center" valign="top"> Type (numeric) </th>\r
+<th align="center" valign="top"> Type (name) </th>\r
+<th align="center" valign="top"> Reply type </th>\r
+<th align="center" valign="top"> Purpose</th>\r
+</tr>\r
+</thead>\r
+<tbody>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">0</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>RUN_COMMAND</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_command_reply">COMMAND</a></p></td>\r
+<td align="center" valign="top"><p class="table">Run the payload as an i3 command (like the commands you can bind to keys).</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">1</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_WORKSPACES</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_workspaces_reply">WORKSPACES</a></p></td>\r
+<td align="center" valign="top"><p class="table">Get the list of current workspaces.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">2</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>SUBSCRIBE</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_subscribe_reply">SUBSCRIBE</a></p></td>\r
+<td align="center" valign="top"><p class="table">Subscribe this IPC connection to the event types specified in the message payload. See <a href="#events">[events]</a>.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">3</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_OUTPUTS</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_outputs_reply">OUTPUTS</a></p></td>\r
+<td align="center" valign="top"><p class="table">Get the list of current outputs.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">4</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_TREE</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_tree_reply">TREE</a></p></td>\r
+<td align="center" valign="top"><p class="table">Get the i3 layout tree.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">5</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_MARKS</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_marks_reply">MARKS</a></p></td>\r
+<td align="center" valign="top"><p class="table">Gets the names of all currently set marks.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">6</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_BAR_CONFIG</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_bar_config_reply">BAR_CONFIG</a></p></td>\r
+<td align="center" valign="top"><p class="table">Gets the specified bar configuration or the names of all bar configurations if payload is empty.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">7</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_VERSION</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_version_reply">VERSION</a></p></td>\r
+<td align="center" valign="top"><p class="table">Gets the i3 version.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">8</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_BINDING_MODES</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_binding_modes_reply">BINDING_MODES</a></p></td>\r
+<td align="center" valign="top"><p class="table">Gets the names of all currently configured binding modes.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="center" valign="top"><p class="table">9</p></td>\r
+<td align="center" valign="top"><p class="table"><tt>GET_CONFIG</tt></p></td>\r
+<td align="center" valign="top"><p class="table"><a href="#_config_reply">CONFIG</a></p></td>\r
+<td align="center" valign="top"><p class="table">Returns the last loaded i3 config.</p></td>\r
+</tr>\r
+</tbody>\r
+</table>\r
+</div>\r
<div class="paragraph"><p>So, a typical message could look like this:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
</dt>\r
<dd>\r
<p>\r
- Confirmation/Error code for the COMMAND message.\r
+ Confirmation/Error code for the RUN_COMMAND message.\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
Reply to the GET_BINDING_MODES message.\r
</p>\r
</dd>\r
+<dt class="hdlist1">\r
+GET_CONFIG (9)\r
+</dt>\r
+<dd>\r
+<p>\r
+ Reply to the GET_CONFIG message.\r
+</p>\r
+</dd>\r
</dl></div>\r
</div>\r
<div class="sect2">\r
</dt>\r
<dd>\r
<p>\r
- Whether this container (window or workspace) has the urgency hint set.\r
+ Whether this container (window, split container, floating container or\r
+ workspace) has the urgency hint set, directly or indirectly. All parent\r
+ containers up until the workspace container will be marked urgent if they\r
+ have at least one urgent child.\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
Whether this container is currently focused.\r
</p>\r
</dd>\r
+<dt class="hdlist1">\r
+focus (array of integer)\r
+</dt>\r
+<dd>\r
+<p>\r
+ List of child node IDs (see <tt>nodes</tt>, <tt>floating_nodes</tt> and <tt>id</tt>) in focus\r
+ order. Traversing the tree by following the first entry in this array\r
+ will result in eventually reaching the one node with <tt>focused</tt> set to\r
+ true.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+nodes (array of node)\r
+</dt>\r
+<dd>\r
+<p>\r
+ The tiling (i.e. non-floating) child containers of this node.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+floating_nodes (array of node)\r
+</dt>\r
+<dd>\r
+<p>\r
+ The floating child containers of this node. Only non-empty on nodes with\r
+ type <tt>workspace</tt>.\r
+</p>\r
+</dd>\r
</dl></div>\r
<div class="paragraph"><p>Please note that in the following example, I have left out some keys/values\r
which are not relevant for the type of the node. Otherwise, the example would\r
<pre><tt>["default", "resize"]</tt></pre>\r
</div></div>\r
</div>\r
+<div class="sect2">\r
+<h3 id="_config_reply">3.11. CONFIG reply</h3>\r
+<div class="paragraph"><p>The config reply is a map which currently only contains the "config" member,\r
+which is a string containing the config file as loaded by i3 most recently.</p></div>\r
+<div class="paragraph"><p><strong>Example:</strong></p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>{ "config": "font pango:monospace 8\nbindsym Mod4+q exit\n" }</tt></pre>\r
+</div></div>\r
+</div>\r
</div>\r
</div>\r
<div class="sect1">\r
</dl></div>\r
</div>\r
</div>\r
+<div class="sect1">\r
+<h2 id="_appendix_a_detecting_byte_order_in_memory_safe_languages">6. Appendix A: Detecting byte order in memory-safe languages</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Some programming languages such as Go don’t offer a way to serialize data in the\r
+native byte order of the machine they’re running on without resorting to tricks\r
+involving the <tt>unsafe</tt> package.</p></div>\r
+<div class="paragraph"><p>The following technique can be used (and will not be broken by changes to i3) to\r
+detect the byte order i3 is using:</p></div>\r
+<div class="olist arabic"><ol class="arabic">\r
+<li>\r
+<p>\r
+The byte order dependent fields of an IPC message are message type and\r
+ payload length.\r
+</p>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+The message type <tt>RUN_COMMAND</tt> (0) is the same in big and little endian, so\r
+ we can use it in either byte order to elicit a reply from i3.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+The payload length 65536 + 256 (<tt>0x00 01 01 00</tt>) is the same in big and\r
+ little endian, and also small enough to not worry about memory allocations\r
+ of that size. We must use payloads of length 65536 + 256 in every message\r
+ we send, so that i3 will be able to read the entire message regardless of\r
+ the byte order it uses.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</li>\r
+<li>\r
+<p>\r
+Send a big endian encoded message of type <tt>SUBSCRIBE</tt> (2) with payload <tt>[]</tt>\r
+ followed by 65536 + 256 - 2 <tt>SPACE</tt> (ASCII 0x20) bytes.\r
+</p>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+If i3 is running in big endian, this message is treated as a noop,\r
+ resulting in a <tt>SUBSCRIBE</tt> reply with payload <tt>{"success":true}</tt>\r
+ <span class="footnote"><br />[A small payload is important: that way, we circumvent dealing\r
+ with UNIX domain socket buffer sizes, whose size depends on the\r
+ implementation/operating system. Exhausting such a buffer results in an i3\r
+ deadlock unless you concurrently read and write, which — depending on the\r
+ programming language — makes the technique much more complicated.]<br /></span>.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+If i3 is running in little endian, this message is read in its entirety due\r
+ to the byte order independent payload length, then\r
+ <a href="https://github.com/i3/i3/blob/d726d09d496577d1c337a4b97486f2c9fbc914f1/src/ipc.c#L1188">silently\r
+ discarded</a> due to the unknown message type.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</li>\r
+<li>\r
+<p>\r
+Send a byte order independent message, i.e. type <tt>RUN_COMMAND</tt> (0) with\r
+ payload <tt>nop byte order detection. padding:</tt>, padded to 65536 + 256 bytes\r
+ with <tt>a</tt> (ASCII 0x61) bytes. i3 will reply to this message with a reply of\r
+ type <tt>COMMAND</tt> (0).\r
+</p>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+The human-readable prefix is in there to not confuse readers of the i3 log.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+This messages serves as a synchronization primitive so that we know whether\r
+ i3 discarded the <tt>SUBSCRIBE</tt> message or didn’t answer it yet.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</li>\r
+<li>\r
+<p>\r
+Receive a message header from i3, decoding the message type as big endian.\r
+</p>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+If the message’s reply type is <tt>COMMAND</tt> (0), i3 is running in little\r
+ endian (because the <tt>SUBSCRIBE</tt> message was discarded). Decode the message\r
+ payload length as little endian, receive the message payload.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+If the message’s reply type is anything else, i3 is running in big endian\r
+ (because our big endian encoded <tt>SUBSCRIBE</tt> message was answered). Decode\r
+ the message payload length in big endian, receive the message\r
+ payload. Then, receive the pending <tt>COMMAND</tt> message reply in big endian.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</li>\r
+<li>\r
+<p>\r
+From here on out, send/receive all messages using the detected byte order.\r
+</p>\r
+</li>\r
+</ol></div>\r
+</div>\r
+</div>\r
</div>\r
<div id="footnotes"><hr /></div>\r
<div id="footer" lang="de">\r
<strong>swallowed</strong> by the placeholder container, hence the term.</p></div>\r
<div class="paragraph"><p>Note: Swallowing windows into unsatisfied placeholder windows takes precedence\r
over\r
-<a href="http://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces">assignment\r
+<a href="https://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces">assignment\r
rules</a>. For example, if you assign all Emacs windows to workspace 1 in your i3\r
configuration file, but there is a placeholder window on workspace 2 which\r
matches Emacs as well, your newly started Emacs window will end up in the\r
</a>\r
</span></p></div>\r
<div class="paragraph"><p>The structure of this JSON file looks a lot like the <tt>TREE</tt> reply, see\r
-<a href="http://build.i3wm.org/docs/ipc.html#_tree_reply">http://build.i3wm.org/docs/ipc.html#_tree_reply</a> for documentation on that. Some\r
+<a href="https://build.i3wm.org/docs/ipc.html#_tree_reply">https://build.i3wm.org/docs/ipc.html#_tree_reply</a> for documentation on that. Some\r
properties are excluded because they are not relevant when restoring a layout.</p></div>\r
<div class="paragraph"><p>Most importantly, look at the "swallows" section of each window. This is where\r
you need to be more or less specific. As an example, remember the section about\r
easier. In case you are writing a more elaborate tool for manipulating these\r
layouts, you can either use a JSON parser that supports these deviations (for\r
example libyajl), transform the layout file to a JSON-conforming file, or\r
-<a href="http://cr.i3wm.org/">submit a patch</a> to make <tt>i3-save-tree(1)</tt> optionally\r
-output standard-conforming JSON.</p></div>\r
+<a href="https://github.com/i3/i3/blob/next/.github/CONTRIBUTING.md">submit a patch</a>\r
+to make <tt>i3-save-tree(1)</tt> optionally output standard-conforming JSON.</p></div>\r
</div>\r
</div>\r
</div>\r
<p>\r
The latest Perl documentation of the "i3test" (general testcase setup) and\r
"i3test::Test" (additional test instructions) modules:\r
- <a href="http://build.i3wm.org/docs/lib-i3test.html">http://build.i3wm.org/docs/lib-i3test.html</a> respectively\r
- <a href="http://build.i3wm.org/docs/lib-i3test-test.html">http://build.i3wm.org/docs/lib-i3test-test.html</a>\r
+ <a href="https://build.i3wm.org/docs/lib-i3test.html">https://build.i3wm.org/docs/lib-i3test.html</a> respectively\r
+ <a href="https://build.i3wm.org/docs/lib-i3test-test.html">https://build.i3wm.org/docs/lib-i3test-test.html</a>\r
</p>\r
</li>\r
<li>\r
<p>\r
The latest documentation on i3’s IPC interface:\r
- <a href="http://build.i3wm.org/docs/ipc.html">http://build.i3wm.org/docs/ipc.html</a>\r
+ <a href="https://build.i3wm.org/docs/ipc.html">https://build.i3wm.org/docs/ipc.html</a>\r
</p>\r
</li>\r
</ol></div>\r
used to install the testsuite. Many users prefer to use the more modern\r
<tt>cpanminus</tt> instead, though (because it asks no questions and just works):</p></div>\r
<div class="paragraph"><p>The tests additionally require <tt>Xephyr(1)</tt> to run a nested X server. Install\r
-<tt>xserver-xephyr</tt> on Debian or <tt>xorg-xserver-xephyr</tt> on Arch Linux.</p></div>\r
+<tt>xserver-xephyr</tt> on Debian or <tt>xorg-server-xephyr</tt> on Arch Linux.</p></div>\r
<div class="listingblock">\r
<div class="title">Installing testsuite dependencies using cpanminus (preferred)</div>\r
<div class="content">\r
$ sudo apt-get install cpanminus\r
$ sudo cpanm .\r
$ cd ~/i3/AnyEvent-I3\r
+$ sudo cpanm Module::Install\r
$ sudo cpanm .</tt></pre>\r
</div></div>\r
<div class="paragraph"><p>If you don’t want to use cpanminus for some reason, the same works with cpan:</p></div>\r
<pre><tt>$ cd ~/i3/testcases\r
$ sudo cpan .\r
$ cd ~/i3/AnyEvent-I3\r
+$ sudo cpan Module::Install\r
$ sudo cpan .</tt></pre>\r
</div></div>\r
<div class="paragraph"><p>In case you don’t have root permissions, you can also install into your home\r
-directory, see <a href="http://michael.stapelberg.de/cpan/">http://michael.stapelberg.de/cpan/</a></p></div>\r
+directory, see <a href="https://michael.stapelberg.de/cpan/">https://michael.stapelberg.de/cpan/</a></p></div>\r
</div>\r
<div class="sect2">\r
<h3 id="_mechanisms">3.2. Mechanisms</h3>\r
interface which i3 provides. It is used for the startup process of i3, for\r
terminating it cleanly and (most importantly) for modifying and getting the\r
current state (layout tree).</p></div>\r
-<div class="paragraph"><p>See [<a href="http://i3wm.org/docs/ipc.html">http://i3wm.org/docs/ipc.html</a>] for documentation on the IPC interface.</p></div>\r
+<div class="paragraph"><p>See [<a href="https://i3wm.org/docs/ipc.html">https://i3wm.org/docs/ipc.html</a>] for documentation on the IPC interface.</p></div>\r
</div>\r
<div class="sect3">\r
<h4 id="_x11_xcb">3.2.4. X11::XCB</h4>\r
<div class="paragraph"><p>The first part of the WM_CLASS is the instance ("irssi" in this example), the\r
second part is the class ("URxvt" in this example).</p></div>\r
<div class="paragraph"><p>Should you have any problems with assignments, make sure to check the i3\r
-logfile first (see <a href="http://i3wm.org/docs/debugging.html">http://i3wm.org/docs/debugging.html</a>). It includes more\r
+logfile first (see <a href="https://i3wm.org/docs/debugging.html">https://i3wm.org/docs/debugging.html</a>). It includes more\r
details about the matching process and the window’s actual class, instance and\r
title when starting up.</p></div>\r
<div class="paragraph"><p>Note that if you want to start an application just once on a specific\r
<div class="paragraph"><p>The <em>output</em> is the name of the RandR output you attach your screen to. On a\r
laptop, you might have VGA1 and LVDS1 as output names. You can see the\r
available outputs by running <tt>xrandr --current</tt>.</p></div>\r
+<div class="paragraph"><p>If your X server supports RandR 1.5 or newer, i3 will use RandR monitor objects\r
+instead of output objects. Run <tt>xrandr --listmonitors</tt> to see a list. Usually,\r
+a monitor object contains exactly one output, and has the same name as the\r
+output; but should that not be the case, you may specify the name of either the\r
+monitor or the output in i3’s configuration. For example, the Dell UP2414Q uses\r
+two scalers internally, so its output names might be “DP1” and “DP2”, but the\r
+monitor name is “Dell UP2414Q”.</p></div>\r
+<div class="paragraph"><p>(Note that even if you specify the name of an output which doesn’t span the\r
+entire monitor, i3 will still use the entire area of the containing monitor\r
+rather than that of just the output’s.)</p></div>\r
<div class="paragraph"><p>If you use named workspaces, they must be quoted:</p></div>\r
<div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
<div class="listingblock">\r
</div>\r
<div class="sect2">\r
<h3 id="_forcing_xinerama">4.25. Forcing Xinerama</h3>\r
-<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
+<div class="paragraph"><p>As explained in-depth in <a href="https://i3wm.org/docs/multi-monitor.html">https://i3wm.org/docs/multi-monitor.html</a>, some X11\r
video drivers (especially the nVidia binary driver) only provide support for\r
Xinerama instead of RandR. In such a situation, i3 must be told to use the\r
inferior Xinerama API explicitly and therefore don’t provide support for\r
# Focus the primary output\r
bindsym $mod+x focus output primary</tt></pre>\r
</div></div>\r
+<div class="paragraph"><p>Note that you might not have a primary output configured yet. To do so, run:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>Note that you might not have a primary output configured yet. To do so, run:</tt></pre>\r
+<pre><tt>xrandr --output <output> --primary</tt></pre>\r
</div></div>\r
-<div class="paragraph"><p>xrandr --output <output> --primary</p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_moving_containers">6.5. Moving containers</h3>\r
+<div class="paragraph"><p>Use the <tt>move</tt> command to move a container.</p></div>\r
+<div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>=== Moving containers\r
-\r
-Use the +move+ command to move a container.\r
-\r
-*Syntax*:</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p># Moves the container into the given direction.\r
+<pre><tt># Moves the container into the given direction.\r
# The optional pixel argument specifies how far the\r
# container should be moved if it is floating and\r
# defaults to 10 pixels.\r
-move <left|right|down|up> [<px> px]</p></div>\r
-<div class="paragraph"><p># Moves the container either to a specific location\r
-# or to the center of the screen. If <em>absolute</em> is\r
+move <left|right|down|up> [<px> px]\r
+\r
+# Moves the container either to a specific location\r
+# or to the center of the screen. If 'absolute' is\r
# used, it is moved to the center of all outputs.\r
move [absolute] position <pos_x> [px] <pos_y> [px]\r
-move [absolute] position center</p></div>\r
-<div class="paragraph"><p># Moves the container to the current position of the\r
+move [absolute] position center\r
+\r
+# Moves the container to the current position of the\r
# mouse cursor. Only affects floating containers.\r
-move position mouse</p></div>\r
+move position mouse</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>*Examples*:</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p># Move container to the left, bottom, top, right\r
+<pre><tt># Move container to the left, bottom, top, right\r
bindsym $mod+j move left\r
bindsym $mod+k move down\r
bindsym $mod+l move up\r
-bindsym $mod+semicolon move right</p></div>\r
-<div class="paragraph"><p># Move container, but make floating containers\r
+bindsym $mod+semicolon move right\r
+\r
+# Move container, but make floating containers\r
# move more than the default\r
-bindsym $mod+j move left 20 px</p></div>\r
-<div class="paragraph"><p># Move floating container to the center of all outputs\r
-bindsym $mod+c move absolute position center</p></div>\r
-<div class="paragraph"><p># Move container to the current position of the cursor\r
-bindsym $mod+m move position mouse</p></div>\r
-<div class="listingblock">\r
-<div class="content">\r
-<pre><tt>=== Swapping containers\r
+bindsym $mod+j move left 20 px\r
\r
-Two containers can be swapped (i.e., move to each other's position) by using\r
-the +swap+ command. They will assume the position and geometry of the container\r
-they are swapped with.\r
+# Move floating container to the center of all outputs\r
+bindsym $mod+c move absolute position center\r
\r
-The first container to participate in the swapping can be selected through the\r
+# Move container to the current position of the cursor\r
+bindsym $mod+m move position mouse</tt></pre>\r
+</div></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_swapping_containers">6.6. Swapping containers</h3>\r
+<div class="paragraph"><p>Two containers can be swapped (i.e., move to each other’s position) by using\r
+the <tt>swap</tt> command. They will assume the position and geometry of the container\r
+they are swapped with.</p></div>\r
+<div class="paragraph"><p>The first container to participate in the swapping can be selected through the\r
normal command criteria process with the focused window being the usual\r
fallback if no criteria are specified. The second container can be selected\r
-using one of the following methods:\r
-\r
-+id+:: The X11 window ID of a client window.\r
-+con_id+:: The i3 container ID of a container.\r
-+mark+:: A container with the specified mark, see <<vim_like_marks>>.\r
-\r
-Note that swapping does not work with all containers. Most notably, swapping\r
+using one of the following methods:</p></div>\r
+<div class="dlist"><dl>\r
+<dt class="hdlist1">\r
+<tt>id</tt>\r
+</dt>\r
+<dd>\r
+<p>\r
+The X11 window ID of a client window.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+<tt>con_id</tt>\r
+</dt>\r
+<dd>\r
+<p>\r
+The i3 container ID of a container.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+<tt>mark</tt>\r
+</dt>\r
+<dd>\r
+<p>\r
+A container with the specified mark, see <a href="#vim_like_marks">[vim_like_marks]</a>.\r
+</p>\r
+</dd>\r
+</dl></div>\r
+<div class="paragraph"><p>Note that swapping does not work with all containers. Most notably, swapping\r
floating containers or containers that have a parent-child relationship to one\r
-another does not work.\r
-\r
-*Syntax*:</tt></pre>\r
+another does not work.</p></div>\r
+<div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>swap container with id|con_id|mark <arg></tt></pre>\r
</div></div>\r
-</div>\r
-</div>\r
-</div>\r
-<div class="sect1">\r
-<h2 id="_swap_container_with_id_con_id_mark_lt_arg_gt">7. swap container with id|con_id|mark <arg></h2>\r
-<div class="sectionbody">\r
<div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
<div class="listingblock">\r
<div class="content">\r
# Swaps container marked »A« and »B«\r
[con_mark="^A$"] swap container with mark B</tt></pre>\r
</div></div>\r
+</div>\r
<div class="sect2">\r
-<h3 id="_sticky_floating_windows">7.1. Sticky floating windows</h3>\r
+<h3 id="_sticky_floating_windows">6.7. Sticky floating windows</h3>\r
<div class="paragraph"><p>If you want a window to stick to the glass, i.e., have it stay on screen even\r
if you switch to another workspace, you can use the <tt>sticky</tt> command. For\r
example, this can be useful for notepads, a media player or a video chat\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_changing_named_workspaces_moving_to_workspaces">7.2. Changing (named) workspaces/moving to workspaces</h3>\r
+<h3 id="_changing_named_workspaces_moving_to_workspaces">6.8. Changing (named) workspaces/moving to workspaces</h3>\r
<div class="paragraph"><p>To change to a specific workspace, use the <tt>workspace</tt> command, followed by the\r
number or name of the workspace. Pass the optional flag\r
<tt>--no-auto-back-and-forth</tt> to disable <a href="#back_and_forth">[back_and_forth]</a> for this specific call\r
bindsym $mod+F1 [class="Firefox"] move workspace current</tt></pre>\r
</div></div>\r
<div class="sect3">\r
-<h4 id="_named_workspaces">7.2.1. Named workspaces</h4>\r
+<h4 id="_named_workspaces">6.8.1. Named workspaces</h4>\r
<div class="paragraph"><p>Workspaces are identified by their name. So, instead of using numbers in the\r
workspace command, you can use an arbitrary name:</p></div>\r
<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
specify a default name if there’s currently no workspace starting with a "1".</p></div>\r
</div>\r
<div class="sect3">\r
-<h4 id="_renaming_workspaces">7.2.2. Renaming workspaces</h4>\r
+<h4 id="_renaming_workspaces">6.8.2. Renaming workspaces</h4>\r
<div class="paragraph"><p>You can rename workspaces. This might be useful to start with the default\r
numbered workspaces, do your work, and rename the workspaces afterwards to\r
reflect what’s actually on them. You can also omit the old name to rename\r
</div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_moving_workspaces_to_a_different_screen">7.3. Moving workspaces to a different screen</h3>\r
+<h3 id="_moving_workspaces_to_a_different_screen">6.9. Moving workspaces to a different screen</h3>\r
<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
RandR output.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_moving_containers_workspaces_to_randr_outputs">7.4. Moving containers/workspaces to RandR outputs</h3>\r
+<h3 id="_moving_containers_workspaces_to_randr_outputs">6.10. Moving containers/workspaces to RandR outputs</h3>\r
<div class="paragraph"><p>To move a container to another RandR output (addressed by names like <tt>LVDS1</tt> or\r
<tt>VGA1</tt>) or to a RandR output identified by a specific direction (like <tt>left</tt>,\r
<tt>right</tt>, <tt>up</tt> or <tt>down</tt>), there are two commands:</p></div>\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_move_window_container_to_mark_lt_mark_gt">8. move window|container to mark <mark></h2>\r
+<h2 id="_move_window_container_to_mark_lt_mark_gt">7. move window|container to mark <mark></h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
<div class="listingblock">\r
<pre><tt>for_window [instance="tabme"] move window to mark target</tt></pre>\r
</div></div>\r
<div class="sect2">\r
-<h3 id="resizingconfig">8.1. Resizing containers/windows</h3>\r
+<h3 id="resizingconfig">7.1. Resizing containers/windows</h3>\r
<div class="paragraph"><p>If you want to resize containers/windows using your keyboard, you can use the\r
<tt>resize</tt> command:</p></div>\r
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_jumping_to_specific_windows">8.2. Jumping to specific windows</h3>\r
+<h3 id="_jumping_to_specific_windows">7.2. Jumping to specific windows</h3>\r
<div class="paragraph"><p>Often when in a multi-monitor environment, you want to quickly jump to a\r
specific window. For example, while working on workspace 3 you may want to\r
jump to your mail client to email your boss that you’ve achieved some\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="vim_like_marks">8.3. VIM-like marks (mark/goto)</h3>\r
+<h3 id="vim_like_marks">7.3. VIM-like marks (mark/goto)</h3>\r
<div class="paragraph"><p>This feature is like the jump feature: It allows you to directly jump to a\r
specific window (this means switching to the appropriate workspace and setting\r
focus to the windows). However, you can directly mark a specific window with\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="pango_markup">8.4. Window title format</h3>\r
+<h3 id="pango_markup">7.4. Window title format</h3>\r
<div class="paragraph"><p>By default, i3 will simply print the X11 window title. Using <tt>title_format</tt>,\r
this can be customized by setting the format to the desired output. This\r
directive supports\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_changing_border_style">8.5. Changing border style</h3>\r
+<h3 id="_changing_border_style">7.5. Changing border style</h3>\r
<div class="paragraph"><p>To change the border of the current client, you can use <tt>border normal</tt> to use the normal\r
border (including window title), <tt>border pixel 1</tt> to use a 1-pixel border (no window title)\r
and <tt>border none</tt> to make the client borderless.</p></div>\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="shmlog">8.6. Enabling shared memory logging</h3>\r
-<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
+<h3 id="shmlog">7.6. Enabling shared memory logging</h3>\r
+<div class="paragraph"><p>As described in <a href="https://i3wm.org/docs/debugging.html">https://i3wm.org/docs/debugging.html</a>, i3 can log to a shared\r
memory buffer, which you can dump using <tt>i3-dump-log</tt>. The <tt>shmlog</tt> command\r
allows you to enable or disable the shared memory logging at runtime.</p></div>\r
<div class="paragraph"><p>Note that when using <tt>shmlog <size_in_bytes></tt>, the current log will be\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_enabling_debug_logging">8.7. Enabling debug logging</h3>\r
+<h3 id="_enabling_debug_logging">7.7. Enabling debug logging</h3>\r
<div class="paragraph"><p>The <tt>debuglog</tt> command allows you to enable or disable debug logging at\r
runtime. Debug logging is much more verbose than non-debug logging. This\r
command does not activate shared memory logging (shmlog), and as such is most\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_reloading_restarting_exiting">8.8. Reloading/Restarting/Exiting</h3>\r
+<h3 id="_reloading_restarting_exiting">7.8. Reloading/Restarting/Exiting</h3>\r
<div class="paragraph"><p>You can make i3 reload its configuration file with <tt>reload</tt>. You can also\r
restart i3 inplace with the <tt>restart</tt> command to get it out of some weird state\r
(if that should ever happen) or to perform an upgrade without having to restart\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_scratchpad">8.9. Scratchpad</h3>\r
+<h3 id="_scratchpad">7.9. Scratchpad</h3>\r
<div class="paragraph"><p>There are two commands to use any existing window as scratchpad window. <tt>move\r
scratchpad</tt> will move a window to the scratchpad workspace. This will make it\r
invisible until you show it again. There is no way to open that workspace.\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_nop">8.10. Nop</h3>\r
+<h3 id="_nop">7.10. Nop</h3>\r
<div class="paragraph"><p>There is a no operation command <tt>nop</tt> which allows you to override default\r
behavior. This can be useful for, e.g., disabling a focus change on clicks with\r
the middle mouse button.</p></div>\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_i3bar_control">8.11. i3bar control</h3>\r
+<h3 id="_i3bar_control">7.11. i3bar control</h3>\r
<div class="paragraph"><p>There are two options in the configuration of each i3bar instance that can be\r
changed during runtime by invoking a command through i3. The commands <tt>bar\r
hidden_state</tt> and <tt>bar mode</tt> allow setting the current hidden_state\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="multi_monitor">9. Multiple monitors</h2>\r
+<h2 id="multi_monitor">8. Multiple monitors</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>As you can see in the goal list on the website, i3 was specifically developed\r
with support for multiple monitors in mind. This section will explain how to\r
screens, you can have the "traditional" approach of having X workspaces per\r
screen by changing your configuration (using modes, for example).</p></div>\r
<div class="sect2">\r
-<h3 id="_configuring_your_monitors">9.1. Configuring your monitors</h3>\r
+<h3 id="_configuring_your_monitors">8.1. Configuring your monitors</h3>\r
<div class="paragraph"><p>To help you get going if you have never used multiple monitors before, here is\r
a short overview of the xrandr options which will probably be of interest to\r
you. It is always useful to get an overview of the current screen configuration.\r
<div class="paragraph"><p>See also <a href="#presentations">[presentations]</a> for more examples of multi-monitor setups.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_interesting_configuration_for_multi_monitor_environments">9.2. Interesting configuration for multi-monitor environments</h3>\r
+<h3 id="_interesting_configuration_for_multi_monitor_environments">8.2. Interesting configuration for multi-monitor environments</h3>\r
<div class="paragraph"><p>There are several things to configure in i3 which may be interesting if you\r
have more than one monitor:</p></div>\r
<div class="olist arabic"><ol class="arabic">\r
</div>\r
</div>\r
<div class="sect1">\r
-<h2 id="_i3_and_the_rest_of_your_software_world">10. i3 and the rest of your software world</h2>\r
+<h2 id="_i3_and_the_rest_of_your_software_world">9. i3 and the rest of your software world</h2>\r
<div class="sectionbody">\r
<div class="sect2">\r
-<h3 id="_displaying_a_status_line">10.1. Displaying a status line</h3>\r
+<h3 id="_displaying_a_status_line">9.1. Displaying a status line</h3>\r
<div class="paragraph"><p>A very common thing amongst users of exotic window managers is a status line at\r
some corner of the screen. It is an often superior replacement to the widget\r
approach you have in the task bar of a traditional desktop environment.</p></div>\r
see <a href="#i3bar_position">[i3bar_position]</a>.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="presentations">10.2. Giving presentations (multi-monitor)</h3>\r
+<h3 id="presentations">9.2. Giving presentations (multi-monitor)</h3>\r
<div class="paragraph"><p>When giving a presentation, you typically want the audience to see what you see\r
on your screen and then go through a series of slides (if the presentation is\r
simple). For more complex presentations, you might want to have some notes\r
which only you can see on your screen, while the audience can only see the\r
slides.</p></div>\r
<div class="sect3">\r
-<h4 id="_case_1_everybody_gets_the_same_output">10.2.1. Case 1: everybody gets the same output</h4>\r
+<h4 id="_case_1_everybody_gets_the_same_output">9.2.1. Case 1: everybody gets the same output</h4>\r
<div class="paragraph"><p>This is the simple case. You connect your computer to the video projector,\r
turn on both (computer and video projector) and configure your X server to\r
clone the internal flat panel of your computer to the video output:</p></div>\r
our example, this would be 1024x768 (my notebook has 1280x800).</p></div>\r
</div>\r
<div class="sect3">\r
-<h4 id="_case_2_you_can_see_more_than_your_audience">10.2.2. Case 2: you can see more than your audience</h4>\r
+<h4 id="_case_2_you_can_see_more_than_your_audience">9.2.2. Case 2: you can see more than your audience</h4>\r
<div class="paragraph"><p>This case is a bit harder. First of all, you should configure the VGA output\r
somewhere near your internal flat panel, say right of it:</p></div>\r
<div class="listingblock">\r
<div class="sectionbody">\r
<div class="paragraph"><p><tt>i3-wsbar</tt> used to be the reference implementation before we had <tt>i3bar</tt>.\r
Nowadays, it is not shipped with release tarballs, but you can still get it at\r
-<a href="http://code.stapelberg.de/git/i3/tree/contrib/i3-wsbar">http://code.stapelberg.de/git/i3/tree/contrib/i3-wsbar</a></p></div>\r
+<a href="https://github.com/i3/i3/blob/next/contrib/i3-wsbar">https://github.com/i3/i3/blob/next/contrib/i3-wsbar</a></p></div>\r
<div class="sect2">\r
<h3 id="_the_big_picture">5.1. The big picture</h3>\r
<div class="paragraph"><p>The most common reason to use an external workspace bar is to integrate system\r