]> git.sur5r.net Git - i3/i3/log
i3/i3
8 years agoMerge pull request #2138 from Alexis211/factor
Michael Stapelberg [Tue, 29 Dec 2015 12:51:15 +0000 (13:51 +0100)]
Merge pull request #2138 from Alexis211/factor

Refactor extern definition of conn and root_screen

8 years agoRefactor extern definition of conn and root_screen 2138/head
Alex Auvolat [Tue, 29 Dec 2015 11:47:12 +0000 (12:47 +0100)]
Refactor extern definition of conn and root_screen

8 years agoMerge pull request #2137 from fmthoma/fix-assign-workspace
Michael Stapelberg [Tue, 29 Dec 2015 11:26:38 +0000 (12:26 +0100)]
Merge pull request #2137 from fmthoma/fix-assign-workspace

Comply with documentation: 'workspace' token in 'assign' command

8 years agoMerge pull request #2131 from kneitinger/next
Michael Stapelberg [Tue, 29 Dec 2015 11:18:57 +0000 (12:18 +0100)]
Merge pull request #2131 from kneitinger/next

userguide: clarify quoting of exec commands

8 years agoMerge pull request #2134 from Airblader/bug-1761
Michael Stapelberg [Tue, 29 Dec 2015 10:50:58 +0000 (11:50 +0100)]
Merge pull request #2134 from Airblader/bug-1761

Properly validate containers when killing via criteria

8 years agoMerge pull request #2132 from Airblader/bug-2128
Michael Stapelberg [Tue, 29 Dec 2015 10:44:19 +0000 (11:44 +0100)]
Merge pull request #2132 from Airblader/bug-2128

Move urgent flag before killing the parent.

8 years agoComply with documentation: 'workspace' token in 'assign' command 2137/head
Franz Thoma [Mon, 28 Dec 2015 18:38:17 +0000 (19:38 +0100)]
Comply with documentation: 'workspace' token in 'assign' command

According to the User's Guide [1], an `assign` command allows a
`workspace` token after the selector, as an alternative or in addition
to the unicode arrow `→`. In reality, however, the `workspace` token is
not recognized.

Example:
  assign [class="Firefox"] workspace "1: Browser"
should assign Firefox windows to workspace `1: Browser`, but the the
browser window appears on a new workspace called
`workspace "1: Browser"` instead.

With this fix, both `→` and `workspace` are recognized (and ignored)
after the selector.

[1] https://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces

8 years agoValidate matched containers for "kill" command correctly. 2134/head
Ingo Bürk [Mon, 28 Dec 2015 03:11:51 +0000 (22:11 -0500)]
Validate matched containers for "kill" command correctly.

We now execute the validations when "kill" is executed even if match
criteria are used. This prevents users from killing workspace containers,
which instead kills all clients (as before when not using criteria).

fixes #1761

8 years agoRename tree_close() to tree_close_internal().
Ingo Bürk [Mon, 28 Dec 2015 01:58:35 +0000 (20:58 -0500)]
Rename tree_close() to tree_close_internal().

It should be clear for callers of this function that this is an internal
function that skips certain validations which might be important. Therefore
we make it clear that this is an internal function by renaming it.

relates to #1761

8 years agoMove urgent flag before killing the parent. 2132/head
Ingo Bürk [Sun, 27 Dec 2015 23:08:30 +0000 (18:08 -0500)]
Move urgent flag before killing the parent.

We need to move the urgent flag when moving a container across
workspaces before calling on_remove_child on the parent in order
to avoid a crash.

fixes #2128

8 years agouserguide: clarify quoting of exec commands 2131/head
Kyle Kneitinger [Sun, 27 Dec 2015 07:29:26 +0000 (23:29 -0800)]
userguide: clarify quoting of exec commands

8 years agoMerge pull request #2113 from Airblader/bug-2111
Michael Stapelberg [Fri, 25 Dec 2015 16:14:29 +0000 (17:14 +0100)]
Merge pull request #2113 from Airblader/bug-2111

Match on all criteria even if con_id or con_mark are given.

8 years agoi3bar: explicitly set cursor using libxcursor if available
Michael Stapelberg [Fri, 25 Dec 2015 15:38:11 +0000 (16:38 +0100)]
i3bar: explicitly set cursor using libxcursor if available

Even if the X11 root window cursor is not set up correctly for some
reason, with this fix, users should at least see the correct cursor when
the pointer is over i3bar.

see issue #2114

8 years agomake: should be XCB_CURSOR, not XCURSOR
Michael Stapelberg [Fri, 25 Dec 2015 15:37:44 +0000 (16:37 +0100)]
make: should be XCB_CURSOR, not XCURSOR

