diff --git a/.gitignore b/.gitignore index 1d4c1678..617421ac 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ docs/*.html i3-command-parser.stamp i3-config-parser.stamp .clang_complete +LAST_VERSION diff --git a/.travis.yml b/.travis.yml index 733daeac..f90e0ebd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_install: - sudo cp /tmp/pin /etc/apt/preferences.d/trustypin - sudo apt-get update - sudo apt-get install -t trusty libc6 libc6-dev - - sudo apt-get install --no-install-recommends devscripts equivs + - sudo apt-get install --no-install-recommends devscripts equivs xdotool - sudo apt-get install -t utopic clang-format-3.5 - clang-format-3.5 --version install: @@ -45,3 +45,22 @@ script: - CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror" make -j - (cd testcases && xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false)) - clang-format-3.5 -i $(find . -name "*.[ch]" | tr '\n' ' ') && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false) + - | + funcs='malloc|calloc|realloc|strdup|strndup|asprintf|write' + cstring='"([^"\\]|\\.)*"' + cchar="'[^\\\\]'|'\\\\.[^']*'" + regex="^([^'\"]|${cstring}|${cchar})*\<(${funcs})\>" + detected=0 + while IFS= read -r file; do + if { cpp -w -fpreprocessed "$file" || exit "$?"; } | grep -E -- "$regex"; then + echo "^ $file calls a function that has a safe counterpart." + detected=1 + fi + done << EOF + $(find -name '*.c' -not -name safewrappers.c -not -name strndup.c) + EOF + if [ "$detected" -ne 0 ]; then + echo + echo "Calls of functions that have safe counterparts were detected." + exit 1 + fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a5e0c5f..474355ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,20 +1,32 @@ -# i3status/i3lock bugreports/feature requests +# Contributing -Note that i3status and i3lock related bugreports and feature requests should be -filed in the corresponding repositories, i.e. https://github.com/i3/i3status -and https://github.com/i3/i3lock +## i3status/i3lock bug reports and feature requests -# i3 bugreports/feature requests +Note that bug reports and feature requests for related projects should be filed in the corresponding repositories for [i3status](https://github.com/i3/i3status) and [i3lock](https://github.com/i3/i3lock). -1. Read http://i3wm.org/docs/debugging.html +## i3 bug reports and feature requests + +1. Read the [debugging instructions](http://i3wm.org/docs/debugging.html). 2. Make sure you include a link to your logfile in your report (section 3). 3. Make sure you include the i3 version number in your report (section 1). +4. Please be aware that we cannot support compatibility issues with + closed-source software, as digging into compatibility problems without + having access to the source code is too time-consuming. Additionally, + experience has shown that often, the software in question is responsible for + the issue. Please raise an issue with the software in question, not i3. -# Pull requests +## Pull requests * Before sending a pull request for new features, please check with us that the feature is something we want to see in i3 by opening an issue which has - “feature request” or “enhancement” in its title. + ”feature request” or ”enhancement” in its title. * Use the `next` branch for developing and sending your pull request. * Use `clang-format` to format your code. -* Run the testsuite, see http://i3wm.org/docs/testsuite.html +* Run the [testsuite](http://i3wm.org/docs/testsuite.html) + +## Finding something to do + +* Find a [reproducible bug](https://github.com/i3/i3/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Areproducible+label%3Abug+) from the issue tracker. These issues have been reviewed and confirmed by a project contributor. +* Find an [accepted enhancement](https://github.com/i3/i3/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Aaccepted+label%3Aenhancement) from the issue tracker. These have been approved and are ok to start working on. + +There's a very good [overview of the codebase](http://i3wm.org/docs/hacking-howto.html) available to get you started. diff --git a/DEPENDS b/DEPENDS index d5dae142..0882f147 100644 --- a/DEPENDS +++ b/DEPENDS @@ -7,29 +7,30 @@ ┌──────────────┬────────┬────────┬────────────────────────────────────────┐ │ dependency │ min. │ lkgv │ URL │ ├──────────────┼────────┼────────┼────────────────────────────────────────┤ -│ pkg-config │ 0.25 │ 0.26 │ http://pkgconfig.freedesktop.org/ │ -│ libxcb │ 1.1.93 │ 1.10 │ http://xcb.freedesktop.org/dist/ │ +│ pkg-config │ 0.25 │ 0.28 │ http://pkgconfig.freedesktop.org/ │ +│ libxcb │ 1.1.93 │ 1.11 │ http://xcb.freedesktop.org/dist/ │ │ xcb-util │ 0.3.3 │ 0.4.1 │ http://xcb.freedesktop.org/dist/ │ -│ xkbcommon │ 0.4.0 │ 0.4.0 │ http://xkbcommon.org/ │ -│ xkbcommon-x11│ 0.4.0 │ 0.4.0 │ http://xkbcommon.org/ │ -│ util-cursor³ │ 0.0.99 │ 0.0.99 │ http://xcb.freedesktop.org/dist/ │ -│ libev │ 4.0 │ 4.11 │ http://libev.schmorp.de/ │ -│ yajl │ 2.0.1 │ 2.0.4 │ http://lloyd.github.com/yajl/ │ -│ asciidoc │ 8.3.0 │ 8.6.4 │ http://www.methods.co.nz/asciidoc/ │ +│ xkbcommon │ 0.4.0 │ 0.5.0 │ http://xkbcommon.org/ │ +│ xkbcommon-x11│ 0.4.0 │ 0.5.0 │ http://xkbcommon.org/ │ +│ util-cursor³⁴│ 0.0.99 │ 0.1.2 │ http://xcb.freedesktop.org/dist/ │ +│ util-wm⁴ │ 0.3.8 │ 0.3.8 │ http://xcb.freedesktop.org/dist/ │ +│ util-keysyms⁴│ 0.3.8 │ 0.4.0 │ http://xcb.freedesktop.org/dist/ │ +│ libev │ 4.0 │ 4.19 │ http://libev.schmorp.de/ │ +│ yajl │ 2.0.1 │ 2.1.0 │ http://lloyd.github.com/yajl/ │ +│ asciidoc │ 8.3.0 │ 8.6.8 │ http://www.methods.co.nz/asciidoc/ │ │ xmlto │ 0.0.23 │ 0.0.23 │ http://www.methods.co.nz/asciidoc/ │ │ Pod::Simple² │ 3.22 │ 3.22 │ http://search.cpan.org/~dwheeler/Pod-Simple-3.23/ │ docbook-xml │ 4.5 │ 4.5 │ http://www.methods.co.nz/asciidoc/ │ -│ Xlib │ 1.3.3 │ 1.4.3 │ http://ftp.x.org/pub/current/src/lib/ │ -│ PCRE │ 8.12 │ 8.12 │ http://www.pcre.org/ │ +│ PCRE │ 8.12 │ 8.35 │ http://www.pcre.org/ │ │ libsn¹ │ 0.10 │ 0.12 │ http://freedesktop.org/wiki/Software/startup-notification -│ pango │ 1.30.0 | 1.30.0 │ http://www.pango.org/ │ -│ cairo │ 1.12.2 │ 1.12.2 │ http://cairographics.org/ │ +│ pango │ 1.30.0 | 1.36.8 │ http://www.pango.org/ │ +│ cairo │ 1.12.2 │ 1.14.0 │ http://cairographics.org/ │ └──────────────┴────────┴────────┴────────────────────────────────────────┘ ¹ libsn = libstartup-notification ² Pod::Simple is a Perl module required for converting the testsuite documentation to HTML. See http://michael.stapelberg.de/cpan/#Pod::Simple - ³ xcb-util-cursor, to be precise. Might be considered part of xcb-util, or not - :-). + ³ xcb-util-cursor, to be precise. + ⁴ Depending on your distribution, this might be considered part of xcb-util. i3bar, i3-msg, i3-input, i3-nagbar and i3-config-wizard do not introduce any new dependencies. diff --git a/Makefile b/Makefile index 1fed4df1..fd302101 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,12 @@ include i3-dump-log/i3-dump-log.mk include docs/docs.mk include man/man.mk +# Update $(TOPDIR)/LAST_VERSION if it differs from $I3_VERSION +CACHED_VERSION := '$(shell [ -f $(TOPDIR)/LAST_VERSION ] && cat $(TOPDIR)/LAST_VERSION)' +ifneq ($(CACHED_VERSION),$(I3_VERSION)) +$(shell echo -n ${I3_VERSION} > $(TOPDIR)/LAST_VERSION) +endif + real-all: $(ALL_TARGETS) install: $(INSTALL_TARGETS) diff --git a/RELEASE-NOTES-4.10.3 b/RELEASE-NOTES-4.10.3 deleted file mode 100644 index 524f5528..00000000 --- a/RELEASE-NOTES-4.10.3 +++ /dev/null @@ -1,30 +0,0 @@ - - ┌──────────────────────────────┐ - │ Release notes for i3 v4.10.3 │ - └──────────────────────────────┘ - -This is i3 v4.10.3. This version is considered stable. All users of i3 are -strongly encouraged to upgrade. - - ┌────────────────────────────┐ - │ Bugfixes │ - └────────────────────────────┘ - - • serialize con_id with %p in run_binding() (For FreeBSD) - • ignore InputHint when not in WM_HINTS (fixes e.g. mupdf focus) - • disable physically disconnect RandR outputs - • initialize workspace rect to the output's upon creation - • userguide: quoted strings need to be used, escaping isn’t possible - • mkdirp: do not throw an error if directory exists (fixes layout loss for - in-place restarts) - • i3bar: fix freeing static strings - - ┌────────────────────────────┐ - │ Thanks! │ - └────────────────────────────┘ - -Thanks for testing, bugfixes, discussions and everything I forgot go out to: - - Tony Crisci, Deiz, Theo Buehler, shdown - --- Michael Stapelberg, 2015-07-30 diff --git a/RELEASE-NOTES-4.11 b/RELEASE-NOTES-4.11 new file mode 100644 index 00000000..2cbadda9 --- /dev/null +++ b/RELEASE-NOTES-4.11 @@ -0,0 +1,115 @@ + + ┌────────────────────────────┐ + │ Release notes for i3 v4.11 │ + └────────────────────────────┘ + +This is i3 v4.11. This version is considered stable. All users of i3 are +strongly encouraged to upgrade. + +Aside from plenty of new features, there are several changes that might result +in behavioral changes, depending on your specific configuration and +environment. As usual, we tried hard to keep the current behavior, and when we +changed behavior, we strongly believe it’s for the better. + +Keyboard binding handling has been made more correct, for details see: +https://github.com/i3/i3/commit/bf3cd41b5ddf1e757515ab5fbf811be56e5f69cc + + ┌────────────────────────────┐ + │ Changes in i3 v4.11 │ + └────────────────────────────┘ + + • docs/debugging: provide instructions on how to debug i3bar + • docs/debugging: added a note about sensitive data + • docs/userguide: add a note to both “exec”s about semicolon and comma + • docs/userguide: quoted strings need to be used, escaping isn’t possible + • docs/userguide: make syntax of syntax descriptions consistent + • docs/userguide: recommend “exec exec” for correct signal handling + • docs/userguide: explain i3-config-wizard’s behavior + • i3-nagbar: open on the primary screen + • i3-config-wizard: respect XDG config directories + • i3-input: position i3-input at window with input focus + • i3bar: use a reasonable default sep_block_width if a separator_symbol is given + • i3bar: add binding mode indicator + • i3bar: add bindsym command (deprecates wheel_{up,down}_cmd) + • i3bar: make tray padding configurable + • makefiles: respect EXEC_PREFIX and PKG_CONFIG + • added a --toggle switch to mark: “mark [--toggle] ” + • added “focus_on_window_activation” directive + • added “no_focus” directive + • added “move [container|window] [to] mark ” command + • added “move [window|container] [to] position mouse|cursor|pointer” command + • added “title_format” command + • added “resize set [width] [height]” command + • added “sticky” command (for floating containers) + • added “workspace” criterion + • added “window_type” criterion + • make center coordinates relative to current workspace + • draw marks in window decoration (configure with show_marks) + • only mark a window if only one window is matched + • make floating window mouse handling consistent with tiled windows + • add a --border flag to enable mouse binds to trigger on border click + • set the _NET_WM_STATE_HIDDEN atom on windows that are currently not visible + due to being in the non-focused tab of a stacked or tabbed container + • ignore InputHint when not in WM_HINTS + • display which config is used in i3 --moreversion + • support config file line continuation + • use WM_SIZE_HINTS when present to set the geometry of floating windows + • add “tray_output primary” to the default config + • use libxkbcommon for translating keysyms, support all XKB groups + • support special value “__focused__” in criteria + • support _NET_WM_VISIBLE_NAME + • make sure borders are never counted as adjacent to the edge for floating + containers + • support moving dock clients to another output + • let “focus” report success depending on whether a window was matched + • handle _NET_WM_STATE_STICKY (for floating containers) + • make “debuglog on” command persist over restarts + • randr: use root window in case of no randr outputs + • set proper WM_CLASS on frame windows + + ┌────────────────────────────┐ + │ Bugfixes │ + └────────────────────────────┘ + + • i3bar: only detect clicks within the statusline width + • i3bar: fix flickering shortened status bar on other output(s) + • i3bar: send custom-defined command upon click on the non-statusline part of + i3bar even if workspace_buttons is set to “no”. + • i3-config-wizard: Make window size and click coordinates dependent on font + • i3-save-tree: retain “rect” for floating cons + • move urgency hint when moving container + • fix percents when attaching a window to a ws creates a new split con + • cope with non-null-terminated x class properties + • get workspace name when renaming current workspace + • allow single-child non-default layout cons to be moved between outputs + • allow --whole-window right after 'bindsym' within binding modes + • remove windows from the save set when unmapping (fixes problems with e.g. + owncloud when restarting i3) + • serialize con_id with %p in run_binding() + • initialize workspace rect to the output's upon creation + • mkdirp: do not throw an error if directory exists + • grab all buttons when managing a window to also allow 'bindsym + --whole-window button4 …' to work correctly + • properly clear the urgency hint when set by i3 + • layout restore: load floating containers correctly + • layout restore: remove remaining criteria when swallowing window + • layout restore: When appending a layout containing a marked container, make + sure that any other containers with the same mark are unmarked during + insertion of the new container. + • use the EWMH support window rather than the root window as an input focus fallback + • use the focused container to determine the target window_mode when using + floating mode_toggle + + ┌────────────────────────────┐ + │ Thanks! │ + └────────────────────────────┘ + +Thanks for testing, bugfixes, discussions and everything I forgot go out to: + + Andrzej Pronobis, Chris West (Faux), Deiz, Felix C. Stegerman, Georgiy Tugai, + hwangcc23, Ingo Bürk, Kacper Kowalik (Xarthisius), lasers, lambithal, Michael + Hofmann, Michael Tipton, Micha Rosenbaum, Nikita Mikhailov, Nils Schneider, + PopeLevi, rr-, shdown, Simon Nagl, Theo Buehler, Thomas Anderson, Tim Creech, + Tony Crisci + +-- Michael Stapelberg, 2015-09-30 diff --git a/common.mk b/common.mk index b9e15a28..d2875042 100644 --- a/common.mk +++ b/common.mk @@ -1,11 +1,14 @@ UNAME=$(shell uname) DEBUG=1 -COVERAGE=0 INSTALL=install LN=ln +PKG_CONFIG=pkg-config ifndef PREFIX PREFIX=/usr endif +ifndef EXEC_PREFIX + EXEC_PREFIX=$(PREFIX) +endif ifndef SYSCONFDIR ifeq ($(PREFIX),/usr) SYSCONFDIR=/etc @@ -60,7 +63,7 @@ I3_CPPFLAGS += -DI3__FILE__=__FILE__ ## Libraries flags -ifeq ($(shell which pkg-config 2>/dev/null 1>/dev/null || echo 1),1) +ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1) $(error "pkg-config was not found") endif @@ -74,15 +77,15 @@ endif # # We redirect stderr to /dev/null because pkg-config prints an error if support # for gnome-config was enabled but gnome-config is not actually installed. -cflags_for_lib = $(shell pkg-config --silence-errors --cflags $(1) 2>/dev/null) -ldflags_for_lib = $(shell pkg-config --exists 2>/dev/null $(1) && pkg-config --libs $(1) 2>/dev/null || echo -l$(2)) +cflags_for_lib = $(shell $(PKG_CONFIG) --silence-errors --cflags $(1) 2>/dev/null) +ldflags_for_lib = $(shell $(PKG_CONFIG) --exists 2>/dev/null $(1) && $(PKG_CONFIG) --libs $(1) 2>/dev/null || echo -l$(2)) # XCB common stuff XCB_CFLAGS := $(call cflags_for_lib, xcb) XCB_CFLAGS += $(call cflags_for_lib, xcb-event) XCB_LIBS := $(call ldflags_for_lib, xcb,xcb) XCB_LIBS += $(call ldflags_for_lib, xcb-event,xcb-event) -ifeq ($(shell pkg-config --exists xcb-util 2>/dev/null || echo 1),1) +ifeq ($(shell $(PKG_CONFIG) --exists xcb-util 2>/dev/null || echo 1),1) XCB_CFLAGS += $(call cflags_for_lib, xcb-atom) XCB_CFLAGS += $(call cflags_for_lib, xcb-aux) XCB_LIBS += $(call ldflags_for_lib, xcb-atom,xcb-atom) @@ -125,7 +128,7 @@ LIBEV_LIBS := $(call ldflags_for_lib, libev,ev) # libpcre PCRE_CFLAGS := $(call cflags_for_lib, libpcre) -ifeq ($(shell pkg-config --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1) +ifeq ($(shell $(PKG_CONFIG) --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1) I3_CPPFLAGS += -DPCRE_HAS_UCP=1 endif PCRE_LIBS := $(call ldflags_for_lib, libpcre,pcre) @@ -175,6 +178,10 @@ else ifneq ($(UNAME),OpenBSD) LIBS += -lrt endif +ifeq ($(UNAME),SunOS) +LIBS += -lsocket -liconv -lgen +endif + ifneq (,$(filter Linux GNU GNU/%, $(UNAME))) I3_CPPFLAGS += -D_GNU_SOURCE endif diff --git a/debian/changelog b/debian/changelog index cc0e5328..65b7fc10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,40 @@ +i3-wm (4.10.5-1) unstable; urgency=medium + + * UNRELEASED + + -- Michael Stapelberg Tue, 08 Sep 2015 09:25:45 +0200 + +i3-wm (4.10.4-1) unstable; urgency=medium + + * New upstream release. + + -- Michael Stapelberg Tue, 08 Sep 2015 09:15:45 +0200 + +i3-wm (4.10.3-1) unstable; urgency=medium + + * New upstream release. + + -- Michael Stapelberg Thu, 30 Jul 2015 21:51:27 +0200 + +i3-wm (4.10.2-2) unstable; urgency=medium + + * New upstream release. + * experimental to unstable because i3-wm 4.10.2-1 was only in experimental + due to the freeze. + + -- Michael Stapelberg Fri, 01 May 2015 20:21:18 +0200 + +i3-wm (4.10.2-1) experimental; urgency=medium + + * New upstream release. + + -- Michael Stapelberg Thu, 16 Apr 2015 09:02:53 +0200 + i3-wm (4.10.1-1) experimental; urgency=medium - * NOT YET RELEASED. + * New upstream release. - -- Michael Stapelberg Sun, 29 Mar 2015 18:08:13 +0200 + -- Michael Stapelberg Sun, 29 Mar 2015 18:54:07 +0200 i3-wm (4.10-1) experimental; urgency=medium diff --git a/debian/i3-wm.docs b/debian/i3-wm.docs index 11a695ba..437175b3 100644 --- a/debian/i3-wm.docs +++ b/debian/i3-wm.docs @@ -8,7 +8,6 @@ docs/snapping.png docs/two_columns.png docs/two_terminals.png docs/modes.png -docs/stacklimit.png docs/ipc.html docs/multi-monitor.html docs/wsbar.html diff --git a/docs/asciidoc-git.conf b/docs/asciidoc-git.conf index 3d42bca8..36bdb6f5 100644 --- a/docs/asciidoc-git.conf +++ b/docs/asciidoc-git.conf @@ -647,7 +647,7 @@ endif::doctype-manpage[] {disable-javascript%

} diff --git a/docs/debugging b/docs/debugging index 1253b0c5..7be7c8e5 100644 --- a/docs/debugging +++ b/docs/debugging @@ -10,10 +10,10 @@ Thank you for being interested in debugging i3. It really means something to us to get your bug fixed. If you have any questions about the process and/or need further help, do not hesitate to contact us! -== Verify you are using i3 ≥ 4.7 +== Verify you are using i3 ≥ 4.10 -Only the latest major version of i3 is supported, i.e. version 4.7 currently. -To verify which version you are running, use: +Only the latest major version of i3 is supported. To verify which version +you are running, use: --------------- $ i3 --moreversion 2>&- || i3 --version @@ -67,8 +67,44 @@ fly: i3-msg 'debuglog on; shmlog on; reload' --------------------------------------- +== Reproducing the problem + +Before submitting an issue, please make sure to close down on the problem as +much as you can yourself. Here are some steps you should consider: + +* Find a deterministic, reliable way to reproduce the problem and provide it + with your bug report. +* Try using the default i3 config to reproduce the problem. If the issue does + not appear with the default config, gradually adapt it to track down what + change(s) to the config introduce the problem. +* Reproduce the problem with a minimal setup, i.e., only use as few applications, + windows and steps as necessary. +* In addition, try to stick to applications that are common and, even more + importantly, free / open source. +* Before obtaining the log file, restart i3 in-place, execute the steps to + reproduce the problem and then save the logs. This keeps the log file as + small as possible and necessary. + +Please be aware that we cannot support compatibility issues with closed-source +software, as digging into compatibility problems without having access to the +source code is too time-consuming. Additionally, experience has shown that +often, the software in question is responsible for the issue. Please raise an +issue with the software in question, not i3. + == Obtaining the debug logfile +[CAUTION] +================================================================================ +Logs may contain sensitive information, so please inspect the log before +submitting it. Logs may be viewed by anyone, once posted. If you choose to +redact the log, make an effort not to discard information which may be relevant +to the issue you are reporting. + +The best way to avoid submitting such information is to only run the necessary +steps to reproduce the behavior when saving the log file. This will also make +analyzing the log file easier. +================================================================================ + No matter whether i3 misbehaved in some way without crashing or whether it just crashed, the logfile provides all information necessary to debug the problem. @@ -121,3 +157,20 @@ 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. + +== Debugging i3bar + +To debug i3bar problems, add +verbose yes+ to all +bar {}+ blocks in your i3 +config, reload your config and then restart all i3bar instances like this: + +--------------------------------------------------------------------- +$ i3 reload +$ killall i3bar +$ for c in $(i3-msg -t get_bar_config | python -c \ + 'import json,sys;print("\n".join(json.load(sys.stdin)))'); do \ + (i3bar --bar_id=$c >i3bar.$c.log 2>&1) & \ + done; +--------------------------------------------------------------------- + +There will now be +i3bar.*.log+ files in your current directory that you can provide +in your bug report. diff --git a/docs/hacking-howto b/docs/hacking-howto index 12d6b14e..d6e2b67e 100644 --- a/docs/hacking-howto +++ b/docs/hacking-howto @@ -404,10 +404,14 @@ can reconfigure themselves). == _NET_WM_STATE -Only the _NET_WM_STATE_FULLSCREEN atom is handled. It calls -``toggle_fullscreen()'' for the specific client which just configures the -client to use the whole screen on which it currently is. Also, it is set as -fullscreen_client for the i3Screen. +Only the _NET_WM_STATE_FULLSCREEN and _NET_WM_STATE_DEMANDS_ATTENTION atoms +are handled. + +The former calls ``toggle_fullscreen()'' for the specific client which just +configures the client to use the whole screen on which it currently is. +Also, it is set as fullscreen_client for the i3Screen. + +The latter is used to set, read and display urgency hints. == WM_NAME @@ -629,8 +633,8 @@ unmapped if it should not be visible anymore. +WM_STATE+ will be set to +x_draw_decoration+ draws window decorations. It is run for every leaf container (representing an actual X11 window) and for every non-leaf container which is in a stacked/tabbed container (because stacked/tabbed containers -display a window decoration for split containers, which at the moment just says -"another container"). +display a window decoration for split containers, which consists of a representation +of the child container's names. Then, parameters are collected to be able to determine whether this decoration drawing is actually necessary or was already done. This saves a substantial @@ -686,9 +690,9 @@ all commands. In earlier versions of i3, interpreting these commands was done using lex and yacc, but experience has shown that lex and yacc are not well suited for our command language. Therefore, starting from version 4.2, we use a custom parser -for user commands (not yet for the configuration file). +for user commands and the configuration file. The input specification for this parser can be found in the file -+parser-specs/commands.spec+. Should you happen to use Vim as an editor, use ++parser-specs/*.spec+. Should you happen to use Vim as an editor, use :source parser-specs/highlighting.vim to get syntax highlighting for this file (highlighting files for other editors are welcome). @@ -729,11 +733,14 @@ features. This is its definition: # workspace next|prev|next_on_output|prev_on_output # workspace back_and_forth # workspace +# workspace number state WORKSPACE: direction = 'next_on_output', 'prev_on_output', 'next', 'prev' -> call cmd_workspace($direction) 'back_and_forth' -> call cmd_workspace_back_and_forth() + 'number' + -> WORKSPACE_NUMBER workspace = string -> call cmd_workspace_name($workspace) ---------------------------------------------------------------- @@ -772,6 +779,10 @@ workspace :: single quotes), but just called string. Other possible tokens are word (the same as string, but stops matching at a whitespace) and end (matches the end of the input). +workspace number :: + The workspace command has to be followed by the keyword +number+. It + then transitions into the state +WORKSPACE_NUMBER+, where the actual + parameter will be read. === Introducing a new command @@ -952,30 +963,35 @@ http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_ 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. There are a few things which we don’t want to see in i3, e.g. a -command which will focus windows in an alt+tab like way. +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 bugreport at https://github.com/i3/i3/issues In case -there is no bugreport yet, please create one. +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 at https://github.com/i3/i3 +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 -http://cr.i3wm.org/. In order to make your review go as fast as possible, you +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”. Since -“master” is what people get when they check out the git repository, its -contents are always stable. That is, it contains the source code of the latest -release, plus any bugfixes that were applied since that release. +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”. +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”. == Thought experiments diff --git a/docs/ipc b/docs/ipc index ff7c8aae..5113d79b 100644 --- a/docs/ipc +++ b/docs/ipc @@ -520,21 +520,23 @@ statusline:: Text color to be used for the statusline. separator:: Text color to be used for the separator. -focused_workspace_text/focused_workspace_bg:: - Text color/background color for a workspace button when the workspace +focused_workspace_text/focused_workspace_bg/focused_workspace_border:: + Text/background/border color for a workspace button when the workspace has focus. -active_workspace_text/active_workspace_bg:: - Text color/background color for a workspace button when the workspace +active_workspace_text/active_workspace_bg/active_workspace_border:: + Text/background/border color for a workspace button when the workspace is active (visible) on some output, but the focus is on another one. You can only tell this apart from the focused workspace when you are using multiple monitors. -inactive_workspace_text/inactive_workspace_bg:: - Text color/background color for a workspace button when the workspace +inactive_workspace_text/inactive_workspace_bg/inactive_workspace_border:: + Text/background/border color for a workspace button when the workspace does not have focus and is not active (visible) on any output. This will be the case for most workspaces. -urgent_workspace_text/urgent_workspace_bar:: - Text color/background color for workspaces which contain at least one +urgent_workspace_text/urgent_workspace_bg/urgent_workspace_border:: + Text/background/border color for workspaces which contain at least one window with the urgency hint set. +binding_mode_text/binding_mode_bg/binding_mode_border:: + Text/background/border color for the binding mode indicator. *Example of configured bars:* @@ -580,11 +582,14 @@ human_readable (string):: build date and branch name. When you need to display the i3 version to your users, use the human-readable version whenever possible (since this is what +i3 --version+ displays, too). +loaded_config_file_name (string):: + The current config path. *Example:* ------------------- { "human_readable" : "4.2-169-gf80b877 (2012-08-05, branch \"next\")", + "loaded_config_file_name" : "/home/hwangcc23/.i3/config", "minor" : 2, "patch" : 0, "major" : 4 @@ -768,8 +773,8 @@ The +binding (object)+ field contains details about the binding that was run: command (string):: The i3 command that is configured to run for this binding. -mods (array of strings):: - The modifier keys that were configured with this binding. +event_state_mask (array of strings):: + The group and modifier keys that were configured with this binding. input_code (integer):: If the binding was configured with +bindcode+, this will be the key code that was given for the binding. If the binding is a mouse binding, it will be @@ -787,7 +792,7 @@ input_type (string):: "change": "run", "binding": { "command": "nop", - "mods": [ + "event_state_mask": [ "shift", "ctrl" ], @@ -822,4 +827,7 @@ Python:: * https://github.com/whitelynx/i3ipc (not maintained) * https://github.com/ziberna/i3-py (not maintained) Ruby:: - * http://github.com/badboy/i3-ipc + * https://github.com/veelenga/i3ipc-ruby + * https://github.com/badboy/i3-ipc (not maintained) +Rust:: + * https://github.com/tmerr/i3ipc-rs diff --git a/docs/stacklimit.png b/docs/stacklimit.png deleted file mode 100644 index ab5bed7a..00000000 Binary files a/docs/stacklimit.png and /dev/null differ diff --git a/docs/testsuite b/docs/testsuite index 29a35218..8fdb9635 100644 --- a/docs/testsuite +++ b/docs/testsuite @@ -160,6 +160,27 @@ $ ./complete-run.pl --parallel=1 --keep-xserver-output This will show the output of Xephyr, which is the X server implementation we use for testing. +==== Coverage testing + +Coverage testing is possible with +lcov+, the front-end for GCC's coverage +testing tool +gcov+. The testcases can generate a nice html report that tells +you which functions and lines were covered during a run of the tests. You can +use this tool to judge how effective your tests are. + +To use test coverage tools, first compile with coverage enabled. + +--------------------------------------------------- +COVERAGE=1 make +--------------------------------------------------- + +Then run the tests with the +--coverage-testing+ flag. + +--------------------------------------------------- +./complete-run.pl --coverage-testing +--------------------------------------------------- + +Then open +latest/i3-coverage/index.html+ in your web browser. + ==== IPC interface The testsuite makes extensive use of the IPC (Inter-Process Communication) diff --git a/docs/userguide b/docs/userguide index 820f5395..13dae4fe 100644 --- a/docs/userguide +++ b/docs/userguide @@ -23,6 +23,13 @@ image:keyboard-layer2.png["Keys to use with Shift+$mod",width=600,link="keyboard The red keys are the modifiers you need to press (by default), the blue keys are your homerow. +Note that when starting i3 without a config file, i3-config-wizard will offer +you to create a config file in which the key positions (!) match what you see +in the image above, regardless of the keyboard layout you are using. If you +prefer to use a config file where the key letters match what you are seeing +above, just decline i3-config-wizard’s offer and base your config on ++/etc/i3/config+. + == Using i3 Throughout this guide, the keyword +$mod+ will be used to refer to the @@ -256,8 +263,9 @@ workspace node’s orientation will be changed to +vertical+. The terminal windo you moved down is directly attached to the workspace and appears on the bottom of the screen. A new (horizontal) container was created to accommodate the other two terminal windows. You will notice this when switching to tabbed mode -(for example). You would end up having one tab called "another container" and -the other one being the terminal window you moved down. +(for example). You would end up having one tab with a representation of the split +container (e.g., "H[urxvt firefox]") and the other one being the terminal window +you moved down. [[configuring]] == Configuring i3 @@ -319,7 +327,7 @@ and fall back to a working font. *Syntax*: ------------------------------ font -font pango:[family list] [style options] [size] +font pango: [