diff --git a/.clang-format b/.clang-format
index 6b542c1..4a15e88 100644
--- a/.clang-format
+++ b/.clang-format
@@ -10,3 +10,4 @@
SpaceBeforeParens: ControlStatements
SortIncludes: false
ForEachMacros: [ TAILQ_FOREACH, TAILQ_FOREACH_REVERSE, SLIST_FOREACH, CIRCLEQ_FOREACH, CIRCLEQ_FOREACH_REVERSE, NODES_FOREACH, NODES_FOREACH_REVERSE, FOREACH_NONINTERNAL]
+TypenameMacros: [ SLIST_HEAD, SLIST_ENTRY, LIST_HEAD, LIST_ENTRY, SIMPLEQ_HEAD, SIMPLEQ_ENTRY, TAILQ_HEAD, TAILQ_ENTRY, CIRCLEQ_HEAD, CIRCLEQ_ENTRY ]
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..6b8710a
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+.git
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..40fd839
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,41 @@
+# Contributing
+
+## i3status/i3lock bug reports and 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).
+
+## i3 bug reports and feature requests
+
+1. Read the [debugging instructions](https://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.
+5. Please note that i3 does not support compositors (e.g. compton). If you
+ encountered the issue you are about to report while using a compositor,
+ please try reproducing it without a compositor.
+
+## 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.
+* Use the `next` branch for developing and sending your pull request.
+* Use `clang-format` to format your code.
+* Run the [testsuite](https://i3wm.org/docs/testsuite.html)
+* If your changes should be reported on the next release's changelog, also
+ update the [RELEASE-notes-next](../RELEASE-notes-next) file in the root
+ folder. Example of changes that should be reported are bug fixes present in
+ the latest stable version of i3 and new enhancements. Example of changes that
+ should not be reported are minor code improvements, documentation, regression
+ and fixes for bugs that were introduced in the `next` branch.
+
+## 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 an [overview of the codebase](https://i3wm.org/docs/hacking-howto.html) available to get you started.
diff --git a/.github/GOVERNANCE.md b/.github/GOVERNANCE.md
new file mode 100644
index 0000000..44e1334
--- /dev/null
+++ b/.github/GOVERNANCE.md
@@ -0,0 +1,30 @@
+# i3 project governance
+
+## Overview
+
+The i3 project uses a governance model commonly described as Benevolent
+Dictator For Life (BDFL). This document outlines our understanding of what this
+means.
+
+## Roles
+
+* user: anyone who interacts with the i3 project
+* core contributor: a handful of people who have contributed significantly to
+ the project by any means (issue triage, support, documentation, code, etc.).
+ Core contributors are recognizable via GitHub’s “Member” badge.
+* BDFL: a single individual who makes decisions when consensus cannot be
+ reached. i3’s current BDFL is [@stapelberg](https://github.com/stapelberg).
+
+## Decision making process
+
+In general, we try to reach consensus in discussions. In case consensus cannot
+be reached, the BDFL makes a decision.
+
+For feature requests and code contributions specifically, the values with which
+we consider them can be found on the bottom of https://i3wm.org/. These values
+are not set in stone and are to be treated as guiding principles, not absolute
+rules that must be followed in every case.
+
+## Contribution process
+
+Please see [CONTRIBUTING](CONTRIBUTING.md).
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..a6df0a9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,72 @@
+---
+name: Bug report
+about: Create a report to help us improve
+---
+
+
+
+## I'm submitting a…
+
+
+[x] Bug
+[ ] Feature Request
+[ ] Documentation Request
+[ ] Other (Please describe in detail)
+
+
+## Current Behavior
+
+
+## Expected Behavior
+
+
+## Reproduction Instructions
+
+
+## Environment
+
+Output of `i3 --moreversion 2>&-`:
+
+i3 version:
+
+
+
+Config file
+
+
+
+
+
+Logfile URL:
+
+
+
+
+- Linux Distribution & Version:
+- Are you using a compositor (e.g., xcompmgr or compton):
+
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..e1c169a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,47 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+---
+
+
+
+## I'm submitting a…
+
+
+[ ] Bug
+[x] Feature Request
+[ ] Documentation Request
+[ ] Other (Please describe in detail)
+
+
+## Current Behavior
+
+
+## Desired Behavior
+
+
+## Environment
+
+Output of `i3 --moreversion 2>&-`:
+
+i3 version:
+
+
+
+
+- Linux Distribution & Version:
+- Are you using a compositor (e.g., xcompmgr or compton):
+
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..726b400
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,71 @@
+
+
+## I'm submitting a…
+
+
+[ ] Bug
+[ ] Feature Request
+[ ] Documentation Request
+[ ] Other (Please describe in detail)
+
+
+## Current Behavior
+
+
+## Expected Behavior
+
+
+## Reproduction Instructions
+
+
+## Environment
+
+Output of `i3 --moreversion 2>&-`:
+
+i3 version:
+
+
+
+
+
+
+
+
+Logfile URL:
+
+
+
+
+- Linux Distribution & Version:
+- Are you using a compositor (e.g., xcompmgr or compton):
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..51baa22
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,55 @@
+*.o
+tags
+include/GENERATED_*.h
+include/all.h.pch
+*~
+*.swp
+*.gcda
+*.gcno
+*.dSYM
+test.commands_parser
+test.config_parser
+testcases/MYMETA.json
+testcases/MYMETA.yml
+testcases/blib/
+testcases/pm_to_blib
+AnyEvent-I3/Makefile
+AnyEvent-I3/META.yml
+AnyEvent-I3/MYMETA.json
+AnyEvent-I3/MYMETA.yml
+AnyEvent-I3/blib/
+AnyEvent-I3/inc/
+AnyEvent-I3/pm_to_blib
+*.output
+*.tab.*
+*.yy.c
+man/*.1
+man/*.xml
+man/*.html
+*.tar.bz2*
+*.tar.xz*
+i3
+i3-input/i3-input
+i3-nagbar/i3-nagbar
+i3-msg/i3-msg
+i3-config-wizard/i3-config-wizard
+i3-dump-log/i3-dump-log
+libi3.a
+docs/*.pdf
+docs/*.html
+!/docs/refcard.html
+i3-command-parser.stamp
+i3-config-parser.stamp
+.clang_complete
+compile_commands.json
+/.ccls-cache
+/.clangd
+LAST_VERSION
+build
+
+# We recommend building in a subdirectory called build.
+# If you chose a different directory name,
+# it is up to you to arrange for it to be ignored by git,
+# e.g. by listing your directory in .git/info/exclude.
+/build
+
diff --git a/.travis.yml b/.travis.yml
index b56bf68..9935cb6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,9 +31,10 @@
script:
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-safe-wrappers.sh
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-formatting.sh
- - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common"'
+ - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address && ninja -v'
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-spelling.pl
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} ./travis/run-tests.sh
+ - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'rm -rf distbuild; mkdir distbuild && cd distbuild && meson .. -Ddocs=true -Dmans=true && ninja -v dist'
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/debian-build.sh deb/debian-amd64/DIST
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME_UBUNTU} ./travis/debian-build.sh deb/ubuntu-amd64/DIST
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME_386} linux32 ./travis/debian-build.sh deb/debian-i386/DIST
diff --git a/AnyEvent-I3/lib/AnyEvent/I3.pm b/AnyEvent-I3/lib/AnyEvent/I3.pm
index ae9e5be..1f4e5bd 100644
--- a/AnyEvent-I3/lib/AnyEvent/I3.pm
+++ b/AnyEvent-I3/lib/AnyEvent/I3.pm
@@ -101,11 +101,13 @@
use constant TYPE_GET_CONFIG => 9;
use constant TYPE_SEND_TICK => 10;
use constant TYPE_SYNC => 11;
+use constant TYPE_GET_BINDING_STATE => 12;
our %EXPORT_TAGS = ( 'all' => [
qw(i3 TYPE_RUN_COMMAND TYPE_COMMAND TYPE_GET_WORKSPACES TYPE_SUBSCRIBE TYPE_GET_OUTPUTS
TYPE_GET_TREE TYPE_GET_MARKS TYPE_GET_BAR_CONFIG TYPE_GET_VERSION
- TYPE_GET_BINDING_MODES TYPE_GET_CONFIG TYPE_SEND_TICK TYPE_SYNC)
+ TYPE_GET_BINDING_MODES TYPE_GET_CONFIG TYPE_SEND_TICK TYPE_SYNC
+ TYPE_GET_BINDING_STATE)
] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} } );
diff --git a/I3_VERSION b/I3_VERSION
deleted file mode 100644
index 60f610c..0000000
--- a/I3_VERSION
+++ /dev/null
@@ -1 +0,0 @@
-4.18.1-non-git
diff --git a/LICENSE b/LICENSE
index 6354f06..1f0872c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,27 +1,26 @@
Copyright © 2009, Michael Stapelberg and contributors
-All rights reserved.
Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
+modification, are permitted provided that the following conditions
+are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of Michael Stapelberg nor the
- names of contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY Michael Stapelberg ''AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL Michael Stapelberg BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 1b9c092..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,644 +0,0 @@
-@CODE_COVERAGE_RULES@
-
-echo-version:
- @echo "@I3_VERSION@"
-
-bin_PROGRAMS = \
- i3 \
- i3bar/i3bar \
- i3-config-wizard/i3-config-wizard \
- i3-dump-log/i3-dump-log \
- i3-input/i3-input \
- i3-msg/i3-msg \
- i3-nagbar/i3-nagbar
-
-install-exec-hook:
- $(LN_S) -f i3 $(DESTDIR)$(bindir)/i3-with-shmlog
-
-uninstall-hook:
- rm -f $(DESTDIR)$(bindir)/i3-with-shmlog
-
-i3includedir=$(includedir)/i3
-i3include_HEADERS = \
- include/i3/ipc.h
-
-dist_bin_SCRIPTS = \
- i3-dmenu-desktop \
- i3-migrate-config-to-v4 \
- i3-save-tree \
- i3-sensible-editor \
- i3-sensible-pager \
- i3-sensible-terminal
-
-i3confdir = $(sysconfdir)/i3
-dist_i3conf_DATA = \
- etc/config \
- etc/config.keycodes
-
-I3STATUS_INSTALL_NAME = $(shell echo i3status | sed '@program_transform_name@')
-
-etc/config: etc/$(dirstamp)
- $(AM_V_GEN) sed "s,status_command i3status,status_command $(I3STATUS_INSTALL_NAME),g" $(top_srcdir)/etc/config > etc/config
-
-etc/config.keycodes: etc/$(dirstamp)
- $(AM_V_GEN) sed "s,status_command i3status,status_command $(I3STATUS_INSTALL_NAME),g" $(top_srcdir)/etc/config.keycodes > etc/config.keycodes
-
-applicationsdir = $(datarootdir)/applications
-xsessionsdir = $(datarootdir)/xsessions
-dist_applications_DATA = \
- share/applications/i3.desktop
-dist_xsessions_DATA = \
- share/xsessions/i3.desktop \
- share/xsessions/i3-with-shmlog.desktop
-
-noinst_LIBRARIES = libi3.a
-
-check_PROGRAMS = \
- test.commands_parser \
- test.config_parser \
- test.inject_randr15
-
-check_SCRIPTS = \
- testcases/complete-run.pl
-
-check_DATA = \
- anyevent-i3.stamp
-
-clean-check:
- rm -rf testsuite-* latest i3-cfg-for-* _Inline
-clean-local: clean-check
-
-TESTS = testcases/complete-run.pl
-
-EXTRA_DIST = \
- $(dist_docs_toc_DATA:.html=) \
- $(dist_docs_notoc_DATA:.html=) \
- AnyEvent-I3/Changes \
- AnyEvent-I3/MANIFEST \
- AnyEvent-I3/MANIFEST.SKIP \
- AnyEvent-I3/Makefile.PL \
- AnyEvent-I3/README \
- AnyEvent-I3/lib/AnyEvent/I3.pm \
- AnyEvent-I3/t/00-load.t \
- AnyEvent-I3/t/01-workspaces.t \
- AnyEvent-I3/t/02-sugar.t \
- AnyEvent-I3/t/boilerplate.t \
- AnyEvent-I3/t/manifest.t \
- AnyEvent-I3/t/pod-coverage.t \
- AnyEvent-I3/t/pod.t \
- contrib/dump-asy.pl \
- contrib/gtk-tree-watch.pl \
- contrib/i3-wsbar \
- contrib/per-workspace-layout.pl \
- contrib/trivial-bar-script.sh \
- docs/asciidoc-git.conf \
- docs/bigpicture.png \
- docs/i3-pod2html \
- docs/i3-sync.dia \
- docs/i3-sync.png \
- docs/i3-sync-working.dia \
- docs/i3-sync-working.png \
- docs/keyboard-layer1.png \
- docs/keyboard-layer2.png \
- docs/layout-saving-1.png \
- docs/logo-30.png \
- docs/modes.png \
- docs/refcard.html \
- docs/refcard_style.css \
- docs/single_terminal.png \
- docs/snapping.png \
- docs/tree-layout1.png \
- docs/tree-layout2.png \
- docs/tree-shot1.png \
- docs/tree-shot2.png \
- docs/tree-shot3.png \
- docs/tree-shot4.png \
- docs/two_columns.png \
- docs/two_terminals.png \
- docs/wsbar.dia \
- docs/wsbar.png \
- i3bar/LICENSE \
- libi3/README \
- $(asciidoc_MANS:.1=.man) \
- $(asciidoc_MANS:.1=.man) \
- man/asciidoc.conf.in \
- DEPENDS \
- I3_VERSION \
- LICENSE \
- PACKAGE-MAINTAINER \
- RELEASE-NOTES-4.18.1 \
- generate-command-parser.pl \
- parser-specs/commands.spec \
- parser-specs/config.spec \
- parser-specs/highlighting.vim \
- pseudo-doc.doxygen \
- testcases/complete-run.pl.in \
- testcases/i3-test.config \
- testcases/lib/i3test/Test.pm \
- testcases/lib/i3test/Util.pm \
- testcases/lib/i3test/XTEST.pm \
- testcases/lib/i3test.pm.in \
- testcases/lib/SocketActivation.pm \
- testcases/lib/StartXServer.pm \
- testcases/lib/StatusLine.pm \
- testcases/lib/TestWorker.pm \
- testcases/Makefile.PL \
- testcases/new-test \
- testcases/restart-state.golden \
- testcases/t \
- testcases/valgrind.supp
-
-# dirstamps contains directories which we want to be created in $(top_builddir)
-# so that our custom rules can store files in them.
-dirstamp = .dirstamp
-dirstamps = \
- docs/$(dirstamp) \
- man/$(dirstamp) \
- parser/$(dirstamp) \
- etc/$(dirstamp)
-DISTCLEANFILES = $(dirstamps)
-
-$(dirstamps):
- @stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
- @: > $@
-
-################################################################################
-# docs generation
-################################################################################
-
-docs_tocdir = ${docdir}
-docs_notocdir = ${docdir}
-docs_poddir = ${docdir}
-if BUILD_DOCS
-dist_docs_toc_DATA = \
- docs/hacking-howto.html \
- docs/userguide.html \
- docs/ipc.html \
- docs/multi-monitor.html \
- docs/wsbar.html \
- docs/testsuite.html \
- docs/i3bar-protocol.html \
- docs/layout-saving.html
-
-dist_docs_notoc_DATA = \
- docs/debugging.html
-
-dist_docs_pod_DATA = \
- docs/lib-i3test.html \
- docs/lib-i3test-test.html
-
-$(dist_docs_toc_DATA): docs/%.html: docs/% docs/$(dirstamp)
- $(AM_V_GEN) @PATH_ASCIIDOC@ -a toc -n -o $@ $<
-
-$(dist_docs_notoc_DATA): docs/%.html: docs/% docs/$(dirstamp)
- $(AM_V_GEN) @PATH_ASCIIDOC@ -n -o $@ $<
-
-docs/lib-i3test.html: testcases/lib/i3test.pm docs/$(dirstamp)
- $(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
-
-docs/lib-i3test-test.html: testcases/lib/i3test/Test.pm docs/$(dirstamp)
- $(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
-
-else
-dist_docs_toc_DATA =
-dist_docs_notoc_DATA =
-dist_docs_pod_DATA =
-endif
-
-################################################################################
-# manpage generation
-################################################################################
-
-if BUILD_MANS
-dist_man1_MANS = \
- $(asciidoc_MANS) \
- $(pod_MANS)
-
-asciidoc_MANS = \
- man/i3.1 \
- man/i3bar.1 \
- man/i3-msg.1 \
- man/i3-input.1 \
- man/i3-nagbar.1 \
- man/i3-config-wizard.1 \
- man/i3-migrate-config-to-v4.1 \
- man/i3-sensible-editor.1 \
- man/i3-sensible-pager.1 \
- man/i3-sensible-terminal.1 \
- man/i3-dump-log.1
-
-pod_MANS = \
- man/i3-dmenu-desktop.1 \
- man/i3-save-tree.1
-
-$(asciidoc_MANS): man/%.1: man/%.xml man/$(dirstamp)
- $(AM_V_GEN) out='$@'; @PATH_XMLTO@ man -o "$${out%/*}" $<
- @stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
-
-man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp)
- $(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $<
-
-$(pod_MANS): man/%.1: % man/$(dirstamp)
- $(AM_V_GEN) @PATH_POD2MAN@ --utf8 $< > $@
-else
-asciidoc_MANS =
-endif
-
-AM_CPPFLAGS = \
- -DSYSCONFDIR="\"$(sysconfdir)\"" \
- -I$(top_builddir)/parser \
- -I$(top_srcdir)/include \
- @AX_EXTEND_SRCDIR_CPPFLAGS@
-
-i3_CFLAGS = \
- $(AM_CFLAGS) \
- $(libi3_CFLAGS) \
- $(LIBSN_CFLAGS) \
- $(XCB_CFLAGS) \
- $(XCB_UTIL_CURSOR_CFLAGS) \
- $(XCB_UTIL_KEYSYM_CFLAGS) \
- $(XCB_UTIL_WM_CFLAGS) \
- $(XCB_UTIL_XRM_CFLAGS) \
- $(XKBCOMMON_CFLAGS) \
- $(YAJL_CFLAGS) \
- $(LIBPCRE_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(CODE_COVERAGE_CFLAGS)
-
-i3_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- $(CODE_COVERAGE_CPPFLAGS)
-
-i3_LDADD = \
- $(libi3_LIBS) \
- $(LIBSN_LIBS) \
- $(XCB_LIBS) \
- $(XCB_UTIL_CURSOR_LIBS) \
- $(XCB_UTIL_KEYSYMS_LIBS) \
- $(XCB_UTIL_WM_LIBS) \
- $(XCB_UTIL_XRM_LIBS) \
- $(XKBCOMMON_LIBS) \
- $(YAJL_LIBS) \
- $(LIBPCRE_LIBS) \
- $(PANGOCAIRO_LIBS) \
- $(PTHREAD_LIBS) \
- $(CODE_COVERAGE_LDFLAGS)
-
-libi3_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLIBGOBJECT_CFLAGS) \
- $(XCB_CFLAGS) \
- $(XCB_UTIL_CFLAGS) \
- $(XCB_UTIL_XRM_CFLAGS) \
- $(YAJL_CFLAGS) \
- $(PANGOCAIRO_CFLAGS)
-
-libi3_LIBS = \
- $(top_builddir)/libi3.a \
- $(GLIBGOBJECT_LIBS) \
- $(XCB_LIBS) \
- $(XCB_UTIL_LIBS) \
- $(XCB_UTIL_XRM_LIBS) \
- $(YAJL_LIBS) \
- $(PANGOCAIRO_LIBS)
-
-libi3_a_CFLAGS = \
- $(libi3_CFLAGS)
-
-libi3_a_SOURCES = \
- include/libi3.h \
- libi3/dpi.c \
- libi3/draw_util.c \
- libi3/fake_configure_notify.c \
- libi3/font.c \
- libi3/format_placeholders.c \
- libi3/g_utf8_make_valid.c \
- libi3/get_colorpixel.c \
- libi3/get_config_path.c \
- libi3/get_exe_path.c \
- libi3/get_mod_mask.c \
- libi3/get_process_filename.c \
- libi3/get_visualtype.c \
- libi3/ipc_connect.c \
- libi3/ipc_recv_message.c \
- libi3/ipc_send_message.c \
- libi3/is_debug_build.c \
- libi3/mkdirp.c \
- libi3/resolve_tilde.c \
- libi3/root_atom_contents.c \
- libi3/safewrappers.c \
- libi3/string.c \
- libi3/strndup.c \
- libi3/ucs2_conversion.c
-
-i3_dump_log_i3_dump_log_CFLAGS = \
- $(AM_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(libi3_CFLAGS)
-
-i3_dump_log_i3_dump_log_LDADD = \
- $(PTHREAD_LIBS) \
- $(libi3_LIBS)
-
-i3_dump_log_i3_dump_log_SOURCES = \
- i3-dump-log/main.c
-
-i3_input_i3_input_CFLAGS = \
- $(AM_CFLAGS) \
- $(libi3_CFLAGS)
-
-i3_input_i3_input_LDADD = \
- $(libi3_LIBS) \
- $(XCB_UTIL_KEYSYMS_LIBS)
-
-i3_input_i3_input_SOURCES = \
- i3-input/i3-input.h \
- i3-input/keysym2ucs.c \
- i3-input/keysym2ucs.h \
- i3-input/main.c
-
-i3_msg_i3_msg_CFLAGS = \
- $(AM_CFLAGS) \
- $(libi3_CFLAGS)
-
-i3_msg_i3_msg_LDADD = \
- $(libi3_LIBS)
-
-i3_msg_i3_msg_SOURCES = \
- i3-msg/main.c
-
-i3_nagbar_i3_nagbar_CFLAGS = \
- $(AM_CFLAGS) \
- $(LIBSN_CFLAGS) \
- $(libi3_CFLAGS)
-
-i3_nagbar_i3_nagbar_LDADD = \
- $(libi3_LIBS) \
- $(LIBSN_LIBS) \
- $(XCB_UTIL_CURSOR_LIBS)
-
-i3_nagbar_i3_nagbar_SOURCES = \
- i3-nagbar/atoms.xmacro \
- i3-nagbar/i3-nagbar.h \
- i3-nagbar/main.c
-
-i3bar_i3bar_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -I$(top_srcdir)/i3bar/include
-
-i3bar_i3bar_CFLAGS = \
- $(AM_CFLAGS) \
- $(libi3_CFLAGS) \
- $(XCB_CFLAGS) \
- $(XKBCOMMON_CFLAGS) \
- $(PANGOCAIRO_CFLAGS) \
- $(YAJL_CFLAGS)
-
-i3bar_i3bar_LDADD = \
- $(libi3_LIBS) \
- $(XCB_LIBS) \
- $(XCB_UTIL_CURSOR_LIBS) \
- $(XKBCOMMON_LIBS) \
- $(PANGOCAIRO_LIBS) \
- $(YAJL_LIBS)
-
-i3bar_i3bar_SOURCES = \
- i3bar/include/child.h \
- i3bar/include/common.h \
- i3bar/include/configuration.h \
- i3bar/include/ipc.h \
- i3bar/include/mode.h \
- i3bar/include/outputs.h \
- i3bar/include/parse_json_header.h \
- i3bar/include/trayclients.h \
- i3bar/include/util.h \
- i3bar/include/workspaces.h \
- i3bar/include/xcb_atoms.def \
- i3bar/include/xcb.h \
- i3bar/src/child.c \
- i3bar/src/config.c \
- i3bar/src/ipc.c \
- i3bar/src/main.c \
- i3bar/src/mode.c \
- i3bar/src/outputs.c \
- i3bar/src/parse_json_header.c \
- i3bar/src/workspaces.c \
- i3bar/src/xcb.c
-
-i3_config_wizard_i3_config_wizard_CFLAGS = \
- $(AM_CFLAGS) \
- $(libi3_CFLAGS) \
- $(LIBSN_CFLAGS) \
- $(XKBCOMMON_CFLAGS)
-
-i3_config_wizard_i3_config_wizard_LDADD = \
- $(libi3_LIBS) \
- $(LIBSN_LIBS) \
- $(XCB_UTIL_KEYSYMS_LIBS) \
- $(XKBCOMMON_LIBS)
-
-i3_config_wizard_i3_config_wizard_SOURCES = \
- i3-config-wizard/atoms.xmacro \
- i3-config-wizard/main.c \
- i3-config-wizard/xcb.h
-
-i3_config_wizard_i3_config_wizard_DEPENDENCIES = \
- $(config_parser_SOURCES)
-
-test_inject_randr15_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_inject_randr15_CFLAGS = \
- $(AM_CFLAGS) \
- $(i3_CFLAGS)
-
-test_inject_randr15_SOURCES = \
- testcases/inject_randr1.5.c
-
-test_inject_randr15_LDADD = \
- $(i3_LDADD)
-
-test_commands_parser_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DTEST_PARSER
-
-test_commands_parser_CFLAGS = \
- $(AM_CFLAGS) \
- $(i3_CFLAGS)
-
-test_commands_parser_SOURCES = \
- src/commands_parser.c
-
-test_commands_parser_LDADD = \
- $(i3_LDADD)
-
-test_config_parser_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DTEST_PARSER
-
-test_config_parser_CFLAGS = \
- $(AM_CFLAGS) \
- $(i3_CFLAGS)
-
-test_config_parser_SOURCES = \
- src/config_parser.c
-
-test_config_parser_LDADD = \
- $(i3_LDADD)
-
-command_parser_SOURCES = \
- parser/GENERATED_command_enums.h \
- parser/GENERATED_command_tokens.h \
- parser/GENERATED_command_call.h
-
-config_parser_SOURCES = \
- parser/GENERATED_config_enums.h \
- parser/GENERATED_config_tokens.h \
- parser/GENERATED_config_call.h
-
-i3_SOURCES = \
- $(command_parser_SOURCES) \
- $(config_parser_SOURCES) \
- include/all.h \
- include/assignments.h \
- include/atoms_NET_SUPPORTED.xmacro \
- include/atoms_rest.xmacro \
- include/atoms.xmacro \
- include/bindings.h \
- include/click.h \
- include/cmdparse.h \
- include/commands.h \
- include/commands_parser.h \
- include/config_directives.h \
- include/configuration.h \
- include/config_parser.h \
- include/con.h \
- include/data.h \
- include/display_version.h \
- include/drag.h \
- include/ewmh.h \
- include/fake_outputs.h \
- include/floating.h \
- include/handlers.h \
- include/i3.h \
- include/ipc.h \
- include/key_press.h \
- include/load_layout.h \
- include/log.h \
- include/main.h \
- include/manage.h \
- include/match.h \
- include/move.h \
- include/output.h \
- include/queue.h \
- include/randr.h \
- include/regex.h \
- include/render.h \
- include/resize.h \
- include/restore_layout.h \
- include/scratchpad.h \
- include/sd-daemon.h \
- include/shmlog.h \
- include/sighandler.h \
- include/startup.h \
- include/sync.h \
- include/tree.h \
- include/util.h \
- include/window.h \
- include/workspace.h \
- include/xcb.h \
- include/xcursor.h \
- include/x.h \
- include/xinerama.h \
- include/yajl_utils.h \
- src/assignments.c \
- src/bindings.c \
- src/click.c \
- src/commands.c \
- src/commands_parser.c \
- src/con.c \
- src/config.c \
- src/config_directives.c \
- src/config_parser.c \
- src/display_version.c \
- src/drag.c \
- src/ewmh.c \
- src/fake_outputs.c \
- src/floating.c \
- src/handlers.c \
- src/ipc.c \
- src/key_press.c \
- src/load_layout.c \
- src/log.c \
- src/main.c \
- src/manage.c \
- src/match.c \
- src/move.c \
- src/output.c \
- src/randr.c \
- src/regex.c \
- src/render.c \
- src/resize.c \
- src/restore_layout.c \
- src/scratchpad.c \
- src/sd-daemon.c \
- src/sighandler.c \
- src/startup.c \
- src/sync.c \
- src/tree.c \
- src/util.c \
- src/version.c \
- src/window.c \
- src/workspace.c \
- src/x.c \
- src/xcb.c \
- src/xcursor.c \
- src/xinerama.c
-
-################################################################################
-# parser generation
-################################################################################
-
-$(command_parser_SOURCES): %.h: i3-command-parser.stamp
-
-$(config_parser_SOURCES): %.h: i3-config-parser.stamp
-
-src/i3-commands_parser.$(OBJEXT): i3-command-parser.stamp
-
-src/i3-config_parser.$(OBJEXT): i3-config-parser.stamp
-
-i3-command-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/commands.spec
- $(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/commands.spec --prefix=command
- $(AM_V_at) mv GENERATED_command_* $(top_builddir)/parser
- $(AM_V_at) touch $@
-
-i3-config-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/config.spec
- $(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/config.spec --prefix=config
- $(AM_V_at) mv GENERATED_config_* $(top_builddir)/parser
- $(AM_V_at) touch $@
-
-################################################################################
-# AnyEvent-I3 build process
-################################################################################
-
-anyevent-i3.stamp: AnyEvent-I3/lib/AnyEvent/I3.pm
- $(AM_V_BUILD) (cd $(top_srcdir)/AnyEvent-I3 && perl Makefile.PL && make)
- $(AM_V_at) touch $@
-
-CLEANFILES = \
- i3-command-parser.stamp \
- i3-config-parser.stamp \
- anyevent-i3.stamp
-
-################################################################################
-# Language Server support
-################################################################################
-
-# Recursively run make through https://github.com/rizsotto/Bear,
-# which generates a compile_commands.json file in the source directory.
-# This is useful for running e.g. the clangd or ccls language servers:
-# https://clang.llvm.org/extra/clangd/
-# https://github.com/MaskRay/ccls/wiki
-.PHONY: bear
-bear: clean
- bear -o $(top_srcdir)/compile_commands.json $(MAKE) $(MAKEFLAGS)
diff --git a/PACKAGE-MAINTAINER b/PACKAGE-MAINTAINER
index 953fac5..c5a7bea 100644
--- a/PACKAGE-MAINTAINER
+++ b/PACKAGE-MAINTAINER
@@ -21,12 +21,14 @@
If your distribution has a mechanism to get the preferred terminal, such as the
x-terminal-emulator symlink in Debian, please use it in i3-sensible-terminal.
-On debian, compilation and installing the manpages looks like this:
+You can build i3 like you build any other software package which uses
+https://mesonbuild.com/; see
+https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project
+In case you’re unfamiliar:
- autoreconf -fi
- mkdir -p build && cd build
- ../configure
- make -j8 install
+ $ mkdir -p build && cd build
+ $ meson ..
+ $ ninja
Please make sure that i3-migrate-config-to-v4 and i3-config-wizard are
installed with i3. The Perl script is necessary to (automatically) convert v3
@@ -35,10 +37,8 @@
start of i3 (it will automatically exit if it finds a config file).
If you have any questions, ideas, hints, problems or whatever, please do not
-hesitate to contact me. I will help you out. Just drop me an E-Mail (find the
-address at https://michael.stapelberg.de/Impressum/, scroll down to bottom),
-contact me using the same address in jabber or ask on our IRC channel:
-(#i3 on irc.freenode.net).
+hesitate to contact me. I will help you out. Please see
+https://i3wm.org/contact/
Thanks again for your efforts,
Michael
diff --git a/README.md b/README.md
index f8b3f06..d94d62c 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
## How do I install i3-gaps?
-Please refer to the [wiki](https://github.com/Airblader/i3/wiki).
+Please refer to the [wiki](https://github.com/Airblader/i3/wiki/installation).
## Where can I get help?
diff --git a/RELEASE-NOTES-4.18.1 b/RELEASE-NOTES-4.18.1
deleted file mode 100644
index c05180f..0000000
--- a/RELEASE-NOTES-4.18.1
+++ /dev/null
@@ -1,32 +0,0 @@
-
- ┌──────────────────────────────┐
- │ Release notes for i3 v4.18.1 │
- └──────────────────────────────┘
-
-This is i3 v4.18.1. This version is considered stable. All users of i3 are
-strongly encouraged to upgrade.
-
-This is a bugfix release for v4.18.
-
- ┌────────────────────────────┐
- │ Bugfixes │
- └────────────────────────────┘
-
- • Move parent nodes in scratchpad correctly
- • i3bar: Call cont_child() more liberally
- • Fix load_layout crash when floating node doesn't have CT_FLOATING_CON parent
- • Fix SEGFAULT when i3bar receives invalid input
- • Revert "floating_reposition: avoid extra tree_render"
- • Call tree_render if floating move changes workspace
- • Update EWMH properties on workspace move
- • cmd_focus_sibling: Fix crash on workspace level
-
- ┌────────────────────────────┐
- │ Thanks! │
- └────────────────────────────┘
-
-Thanks for testing, bugfixes, discussions and everything I forgot go out to:
-
- Heman Gandhi, Orestis Floros
-
--- Michael Stapelberg, 2020-04-22
diff --git a/RELEASE-NOTES-4.19 b/RELEASE-NOTES-4.19
new file mode 100644
index 0000000..cd5bf2c
--- /dev/null
+++ b/RELEASE-NOTES-4.19
@@ -0,0 +1,81 @@
+
+ ┌──────────────────────────────┐
+ │ Release notes for i3 v4.19 │
+ └──────────────────────────────┘
+
+This is i3 v4.19. This version is considered stable. All users of i3 are
+strongly encouraged to upgrade.
+
+In this release, we switched from the autotools build system to the meson build
+system (https://mesonbuild.com/). Check https://github.com/i3/i3/issues/4086 for
+details. If this causes problems for you, you can revert the commit which
+removed autotools from the tree: we tried our best to keep both build systems
+working. Please reach out to us in that case!
+
+ ┌────────────────────────────┐
+ │ Changes in i3 v4.19 │
+ └────────────────────────────┘
+
+ • userguide: explain button6 and button7 (scroll wheel right/left)
+ • ipc: always include the marks property (even if empty)
+ • ipc: introduce GET_BINDING_STATE command
+ • ipc: clarify workspace name field semantics
+ • ipc: document parse_error COMMAND reply field
+ • i3bar: launch using exec to avoid leaving useless shell process
+ • i3bar: make dock client order deterministic (sorted by class/instance) as a
+ side effect, i3bars without an explicit bar-id will be sorted according
+ to their definition order in the config file
+ • i3bar: update config when necessary (reduces redraws on bar mode changes)
+ • i3bar: add coordinates relative to the current output in i3bar click events
+ • i3bar: add “nonprimary” output option
+ • i3bar: set WM_CLASS instance to bar id
+ • i3-input: add different exit codes for when i3-input fails
+ • i3-dmenu-desktop: Support symlinks in search path
+ • pod2html: render without stylesheet by default
+ • introduce “tiling_from” and ”floating_from” criteria
+ • mention rofi in default config file
+ • allow ppt values in move direction and move position commands
+ • allow matching on empty properties like class, title, etc.
+
+ ┌────────────────────────────┐
+ │ Bugfixes │
+ └────────────────────────────┘
+
+ • i3-nagbar: Use _PATH_BSHELL to ensure using a bourne shell
+ • i3bar: fix Xorg memory leak
+ • i3bar: fix hang when pausing/resuming bar program
+ • i3bar: fix crash on invalid JSON input
+ • i3bar: kick tray clients before destroying the bar
+ • ensure client windows have a size of at least 1px after resize
+ • correctly handle overlapping decorations
+ • limit workspace numbers within 0..INT32_MAX
+ • fix a bug with tiling resize inside floating container
+ • correctly handle mouse resize in fullscreen containers by
+ not propagating $mod+right click to fullscreen clients
+ • do not try to resize fullscreen and non-fullscreen windows
+ • do not focus floating windows changing workspace with ConfigureNotify
+ • set _NET_DESKTOP_VIEWPORT after randr changes
+ • fix a bug with i3-nagbar not starting after it has already started once
+ • fix conflict when moving parent of fullscreen window to workspace
+ • fix named workspace assignments on output changes
+ • fix named workspace assignment precedence on workspace renames
+ • fix windows getting swallowed more than once
+ • erase i3 --moreversion progress line before overwriting
+ • fix test case 180-fd-leaks when running on Fedora
+ • fix crash in `focus next sibling`
+ • fix moving tiling windows out of the scratchpad
+ • floating_maybe_reassign_ws: only re-focus if previously focused
+ (fixes a focus issue with KDE notifications)
+ • fix crash on invalid JSON input in stored layouts
+ • fix monitor change during/with i3 restart by moving
+ content for non-existing output containers
+
+Thanks for testing, bugfixes, discussions and everything I forgot go out to:
+
+ 6144, acheronfail, Albert Safin, Alessandro Vinciguerra, Andrey Burov,
+ Francesc Hervada-Sala, Heman Gandhi, Ian Fan, Ingo Bürk, izzel, Jason, Jason
+ Nader, Jorg Heymans, Joseph, Konstantin Kharlamov, Lukas Kern, Mark Guptill,
+ Martin T. H. Sandsmark, Matthew Martin, Maxim Schuwalow, Mike Sharov, Orestis
+ Floros, Vasily Fomin, Wilhelm Schuster, xzfc, zero77
+
+-- Michael Stapelberg, 2020-11-15
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index fe34d6b..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,202 +0,0 @@
-# -*- Autoconf -*-
-# Run autoreconf -fi to generate a configure script from this file.
-
-AC_PREREQ([2.69])
-AC_INIT([i3], [4.18.1], [https://github.com/i3/i3/issues])
-# For AX_EXTEND_SRCDIR
-AX_ENABLE_BUILDDIR
-AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2])
-# Default to silent rules, use V=1 to get verbose compilation output.
-AM_SILENT_RULES([yes])
-# Make it possible to disable maintainer mode to disable re-generation of build
-# system files.
-AM_MAINTAINER_MODE([enable])
-AC_CONFIG_SRCDIR([libi3/ipc_recv_message.c])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_MACRO_DIR([m4])
-
-dnl Verify macros defined in m4/ such as AX_SANITIZERS are not present in the
-dnl output, i.e. are replaced as expected. This line results in a better error
-dnl message when using aclocal < 1.13 (which does not understand
-dnl AC_CONFIG_MACRO_DIR) without passing the -I m4 parameter.
-m4_pattern_forbid([AX_SANITIZERS])
-
-# Verify we are using GNU make because we use '%'-style pattern rules in
-# Makefile.am, which are a GNU make extension. Pull requests to replace
-# '%'-style pattern rules with a more portable alternative are welcome.
-AX_CHECK_GNU_MAKE
-AS_VAR_IF([_cv_gnu_make_command], [""], [AC_MSG_ERROR([the i3 Makefile.am requires GNU make])])
-
-AX_EXTEND_SRCDIR
-
-AS_IF([test -e ${srcdir}/.git],
- [
- VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)"
- I3_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} rev-list --format=%cd --date=short -n1 $(git rev-parse HEAD) | tail -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")"
- # Mirrors what libi3/is_debug_build.c does:
- is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no)
- ],
- [
- VERSION="$(cut -d '-' -f 1 ${srcdir}/I3_VERSION | cut -d ' ' -f 1)"
- I3_VERSION="$(sed -e 's/@<:@\"?\\@:>@/\\&/g' ${srcdir}/I3_VERSION)"
- is_release="$(grep -q non-git ${srcdir}/I3_VERSION && echo no || echo yes)"
- ])
-AC_SUBST([I3_VERSION], [$I3_VERSION])
-MAJOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 1)"
-MINOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 2)"
-PATCH_VERSION="$(echo ${VERSION} | cut -d '.' -f 3)"
-AS_IF([test "x${PATCH_VERSION}" = x], [PATCH_VERSION=0])
-AC_DEFINE_UNQUOTED([I3_VERSION], ["${I3_VERSION}"], [i3 version])
-AC_DEFINE_UNQUOTED([MAJOR_VERSION], [${MAJOR_VERSION}], [i3 major version])
-AC_DEFINE_UNQUOTED([MINOR_VERSION], [${MINOR_VERSION}], [i3 minor version])
-AC_DEFINE_UNQUOTED([PATCH_VERSION], [${PATCH_VERSION}], [i3 patch version])
-
-AX_CODE_COVERAGE
-
-dnl is_release must be lowercase because AX_CHECK_ENABLE_DEBUG calls m4_tolower
-dnl on its fourth argument.
-AX_CHECK_ENABLE_DEBUG([yes], , [UNUSED_NDEBUG], [$is_release])
-
-AC_PROG_CC_C99
-
-# For strnlen() and vasprintf().
-AC_USE_SYSTEM_EXTENSIONS
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_CHECK_HEADER_STDBOOL
-dnl The error message should include the specific type which could not be
-dnl found, but I do not see a way to achieve that.
-AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t], , [AC_MSG_FAILURE([cannot find required type])])
-
-# Checks for library functions.
-AC_FUNC_FORK
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_STRNLEN
-AC_CHECK_FUNCS([atexit dup2 ftruncate getcwd gettimeofday localtime_r memchr memset mkdir rmdir setlocale socket strcasecmp strchr strdup strerror strncasecmp strrchr strspn strstr strtol strtoul], , [AC_MSG_FAILURE([cannot find the $ac_func function, which i3 requires])])
-AC_REPLACE_FUNCS([mkdirp strndup])
-
-# Checks for libraries.
-
-AC_SEARCH_LIBS([floor], [m], , [AC_MSG_FAILURE([cannot find the required floor() function despite trying to link with -lm])])
-
-# libev does not ship with a pkg-config file :(.
-AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_run() function despite trying to link with -lev])])
-
-AC_SEARCH_LIBS([shm_open], [rt], [], [], [-pthread])
-
-AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [iconv_open(0, 0)])], ,
- [LIBS="-liconv $LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [iconv_open(0, 0)])], ,
- [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])])]
-)
-
-AX_PTHREAD
-
-dnl Each prefix corresponds to a source tarball which users might have
-dnl downloaded in a newer version and would like to overwrite.
-PKG_CHECK_MODULES([LIBSN], [libstartup-notification-1.0])
-PKG_CHECK_MODULES([XCB], [xcb xcb-xkb xcb-xinerama xcb-randr xcb-shape])
-PKG_CHECK_MODULES([XCB_UTIL], [xcb-event xcb-util])
-PKG_CHECK_MODULES([XCB_UTIL_CURSOR], [xcb-cursor])
-PKG_CHECK_MODULES([XCB_UTIL_KEYSYMS], [xcb-keysyms])
-PKG_CHECK_MODULES([XCB_UTIL_WM], [xcb-icccm])
-PKG_CHECK_MODULES([XCB_UTIL_XRM], [xcb-xrm])
-PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon xkbcommon-x11])
-PKG_CHECK_MODULES([YAJL], [yajl])
-PKG_CHECK_MODULES([LIBPCRE], [libpcre >= 8.10])
-PKG_CHECK_MODULES([PANGOCAIRO], [cairo >= 1.14.4 pangocairo])
-PKG_CHECK_MODULES([GLIBGOBJECT], [glib-2.0 gobject-2.0])
-
-# Checks for programs.
-AC_PROG_AWK
-AC_PROG_CPP
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-AC_PROG_RANLIB
-AC_PROG_LN_S
-
-AC_ARG_ENABLE(docs,
- AS_HELP_STRING(
- [--disable-docs],
- [disable building documentation]),
- [ax_docs=$enableval],
- [ax_docs=yes])
-AC_ARG_ENABLE(mans,
- AS_HELP_STRING(
- [--disable-mans],
- [disable building manual pages]),
- [ax_mans=$enableval],
- [ax_mans=yes])
-AS_IF([test x$ax_docs = xyes || test x$ax_mans = xyes], [
- AC_PATH_PROG([PATH_ASCIIDOC], [asciidoc])
-])
-AS_IF([test x$ax_mans = xyes], [
- AC_PATH_PROG([PATH_XMLTO], [xmlto])
- AC_PATH_PROG([PATH_POD2MAN], [pod2man])
-])
-AM_CONDITIONAL([BUILD_MANS], [test x$ax_mans = xyes && test x$PATH_ASCIIDOC != x && test x$PATH_XMLTO != x && test x$PATH_POD2MAN != x])
-AM_CONDITIONAL([BUILD_DOCS], [test x$ax_docs = xyes && test x$PATH_ASCIIDOC != x])
-
-AM_PROG_AR
-
-AX_FLAGS_WARN_ALL
-AX_CHECK_COMPILE_FLAG([-Wunused-value], [AX_APPEND_FLAG([-Wunused-value], [AM_CFLAGS])])
-AC_SUBST(AM_CFLAGS)
-
-# Checks for header files.
-AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h locale.h netinet/in.h paths.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h], , [AC_MSG_FAILURE([cannot find the $ac_header header, which i3 requires])])
-
-AC_CONFIG_FILES([Makefile testcases/lib/i3test.pm man/asciidoc.conf])
-AC_CONFIG_FILES([testcases/complete-run.pl], [chmod +x testcases/complete-run.pl])
-
-# Enable address sanitizer for non-release builds. The performance hit is a
-# 50% increase of wallclock time for the testsuite on my machine.
-if test x$is_release = xyes; then
- default_sanitizers=
-else
- default_sanitizers=address
-fi
-AX_SANITIZERS(, [$default_sanitizers], [AC_DEFINE([I3_ASAN_ENABLED], [], [Enable ASAN])])
-
-AC_OUTPUT
-
-if test -z "${BUILD_DOCS_TRUE}"; then
- print_BUILD_DOCS=yes
-else
- print_BUILD_DOCS=no
-fi
-
-
-if test -z "${BUILD_MANS_TRUE}"; then
- print_BUILD_MANS=yes
-else
- print_BUILD_MANS=no
-fi
-
-in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null`
-if [[ "$in_git_worktree" = "true" ]]; then
- git_dir=`git rev-parse --git-dir 2>/dev/null`
- srcdir=`dirname "$git_dir"`
- exclude_dir=`pwd | sed "s,^$srcdir,,g"`
- if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then
- echo "$exclude_dir" >> "$git_dir/info/exclude"
- fi
-fi
-
-echo \
-"--------------------------------------------------------------------------------
-build configured:
-
-AS_HELP_STRING([i3 version:], [`echo ${I3_VERSION} | sed 's,\\\\,,g'`])
-AS_HELP_STRING([is release version:], [${is_release}])
-
-AS_HELP_STRING([build manpages:], [${print_BUILD_MANS}])
-AS_HELP_STRING([build docs:], [${print_BUILD_DOCS}])
-AS_HELP_STRING([enable debug flags:], [${ax_enable_debug}])
-AS_HELP_STRING([code coverage:], [${CODE_COVERAGE_ENABLED}])
-AS_HELP_STRING([enabled sanitizers:], [${ax_enabled_sanitizers}])
-
-To compile, run:
-
- cd `pwd` && make -j8
---------------------------------------------------------------------------------"
diff --git a/debian/changelog b/debian/changelog
index 059fa32..c9df867 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,27 @@
+i3-wm (4.19.1-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Michael Stapelberg Mon, 19 Oct 2020 22:48:30 +0200
+
+i3-wm (4.19-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Michael Stapelberg Sun, 15 Nov 2020 18:28:11 +0100
+
+i3-wm (4.18.3-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Michael Stapelberg Mon, 19 Oct 2020 22:48:30 +0200
+
+i3-wm (4.18.2-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Michael Stapelberg Sun, 26 Jul 2020 10:24:46 +0200
+
i3-wm (4.18.1-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 843e655..5cd27cd 100644
--- a/debian/control
+++ b/debian/control
@@ -2,8 +2,8 @@
Section: x11
Priority: extra
Maintainer: Michael Stapelberg
-Build-Depends: debhelper (>= 9),
- dh-autoreconf,
+Build-Depends: debhelper (>= 10),
+ meson,
libx11-dev,
libxcb-util0-dev (>= 0.3.8),
libxcb-keysyms1-dev,
diff --git a/debian/i3-wm.docs b/debian/i3-wm.docs
deleted file mode 100644
index 437175b..0000000
--- a/debian/i3-wm.docs
+++ /dev/null
@@ -1,32 +0,0 @@
-docs/debugging.html
-docs/hacking-howto.html
-docs/i3bar-protocol.html
-docs/userguide.html
-docs/bigpicture.png
-docs/single_terminal.png
-docs/snapping.png
-docs/two_columns.png
-docs/two_terminals.png
-docs/modes.png
-docs/ipc.html
-docs/multi-monitor.html
-docs/wsbar.html
-docs/wsbar.png
-docs/keyboard-layer1.png
-docs/keyboard-layer2.png
-docs/testsuite.html
-docs/i3-sync-working.png
-docs/i3-sync.png
-docs/tree-layout1.png
-docs/tree-layout2.png
-docs/tree-shot1.png
-docs/tree-shot2.png
-docs/tree-shot3.png
-docs/tree-shot4.png
-docs/refcard.html
-docs/refcard_style.css
-docs/logo-30.png
-docs/lib-i3test.html
-docs/lib-i3test-test.html
-docs/layout-saving.html
-docs/layout-saving-1.png
diff --git a/debian/i3-wm.manpages b/debian/i3-wm.manpages
deleted file mode 100644
index 1953b6a..0000000
--- a/debian/i3-wm.manpages
+++ /dev/null
@@ -1,13 +0,0 @@
-man/i3.1
-man/i3-msg.1
-man/i3-input.1
-man/i3-nagbar.1
-man/i3-config-wizard.1
-man/i3-dump-log.1
-man/i3-migrate-config-to-v4.1
-man/i3-sensible-pager.1
-man/i3-sensible-editor.1
-man/i3-sensible-terminal.1
-man/i3-dmenu-desktop.1
-man/i3-save-tree.1
-man/i3bar.1
diff --git a/debian/rules b/debian/rules
index d5c3068..26e303e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,12 +14,12 @@
# TODO: enable tests
override_dh_auto_configure:
- # The default is /usr/share/doc/i3
- dh_auto_configure -- --docdir=/usr/share/doc/i3-wm
+ # Set -Ddocdir; the default is /usr/share/doc/i3
+ dh_auto_configure -- -Ddocdir=/usr/share/doc/i3-wm -Dmans=true
override_dh_builddeb:
# bintray does not support xz currently.
dh_builddeb -- -Zgzip
%:
- dh $@ --parallel --builddirectory=build --with=autoreconf
+ dh $@ --buildsystem=meson
diff --git a/docs/bigpicture.asy b/docs/bigpicture.asy
new file mode 100644
index 0000000..4b3656c
--- /dev/null
+++ b/docs/bigpicture.asy
@@ -0,0 +1,19 @@
+import drawtree;
+treeLevelStep = 2cm;
+TreeNode n94457831379296 = makeNode("``root'' (splith) []");
+TreeNode n94457831380944 = makeNode(n94457831379296, "``\_\_i3'' (output) []");
+TreeNode n94457831384048 = makeNode(n94457831380944, "``content'' (splith) []");
+TreeNode n94457831387184 = makeNode(n94457831384048, "``\_\_i3\_scratch'' (splith) []");
+TreeNode n94457831390576 = makeNode(n94457831379296, "``eDP-1'' (output) []");
+TreeNode n94457831393744 = makeNode(n94457831390576, "``topdock'' (dockarea) []");
+TreeNode n94457831396992 = makeNode(n94457831390576, "``content'' (splith) []");
+TreeNode n94457831628304 = makeNode(n94457831396992, "``1'' (splith) []");
+TreeNode n94457831571040 = makeNode(n94457831628304, "``Hacking i3: How To - Mozilla Firefox'' (leaf) []");
+TreeNode n94457831246384 = makeNode(n94457831628304, "``vim'' (leaf) []");
+TreeNode n94457831461088 = makeNode(n94457831396992, "``Named workspace'' (splith) []");
+TreeNode n94457831471424 = makeNode(n94457831461088, "``[Empty]'' (tabbed) []");
+TreeNode n94457831570576 = makeNode(n94457831471424, "``contrib/dump-asy.pl --no-gv'' (leaf) [Marks go here]");
+TreeNode n94457831645488 = makeNode(n94457831471424, "``ipython'' (leaf) []");
+TreeNode n94457831400192 = makeNode(n94457831390576, "``bottomdock'' (dockarea) []");
+TreeNode n94457831424848 = makeNode(n94457831400192, "``i3bar for output eDP-1'' (leaf) []");
+draw(n94457831379296, (0, 0));
diff --git a/docs/bigpicture.png b/docs/bigpicture.png
index fc3c8db..031673b 100644
Binary files a/docs/bigpicture.png and b/docs/bigpicture.png differ
diff --git a/docs/bigpicture.xcf b/docs/bigpicture.xcf
deleted file mode 100644
index ead0071..0000000
Binary files a/docs/bigpicture.xcf and /dev/null differ
diff --git a/docs/hacking-howto b/docs/hacking-howto
index 2ca44a5..cc08cd1 100644
--- a/docs/hacking-howto
+++ b/docs/hacking-howto
@@ -8,83 +8,82 @@
you understand why things are like they are. If it does not mention something
you find necessary, please do not hesitate to contact me.
+++++
+
+
WARNING!
+
+++++
+This document is not 100% up to date. Specifically, everything up to and
+including <> has been updated recently. The rest might contain
+outdated information.
+++++
+
+
+++++
+
== Building i3
-You can build i3 like you build any other software package which uses autotools.
-Here’s a memory refresher:
-
- $ autoreconf -fi
+You can build i3 like you build any other software package which uses
+https://mesonbuild.com/[The Meson Build system]; see
+https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project[Quickstart
+Guide → Compiling a Meson project]. In case you’re unfamiliar:
+
$ 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.)
+ $ meson ..
+ $ ninja
=== 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
+* 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
+* +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.
+* +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.
+ to install all these dependencies to get started hacking on i3. Manpages and
+ docs can be disabled with the +--disable-mans++ and ++--disable-docs++
+ configure options respectively.
* 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
+ +--disable-sanitizers+ configure option to turn off all sanitizers, and see
+ +--help+ for available sanitizers.
+
+* Coverage reports are now generated using +make check-code-coverage+, which
+ requires specifying +--enable-code-coverage+ when calling configure.
+
+== Pull requests
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.
+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.
+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
+Work on i3 generally happens in two branches: “next” (default) and “stable”.
+
+The contents of “stable” 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”.
+New features are only found in the “next” branch. Always use this branch when
+writing new code (both bugfixes and features).
== Window Managers
@@ -106,9 +105,9 @@
the first client of X) and manage them (reparent them, create window
decorations, etc.)
. When new windows are created, manage them
-. Handle the client’s `_WM_STATE` property, but only `_WM_STATE_FULLSCREEN` and
- `_NET_WM_STATE_DEMANDS_ATTENTION`
-. Handle the client’s `WM_NAME` property
+. Handle the client’s +_WM_STATE+ property, but only +_WM_STATE_FULLSCREEN+ and
+ +_NET_WM_STATE_DEMANDS_ATTENTION+
+. Handle the client’s +WM_NAME+ property
. Handle the client’s size hints to display them proportionally
. Handle the client’s urgency hint
. Handle enter notifications (focus follows mouse)
@@ -123,11 +122,11 @@
=== Tiling window managers
-Traditionally, there are two approaches to managing windows: The most common
-one nowadays is floating, which means the user can freely move/resize the
-windows. The other approach is called tiling, which means that your window
-manager distributes windows to use as much space as possible while not
-overlapping each other.
+Traditionally, there are two approaches to managing windows: The most common one
+nowadays is stacking (or floating, using i3's terminology), which means the user
+can freely move/resize the windows, potentially overlapping them. The other
+approach is called tiling, which means that the window manager distributes
+windows to use as much space as possible while not overlapping each other.
The idea behind tiling is that you should not need to waste your time
moving/resizing windows while you usually want to get some work done. After
@@ -161,63 +160,67 @@
== Files
-include/atoms.xmacro::
-A file containing all X11 atoms which i3 uses. This file will be included
-various times (for defining, requesting and receiving the atoms), each time
-with a different definition of xmacro().
+i3's source code is in the +src+ folder while header files reside in +include+.
+Other tools such as i3bar and i3-nagbar have their own folders. i3 and its tools
+share an internal library called ``libi3'' which also has its own folder.
+
+The following list gives an overview of the codebase, explaining the
+functionality of the most important, core source code files. Other files in the
+tree that are not mentioned here implement specific functionalities: for example,
++src/scratchpad.c+ is obviously about the scratchpad functionality.
include/data.h::
-Contains data definitions used by nearly all files. You really need to read
-this first.
+Contains data definitions used by nearly all files.
include/*.h::
Contains forward definitions for all public functions, as well as
doxygen-compatible comments (so if you want to get a bit more of the big
picture, either browse all header files or use doxygen if you prefer that).
-src/config_parser.c::
-Contains a custom configuration parser. See src/command_parser.c for rationale
- on why we use a custom parser.
-
-src/click.c::
-Contains all functions which handle mouse button clicks (right mouse button
-clicks initiate resizing and thus are relatively complex).
-
-src/command_parser.c::
-Contains a hand-written parser to parse commands (commands are what
-you bind on keys and what you can send to i3 using the IPC interface, like
-'move left' or 'workspace 4').
+src/config_directives.c::
+src/commands.c::
+Contain the definitions for all high-level config and command directives. These
+are excellent places to start with a top-to-bottom approach to understand
+specific i3 behavior. For example, if you want to investigate a bug that happens
+for the +move to mark+ command, you can use gdb to pause in
++cmd_move_con_to_mark+ and then work your way from there, stepping into
+lower-level functions.
src/con.c::
-Contains all functions which deal with containers directly (creating
-containers, searching containers, getting specific properties from containers,
-…).
-
-src/config.c::
-Contains all functions handling the configuration file (calling the parser
-src/config_parser.c) with the correct path, switching key bindings mode).
-
-src/ewmh.c::
-Functions to get/set certain EWMH properties easily.
-
-src/floating.c::
-Contains functions for floating mode (mostly resizing/dragging).
+Contains all functions which deal with containers directly (creating containers,
+searching containers, getting specific properties from containers, …). Contains
+abstractions and auxiliary functions necessary to work with the container
+structure which is used in almost all parts of the codebase.
+
+src/tree.c::
+Contains functions which deal with the tree abstraction. However, be aware that
++src/con.c+ also contains functions that heavily interact with the tree
+structure. Some functions that are included in +str/tree.c+ are those that handle
+opening and closing containers in the tree, finding the container that should be
+focused next and flattening the tree. See also +src/move.c+ for other
+move-specific functions that interact with the tree, which were moved into their
+own file because they are so long.
+
+src/workspace.c::
+Contains functions which deal with workspaces. Includes code that creates new
+workspaces, shows existing ones and deals with workspace assignments.
src/handlers.c::
Contains all handlers for all kinds of X events (new window title, new hints,
-unmapping, key presses, button presses, …).
-
-src/ipc.c::
-Contains code for the IPC interface.
-
-src/load_layout.c::
-Contains code for loading layouts from JSON files.
-
-src/log.c::
-Contains the logging functions.
-
-src/main.c::
-Initializes the window manager.
+unmapping, key presses, button presses, …). This is a very important file to
+understand how i3 interacts with changes to its environment.
+
+src/command_parser.c::
+src/config_parser.c::
+Contain a hand-written parser to parse commands and configuration (commands are what
+you bind on keys and what you can send to i3 using the IPC interface, like
++move left+ or +workspace 4+). +src/config.c+ is responsible for calling the
+configuration parser.
+
+src/click.c::
+src/resize.c::
+Contain functions which handle mouse button clicks (right mouse button
+clicks initiate resizing and thus are relatively complex).
src/manage.c::
Looks at existing or new windows and decides whether to manage them. If so, it
@@ -226,93 +229,66 @@
src/match.c::
A "match" is a data structure which acts like a mask or expression to match
certain windows or not. For example, when using commands, you can specify a
-command like this: [title="*Firefox*"] kill. The title member of the match
+command like this: +[title="*Firefox*"] kill+. The title member of the match
data structure will then be filled and i3 will check each window using
-match_matches_window() to find the windows affected by this command.
-
-src/move.c::
-Contains code to move a container in a specific direction.
-
-src/output.c::
-Functions to handle CT_OUTPUT cons.
++match_matches_window()+ to find the windows affected by this command.
src/randr.c::
The RandR API is used to get (and re-query) the configured outputs (monitors,
-…).
+…). Legacy Xinerama support resides in +src/xinerama.c+.
src/render.c::
Renders the tree data structure by assigning coordinates to every node. These
values will later be pushed to X11 in +src/x.c+.
-src/resize.c::
-Contains the functions to resize containers.
-
-src/restore_layout.c::
-Everything for restored containers that is not pure state parsing (which can be
-found in load_layout.c).
-
src/sighandler.c::
Handles +SIGSEGV+, +SIGABRT+ and +SIGFPE+ by showing a dialog that i3 crashed.
-You can chose to let it dump core, to restart it in-place or to restart it
-in-place but forget about the layout.
-
-src/tree.c::
-Contains functions which open or close containers in the tree, change focus or
-cleanup ("flatten") the tree. See also +src/move.c+ for another similar
-function, which was moved into its own file because it is so long.
-
-src/util.c::
-Contains useful functions which are not really dependent on anything.
+You can choose to let it dump core and restart i3 in-place (either trying to
+preserve layout or forget about it).
src/window.c::
Handlers to update X11 window properties like +WM_CLASS+, +_NET_WM_NAME+,
+CLIENT_LEADER+, etc.
-src/workspace.c::
-Contains all functions related to workspaces (displaying, hiding, renaming…)
-
-src/x.c::
-Transfers our in-memory tree (see +src/render.c+) to X11.
-
-src/xcb.c::
-Contains wrappers to use xcb more easily.
-
-src/xcursor.c::
-XCursor functions (for cursor themes).
-
-src/xinerama.c::
-Legacy support for Xinerama. See +src/randr.c+ for the preferred API.
-
+include/*.xmacro.*::
+A file containing all X11 atoms which i3 uses. This file will be included
+various times (for defining, requesting and receiving the atoms), each time
+with a different definition of xmacro().
+
+[[data_structures]]
== Data structures
-
-See include/data.h for documented data structures. The most important ones are
-explained right here.
-
-/////////////////////////////////////////////////////////////////////////////////
-// TODO: update image
-
-image:bigpicture.png[The Big Picture]
-
-/////////////////////////////////////////////////////////////////////////////////
-
-So, the hierarchy is:
-
-. *X11 root window*, the root container
-. *Output container* (LVDS1 in this example)
-. *Content container* (there are also containers for dock windows)
-. *Workspaces* (Workspace 1 in this example, with horizontal orientation)
-. *Split container* (vertically split)
-. *X11 window containers*
+See +include/data.h+ for documented data structures. The most important ones are
+explained here.
+
+The following picture is generated by the +contrib/dump-asy.pl+ script.
+
+image:bigpicture.png["The Big Picture",width=1000,link="bigpicture.png"]
+
+The hierarchy is:
+
+. *Root container*
+. *Output containers*: +eDP-1+ in this example and the internal +__i3++ output
+. *Content and 2 dockarea containers*
+. *Workspaces*: Numbered workspace ``1'' and a ``Named workspace''
+. *Split containers*: One horizontal in the first workspace and a tabbed one in
+ the named one.
+. *Leaf containers*: Windows like vim and an i3bar dock.
The data type is +Con+, in all cases.
-=== X11 root window
-
-The X11 root window is a single window per X11 display (a display is identified
-by +:0+ or +:1+ etc.). The root window is what you draw your background image
-on. It spans all the available outputs, e.g. +VGA1+ is a specific part of the
-root window and +LVDS1+ is a specific part of the root window.
+=== Root container
+
+The root container (global variable +croot+) is the up-most ascendant of every i3
+container. It can be used to iterate over the whole tree structure. E.g., it is
+used to reply to the +GET_WORKSPACES+ request, iterating over it's children to
+find all workspaces. This is different from the X11 root window.
+
+The X11 root window (global variable +root+) is a single window per X11 display
+(a display is identified by +:0+ or +:1+ etc.). The root window is what you draw
+your background image on. It spans all the available outputs, e.g. +VGA1+ is a
+specific part of the root window and +LVDS1+ is a specific part of the root
+window.
=== Output container
@@ -334,8 +310,8 @@
=== Content container
Each output has multiple children. Two of them are dock containers which hold
-dock clients. The other one is the content container, which holds the actual
-content (workspaces) of this output.
+the top and bottom dock clients. The other one is the content container, which
+holds the actual content (workspaces) of this output.
=== Workspace
@@ -354,21 +330,20 @@
Split containers (and X11 window containers, which are a subtype of split
containers) can have different border styles.
-=== X11 window container
-
-An X11 window container holds exactly one X11 window. These are the leaf nodes
-of the layout tree, they cannot have any children.
+=== Leaf containers
+
+A leaf container holds exactly one X11 window. They can't have any children.
== List/queue macros
i3 makes heavy use of the list macros defined in BSD operating systems. To
ensure that the operating system on which i3 is compiled has all the expected
-features, i3 comes with `include/queue.h`. On BSD systems, you can use man
-`queue(3)`. On Linux, you have to use google (or read the source).
+features, i3 comes with +include/queue.h+. On BSD systems, you can use +man
+queue(3)+. On Linux, you have to use google (or read the source).
The lists used are +SLIST+ (single linked lists), +CIRCLEQ+ (circular
queues) and +TAILQ+ (tail queues). Usually, only forward traversal is necessary,
-so an `SLIST` works fine. If inserting elements at arbitrary positions or at
+so an +SLIST+ works fine. If inserting elements at arbitrary positions or at
the end of a list is necessary, a +TAILQ+ is used instead. However, for the
windows inside a container, a +CIRCLEQ+ is necessary to go from the currently
selected window to the window above/below.
@@ -378,10 +353,10 @@
There is a row of standard variables used in many events. The following names
should be chosen for those:
- * ``conn'' is the xcb_connection_t
- * ``event'' is the event of the particular type
- * ``con'' names a container
- * ``current'' is a loop variable when using +TAILQ_FOREACH+ etc.
+ * +conn+ is the xcb_connection_t
+ * +event+ is the event of the particular type
+ * +con+ names a container
+ * +current+ is a loop variable when using +TAILQ_FOREACH+ etc.
== Startup (src/mainx.c, main())
@@ -430,7 +405,7 @@
== Manage windows (src/main.c, manage_window() and reparent_window())
-`manage_window()` does some checks to decide whether the window should be
++manage_window()+ does some checks to decide whether the window should be
managed at all:
* Windows have to be mapped, that is, visible on screen
@@ -438,18 +413,18 @@
not be managed by a window manager
Afterwards, i3 gets the initial geometry and reparents the window (see
-`reparent_window()`) if it wasn’t already managed.
++reparent_window()+) if it wasn’t already managed.
Reparenting means that for each window which is reparented, a new window,
slightly larger than the original one, is created. The original window is then
reparented to the bigger one (called "frame").
-After reparenting, the window type (`_NET_WM_WINDOW_TYPE`) is checked to see
-whether this window is a dock (`_NET_WM_WINDOW_TYPE_DOCK`), like dzen2 for
+After reparenting, the window type (+_NET_WM_WINDOW_TYPE+) is checked to see
+whether this window is a dock (+_NET_WM_WINDOW_TYPE_DOCK+), like dzen2 for
example. Docks are handled differently, they don’t have decorations and are not
assigned to a specific container. Instead, they are positioned at the bottom
or top of the screen (in the appropriate dock area containers). To get the
-height which needs to be reserved for the window, the `_NET_WM_STRUT_PARTIAL`
+height which needs to be reserved for the window, the +_NET_WM_STRUT_PARTIAL+
property is used.
Furthermore, the list of assignments (to other workspaces, which may be on
@@ -460,10 +435,10 @@
== What happens when an application is started?
i3 does not care about applications. All it notices is when new windows are
-mapped (see `src/handlers.c`, `handle_map_request()`). The window is then
+mapped (see +src/handlers.c+, +handle_map_request()+). The window is then
reparented (see section "Manage windows").
-After reparenting the window, `render_tree()` is called which renders the
+After reparenting the window, +render_tree()+ is called which renders the
internal layout table. The new window has been placed in the currently focused
container and therefore the new window and the old windows (if any) need to be
moved/resized so that the currently active layout (default/stacking/tabbed mode)
@@ -482,7 +457,7 @@
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
+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.
@@ -539,7 +514,7 @@
=== Rendering the root container
-The i3 root container (`con->type == CT_ROOT`) represents the X11 root window.
+The i3 root container (+con->type == CT_ROOT+) represents the X11 root window.
It contains one child container for every output (like LVDS1, VGA1, …), which
is available on your computer.
@@ -558,7 +533,7 @@
=== Rendering an output
-Output containers (`con->layout == L_OUTPUT`) represent a hardware output like
+Output containers (+con->layout == L_OUTPUT+) represent a hardware output like
LVDS1, VGA1, etc. An output container has three children (at the moment): One
content container (having workspaces as children) and the top/bottom dock area
containers.
@@ -566,7 +541,7 @@
The rendering happens in the function +render_l_output()+ in the following
steps:
-1. Find the content container (`con->type == CT_CON`)
+1. Find the content container (+con->type == CT_CON+)
2. Get the currently visible workspace (+con_get_fullscreen_con(content,
CF_OUTPUT)+).
3. If there is a fullscreened window on that workspace, directly render it and
@@ -574,22 +549,22 @@
4. Sum up the space used by all the dock windows (they have a variable height
only).
5. Set the workspace rects (x/y/width/height) based on the position of the
- output (stored in `con->rect`) and the usable space
- (`con->rect.{width,height}` without the space used for dock windows).
+ output (stored in +con->rect+) and the usable space
+ (+con->rect.{width,height}+ without the space used for dock windows).
6. Recursively raise and render the output’s child containers (meaning dock
area containers and the content container).
=== Rendering a workspace or split container
From here on, there really is no difference anymore. All containers are of
-`con->type == CT_CON` (whether workspace or split container) and some of them
-have a `con->window`, meaning they represent an actual window instead of a
++con->type == CT_CON+ (whether workspace or split container) and some of them
+have a +con->window+, meaning they represent an actual window instead of a
split container.
==== Default layout
In default layout, containers are placed horizontally or vertically next to
-each other (depending on the `con->orientation`). If a child is a leaf node (as
+each other (depending on the +con->orientation+). If a child is a leaf node (as
opposed to a split container) and has border style "normal", appropriate space
will be reserved for its window decoration.
@@ -835,8 +810,8 @@
the beginning. +
NOTE: Note that you can specify multiple literals in the same line. This has
- exactly the same effect as if you specified `direction =
- 'next_on_output' -> call cmd_workspace($direction)` and so forth. +
+ exactly the same effect as if you specified +direction =
+ 'next_on_output' -> call cmd_workspace($direction)+ and so forth. +
NOTE: Also note that the order of literals is important here: If 'next' were
ordered before 'next_on_output', then 'next_on_output' would never
@@ -1020,11 +995,11 @@
== Gotchas
-* Forgetting to call `xcb_flush(conn);` after sending a request. This usually
+* Forgetting to call +xcb_flush(conn);+ after sending a request. This usually
leads to code which looks like it works fine but which does not work under
certain conditions.
-* Forgetting to call `floating_fix_coordinates(con, old_rect, new_rect)` after
+* Forgetting to call +floating_fix_coordinates(con, old_rect, new_rect)+ after
moving workspaces across outputs. Coordinates for floating containers are
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.
diff --git a/docs/i3bar-protocol b/docs/i3bar-protocol
index cadcd8a..c1bf8f8 100644
--- a/docs/i3bar-protocol
+++ b/docs/i3bar-protocol
@@ -103,9 +103,11 @@
version::
The version number (as an integer) of the i3bar protocol you will use.
stop_signal::
- Specify to i3bar the signal (as an integer) to send to stop your
- processing.
- The default value (if none is specified) is SIGSTOP.
+ Specify the signal (as an integer) that i3bar should send to request that you
+ pause your output. This is used to conserve battery power when the bar is
+ hidden by not unnecessarily computing bar updates. The default value is SIGSTOP,
+ which will unconditionally stop your process. If this is an issue, this feature
+ can be disabled by setting the value to 0.
cont_signal::
Specify to i3bar the signal (as an integer) to send to continue your
processing.
@@ -258,6 +260,8 @@
relative_x, relative_y::
Coordinates where the click occurred, with respect to the top left corner
of the block
+output_x, output_y::
+ Coordinates relative to the current output where the click occurred
width, height::
Width and height (in px) of the block
modifiers::
@@ -271,10 +275,12 @@
"instance": "eth0",
"button": 1,
"modifiers": ["Shift", "Mod1"],
- "x": 1320,
+ "x": 1925,
"y": 1400,
"relative_x": 12,
"relative_y": 8,
+ "output_x": 5,
+ "output_y": 1400,
"width": 50,
"height": 22
}
diff --git a/docs/ipc b/docs/ipc
index 5bc40e2..bb8719c 100644
--- a/docs/ipc
+++ b/docs/ipc
@@ -1,7 +1,7 @@
IPC interface (interprocess communication)
==========================================
Michael Stapelberg
-September 2017
+June 2020
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
@@ -66,6 +66,7 @@
| 9 | +GET_CONFIG+ | <<_config_reply,CONFIG>> | Returns the last loaded i3 config.
| 10 | +SEND_TICK+ | <<_tick_reply,TICK>> | Sends a tick event with the specified payload.
| 11 | +SYNC+ | <<_sync_reply,SYNC>> | Sends an i3 sync event with the specified random value to the specified window.
+| 12 | +GET_BINDING_STATE+ | <<_binding_state_reply,BINDING_STATE>> | Request the current binding state, i.e. the currently active binding mode name.
|======================================================
So, a typical message could look like this:
@@ -131,6 +132,8 @@
Reply to the GET_CONFIG message.
TICK (10)::
Reply to the SEND_TICK message.
+GET_BINDING_STATE (12)::
+ Reply to the GET_BINDING_STATE message.
[[_command_reply]]
=== COMMAND reply
@@ -156,6 +159,14 @@
*Example:*
-------------------
[{ "success": true }]
+-------------------
+
+When the specified command cannot be parsed, `success` will be false and
+`parse_error` will be true:
+
+*Example:*
+-------------------
+[{ "success": false, "parse_error": true }]
-------------------
[[_workspaces_reply]]
@@ -172,8 +183,8 @@
The logical number of the workspace. Corresponds to the command
to switch to this workspace. For named workspaces, this will be -1.
name (string)::
- The name of this workspace (by default num+1), as changed by the
- user. Encoded in UTF-8.
+ The name of this workspace if changed by the user, otherwise defaults
+ to the string representation of the +num+ field). Encoded in UTF-8.
visible (boolean)::
Whether this workspace is currently visible on an output (multiple
workspaces can be visible at the same time).
@@ -709,6 +720,17 @@
{ "success": true }
-------------------
+[[_binding_state_reply]]
+=== GET_BINDING_STATE reply
+
+The binding_state reply is a map which currently only contains the "name"
+member, which is the name of the currently active binding mode as a string.
+
+*Example:*
+-------------------
+{ "name": "default" }
+-------------------
+
== Events
[[events]]
diff --git a/docs/refcard.html b/docs/refcard.html
index 6d71c98..0e3a412 100644
--- a/docs/refcard.html
+++ b/docs/refcard.html
@@ -15,7 +15,7 @@
h1 { font-size: 1.1em; }
header a { font-size: 0.7em; }
header p { margin: 5px 0; font-size: 0.8em; text-align: left; }
- kbd { font-family: LinuxBiolinumKeyboard, Linux Biolinum Keyboard O, Linux Biolinum Keyboard, DejaVu Sans Mono, monospace; font-size: 0.9em; }
+ kbd { font-family: LinuxBiolinumKeyboard, Linux Biolinum Keyboard O, Linux Biolinum Keyboard, DejaVu Sans Mono, monospace; font-size: 1.2em; }
code { font-family: DejaVu Sans Mono, monospace; font-size: 0.8em; }
section { break-inside: avoid-column; -moz-break-inside: -moz-avoid-column; -webkit-break-inside: avoid-column; }
h2 { margin: 7px 0 2px; padding: 2px 4px; font-size: 1.1em; font-family: LinuxBiolinum, Linux Biolinum O, Linux Biolinum, sans; background-color: #b3b3b3; }
diff --git a/docs/testsuite b/docs/testsuite
index b535e7c..145da15 100644
--- a/docs/testsuite
+++ b/docs/testsuite
@@ -120,13 +120,11 @@
---------------------------------------
$ cd ~/i3
-$ autoreconf -fi
-
$ mkdir -p build && cd build
-$ ../configure
-
-$ make -j8
+$ meson ..
+
+$ ninja
# output omitted because it is very long
$ cd testcases
@@ -183,13 +181,11 @@
---------------------------------------
$ cd ~/i3
-$ autoreconf -fi
-
$ mkdir -p build && cd build
-$ ../configure
-
-$ make -j8
+$ meson ..
+
+$ ninja
# output omitted because it is very long
$ make check
diff --git a/docs/userguide b/docs/userguide
index 02130cd..2ad3418 100644
--- a/docs/userguide
+++ b/docs/userguide
@@ -54,7 +54,7 @@
image:two_terminals.png[Two terminals]
To move the focus between the two terminals, you can use the direction keys
-which you may know from the editor +vi+. However, in i3, your homerow is used
+which you might know from the editor +vi+. However, in i3, your homerow is used
for these keys (in +vi+, the keys are shifted to the left by one for
compatibility with most keyboard layouts). Therefore, +$mod+j+ is left, +$mod+k+
is down, +$mod+l+ is up and `$mod+;` is right. So, to switch between the
@@ -245,7 +245,7 @@
So, how can you open a new terminal window to the *right* of the current one?
The solution is to use +focus parent+, which will focus the +Parent Container+ of
-the current +Container+. In default configuration, use +$mod+a+ to navigate one
+the current +Container+. In default configuration, use +$mod+a+ to navigate one
+Container+ up the tree (you can repeat this multiple times until you get to the
+Workspace Container+). In this case, you would focus the +Vertical Split Container+
which is *inside* the horizontally oriented workspace. Thus, now new windows will be
@@ -263,7 +263,7 @@
windows are directly attached to one node inside i3’s layout tree, the
workspace node. By default, the workspace node’s orientation is +horizontal+.
-Now you move one of these terminals down (+$mod+Shift+k+ by default). The
+Now you move one of these terminals down (+$mod+Shift+j+ by default). The
workspace node’s orientation will be changed to +vertical+. The terminal window
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
@@ -924,7 +924,7 @@
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
+output; but should that not be the case, you can 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”.
@@ -1066,7 +1066,7 @@
=== Popups during fullscreen mode
When you are in fullscreen mode, some applications still open popup windows
-(take Xpdf for example). This is because these applications may not be aware
+(take Xpdf for example). This is because these applications might not be aware
that they are in fullscreen mode (they do not check the corresponding hint).
There are three things which are possible to do in this situation:
@@ -1176,9 +1176,9 @@
=== Delaying urgency hint reset on workspace change
If an application on another workspace sets an urgency hint, switching to this
-workspace may lead to immediate focus of the application, which also means the
+workspace might lead to immediate focus of the application, which also means the
window decoration color would be immediately reset to +client.focused+. This
-may make it unnecessarily hard to tell which window originally raised the
+might make it unnecessarily hard to tell which window originally raised the
event.
In order to prevent this, you can tell i3 to delay resetting the urgency state
@@ -1201,9 +1201,9 @@
=== Focus on window activation
If a window is activated, e.g., via +google-chrome www.google.com+, it may request
-to take focus. Since this may not be preferable, different reactions can be configured.
-
-Note that this may not affect windows that are being opened. To prevent new windows
+to take focus. Since this might not be preferable, different reactions can be configured.
+
+Note that this might not affect windows that are being opened. To prevent new windows
from being focused, see <>.
*Syntax*:
@@ -1350,9 +1350,11 @@
The mode option can be changed during runtime through the +bar mode+ command.
On reload the mode will be reverted to its configured value.
-The hide mode maximizes screen space that can be used for actual windows. Also,
-i3bar sends the +SIGSTOP+ and +SIGCONT+ signals to the statusline process to
-save battery power.
+The hide mode maximizes screen space that can be used for actual windows. When
+the bar is hidden, i3bar sends the +SIGSTOP+ and +SIGCONT+ signals to the
++status_command+ process in order to conserve battery power. This feature can
+be disabled by the +status_command+ process by setting the appropriate values
+in its JSON header message.
Invisible mode allows to permanently maximize screen space, as the bar is never
shown. Thus, you can configure i3bar to not disturb you by popping up because
@@ -1413,7 +1415,7 @@
Scroll wheel right.
button7::
Scroll wheel left.
-
+
Please note that the old +wheel_up_cmd+ and +wheel_down_cmd+ commands are deprecated
and will be removed in a future release. We strongly recommend using the more general
@@ -1482,9 +1484,16 @@
To make a particular i3bar instance handle multiple outputs, specify the output
directive multiple times.
+These output names have a special meaning:
+
+primary::
+ Selects the output that is configured as primary in the X server.
+nonprimary::
+ Selects every output that is not configured as primary in the X server.
+
*Syntax*:
---------------
-output primary|