After all, we’re not using libXcursor, but libxcb-cursor :).

8 years agoBugfix: don’t remove SubstructureRedirect event mask temporarily
Michael Stapelberg [Tue, 22 Dec 2015 21:33:37 +0000 (22:33 +0100)]
Bugfix: don’t remove SubstructureRedirect event mask temporarily

This fixes race conditions, for example when i3bar gets reconfigured
after the available outputs change. In that specific case, i3bar sends a
ConfigureWindow request (see
https://github.com/i3/i3/blob/b5693d6fb33ad29337e4187a2db4a2618ea8fb4c/i3bar/src/xcb.c#L376)
which normally is turned into a ConfigureRequest that i3 largely
ignores, only the dock client’s height is considered (see
https://github.com/i3/i3/blob/b5693d6fb33ad29337e4187a2db4a2618ea8fb4c/src/handlers.c#L390).

Turning ConfigureWindow into ConfigureRequest is only done when the
SubstructureRedirect event mask is set, and because we temporarily
removed _all_ events from our mask, the ConfigureWindow request went
through unmodified.

This in turn lead to the i3bar client window (not its decoration frame)
being positioned at e.g. y=1304, whereas dock client windows should
always end up at x=0 y=0 within their decoration frame. The result of
the i3bar client window being out of the visible space was either a
black i3bar or graphics corruption.

This also fixes issue #1904, I think. I couldn’t reproduce issue #1904
specifically, but when i3bar is in the misconfigured state, it will
receive a VisibilityNotify event, telling i3bar that it is obscured.
This would explain why i3bar sent a SIGSTOP in issue #1904.

fixes #1904

8 years agouserguide: faq has moved to reddit
Michael Stapelberg [Sun, 20 Dec 2015 12:12:37 +0000 (13:12 +0100)]
userguide: faq has moved to reddit

8 years agoMerge pull request #2121 from Airblader/bug-base-10
Michael Stapelberg [Thu, 17 Dec 2015 21:10:06 +0000 (22:10 +0100)]
Merge pull request #2121 from Airblader/bug-base-10

Don't force base 10 for parsing id.

8 years agoDon't force base 10 for parsing id. 2121/head
Ingo Bürk [Thu, 17 Dec 2015 14:43:34 +0000 (09:43 -0500)]
Don't force base 10 for parsing id.

8 years agoMatch on all criteria even if con_id or con_mark are given. 2113/head
Ingo Bürk [Tue, 15 Dec 2015 12:38:56 +0000 (07:38 -0500)]
Match on all criteria even if con_id or con_mark are given.

Previously, if a match specification contained the con_id or con_mark criterion,
all other criteria were ignored. However, a user may want to specify one of
those two unique identifiers and still specify others as well, for example to
match the currently focused window, but only if it has a certain WM_CLASS:

    [con_id=__focused__ class=special] kill

We now check all specified criteria.

fixes #2111

8 years agoMerge pull request #2102 from ccryx/next
Michael Stapelberg [Wed, 16 Dec 2015 07:58:59 +0000 (08:58 +0100)]
Merge pull request #2102 from ccryx/next

Add support for _NET_WM_WINDOW_TYPE_NOTIFICATION

8 years agoMerge pull request #2112 from Airblader/feature-multiple-tree-render
Michael Stapelberg [Wed, 16 Dec 2015 07:56:11 +0000 (08:56 +0100)]
Merge pull request #2112 from Airblader/feature-multiple-tree-render

Avoid rendering the tree twice in a row

8 years agoSupport matching _NET_WM_WINDOW_TYPE_NOTIFICATION 2102/head
Florian Merkel [Mon, 7 Dec 2015 11:34:24 +0000 (12:34 +0100)]
Support matching _NET_WM_WINDOW_TYPE_NOTIFICATION

This commit fixes #1969 by adding support for matching a window's type
against _NET_WM_WINDOW_TYPE_NOTIFICATION. The userguide and tests were
updated to reflect this change.

8 years agoAvoid rendering the tree twice in a row 2112/head
Ingo Bürk [Tue, 15 Dec 2015 12:21:11 +0000 (07:21 -0500)]
Avoid rendering the tree twice in a row

The callee already renders the tree if necessary, so despite the documentation
of the function, doing it again on the caller side is unnecessary.

8 years agoMerge pull request #2108 from Airblader/feature-2097
Michael Stapelberg [Tue, 15 Dec 2015 18:15:03 +0000 (19:15 +0100)]
Merge pull request #2108 from Airblader/feature-2097

Allow mouse bindings to run on the root window.

8 years agoAllow mouse bindings to run on the root window. 2108/head
Ingo Bürk [Sat, 12 Dec 2015 20:45:59 +0000 (15:45 -0500)]
Allow mouse bindings to run on the root window.

Previously, mouse bindings could only be run when a window was present,
by using --whole-window. Such bindings would not work on empty
workspaces. However, this is a valid usecase for bindings like

    bindsym $mod+button4 workspace prev
    bindsym $mod+button5 workspace next

Hence, we need to grab the root window as well and run bindings on it.

fixes #2097

8 years agoMerge pull request #2105 from Airblader/bug-2099
Michael Stapelberg [Mon, 14 Dec 2015 19:48:49 +0000 (20:48 +0100)]
Merge pull request #2105 from Airblader/bug-2099

Reject empty swallow definitions

8 years agoMerge pull request #2103 from Airblader/bug-2091
Michael Stapelberg [Mon, 14 Dec 2015 08:17:12 +0000 (09:17 +0100)]
Merge pull request #2103 from Airblader/bug-2091

Reject invalid match criteria with an error.

8 years agoReject empty swallow definitions 2105/head
Ingo Bürk [Fri, 11 Dec 2015 08:00:20 +0000 (09:00 +0100)]
Reject empty swallow definitions

Empty swallow definitions don't make sense and can lead to crashes,
for that reason we reject them.

fixes #2099

8 years agotravis: install git 1.9.1 from trusty for git fetch --unshallow
Michael Stapelberg [Wed, 9 Dec 2015 22:07:18 +0000 (23:07 +0100)]
travis: install git 1.9.1 from trusty for git fetch --unshallow

8 years agoReject invalid match criteria with an error. 2103/head
Ingo Bürk [Wed, 9 Dec 2015 12:39:08 +0000 (13:39 +0100)]
Reject invalid match criteria with an error.

Previously, using a command like

  [con_id=foo] kill

would kill the currently focused window because while an error for
not being able to parse the con_id was logged, no further action
was taken, which caused the criterion to be ignored. In this case,
the fallback behavior of using the focused window took over.

For con_id, id and window_type we now reject incorrect values with
an error and abort the command.

fixes #2091

8 years agoMerge pull request #2095 from Airblader/bug-2090
Michael Stapelberg [Fri, 4 Dec 2015 08:02:51 +0000 (09:02 +0100)]
Merge pull request #2095 from Airblader/bug-2090

Allow "move position center" to operate on matched windows

8 years agoMerge pull request #2096 from Airblader/bug-2094
Michael Stapelberg [Fri, 4 Dec 2015 08:01:26 +0000 (09:01 +0100)]
Merge pull request #2096 from Airblader/bug-2094

Fix draw_util crash

8 years agoFail gracefully when the gc cannot be created 2096/head
Ingo Bürk [Thu, 3 Dec 2015 17:59:35 +0000 (18:59 +0100)]
Fail gracefully when the gc cannot be created

We now only log an error but do not exit when creating the graphics
context fails. While, if this happens, rendering will likely be wrong,
this is still better than terminating the user's session entirely due
to a rendering problem, potentially causing data loss.

relates to #2094

8 years agoCast unsigned to signed before comparison
Ingo Bürk [Thu, 3 Dec 2015 17:57:02 +0000 (18:57 +0100)]
Cast unsigned to signed before comparison

The values of a Rect are unsigned, but can contain signed values.
Using MAX when the value is negative causes incorrect behavior and
makes the result stay negative, which is what we wanted to avoid here
in the first place.

Fix by properly casting the value for the comparison.

fixes #2094

8 years agoAllow "move position center" to operate on matched windows 2095/head
Ingo Bürk [Thu, 3 Dec 2015 12:24:39 +0000 (13:24 +0100)]
Allow "move position center" to operate on matched windows

Moving windows to the center previously did not consider command criteria.
We now operate on matched windows as for other commands.

fixes #2090

8 years agoMerge pull request #2087 from tbu-/pr_sensible_quote_vars
Michael Stapelberg [Mon, 30 Nov 2015 21:55:53 +0000 (22:55 +0100)]
Merge pull request #2087 from tbu-/pr_sensible_quote_vars

Quote the variables in i3-sensible-* correctly

8 years agoQuote the variables in i3-sensible-* correctly 2087/head
Tobias Bucher [Tue, 24 Nov 2015 13:15:31 +0000 (13:15 +0000)]
Quote the variables in i3-sensible-* correctly

Previously, the variables $EDITOR, $PAGER, $TERMINAL and $VISUAL got
shell-expanded twice before executing them.

8 years agotravis: call git fetch --unshallow, so that git describe works
Michael Stapelberg [Mon, 30 Nov 2015 20:08:00 +0000 (21:08 +0100)]
travis: call git fetch --unshallow, so that git describe works

8 years agoMerge pull request #2065 from Airblader/feature-1278
Michael Stapelberg [Mon, 23 Nov 2015 21:27:31 +0000 (22:27 +0100)]
Merge pull request #2065 from Airblader/feature-1278

Migrate i3 rendering to cairo

8 years agoMake freeing surfaces idempotent 2065/head
Ingo Bürk [Wed, 18 Nov 2015 14:32:45 +0000 (15:32 +0100)]
Make freeing surfaces idempotent

If a window with border is set to "border none" and then closed, we would
call cairo_destroy / cairo_surface_destroy twice, causing an assertion
failure in cairo as the objects already had zero references the second
time. We fix this by explicitly setting these objects to NULL.

relates to #1278

8 years agoUse 32-bit visual by default if available.
Ingo Bürk [Tue, 17 Nov 2015 11:50:06 +0000 (12:50 +0100)]
Use 32-bit visual by default if available.

With this patch, we use 32-bit visuals per default whenever it is
available. Otherwise, we fall back to the actual root window's
depth, which will typically be 24-bit.

Before this patch, we already used 32-bit depth for containers with
a window that uses 32-bit. However, this means that we didn't use
32-bit for split parent containers on which decoration is drawn.
For 32-bit windows using transparency, this caused a graphical glitch
because the decoration pixmap behind it would show through. This
behavior is fixed with this change.

relates to #1278

8 years agoDon't create a pixmap for CT_ROOT and CT_OUTPUT containers.
Ingo Bürk [Mon, 16 Nov 2015 22:40:41 +0000 (23:40 +0100)]
Don't create a pixmap for CT_ROOT and CT_OUTPUT containers.

Such containers never require a pixmap anyway. In particular for the __i3
output (used for the scratchpad workspace), this would cause an allocation
error anyway because it can be very big -- so big, in fact, that X cannot
allocate the pixmap for it.

Until now, this error was silently ignored due to the fact that we did not
create the pixmap checked (and asserted its success), but with cairo this
would cause a crash because we'd try to create a surface for a pixmap
which doesn't exist.

relates to #1278

8 years agoParse colors as color_t instead of colorpixel.
Ingo Bürk [Mon, 16 Nov 2015 22:03:39 +0000 (23:03 +0100)]
Parse colors as color_t instead of colorpixel.

With this patch we remove the temporary draw_util_colorpixel_to_color
function we introduced previously by parsing the colors as color_t to
begin with.

relates to #1278

8 years agoSkip drawing for uninitialized surfaces.
Ingo Bürk [Mon, 16 Nov 2015 20:28:33 +0000 (21:28 +0100)]
Skip drawing for uninitialized surfaces.

We return early from drawing functions if the surface to draw to is not
initialized properly. There is no immediate need to do so, at least no
crashes have been observed, but it mirrors the previous behavior a bit
more closely. Furthermore, i3 should not crash due to not being able to
make some rendering call, so this provides some stability.

relates to #1278

8 years agoMigrate i3 rendering to cairo.
Ingo Bürk [Mon, 16 Nov 2015 20:26:06 +0000 (21:26 +0100)]
Migrate i3 rendering to cairo.

This patch migrates all decoration rendering of i3 to cairo. Using the
compile switch CAIRO_SUPPORT, rendering can be switched back to the
previous XCB behavior, just like with the previous migration to cairo
in i3bar.

This patch also fixes a bug in draw_util.c where copying one surface
to another would use incorrect coordinates if the source coordinates
are not 0, 0.

Furthermore, this patch implicitly fixes some minor issues in the
decoration rendering which would be ignored previously due to the fact
that errors would only show up in the event queue, but not cause the
rendering code path to crash. One example is zero-height pixmaps which
are not allowed. Using cairo, these would cause i3 to instantly segfault,
so this patch avoids this.

Lastly, this patch annotates other issues found but not fixed in this patch
using TODO comments, e.g., the zero-height check not working correctly
and the comment that it should probably work the same way for zero-width
pixmaps.

relates to #1278

8 years agoFix draw_util_copy_surface.
Ingo Bürk [Sun, 15 Nov 2015 16:25:12 +0000 (17:25 +0100)]
Fix draw_util_copy_surface.

This patch fixes a bug when copying one surface to another.
Since it only exposes itself when used with non-trivial source
coordinates, it didn't surface before when only used for i3bar.

relates to #1278

8 years agoMove draw_util.c to libi3.
Ingo Bürk [Wed, 11 Nov 2015 22:39:15 +0000 (23:39 +0100)]
Move draw_util.c to libi3.

In order to prepare for using cairo for rendering i3 decorations,
we need to make the draw_util.c from i3bar available via libi3 such
that both i3bar and i3 can use it.

relates to #1278

8 years agoMerge pull request #2078 from acrisci/bug/detect-base16-conid
Michael Stapelberg [Mon, 23 Nov 2015 21:07:08 +0000 (22:07 +0100)]
Merge pull request #2078 from acrisci/bug/detect-base16-conid

Bug: parse con_id base 16

8 years agoMerge pull request #2079 from tyll/contact
Michael Stapelberg [Sun, 22 Nov 2015 19:00:33 +0000 (20:00 +0100)]
Merge pull request #2079 from tyll/contact

Fix contact information

8 years agoFix contact information 2079/head
Till Maas [Sun, 22 Nov 2015 18:57:46 +0000 (19:57 +0100)]
Fix contact information

fixes #2077

8 years agoBug: parse con_id base 16 2078/head
Tony Crisci [Sun, 22 Nov 2015 18:32:21 +0000 (13:32 -0500)]
Bug: parse con_id base 16

Mouse bindings that target the window that was clicked send the command
to the parser with `con_id` of the clicked window serialized base 16
for compatability with FreeBSD. See 7c2842e for explaination.

Set base to 0 for strtol to handle base 16 numbers for that reason.

This allows mouse bindings that target specific windows to work
correctly. Without this change, the focused window is always targetted
rather than the window that was actually clicked.

Regression introduced in b744c5e.

8 years agoMerge pull request #2074 from Airblader/feature-2064
Michael Stapelberg [Sat, 21 Nov 2015 22:04:49 +0000 (23:04 +0100)]
Merge pull request #2074 from Airblader/feature-2064

Support _NET_WM_USER_TIME.

8 years agoSupport _NET_WM_USER_TIME. 2074/head
Ingo Bürk [Fri, 20 Nov 2015 23:19:49 +0000 (00:19 +0100)]
Support _NET_WM_USER_TIME.

With this patch, we support the special value "0" for _NET_WM_USER_TIME
on a window upon managing it, which indicates that the window shall not
be focused.

fixes #2064

8 years agoMerge pull request #2076 from Airblader/feature-document-rects
Michael Stapelberg [Sat, 21 Nov 2015 21:44:31 +0000 (22:44 +0100)]
Merge pull request #2076 from Airblader/feature-document-rects

Document rect, window_rect and deco_rect.

8 years agoDocument rect, window_rect and deco_rect. 2076/head
Ingo Bürk [Sat, 21 Nov 2015 20:52:43 +0000 (21:52 +0100)]
Document rect, window_rect and deco_rect.

8 years agoMerge pull request #2071 from tyll/https
Michael Stapelberg [Thu, 19 Nov 2015 13:10:42 +0000 (14:10 +0100)]
Merge pull request #2071 from tyll/https

Use https if possible

8 years agoUse https if possible 2071/head
Till Maas [Thu, 19 Nov 2015 12:32:35 +0000 (13:32 +0100)]
Use https if possible

git:// and http:// do not protect the integrity of the accessed data.
Therefore use https instead.

8 years agoMerge pull request #2061 from Airblader/bug-2049
Michael Stapelberg [Mon, 16 Nov 2015 08:49:27 +0000 (00:49 -0800)]
Merge pull request #2061 from Airblader/bug-2049

Only grab scrollwheel buttons if necessary

8 years agoAdd i3test::XTEST, add 2 test cases for key bindings
Michael Stapelberg [Mon, 16 Nov 2015 08:25:53 +0000 (09:25 +0100)]
Add i3test::XTEST, add 2 test cases for key bindings

8 years agoRevert "Bugfix: set group mask 1 by default, correctly compare modifiers"
Michael Stapelberg [Sun, 15 Nov 2015 17:00:48 +0000 (18:00 +0100)]
Revert "Bugfix: set group mask 1 by default, correctly compare modifiers"

This reverts commit 9692c1498bcde3489f80b484dbd847a75dfd0405.

That commit accidentally defaulted to group mask 1, but the default
should be to match any group mask, so that having multiple layouts
loaded at the same time works.

fixes #2062

8 years agoOnly grab scrollwheel buttons if necessary. 2061/head
Ingo Bürk [Wed, 11 Nov 2015 19:40:25 +0000 (20:40 +0100)]
Only grab scrollwheel buttons if necessary.

With this patch, we only grab the scrollwheel buttons (4 and 5) when
managing a window if a whole window key binding exists for these buttons.

This allows both of these usecases:
  - Bindings to scrollwheel buttons using --whole-window (see #1701).
  - Scrolling in a window without focusing it if no such binding
    exists (see #2049).

Furthermore, we drop all button grabs and regrab them after a config
reload in order to reevaluate the new bindings correctly.

fixes #2049

8 years agoExtract function to grab buttons when managing a window.
Ingo Bürk [Wed, 11 Nov 2015 19:21:26 +0000 (20:21 +0100)]
Extract function to grab buttons when managing a window.

We refactor the button grabbing into a function to allow the next patch
both to
  - conditionally grab different sets of buttons
  - grab the buttons again when reloading the config.

relates to #2049

8 years agoMerge pull request #2058 from Airblader/feature-rename-flag
Michael Stapelberg [Mon, 9 Nov 2015 20:17:07 +0000 (21:17 +0100)]
Merge pull request #2058 from Airblader/feature-rename-flag

Rename I3BAR_CAIRO to CAIRO_SUPPORT.

8 years agoRename I3BAR_CAIRO to CAIRO_SUPPORT. 2058/head
Ingo Bürk [Sat, 7 Nov 2015 19:28:45 +0000 (14:28 -0500)]
Rename I3BAR_CAIRO to CAIRO_SUPPORT.

8 years agoMerge pull request #2053 from Airblader/feature-2048
Michael Stapelberg [Tue, 3 Nov 2015 07:44:02 +0000 (08:44 +0100)]
Merge pull request #2053 from Airblader/feature-2048

Raise dependency to cairo 1.14.4.

8 years agoRaise dependency to cairo 1.14.4. 2053/head
Ingo Bürk [Mon, 2 Nov 2015 14:11:21 +0000 (09:11 -0500)]
Raise dependency to cairo 1.14.4.

With the recent cairo bugfix, we can now switch to using cairo for
rendering i3bar per default by raising the minimum version of cairo
to 1.14.4, if this cairo version is available.

resolves #2048

8 years agoMerge pull request #2054 from hwangcc23/fix-2051
Michael Stapelberg [Mon, 2 Nov 2015 19:13:20 +0000 (20:13 +0100)]
Merge pull request #2054 from hwangcc23/fix-2051

Fix config validation fail when no new line from end of file

8 years agoMerge pull request #2055 from Airblader/bug-2044
Michael Stapelberg [Mon, 2 Nov 2015 19:10:53 +0000 (20:10 +0100)]
Merge pull request #2055 from Airblader/bug-2044

Remove autostart commands after they have been executed.

8 years agoRemove autostart commands after they have been executed. 2055/head
Ingo Bürk [Mon, 2 Nov 2015 14:21:43 +0000 (09:21 -0500)]
Remove autostart commands after they have been executed.

As there is no need to keep autostart commands in memory, we can safely
remove them as soon as they have been executed. As we previously didn't
clear them at all during config reloads, this also fixes a memory leak.

Note that neither autostarts nor autostarts_always is executed during
config reloads, so removing them from memory is fine as an i3 restart
will cause them to be parsed again.

fixes #2044

8 years agoFix config validation fail when no new line from end of file 2054/head
hwangcc23 [Mon, 2 Nov 2015 14:12:44 +0000 (22:12 +0800)]
Fix config validation fail when no new line from end of file

1. i3 config validation failed when the new line is missing from the end of file.
   The error was: "ERROR: Your line continuation is too long, it exceeds 4096 bytes".
   It is wrong to assume that there is always a '\n' at the end of each line in the config file.
   (Not for the last line.)
   Fix it via adding a end-of-file check.

2. See the issue #2051. (https://github.com/i3/i3/issues/2051)

8 years agoMerge pull request #2001 from Airblader/feature-multiple-tray-output
Michael Stapelberg [Mon, 2 Nov 2015 08:18:26 +0000 (09:18 +0100)]
Merge pull request #2001 from Airblader/feature-multiple-tray-output

Allow multiple tray_output directives.

8 years agoFix memory leaks in modes and bar bindings. 2001/head
Ingo Bürk [Fri, 30 Oct 2015 17:10:41 +0000 (13:10 -0400)]
Fix memory leaks in modes and bar bindings.

8 years agoAllow multiple tray_output directives.
Ingo Bürk [Fri, 16 Oct 2015 09:34:19 +0000 (11:34 +0200)]
Allow multiple tray_output directives.

This patch introduces the possibility to specify the tray_output directive
multiple times. All values will be used by i3bar, in the order they are
given.

This way, a single bar configuration can be used for several machines with
internal output names "eDP1" and "LVDS-0" by specifying tray_output for both.
Any external output (e.g., "DP-0") will still not receive the tray. The same
effect can be achieved by using "primary", but forces the user to couple the
tray display to the primary output which may not be desirable behavior.

relates to #555

8 years agoBugfix: ignore XKB group bits in floating_modifier
Michael Stapelberg [Fri, 30 Oct 2015 07:38:53 +0000 (08:38 +0100)]
Bugfix: ignore XKB group bits in floating_modifier

fixes #2046

8 years agoBugfix: set group mask 1 by default, correctly compare modifiers
Michael Stapelberg [Thu, 29 Oct 2015 07:47:36 +0000 (08:47 +0100)]
Bugfix: set group mask 1 by default, correctly compare modifiers

fixes #2002

8 years agoBugfix: correctly compare modifier mask when identifying keybindings
Michael Stapelberg [Wed, 28 Oct 2015 20:42:37 +0000 (21:42 +0100)]
Bugfix: correctly compare modifier mask when identifying keybindings

fixes #2002

8 years agoMerge pull request #2043 from Airblader/bug-regex-mem-leak
Michael Stapelberg [Wed, 28 Oct 2015 17:55:26 +0000 (18:55 +0100)]
Merge pull request #2043 from Airblader/bug-regex-mem-leak

Fix multiple memory leaks with regular expressions.

8 years agoFix multiple memory leaks with regular expressions. 2043/head
Ingo Bürk [Wed, 28 Oct 2015 13:39:23 +0000 (14:39 +0100)]
Fix multiple memory leaks with regular expressions.

8 years agoMerge pull request #2030 from DavidMikeSimon/focus-bar-color
Michael Stapelberg [Tue, 27 Oct 2015 18:57:15 +0000 (19:57 +0100)]
Merge pull request #2030 from DavidMikeSimon/focus-bar-color

Optionally change i3bar color on focused output, implements #2020

8 years agoOptionally change i3bar color on focused output, implements #2020 2030/head
David Simon [Mon, 26 Oct 2015 20:55:01 +0000 (16:55 -0400)]
Optionally change i3bar color on focused output, implements #2020

8 years agoMerge pull request #2040 from Airblader/bug-2034
Michael Stapelberg [Tue, 27 Oct 2015 09:07:25 +0000 (10:07 +0100)]
Merge pull request #2040 from Airblader/bug-2034

Fix crash when trying to split and float a dock container.

8 years agoMerge pull request #2041 from Airblader/feature-2028-2
Michael Stapelberg [Tue, 27 Oct 2015 07:50:48 +0000 (08:50 +0100)]
Merge pull request #2041 from Airblader/feature-2028-2

Add --no-auto-back-and-forth for moving windows.

8 years agoAdd --no-auto-back-and-forth for moving windows. 2041/head
Ingo Bürk [Mon, 26 Oct 2015 21:38:06 +0000 (22:38 +0100)]
Add --no-auto-back-and-forth for moving windows.

This patch extends the previously introduced flag --no-auto-back-and-forth
to also apply to

    move window to workspace <name>
    move window to workspace number <number>

relates to #2028

8 years agoFix crash when trying to split and float a dock container. 2040/head
Ingo Bürk [Mon, 26 Oct 2015 17:16:21 +0000 (18:16 +0100)]
Fix crash when trying to split and float a dock container.

Since splitting a docking container was allowed and successful, the check
to prevent floating it fails to work. This causes a crash because the
workspace of the container cannot be determined as the dockarea is higher
up in the tree than the workspace it belongs to.

This patch extends to sanity check to nested dock containers when trying to
float a container and also disallows manually splitting a docked container
or changing its layout.

fixes #2034

8 years agoMerge pull request #2039 from DavidMikeSimon/fix-1824
Michael Stapelberg [Mon, 26 Oct 2015 20:26:53 +0000 (21:26 +0100)]
Merge pull request #2039 from DavidMikeSimon/fix-1824

Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824

8 years agoUse separate buffers for i3bar statusline for each workspace, track short and long... 2039/head
David Simon [Mon, 26 Oct 2015 15:27:09 +0000 (11:27 -0400)]
Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824

8 years agoMerge pull request #2036 from Airblader/bug-2015
Michael Stapelberg [Mon, 26 Oct 2015 08:14:28 +0000 (09:14 +0100)]
Merge pull request #2036 from Airblader/bug-2015

Make resize grow|shrink width|height work for a nested split in the s…

8 years agoMerge pull request #2031 from Airblader/feature-2028
Michael Stapelberg [Sun, 25 Oct 2015 15:51:32 +0000 (16:51 +0100)]
Merge pull request #2031 from Airblader/feature-2028

Added --no-auto-back-and-forth to workspace commands.

8 years agoMerge pull request #2037 from Airblader/bug-run-assignments
Michael Stapelberg [Sun, 25 Oct 2015 15:48:32 +0000 (16:48 +0100)]
Merge pull request #2037 from Airblader/bug-run-assignments

Fix assignments bug and a small logging bug

8 years agoMark assignment as run before executing it. 2037/head
Ingo Bürk [Sun, 25 Oct 2015 13:27:08 +0000 (14:27 +0100)]
Mark assignment as run before executing it.

We need to store the information that an assignment was run for a window
before actually executing the command. Otherwise, if the command causes
a change that causes assignments to be run again, the window might be
matched again, causing an infinite loop and hence i3 to freeze or crash.

8 years agoFixed logging statement.
Ingo Bürk [Sun, 25 Oct 2015 13:25:55 +0000 (14:25 +0100)]
Fixed logging statement.

Assignments don't necessarily represent workspace assignments, but could
also be used, e.g., for no_focus. Hence, there's no point in logging
dest.workspace for all assignments.

8 years agoMake resize grow|shrink width|height work for a nested split in the same direction. 2036/head
Ingo Bürk [Sun, 25 Oct 2015 12:03:56 +0000 (13:03 +0100)]
Make resize grow|shrink width|height work for a nested split in the same direction.

Suppose a horizontally oriented workspace has two windows open. Issuing "split h" on
the right window creates a nested horizontal container. If we now resize in "width"
direction, the resize doesn't work because it will only operate on the current parent,
which is a container with only one child, so the resize command exits.

This is unexpected behavior from a user point of view. Hence, with this patch, we
ensure that we don't just go up the tree until we find a parent with the correct
orientation, but also keep going if that parent has only a single child.

fixes #2015

8 years agoAdded --no-auto-back-and-forth to workspace commands. 2031/head
Ingo Bürk [Fri, 23 Oct 2015 21:36:37 +0000 (23:36 +0200)]
Added --no-auto-back-and-forth to workspace commands.

This patch introduces the --no-auto-back-and-forth flag to both of

    workspace --no-auto-back-and-forth <name>
    workspace --no-auto-back-and-forth number <number>

This flag will only have an effect if the back_and_forth feature is
enabled. If passed, the feature will be ignored for this particular
call only.

fixes #2028

8 years agoMerge pull request #2027 from Airblader/feature-cleanup-1
Michael Stapelberg [Fri, 23 Oct 2015 06:34:55 +0000 (08:34 +0200)]
Merge pull request #2027 from Airblader/feature-cleanup-1

Remove broken and unused debug borders.

8 years agoRemove broken and unused debug borders. 2027/head
Ingo Bürk [Thu, 22 Oct 2015 22:38:11 +0000 (00:38 +0200)]
Remove broken and unused debug borders.

8 years agoMerge pull request #2025 from Airblader/feature-2022
Michael Stapelberg [Thu, 22 Oct 2015 18:36:02 +0000 (20:36 +0200)]
Merge pull request #2025 from Airblader/feature-2022

Added background and border keys to the i3bar protocol.

8 years agoMerge pull request #2018 from Airblader/feature-2014
Michael Stapelberg [Thu, 22 Oct 2015 18:32:05 +0000 (20:32 +0200)]
Merge pull request #2018 from Airblader/feature-2014

Allow multiple marks on a window

8 years agoAdded background and border keys to the i3bar protocol. 2025/head
Ingo Bürk [Thu, 22 Oct 2015 14:11:08 +0000 (16:11 +0200)]
Added background and border keys to the i3bar protocol.

This patch adds two new status block keys, background and border, which
define the respective colors for the status block. If not specified, the
current behavior is kept, e.g., no background / border will be drawn.

If the status block is marked urgent, the urgent color is prioritized.

fixes #2022

8 years agoIntroduce special value __focused__ for criterion con_id. 2018/head
Ingo Bürk [Thu, 22 Oct 2015 13:38:23 +0000 (15:38 +0200)]
Introduce special value __focused__ for criterion con_id.

This allows matching with

    [con_id=__focused__] unmark

for commands that do not default to operating on the focused window
if no criteria have been specified (such as unmark).

relates to #2014

8 years agoMake 'unmark' aware of matched windows.
Ingo Bürk [Tue, 20 Oct 2015 06:14:42 +0000 (08:14 +0200)]
Make 'unmark' aware of matched windows.

This patch allows using 'unmark' on matched windows. The old behavior
of applying it to all windows if no criteria were specified is kept.

relates to #2014