1
0
forked from mirrors/i3

Compare commits

...

5619 Commits
4.0 ... next

Author SHA1 Message Date
Michael Stapelberg
853b0d9161 i3bar: fix clang compilation error by using const size_t (#6349)
Thanks to Shouη (@Shoun2137 on GitHub) for the suggestion.
2024-12-30 08:29:29 +01:00
Emeric Planet
9dc5230000 Update meson setup command to remove warning (#6338)
This is a very easy fix, to remove the following warning:
```
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
```
The fix is to just run `meson setup` instead and it works like a charm.

Related PRs: i3/i3lock#365 and i3/i3status#538.
2024-12-29 19:50:09 +01:00
Michael Stapelberg
2746e0319b i3bar: work around weird clang compiler behavior
clang used to not warn (= error, with -Werror) about this line. Oh well.
2024-11-06 19:22:15 +01:00
Michael Stapelberg
e107254f1e GitHub Actions: update actions/upload-artifact to v4
The older versions are now deprecated and result in failing GitHub Actions runs.
2024-11-06 19:22:15 +01:00
Michael Stapelberg
2f9ffa3178 debian: update changelog 2024-11-06 18:34:21 +01:00
Michael Stapelberg
d64e5df5b4 Merge branch 'release-4.24' 2024-11-06 18:27:13 +01:00
Michael Stapelberg
454fb63392 Restore non-git version suffix 2024-11-06 18:27:13 +01:00
Michael Stapelberg
4a42eb085c release i3 4.24 2024-11-06 18:26:52 +01:00
Malix
4661e74b5e Fix: remove "dynamic" TWM (#6193)
related to https://github.com/i3/i3.github.io/issues/137
2024-08-05 18:23:55 +02:00
Orestis Floros
d05eed3c01 Consider fullscreen windows maximized (#6153)
Fixes #6148
2024-07-12 09:17:25 +02:00
Orestis Floros
45d8f98fd5 complete-run.pl: Un-set I3SOCK (#6139)
This causes test breakage when the developer/tester is running the tests
in i3, as the actual active instance socket is used instead of the test
instance.

Besides breaking tests, this is quite dangerous as tests like 319-gaps.t
will replace the **actual** config of the user (i.e.
~/.config/i3/config) instead of the current test config.

Broken after #5987
2024-07-10 08:40:50 +02:00
Orestis Floros
05feaecf8a Remove v3 to v4 automatic migration logic (#6144)
Closes https://github.com/i3/i3/issues/6131
2024-07-09 18:03:57 +00:00
Orestis Floros
5413c15e97 Fix crash when reloading config with invalid criteria (#6142)
Came up in https://github.com/i3/i3/discussions/6141
2024-07-09 17:41:11 +02:00
Orestis Floros
be840af45c tiling_drag: Allow swapping containers (#6084)
This was originally mentioned in #3085 but left for a future PR.

One of the noticeable limitations is that pressing the modifier while
the drag is already initiated, will not swap the containers but instead
cancel the drag. This is because of how `drag_pointer()` is written and
would be quite an involved case to handle it.
2024-07-04 21:44:41 +02:00
Orestis Floros
4215998929 GH action: Upload built htmls (#6070) 2024-06-20 07:05:50 +02:00
Orestis Floros
1ee963ede9 Fix crash with focus output and scratchpad (#6079)
The crash was brought up in a comment in
https://github.com/i3/i3/discussions/6076#discussioncomment-9536969

The cause is that the command criteria are matching a window in the
scratchpad. In that case, the assertion in get_output_for_con() fails.
That happens because there is no `Output` for the `Con` output of a
scratchpad window.

I've decided to *not* remove the offending assertion but rather rely on
the caller not using the function with internal containers. My reasoning
is:
1. If get_output_for_con can return NULL then the caller will either
segfault (which is worse) or needs to check the return for NULL.
2. The case where the return can be NULL is already known, it happens
for internal containers.
3. Therefore, the caller should already prevent the situation with a
call to con_is_internal(). Thus, the `assert`ion can remain.

There is also the potential fix of con_get_workspace returning some
arbitrary output (e.g. first in the list or currently focused one)
instead of NULL. This can lead to more tricky to catch bugs.
2024-06-03 17:00:47 +02:00
colona_
11c0a9567f docs/ipc: Add more elaborate description to workspace events (#6089)
This adds some detail to the workspace events documentation and is
written along the same lines as the window events documentation. This
was brought up in [#4392 (issue)](https://github.com/i3/i3/issues/4392).
2024-06-01 09:57:12 +00:00
Orestis Floros
822477cb35 Add popup_during_fullscreen all option (#6068)
Fixes #6062
2024-05-21 17:19:11 +02:00
Orestis Floros
cd6573493c docs/ipc: Fix enumerated list (#6069) 2024-05-21 17:16:23 +02:00
Orestis Floros
1993b7e318 Add popup_during_fullscreen all option 2024-05-20 21:26:27 +02:00
Orestis Floros
3b1747a107 Add tests for popup_during_fullscreen 2024-05-20 21:13:41 +02:00
Tasos Sahanidis
9a69c1eecf Fix size_t format specifiers on 32 bit systems (#6065)
This fixes the following warnings on 32 bit systems

```
[60/108] Compiling C object i3.p/src_regex.c.o
In file included from ../include/all.h:40,
                 from ../src/regex.c:10:
../src/regex.c: In function ‘regex_new’:
../include/log.h:29:33: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
   29 | #define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__)
      |                                 ^~~~~~~~~
../src/regex.c:35:9: note: in expansion of macro ‘ELOG’
   35 |         ELOG("PCRE regular expression compilation failed at %lu: %s\n",
      |         ^~~~
[93/108] Compiling C object i3-input.p/i3-input_main.c.o
../i3-input/main.c: In function ‘finish_input’:
../i3-input/main.c:173:29: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  173 |     printf("occurrences = %ld\n", cnt);
      |                           ~~^     ~~~
      |                             |     |
      |                             |     size_t {aka unsigned int}
      |                             long int
      |                           %d 
```
2024-05-20 13:13:26 +02:00
Orestis Floros
82a1c101fd i3bar: Fix clicks with horizontal padding (#6064)
Fixes #5476
2024-05-20 09:17:16 +02:00
Orestis Floros
093e3cf1f7 docs/ipc: Update information on IPC socket 2024-05-20 09:15:57 +02:00
Orestis Floros
00aaa84ab0 ipc_connect: Delete outdated path 2024-05-20 09:15:57 +02:00
Nikolay Nechaev
caf5b32d5c Reap zombie children on i3 start (#5909)
One case when this might be useful is when i3 is restarted and there are
children that terminate after the previous i3 instance shut down but
before the new one set things up.

Fixes #5756
2024-05-17 21:49:54 +02:00
Theo Buehler
854696cfb5 Remove pledge() support for OpenBSD (#6048)
While this initially worked fine, at some point these patches broke
because libcairo started calling shmget(2) - a syscall not covered by
any pledge promise - and a common pitfall when using pledge with
graphics-oriented applications.

Various attempts were made to fix them, but at some time they were
simply disabled in the OpenBSD port:


a4a9f41dd7
5a03c386ba

This seems pointless and creates needless friction both for the i3 team
who was willing to carry ugly code and for the OpenBSD ports maintainers
who had to disable that code again.

Let's abandon this experiment.
2024-05-17 21:41:45 +02:00
Bimba Laszlo
c06ac08aab docs: Fix "Focus the next output" example (#6054)
The "Focus the next output" example was misleading, fixed the code and
added another comment to the previous code.
2024-05-17 21:38:15 +02:00
Junicchi
1597ec27ee add WINDOW_TYPE_NOTIFICATION to floating list (#6017)
as explained in this discussion:
https://github.com/i3/i3/discussions/5966#discussioncomment-8961295
2024-05-16 07:50:06 +00:00
Orestis Floros
6094944345 testsuite docs: Update instructions (#6034)
- Only recommend local perl library installation
- Update build instructions to match hacking-howto
2024-05-05 10:47:17 +02:00
Orestis Floros
d54a10b200 i3bar-workspace-protocol: Make examples (more) POSIX compliant (#6029)
See https://unix.stackexchange.com/a/581410, `read` needs a variable
name.

Came up in #5939
2024-04-30 13:41:45 +02:00
Orestis Floros
e020701df1 errorlog: Check errorfile exists (#6028)
Fixes #6027
2024-04-30 13:39:54 +02:00
Wesley Schwengle
5834b7e824 Use I3SOCK environment variable for path in AnyEvent::I3 (#5987)
Commit 3ae5f31d0 introduced the I3SOCK environment variable. This
prevents us from having to call `i3 --get-socketpath'. In case the
variable doesn't exist, fall back to the old ways.

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-19 19:12:11 +02:00
Michael Stapelberg
91ce3bdbd5 AnyEvent::I3: rip out taint mode compatibility (#5999)
I suspect nobody actually uses Perl’s taint mode with AnyEvent::I3.

See https://github.com/i3/i3/pull/5987 for discussion.
2024-04-19 08:45:34 +02:00
yuvallangerontheroad
ffbbbf3477 Add a newline at the end of the version option output. (#5980)
If there is no newline character at the end of the version option's
output, the next command line prompt is written left to the version,
rather than under it.
2024-04-16 11:38:23 +00:00
Michael Stapelberg
051d3537e3 AnyEvent-I3: bump to 0.19 (#5990)
fixes https://github.com/i3/i3/issues/5986
2024-04-09 17:43:02 +02:00
Wesley Schwengle
d91597b1c1 Check if subscribe event type is supported in AnyEvent::I3 (#5988)
Add simple `if exists' construct in the subscribe function. This
prevents a somewhat cryptic warnings such as these:

Use of uninitialized value $type in hash element at
/usr/share/perl5/AnyEvent/I3.pm line 309.

We still warn the user, but it is much clearer as to what the cause is.

It now shows something like this:

Could not subscribe to event type 'foo'. Supported events are _error
barconfig_update binding mode output shutdown tick window workspace

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-09 08:28:40 +02:00
systec-awe
47cab33aa8 Fix missing SIGUSR2 posix signal handling (#5960)
Since there is no separate error handling the `SIGUSR2` signal is
registered to get the write return code after exiting the program.

Fixes #5958

---------

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
2024-03-20 12:58:56 +00:00
Orestis Floros
910e58585f Support multiple _NET_WM_STATE changes in one ClientMessage (#5910) 2024-02-12 08:40:39 +01:00
rsgowman
6a530de220 Create new workspaces to the right of existing ones with the same number
i.e. creating workspaces named "1", "2:a", "2:b", "3" should result in
that same order rather than "1", "2:b", "2:a", "3".
2024-02-06 20:28:20 +01:00
rsgowman
0639167185 Don't skip identically numbered workspaces when moving to next/prev (#4578)
eg if you have workspaces: { 1, 2:a, 2:b, 3 } and are on workspace 1,
then 'workspace next' should traverse 1 -> 2:a -> 2:b -> 3 -> 1 instead
of 1 -> 2:a -> 3 -> 1.

Fixes #4452
2024-02-06 20:07:21 +01:00
Orestis Floros
60cc6ce174 Use new GitHub issue templates (#5900)
Biggest benefit is that the users are presented with a set of editable
fields instead of having to edit markdown directly in a text box, which
is less friendly. Links to userguide and IPC docs are clickable in the
description.

See
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
2024-02-05 08:27:31 +01:00
Harimbola Santatra
b9a796b24a doc: update meson build instruction (#5899)
The [official build instruction][1] are deprecated on Meson 1.3.1.
These command:

    mkdir -p build && cd build
    meson ..
    ninja

... work but will yield the following warning:

> WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

Here's the correct way, according to the [meson documentation][2]:

    mkdir -p build
    meson setup build
    meson compile -C build
    meson install -C build


[1]: https://i3wm.org/docs/hacking-howto.html#_building_i3
[2]: https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project
2024-02-04 15:50:36 +01:00
Orestis Floros
f8befe378a Avoid creating redundant containers when switching between tabbed/stacked and split layouts (#5469)
Fixes #3001
2024-01-31 08:14:32 +01:00
Orestis Floros
230147c815 smart_borders: Deprecate option (#5889)
This had pretty much identical behaviour to hide_edge_borders which made
it confusing. The `hide_edge_borders smart_no_gaps` implementation has an extra check
which fixes #5406.
2024-01-30 08:53:32 +01:00
Orestis Floros
c3173af2f1 Merge pull request #5787 from elebow/userguide-default_border-title-layout-note
docs: Add note to `default_border` about title bar in stacking/tabbed
2024-01-28 13:00:16 +01:00
Alessandro Vinciguerra
ca510e5e0f Shrinking on a per-block basis (#5818)
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2024-01-28 11:30:28 +01:00
Orestis Floros
f169624560 clang-format: enable InsertBraces (#5882)
Enforces a rule that we have followed for years now. Yes, the diff is
quite big but we get it over with once and we prevent having to nit-pick
future PRs.
2024-01-27 11:37:05 +01:00
Orestis Floros
5fdfb14530 con_is_maximized: Fix case where parent is workspace (#5880)
See added test for simple example.
2024-01-26 08:51:28 +01:00
Seth Pollen
a56670bca8 split up compound test assertions 2024-01-24 14:29:01 +01:00
sethpollen
b660d6a902 Add support for _NET_WM_STATE_MAXIMIZED_{HORZ, VERT} (#5840)
If a window occupies the entirety of its workspace vertically and/or horizontally, pass it the _NET_WM_STATE_MAXIMIZED_{HORZ, VERT} atoms. This helps applications like Google Chrome draw the tab bar correctly and handle tab clicks correctly (see https://crbug.com/1495853).

This change is based on work from @yshui in #2380.
2024-01-22 20:34:40 +01:00
Yonas Yanfa
9aba43119b Make raphamorim/rio one of i3's sensible terminals. 2023-12-13 12:45:14 +02:00
Eddie Lebow
96d3762712 docs: Add note to default_border about title bar in stacking/tabbed
See <https://github.com/i3/i3/issues/2664>.
2023-11-26 02:38:02 -05:00
Orestis Floros
69f68dcd74 focus workspace: consider workspace_auto_back_and_forth (#5754)
Additionally, adds some tests for the command.

Fixes #5744
2023-11-05 11:08:44 +01:00
Orestis Floros
a36618f96c Clean up old release notes (#5753) 2023-11-05 11:08:10 +01:00
Orestis Floros
b42dc21068 bindings: Do not grab pointer when executing bindings (#5755)
Grabing the pointer produces a `GrabFrozen` error in applications that
are run from key bindings. Since we don't need the pointer in such
cases, we can change the call to use ASYNC. This seems to be a
historical leftover.

I've tested locally that these still work:
- bindsym $mod+x ...
- bindsym --release $mod+x ...
- bindsym $mod+button1 ...
- bindsym --release $mod+button1 ...
- bindsym --release $mod+x exec program that grabs the keyboard
  now works (see original issue)

Even in the main branch, I actually couldn't get `import` and `xdotool`
to fail with the pointer being frozen, potentially because these
programs wait a bit for the pointer to be unfrozen like i3lock does.

This patch came up in
https://github.com/i3/i3/issues/5735#issuecomment-1781321011

I wonder why the pointer is actually grabbed.

The argument I change in `xcb_grab_key` there, is `pointer_mode`, from
https://www.x.org/releases/X11R7.7/doc/man/man3/xcb_grab_key.3.xhtml:
```
pointer_mode

One of the following values:
XCB_GRAB_MODE_SYNC

The state of the keyboard appears to freeze: No further keyboard events are generated by the server until the grabbing client issues a releasing AllowEvents request or until the keyboard grab is released.

XCB_GRAB_MODE_ASYNC

Keyboard event processing continues normally.
```

I traced via `git blame` the usage of `xcb_grab_key` throughout 14 years
of i3 development and it seems that `pointer_mode` was always set to
`XCB_GRAB_MODE_SYNC`, going all the way back to
b664456706.

Fixes #5735
2023-11-05 11:04:04 +01:00
a-kenji
f1f2282947 docs: fix typo in i3bar-workspace-protocol 2023-11-04 12:18:03 +01:00
Michael Stapelberg
1da50c4ae0 debian: update changelog 2023-10-29 15:42:25 +01:00
Michael Stapelberg
06b3137bd7 Merge branch 'release-4.23' 2023-10-29 09:58:05 +01:00
Michael Stapelberg
ee12c2d1e1 Restore non-git version suffix 2023-10-29 09:58:05 +01:00
Michael Stapelberg
f844de8e66 release i3 4.23 2023-10-29 09:57:51 +01:00
Sergey Zhmylove
26608b74d9 Fix failing testcase when the font exists (#5679)
When the font from testcase's config exists on the system,
load_configuration() does not fallback to a 'fixed' one resulting in a
fail of this case.
The fallback scenario is added as well.
2023-09-23 17:06:54 +02:00
Orestis Floros
5489db6bc8 motif hints: respect maximum border style in append_layout 2023-09-21 18:55:01 +02:00
Orestis Floros
f4959d5da4 Update to clang-format-15 2023-09-21 18:55:01 +02:00
Orestis Floros
bffa4a543c userguide: Add an example for negative lookeaheads (#5665) 2023-09-13 08:42:52 +02:00
Orestis Floros
908c86544b remanage_window: Refactor to make clearer when a swallowing happens 2023-09-06 17:24:53 +02:00
Orestis Floros
82b9821204 Remanage window after urgency flag change
Fixes #5658
2023-09-06 17:24:53 +02:00
Orestis Floros
c1c405f4fc Update to actions/checkout@v4 (#5653)
Update to [actions/checkout@v4](https://github.com/actions/checkout/releases/tag/v4.0.0)

According to https://github.com/actions/checkout/issues/1448 it might fix the issue we are encountering. Even if it doesn't, no apparent harm from using the latest version.
2023-09-05 17:18:38 +02:00
Wesley Schwengle
c6befec0fd Fix dead links for Modern Perl book
Closes: #5523

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2023-09-04 16:09:05 +02:00
Orestis Floros
c6f62f4695 Fix crashes when using machine criterion (#5650)
Fixes #5616
2023-09-03 19:32:42 +02:00
Uli Schlachter
d6e2a38b5c Share graphics context globally (#4376)
Instead of creating a graphics context for every surface_t, this commit
adds a cache that allows to "remember" up to two GCs. Thus, the code
uses less GCs. When a GC from the cache can be used, this also gets rid
of a round-trip to the X11 server. Both of these are tiny, insignificant
savings, but so what?

Since GCs are per-depth, this code needs access to get_visual_depth().
To avoid a code duplication, this function is moved to libi3.

Fixes: https://github.com/i3/i3/issues/3478
Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-07-22 10:24:13 +02:00
slyshot
6fe98f7847 Remove focus workaround 2023-07-21 13:52:44 +02:00
Orestis Floros
9947890472 Fix gcc false-positive warning 2023-07-15 21:27:11 +02:00
Orestis Floros
cf2ea348c7 debugging docs: Add note about ptrace
Also remove outdated section about IRC
2023-07-15 21:27:11 +02:00
Orestis Floros
e6b41172da Regrab buttons on mode change (#5554)
Unfortunately, grabbing / ungrabbing doesn't seem to work correctly in
xvfb so we can't really test this.

I also fixed the deduplication code in bindings_get_buttons_to_grab().
2023-06-30 08:57:19 +02:00
Harm te Hennepe
866e3dd909 Improve documentation regarding tiling drag (#5541) 2023-06-26 14:43:33 +02:00
Nikolay Nechaev
3ae5f31d04 Remove the double forking in start_application (#5510)
Having just a single fork is beneficial, as it preserves the approprate
parent information for the children of i3, which is useful in some
scenarious e.g. when a child wants to do something on the wm's exit
(possible via `prctl(PR_SET_PDEATHSIG, ...)`).

Moreover, this is a zero-cost benefit: i3 is already using libev with
the default loop, which automatically reaps all the zombie children even
when there is no corresponding event set.

Resolves #5506
2023-06-15 08:38:35 +02:00
Orestis Floros
a95870120c fix workspace not being focused on title bar scroll (#5518) 2023-05-29 14:08:46 +02:00
Orestis Floros
fde43a078b Merge pull request #5378 from slyshot/next
Fix top border resizing registered on tiled windows
2023-05-05 14:15:47 +02:00
slyshot
a715c03d30 Fix top border resizing registered on tiled windows 2023-04-27 20:20:41 -04:00
Orestis Floros
fae2b637ee i3-input: Avoid compiler warning (#5480)
Also updates the function to use proper types, const and style.

The warning:

../i3/i3-input/main.c: In function ‘finish_input’:
../i3/i3-input/main.c:187:13: warning: ‘__builtin_strncat’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  187 |             strncat(dest, command, inputlen);
      |             ^
../i3/i3-input/main.c:175:20: note: length computed here
  175 |     int inputlen = strlen(command);

Which is triggered because gcc thinks it's bad that `input_len` (the
length of the source in the copy) is used instead of a length that is
inside the limits of the allocated size for the destination. However, in
practice, `full_len` is always than `input_len`.
2023-04-22 18:59:03 +02:00
Orestis Floros
d06f97c4d4 GH Actions: Check for gcc before deploying (#5483)
Fixes #5482
2023-04-11 20:11:30 +02:00
Orestis Floros
13474ff787 man page: Update outdated information (#5478)
Instead of correcting some of them, I completely deleted them since the
userguide is always more up-to-date.

Fixes #5477
2023-04-10 18:36:02 +02:00
Orestis Floros
74785f4795 Allow switching workspaces when in global fullscreen mode (#5398)
Fixes #2974
2023-04-02 18:55:21 +02:00
Orestis Floros
d7583fbc17 Update some of the hacking docs (#5464) 2023-04-02 16:28:06 +02:00
Orestis Floros
fbb6bf666f hacking-howto: Update build instructions for meson (#5463) 2023-04-02 16:27:16 +02:00
Orestis Floros
892ae730cb Update ubuntu & clang-format in builds (#5467) 2023-04-02 16:24:15 +02:00
Orestis Floros
ecb9b895c7 docker: fix missing address sanitizer dependency (#5466) 2023-04-02 15:39:13 +02:00
Orestis Floros
a5da4d54f3 GitHub Actions: revert changes and use if on each step (#5393) 2023-01-23 19:50:28 +01:00
Orestis Floros
3702960a87 Actions: Fix BASENAME env vars (#5392) 2023-01-23 18:57:08 +01:00
Orestis Floros
6911c116e7 GitHub Actions: push artifacts only on next branch (#5388) 2023-01-23 17:39:55 +01:00
Orestis Floros
bfbe73f665 Merge pull request #5390 from nikitabobko/bobko/userguide
Fix "default binding" mistake in userguide
2023-01-23 13:20:31 +01:00
Nikita Bobko
0f64420281 Fix "default binding" mistake in userguide
Default binding to move window down is $mod+Shift+k, not $mod+Shift+j.
Proof: https://github.com/i3/i3/blob/next/etc/config#L45
This commit reverts this pull request https://github.com/i3/i3/pull/4146
2023-01-23 11:49:37 +01:00
Orestis Floros
26990d90f2 Merge pull request #4311 from i3/i3bar-ws-protocol
i3bar: Add protocol for workspace buttons
2023-01-22 19:05:01 +01:00
Orestis Floros
ba1f40f45f i3bar: Add protocol for workspace buttons
Closes #3818 (parent issue)
Fixes #1808
Fixes #2333
Fixes #2617
Fixes #3548
2023-01-22 18:59:58 +01:00
Orestis Floros
c52f13900d Add focus workspace command 2023-01-22 18:33:23 +01:00
Michael Stapelberg
8d64937054 Bump -D_FORTIFY_SOURCE=2 to -D_FORTIFY_SOURCE=3 (#5379)
Arch Linux is discussing increasing to 3, so we should probably keep up:

https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/17
2023-01-19 08:37:46 +01:00
Orestis Floros
9c8746c00f Merge pull request #5355 from orestisfl/5346/do-not-canonicalize-nonprimary
Do not canonicalize "nonprimary" output for i3bar
2023-01-07 10:02:45 +01:00
Orestis Floros
fa25afedd2 Do not canonicalize "nonprimary" output for i3bar
Fixes #5346
2023-01-06 22:30:56 +01:00
Michael Stapelberg
46de32eedd GitHub Actions: remove i386 autobuild packages (#5345)
They are newly failing since the previous commit (upgrading to Ubuntu focal),
so instead of debugging what the issue is, let’s just remove them entirely.
Not many i386 users are left, as the world is on amd64 and arm64 these days.
2023-01-02 12:24:54 +01:00
Michael Stapelberg
944a262688 GitHub Actions: build Ubuntu packages using Ubuntu focal (#5344)
This is required to satisfy our meson.build minimal Meson version.
2023-01-02 12:10:36 +01:00
Michael Stapelberg
aaee2b3eae free some heap allocations to satisfy LeakSanitizer 2023-01-02 11:36:37 +01:00
Michael Stapelberg
dfb3850989 fix reload binding memory issue: copy current_binding_mode 2023-01-02 11:36:37 +01:00
Michael Stapelberg
90d7b9769c meson: specify check: false on run_command
We use run_command for conditionals, meaning meson execution should not stop
when the command returns false. This change keeps our meson setup working
throughout the upcoming change of default behavior (check: true).
2023-01-02 11:36:37 +01:00
Michael Stapelberg
16f83396b4 GitHub Actions: switch to meson setup subcommand
Using “meson” instead of “meson setup” results in a warning.
2023-01-02 11:36:37 +01:00
Michael Stapelberg
8fe28d1a95 fix -Wmaybe-unused and -Wstringop-truncation warnings 2023-01-02 11:36:37 +01:00
Michael Stapelberg
d06e87eb8d GitHub Actions: build with -D_FORTIFY_SOURCE=2
This requires --buildtype=debugoptimized (or --buildtype=release, but
optimizations need to be enabled), and will allow us to keep the i3 build free
of warnings during development.

Distributions like Debian build with -D_FORTIFY_SOURCE=2.
2023-01-02 11:36:37 +01:00
Michael Stapelberg
3e184daf29 release.sh: update after 4.22 release 2023-01-02 11:36:37 +01:00
Michael Stapelberg
7d3a3ae0fb clean up old release notes 2023-01-02 09:49:20 +01:00
Michael Stapelberg
6984dff01a debian: update changelog 2023-01-02 09:46:32 +01:00
Michael Stapelberg
47b2caa116 Merge branch 'release-4.22' 2023-01-02 09:39:12 +01:00
Michael Stapelberg
57f984ae67 Restore non-git version suffix 2023-01-02 09:39:12 +01:00
Michael Stapelberg
b85da284a7 release i3 4.22 2023-01-02 09:39:00 +01:00
Michael Stapelberg
ab6f1fd160 fix focus <direction> with negative gaps (#5333)
fixes #5293
2022-12-21 08:11:51 +01:00
Orestis Floros
ed690c7ba0 Merge pull request #5324 from orestisfl/5323/mode-in-binding-event
Add "mode" field in binding event
2022-12-14 14:24:05 +01:00
Orestis Floros
d5c8319b6c Add "mode" field in binding event
This does *not* go in the binding object to reflect the same hierarchy
of the config file: a mode is a collection of bindings.

Fixes #5323
2022-12-14 13:23:12 +01:00
Demian
1786b13f0d i3-dmenu-desktop: Allow more than one --entry-type (#5294)
Unlike in the man page, only one --entry-type is reasonable possible.
On using multiple --entry-types and a command offers multiple, duplicates are removed i3-dmenu-desktop.
See more at #5291

added --show-duplicates flag for this
2022-12-06 17:23:10 +01:00
Michael Stapelberg
fd95a47183 Update to clang-format-12 (as 10 is no longer installable) (#5317)
No changes to the code are needed.
2022-12-06 11:06:18 +01:00
Orestis Floros
30131ed697 Support nonprimary output keyword (#5273)
Fixes #4878
2022-11-19 18:11:26 +01:00
Orestis Floros
a1e4b44955 command.spec: Put cmd_border stuff together (#5266) 2022-11-13 16:22:41 +01:00
Orestis Floros
029cb8af19 Use mask to determine workspace gaps assignments (#5283)
Fixes #5282
2022-11-13 16:03:58 +01:00
Orestis Floros
60c3fedb73 window_update_motif_hints: Do not assert that the property will always be there (#5281)
Fixes #5280
2022-11-13 10:48:26 +01:00
Michael Stapelberg
96614a2f32 apply updated workspace gap assignments after reload (#5279)
Fixes https://github.com/i3/i3/issues/5257
2022-11-12 17:32:30 +01:00
Michael Stapelberg
1ba0eaca22 Make floating_from and tiling_from criterion work in commands, too (#5278)
Fixes https://github.com/i3/i3/issues/5258
2022-11-12 16:44:08 +01:00
Michael Stapelberg
2ac6180b90 gaps: position graphical resize bar in the middle between windows (#5277)
Fixes https://github.com/i3/i3/issues/5256
2022-11-12 15:48:07 +01:00
Michael Stapelberg
170a322cc2 fix: prevent gaps inside floating split containers (#5276)
Fixes https://github.com/i3/i3/issues/5272
2022-11-12 14:58:13 +01:00
Michael Stapelberg
d130126204 gaps: fix inner gaps for stacked/tabbed containers in splith/splitv (#5275)
Fixes https://github.com/i3/i3/issues/5261
2022-11-12 14:08:13 +01:00
Michael Stapelberg
2b236955bd use con_border_style() to fix titles in stacked/tabbed containers (#5274)
Previously, the code was directly accessing con->border_style, which circumvents
the special-casing for stacked/tabbed containers that forces window titles even
for title-less containers.

Fixes https://github.com/i3/i3/issues/5269
2022-11-12 12:43:55 +01:00
Orestis Floros
be27a2f50d userguide: gaps: mention minimum version (#5265) 2022-11-08 17:14:22 +01:00
Michael Stapelberg
804bca3a9a gaps: make workspace gap assignments order-independent (#5259)
This commit moves subtracting the global gaps from the workspace gaps:
previously, this calculation was done while parsing the configuration
(order dependent), now it’s done at workspace assignment evaluation time.

related to https://github.com/i3/i3/issues/3724

fixes https://github.com/i3/i3/issues/5253
2022-11-07 19:02:57 +01:00
Michael Stapelberg
14795c303c fix title bar rendering with hide_edge_borders smart (#5260)
related to https://github.com/i3/i3/pull/5245

fixes https://github.com/i3/i3/issues/5254
2022-11-07 19:01:58 +01:00
Michael Stapelberg
e6a28b9475 gaps: change workspace rendering to fix sizes with large outer gaps (#5252)
Currently, containers only consider their neighbors and screen edges.

If >2 containers are in a line, the outer containers adjust from outer gaps, but
the middle containers know nothing of this and only consider the inner gaps.

When the outer gaps differ substantially from the inner gaps, the left-most and
right-most containers are smaller as only they adjust for the larger outer gaps.

This commit changes the rendering: containers are now always inset by their
inner gap settings, and workspace containers is now inset by the outer gap
settings.

The result is that many tiled containers have the same size, and the gaps
overall work as the user might expect them to previous combinations of
outer/inner gap settings still produce the same result, albeit with fixed
outer-most sizes.

fixes https://github.com/Airblader/i3/issues/22

related to https://github.com/i3/i3/issues/3724

Co-authored-by: Cameron Leger <contact@cameronleger.com>
2022-11-06 21:22:21 +01:00
Michael Stapelberg
69e13d7821 Revert "gaps: use logical_px() to work correctly on hi-dpi monitors" (#5251)
This reverts commit 6b658f88be.

The commit was misguided: the pixel values are already run through logical_px()
when parsing the configuration directive or command, so they should not be run
through another logical_px() pass at rendering time.
2022-11-06 19:42:30 +01:00
Michael Stapelberg
2a91514a31 t/548-motif-hints: add missing $x->flush after $x->change_property
I noticed the test was flaky before, possibly this fixes it.

related to #3009
2022-11-06 18:18:23 +01:00
Orestis Floros
9dcf37b428 Fix motif behavior according to spec
See https://linux.die.net/man/3/vendorshell
The important part is:
> MWM_DECOR_ALL
> All decorations *except* those specified by other flag bits that are set
2022-11-06 18:18:23 +01:00
Michael Stapelberg
9e3a9e8225 Allow text drawing to use the alpha channel. (#5246)
This is the last remaining diff from the i3-gaps tree.

related to https://github.com/i3/i3/issues/3724

Tested using the following config with picom:

bar {
	i3bar_command i3bar -t
	status_command i3status
	colors {
		# fully	transparent text on opaque background:
		statusline #ffffff00
		background #000000ff
	}
}
2022-11-06 12:43:37 +01:00
Michael Stapelberg
c8fd8eff21 userguide: document smart_borders 2022-11-06 12:43:01 +01:00
Michael Stapelberg
6fe625f469 userguide: document hide_edge_borders smart_no_gaps
related to https://github.com/i3/i3/issues/3724
2022-11-06 12:43:01 +01:00
Michael Stapelberg
d26ddcbfe5 draw leaf window decorations on ->frame instead of ->parent->frame
related to https://github.com/i3/i3/issues/3724
fixes https://github.com/i3/i3/issues/1966
2022-11-05 15:58:15 +01:00
Michael Stapelberg
6e6af01b7a draw_util: refactor surface_initialized macro into function
This makes it possible to set a breakpoint in gdb on a line in the function and
get a backtrace of un-initialized surface access.
2022-11-05 15:58:15 +01:00
Michael Stapelberg
a59423df81 check-spelling: add another false positive (#5247) 2022-11-05 15:56:36 +01:00
Michael Stapelberg
2bfa06b7df meson.build: include new gaps1920.png file in dist tarball (#5242) 2022-11-01 18:26:57 +01:00
Michael Stapelberg
9c9b110ed1 config.spec: add missing smart_gaps inverse_outer comment 2022-11-01 17:55:46 +01:00
Michael Stapelberg
588cc4c79c refactor cmd_gaps to get rid of all #define
I’m still not 100% happy with how the function turned out (it still does too
many things at once), but this seems like an improvement — at least reading and
navigating the code with LSP now works better.
2022-11-01 17:55:46 +01:00
Michael Stapelberg
4d0323fa9e t/319-gaps.t: also test the gaps command 2022-11-01 17:55:46 +01:00
Michael Stapelberg
3f400b8ad0 move gaps-specific logic out of con.c and render.c into gaps.c 2022-11-01 17:55:46 +01:00
Michael Stapelberg
a5791b2e64 gaps: allow optional px suffix 2022-11-01 17:55:46 +01:00
Michael Stapelberg
b2c696f680 add basic gaps test 2022-11-01 17:55:46 +01:00
Michael Stapelberg
b82b3e85da userguide: document gaps config directive and gaps command 2022-11-01 17:55:46 +01:00
Michael Stapelberg
6b658f88be gaps: use logical_px() to work correctly on hi-dpi monitors 2022-11-01 17:55:46 +01:00
Michael Stapelberg
5b0f848a40 Fix config.spec comment 2022-11-01 17:55:46 +01:00
Michael Stapelberg
9ac027234b refactor render_con() global parameter into should_inset_con()
This bundles the logic all in one place and thereby makes it a little easier to
understand.
2022-11-01 17:55:46 +01:00
Michael Stapelberg
2fbb36b95f remove dead code: window_rect is overwritten a few lines below 2022-11-01 17:55:46 +01:00
Michael Stapelberg
b825dc124a Merge gaps support as-is
This code was copied over unmodified from https://github.com/Airblader/i3-gaps.

I have split out the differences between i3-gaps and i3 into three areas:
1. Gaps
2. i3bar height
3. rgba colors
2022-11-01 17:55:46 +01:00
Michael Stapelberg
0b89d4b2a7 implement bar { padding } config directive
related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/pull/4288
fixes https://github.com/i3/i3/issues/3721
2022-10-30 22:22:08 +01:00
Michael Stapelberg
327bca26d8 add test for bar { height } 2022-10-30 22:22:08 +01:00
Michael Stapelberg
c45342e74f Merge support for the bar { height } option as-is from i3-gaps
related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/issues/3721

In a follow-up commit, we can evolve this into the padding directive as
discussed on issue #3721.
2022-10-30 22:22:08 +01:00
Michael Stapelberg
62eb0033b1 docs/userguide: fix asciidoc block syntax (for asciidoctor)
asciidoctor is a bit stricter in what it accepts: the leading and trailing lines
need to have the exact same number of characters, and apparently there needs to
be a blank line after the trailing delimiter line.
2022-10-30 22:22:08 +01:00
Michael Stapelberg
a68eb3a71e delete old release notes 2022-10-30 22:22:08 +01:00
Orestis Floros
080c73d1a4 i3-dmenu-desktop: ignore SIGPIPE when writing to dmenu (#5228)
Fixes broken test
2022-10-29 08:20:09 +02:00
Michael Stapelberg
1f53ae4614 debian: update changelog 2022-10-24 21:33:43 +02:00
Michael Stapelberg
23bc304477 Update debian/changelog 2022-10-24 21:23:07 +02:00
Michael Stapelberg
c6bfd05276 Merge branch 'stable' into next 2022-10-24 21:23:07 +02:00
Michael Stapelberg
85252a3bd1 Merge branch 'release-4.21.1' 2022-10-24 21:23:06 +02:00
Michael Stapelberg
9ffcc51183 Restore non-git version suffix 2022-10-24 21:23:06 +02:00
Michael Stapelberg
39afa033e4 release i3 4.21.1 2022-10-24 21:22:50 +02:00
Michael Stapelberg
3b9d70af41 tiling drag: only start when there are drop targets (#5213)
This prevents potentially confusing drag & drop on fullscreen containers and
only-containers on workspaces.

fixes https://github.com/i3/i3/issues/5184
2022-10-24 21:13:03 +02:00
Michael Stapelberg
c55b52a7cc tiling drag: ignore scratchpad windows when locating drop targets (#5211)
fixes https://github.com/i3/i3/issues/5170
2022-10-24 21:13:00 +02:00
Michael Stapelberg
131b0c5b3d make tiling drag configurable
fixes https://github.com/i3/i3/issues/5155
2022-10-24 21:12:58 +02:00
Michael Stapelberg
aa876585e8 tiling drag: left-click needs threshold, mod-click doesn’t
related to https://github.com/i3/i3/issues/5155
2022-10-24 21:12:56 +02:00
Michael Stapelberg
f1754e12c0 increase drag threshold, run it through logical_px()
related to https://github.com/i3/i3/issues/5155
2022-10-24 21:12:53 +02:00
Michael Stapelberg
e12d2f6a1d tiling drag: fix cursor (wrong argument passed) (#5207)
Currently, the cursor is XCURSOR_CURSOR_TOP_RIGHT_CORNER (== BORDER_TOP),
but the intended cursor was XCURSOR_CURSOR_MOVE.

noticed this as part of https://github.com/i3/i3/issues/5198
2022-10-24 21:12:51 +02:00
Michael Stapelberg
b88ca36a5a tiling drag: allow click immediately, to focus on decoration click (#5206)
With the introduction of tiling drag, i3’s click behavior in window decorations
changed: before tiling drag, in a tabbed or stacked container, a window would be
focused/raised on mouse down. After tiling drag, on mouse up.

This commit sends XCB_ALLOW_REPLAY_POINTER before running the tiling drag code,
thereby restoring the focus/raise-on-mouse-down behavior without affecting the
tiling drag operation.

fixes https://github.com/i3/i3/issues/5169
2022-10-24 21:12:48 +02:00
bodea
7abd58abf2 Escape ~ to prevent interpretation as subscript. (#5168) 2022-10-24 21:12:43 +02:00
Matias Goldfeld
d62183a2b8 Fix segfault during config validation (#5167) (#5173)
Configs with bar blocks will segfault during validation since they
copy the i3 font which is not set during validation.
2022-10-24 21:12:38 +02:00
Tudor Brindus
9d6a8735eb Raise floating windows when their border is clicked (#5196)
This logic already existed for `floating_drag_window`, but we need it
for `floating_resize_window` too.

Fixes #5195.
2022-10-24 21:12:30 +02:00
Michael Stapelberg
decc37eba1 Fix i3-dmenu-desktop quoting (#5162)
Commit 70f23caa9a introduced new issues.

Instead of distinguishing " and \, as that commit attempted,
let’s instead keep the level of escaping by escaping each backslash,
just like each double quote.

I tested this with:

    # recommended way to quote $ and " in quoted arguments, not ambiguous
    Exec=/tmp/logargs "hello \\$PWD \\"and\\" more"

    # permitted way to quote $ and " in quoted arguments, but ambiguous
    Exec=/tmp/logargs "hello \$PWD \"and\" more"

    # permitted way to quote arguments, slightly unusual to quote first arg
    Exec="/tmp/logargs" hey

    # a complicated shell expression, not ambiguous
    Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec /tmp/logargs --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec /tmp/logargs --alternate-editor= --create-frame; fi" placeholder %F

related to https://github.com/i3/i3/issues/4697 (electrum, original)
related to https://github.com/i3/i3/issues/5152 (phpstorm, breakage)
related to https://github.com/i3/i3/issues/5156 (emacsclient, breakage)
2022-10-24 21:12:27 +02:00
Orestis Floros
3f58d51ec6 Fix motif logic for new floats
- manage.c still used wrong `motif_border_style == BS_NORMAL`
- container must be set to floating first for correct code path and
  correct max_user_border_style to be used in con_set_border_style
- Motif test now includes default_floating_border
2022-10-24 21:12:25 +02:00
Orestis Floros
304e815ed4 Motif hints: Respect maximum border style configuration set by user
Context:
Motif hints [1] allow applications to request specific window manager
frame decorations. Most applications like alacritty, chromium, and
godot, use the hints as a binary flag, setting or un-setting
`MWM_DECOR_ALL`.
Previously [2], we had disallowed applications to set the "normal"
border style through motif hints. This effectively meant that users that
had set `default_border pixel` would not see applications spawning with
normal decorations [3].
However, that meant that applications like godot [4] could not toggle
their border between none and normal so the behaviour changed with
v4.21 [5].
That change however also allowed applications to override the default
none/pixel border style the user set. For example, alacritty can be
configured to either have all or no decorations [6] and they always set
the motif hint on startup, completely overriding i3 user's preference:
1. If decorations are disabled with alacritty's config then they will
   override `default_border normal` and no title will be used.
2. If decorations are enabled (also the default behavior) with
   alacritty's config then they will override `default_border pixel` and
   a title will be used.

This patch redefines how we interpret motif hints. When a client sets
`MWM_DECOR_ALL`, we interpret it as "the maximum decoration the user has
allowed for this window". I.e., if a client was all decorations and the
user expects the window to not have a title, we don't include the title
in "all" decorations.

The user's preference is determined by these:
1. For new tiling windows, as set by `default_border`
2. For new floating windows, as set by `default_floating_border`
3. For all windows that the user runs the `border` command, whatever is
   the result of that command for that window.
Example:
- User opens new tiling window with `default_border pixel` => maximum
  decoration = PIXEL
- Window requests all/title decorations => i3 enforces the user maximum
  decoration, PIXEL (no change)
- Window requests no decorations => i3 accepts it and sets border to
  NONE, maximum decoration remains PIXEL
- User toggles the border, next style is NORMAL => maximum decoration is
  now NORMAL
- Window requests no decorations => i3 accepts it and sets border to
  NONE
- Window requests all/title decorations => i3 accepts it and sets the
  maximum border, NORMAL
- User toggles the border, next style is NONE => maximum decoration is
  now NONE
- Window requests all/title decorations => i3 enforces the user maximum
  decoration, NONE (no change)

With this, we will still allow behaviour where windows can toggle their
border style with motif hints [4][7].

Reference/footnotes:
[1]: https://linux.die.net/man/3/vendorshell
[2]: https://github.com/i3/i3/pull/2386
[3]: Notice how there is apparently a gap because `default border none`
settings would not be respected if an application wanted just "border"
decorations but this was never reported, probably because of the rare
conjunction of applications requesting that and users defaulting to none
borders.
[4]: https://github.com/godotengine/godot/issues/40037
[5]: https://github.com/i3/i3/pull/5135
[6]: Set by an underlying library here:
fafdedfb7d/src/platform_impl/linux/x11/util/hint.rs (L113-L142)
called by alactitty here:
4ddb608563/alacritty/src/display/window.rs (L341)
[7]: https://github.com/i3/i3/issues/3678

Closes #3678
Fixes #5149
2022-10-24 21:12:23 +02:00
Orestis Floros
0af2bac9ed Order border_style_t enum according to amount of decoration
The only place where this matters is with command `border toggle` which
cycles through them. Luckily, the behaviour does not change because the
order is the same with the new enum.
2022-10-24 21:12:20 +02:00
Erich Heine
5e4ed2fc75 Adds sticky field to get_tree reply in ipc doc 2022-10-24 21:12:00 +02:00
Orestis Floros
de3fc07123 Update actions/checkout to v3 (#5226)
Fixes #5225
2022-10-24 21:01:23 +02:00
Orestis Floros
b18b80ca40 i3-dmenu-desktop test: Do not autostart i3 (#5224)
This actually fixes a hang that happens on my machine for some reason.
Regardless, starting i3 is not necessary for this test.
2022-10-24 19:57:07 +02:00
Michael Stapelberg
5e759ed424 tiling drag: only start when there are drop targets (#5213)
This prevents potentially confusing drag & drop on fullscreen containers and
only-containers on workspaces.

fixes https://github.com/i3/i3/issues/5184
2022-10-18 22:10:03 +02:00
Michael Stapelberg
941229ee62 tiling drag: ignore scratchpad windows when locating drop targets (#5211)
fixes https://github.com/i3/i3/issues/5170
2022-10-16 22:12:45 +02:00
Michael Stapelberg
55d400b17d make tiling drag configurable
fixes https://github.com/i3/i3/issues/5155
2022-10-16 18:21:08 +02:00
Michael Stapelberg
2ba393f084 tiling drag: left-click needs threshold, mod-click doesn’t
related to https://github.com/i3/i3/issues/5155
2022-10-16 18:21:08 +02:00
Michael Stapelberg
6479cb7deb increase drag threshold, run it through logical_px()
related to https://github.com/i3/i3/issues/5155
2022-10-16 18:21:08 +02:00
Michael Stapelberg
8128774386 tiling drag: fix cursor (wrong argument passed) (#5207)
Currently, the cursor is XCURSOR_CURSOR_TOP_RIGHT_CORNER (== BORDER_TOP),
but the intended cursor was XCURSOR_CURSOR_MOVE.

noticed this as part of https://github.com/i3/i3/issues/5198
2022-10-16 16:53:15 +02:00
Michael Stapelberg
a6c86fd794 tiling drag: allow click immediately, to focus on decoration click (#5206)
With the introduction of tiling drag, i3’s click behavior in window decorations
changed: before tiling drag, in a tabbed or stacked container, a window would be
focused/raised on mouse down. After tiling drag, on mouse up.

This commit sends XCB_ALLOW_REPLAY_POINTER before running the tiling drag code,
thereby restoring the focus/raise-on-mouse-down behavior without affecting the
tiling drag operation.

fixes https://github.com/i3/i3/issues/5169
2022-10-16 15:21:22 +02:00
bodea
4f3d4c26f6 Escape ~ to prevent interpretation as subscript. (#5168) 2022-10-11 18:09:26 +02:00
Matias Goldfeld
c5dc0d8c93 Fix segfault during config validation (#5167) (#5173)
Configs with bar blocks will segfault during validation since they
copy the i3 font which is not set during validation.
2022-10-10 18:52:55 +02:00
Tudor Brindus
06e31ece8f Raise floating windows when their border is clicked (#5196)
This logic already existed for `floating_drag_window`, but we need it
for `floating_resize_window` too.

Fixes #5195.
2022-10-10 14:22:55 +02:00
Michael Stapelberg
812ec43d46 Fix i3-dmenu-desktop quoting (#5162)
Commit 70f23caa9a introduced new issues.

Instead of distinguishing " and \, as that commit attempted,
let’s instead keep the level of escaping by escaping each backslash,
just like each double quote.

I tested this with:

    # recommended way to quote $ and " in quoted arguments, not ambiguous
    Exec=/tmp/logargs "hello \\$PWD \\"and\\" more"

    # permitted way to quote $ and " in quoted arguments, but ambiguous
    Exec=/tmp/logargs "hello \$PWD \"and\" more"

    # permitted way to quote arguments, slightly unusual to quote first arg
    Exec="/tmp/logargs" hey

    # a complicated shell expression, not ambiguous
    Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec /tmp/logargs --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec /tmp/logargs --alternate-editor= --create-frame; fi" placeholder %F

related to https://github.com/i3/i3/issues/4697 (electrum, original)
related to https://github.com/i3/i3/issues/5152 (phpstorm, breakage)
related to https://github.com/i3/i3/issues/5156 (emacsclient, breakage)
2022-09-28 18:29:26 +02:00
Orestis Floros
8ec41334ec Fix motif logic for new floats
- manage.c still used wrong `motif_border_style == BS_NORMAL`
- container must be set to floating first for correct code path and
  correct max_user_border_style to be used in con_set_border_style
- Motif test now includes default_floating_border
2022-09-24 20:46:47 +02:00
Orestis Floros
f6097d4a37 Motif hints: Respect maximum border style configuration set by user
Context:
Motif hints [1] allow applications to request specific window manager
frame decorations. Most applications like alacritty, chromium, and
godot, use the hints as a binary flag, setting or un-setting
`MWM_DECOR_ALL`.
Previously [2], we had disallowed applications to set the "normal"
border style through motif hints. This effectively meant that users that
had set `default_border pixel` would not see applications spawning with
normal decorations [3].
However, that meant that applications like godot [4] could not toggle
their border between none and normal so the behaviour changed with
v4.21 [5].
That change however also allowed applications to override the default
none/pixel border style the user set. For example, alacritty can be
configured to either have all or no decorations [6] and they always set
the motif hint on startup, completely overriding i3 user's preference:
1. If decorations are disabled with alacritty's config then they will
   override `default_border normal` and no title will be used.
2. If decorations are enabled (also the default behavior) with
   alacritty's config then they will override `default_border pixel` and
   a title will be used.

This patch redefines how we interpret motif hints. When a client sets
`MWM_DECOR_ALL`, we interpret it as "the maximum decoration the user has
allowed for this window". I.e., if a client was all decorations and the
user expects the window to not have a title, we don't include the title
in "all" decorations.

The user's preference is determined by these:
1. For new tiling windows, as set by `default_border`
2. For new floating windows, as set by `default_floating_border`
3. For all windows that the user runs the `border` command, whatever is
   the result of that command for that window.
Example:
- User opens new tiling window with `default_border pixel` => maximum
  decoration = PIXEL
- Window requests all/title decorations => i3 enforces the user maximum
  decoration, PIXEL (no change)
- Window requests no decorations => i3 accepts it and sets border to
  NONE, maximum decoration remains PIXEL
- User toggles the border, next style is NORMAL => maximum decoration is
  now NORMAL
- Window requests no decorations => i3 accepts it and sets border to
  NONE
- Window requests all/title decorations => i3 accepts it and sets the
  maximum border, NORMAL
- User toggles the border, next style is NONE => maximum decoration is
  now NONE
- Window requests all/title decorations => i3 enforces the user maximum
  decoration, NONE (no change)

With this, we will still allow behaviour where windows can toggle their
border style with motif hints [4][7].

Reference/footnotes:
[1]: https://linux.die.net/man/3/vendorshell
[2]: https://github.com/i3/i3/pull/2386
[3]: Notice how there is apparently a gap because `default border none`
settings would not be respected if an application wanted just "border"
decorations but this was never reported, probably because of the rare
conjunction of applications requesting that and users defaulting to none
borders.
[4]: https://github.com/godotengine/godot/issues/40037
[5]: https://github.com/i3/i3/pull/5135
[6]: Set by an underlying library here:
fafdedfb7d/src/platform_impl/linux/x11/util/hint.rs (L113-L142)
called by alactitty here:
4ddb608563/alacritty/src/display/window.rs (L341)
[7]: https://github.com/i3/i3/issues/3678

Closes #3678
Fixes #5149
2022-09-24 20:46:47 +02:00
Orestis Floros
eddced6b45 Order border_style_t enum according to amount of decoration
The only place where this matters is with command `border toggle` which
cycles through them. Luckily, the behaviour does not change because the
order is the same with the new enum.
2022-09-24 20:46:47 +02:00
Orestis Floros
8e9b29419f Merge pull request #5151 from orestisfl/release-notes
Clean up 4.21 release notes
2022-09-22 15:37:03 +02:00
Orestis Floros
016d0b5f07 Clean up 4.21 release notes 2022-09-22 15:28:53 +02:00
Michael Stapelberg
4ab34d5042 GitHub Actions: skip build + test steps in meson dist (#5148)
Originally I thought we should remove the build and test steps in favor of the
“meson dist” step. But, then we lose verbose build command lines and access
to the test logs, and having the failing test logs readily available is
critical.

So, instead, let’s make the “meson dist” step not repeat the work that was
already done in earlier steps. The Meson manual even documents the --no-tests
flag precisely for our use case:

> The meson dist command has a --no-tests option to skip build and tests steps
> of generated packages. It can be used to not waste time for example when done
> in CI that already does its own testing.

From https://mesonbuild.com/Creating-releases.html

fixes https://github.com/i3/i3/issues/5145
2022-09-21 22:19:57 +02:00
Michael Stapelberg
28671a622b release.sh: re-add warning about debian/changelog changes
As long as we push auto builder packages from our CI, we need to update the
version number via the changelog.
2022-09-21 21:58:41 +02:00
Michael Stapelberg
3e434ba0ce release.sh: latest released version numbers 2022-09-21 21:58:41 +02:00
Michael Stapelberg
6ae232a323 release.sh: fix Debian source repository configuration
Debian switched to deb822 sources.list:

https://twitter.com/zekjur/status/1572622368492888065
2022-09-21 21:58:41 +02:00
Michael Stapelberg
5caf49323c release.sh: fix regexp for updating version in index.html 2022-09-21 21:58:41 +02:00
Michael Stapelberg
12cdf435aa release.sh: update website branch name 2022-09-21 21:58:41 +02:00
Michael Stapelberg
d7b9a45ff3 release.sh: remove dput instruction
Package maintenance is done by sur5r these days (thanks!)
2022-09-21 21:58:41 +02:00
Erich Heine
0967021858 Adds sticky field to get_tree reply in ipc doc 2022-09-21 19:27:32 +02:00
Michael Stapelberg
f0856c285c debian: update changelog 2022-09-21 18:38:54 +02:00
Michael Stapelberg
ac95dffd6b Update debian/changelog 2022-09-21 18:26:55 +02:00
Michael Stapelberg
2bdcae8149 Merge branch 'release-4.21' 2022-09-21 18:26:55 +02:00
Michael Stapelberg
c0ef3caec8 Merge branch 'next' into stable 2022-09-21 18:26:55 +02:00
Michael Stapelberg
d7f4707e05 Restore non-git version suffix 2022-09-21 18:26:55 +02:00
Michael Stapelberg
5bc4280a48 release i3 4.21 2022-09-21 18:26:43 +02:00
Michael Stapelberg
8ade46bdf0 unflake t/289-ipc-shutdown-event.t (#5144)
Before this commit, the test was flaky: it relied on the Perl test process
sending the kill() system call before i3 exited. This can easily be triggered
by adding a sleep(1) after the “cmd 'exit'” line.

This is because with i3_autostart => 1 (the default), i3test.pm kills i3
or bails out if it can’t.

So, we instead set i3_autostart => 0 and launch i3 ourselves.
This will unfortunately still make the code kill i3 and bail out,
because launch_with_config updates the $i3_pid variable that i3test.pm
uses for tracking whether it should clean up i3.
The solution is to exit i3 by calling exit_gracefully,
which will make the i3test.pm state correct.

related to https://github.com/i3/i3/issues/3009
2022-09-21 17:47:40 +02:00
Orestis Floros
227c1538be Add some release notes (#5138) 2022-09-20 09:13:34 +02:00
Orestis Floros
516d442e9a tiling_drag: Correctly switch to workspace when dragging across outputs (#5141)
Fixes #5089
2022-09-20 09:13:14 +02:00
viri
8252144cc3 motif: restore BS_NORMAL correctly (#5135)
motif hints: restore BS_NORMAL correctly
2022-09-19 20:12:15 +02:00
Orestis Floros
0ac5e248f2 tiling_drag: con_rect_plus_deco_height: Fix underflow (#5129)
Fixes #5069
2022-09-17 13:00:29 +02:00
zhrvn
5ce8e3241b Fix crash in parse_file() when parsing nested variables (#5003)
Count extra_bytes correctly

If there is a variable with the same name as the rest of another
variable after removing $, then it will be counted twice. Therefore,
we need to completely replace it with spaces (variable names cannot
contain spaces) in order to correctly calculate the length of a new
string.

fixes https://github.com/i3/i3/pull/5002

Co-authored-by: Ivan Zharov <zhiv.email@gmail.com>
Co-authored-by: Michael Stapelberg <stapelberg@users.noreply.github.com>
2022-09-12 09:03:50 +02:00
zhrvn
e48b9aa284 Fix segfault with mode "default" key bindings (#5007)
ignore bindings when not in a valid mode

Co-authored-by: Ivan Zharov <zhiv.email@gmail.com>
Co-authored-by: Michael Stapelberg <stapelberg@users.noreply.github.com>
2022-09-11 15:22:01 +02:00
Michael Stapelberg
f795c2c8da testsuite: catch i3 SIGSEGV by installing SIGCHLD handler (#5123)
The testsuite already contains quite a number of SIGCHLD handler
installation/un-installations. Here is my attempt at an inventary.

1. complete-run.pl installs a SIGCHLD handler in the `start_xserver()` function
   call, which prints an error and exits when all x server processes have exited.

2. In the TestWorker child process, a SIGCHLD handler is installed to reap dead
   test child processes.

3. The TestWorker child process forks another child process for running the test
   file, where the previously installed SIGCHLD handler (point 2) is unset.

   This is where this commit comes in: it installs a SIGCHLD handler in the test
   file child process, which will trigger when the i3 subprocess dies.

4. (For completeness: i3test.pm defines an END block where it unsets the
    previous SIGCHLD handler before it kills the subprocesses.)

With this commit, when i3 segfaults, the output will look like this:

    Writing logfile to 'testsuite-2022-09-10-21-14-46-4.20-103-gb242bceb/complete-run.log'...
    [:100] /home/michael/i3/testcases/t/167-workspace_layout.t: BAILOUT
    completed 0 of 1 tests
    test /home/michael/i3/testcases/t/167-workspace_layout.t bailed out:
    could not kill i3: No such process

fixes https://github.com/i3/i3/issues/4437
2022-09-10 21:29:04 +02:00
Michael Stapelberg
4b5ead023e open_logbuffer: avoid overflow by comparing (long long) (#5113)
I tested this on a machine with 256 GB of RAM.

fixes #4906
2022-09-09 10:26:17 +02:00
Michael Stapelberg
ac368e7916 config_parser: prevent trailing whitespace in output (string → word) (#5117)
fixes https://github.com/i3/i3/issues/5064
2022-09-09 10:23:55 +02:00
Michael Stapelberg
6fb58eb841 config: set bar block font to i3-wide font *after* parsing (#5118)
Otherwise, the font directive needs to come before bar blocks,
which is surprising to users.

fixes https://github.com/i3/i3/issues/5031
2022-09-09 10:21:33 +02:00
paperluigis
4db383e430 man/i3-input: fix a typo: chose → choose (#5087) 2022-09-06 20:30:23 +02:00
mariano
e9c63d3001 Add wezterm to i3-sensible-terminal (#5107) 2022-09-06 20:23:56 +02:00
bodea
b242bcebcf i3-sensible-pager: sanitize LESS environment variable (#5111)
When an error is encountered such as "The configured command for this shortcut
could not be run successfully", the "show errors" button on i3-nagbar doesn't
work if $PAGER is less, and $LESS contains either the -E or -F flag (the
window pops up, but immediately disappears).

Strip these flags from the LESS environment variable before invoking $pager.
2022-09-06 08:42:02 +02:00
Orestis Floros
ebcd1d43ea Allow dragging tiled windows with the mouse. (#3085)
Fixes #2643

Inner drop region behaves like move to mark.
The outer region is close to the edge (currently 30px from the edge).
This will place the container as a sibling in the given direction within
the parent container. If the move direction goes against the orientation
of the parent container, tree_move() is called.

Contributors:
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
See #3085
- Inner drop region behaves like move to mark
- Handle workspaces
- Fix crash when target closes
- Initiate tiling drag from titlebar
- Hide indicator until container is dragged outside of original position
- Calculate outer_threshold using percentages instead of fixed pixel
values
- Emit 'move' event properly
- Don't focus previously unfocused containers
- Use tree_split() on different orientation
- Fix redundant split containers
- DT_PARENT
- Readability & optimizations
- Limit parent threshold by render_deco_height()
- Tests
- Fullscreen container handling
- Initiate drag from title bar
- Fix issue of EnterNotify events still triggering after drag_callback
  is called
- Include decorations for drop target calculation

Co-authored-by: Michael Forster <email@michael-forster.de>
See #2178
- Original implementation of tiling drag + indicator window
> A container can be dragged by the title bar to one of the four sides
> of another container. That container will then be split either
> horizontally or vertically.

Co-authored-by: Tony Crisci <tony@dubstepdish.com>
See #2653
- Original implementation of outer/inner drop region indicator:
> There are two drop regions per direction.
>
> The inner region is closer to the center of the window. Dropping on
> this region will split the target container and put the container
> within the split at the given direction beside the target container.
>
> The outer region is close to the edge (currently 30px from the edge).
> This will place the container as a sibling in the given direction within
> the parent container.
>
> Dropping into the outer region moves the con beside the target. If the
> move direction goes against the orientation of the parent container, the
> con moves out of the row.
- Fix crash: Ignore containers without a managed window (eg i3bar)
2022-07-28 12:03:16 +02:00
Orestis Floros
807e972330 Fix Wbitwise-instead-of-logical warnings
> error: use of bitwise '|' with boolean operands
2022-07-28 09:25:55 +02:00
Michael Stapelberg
103dc7b55d fix travis/check-spelling.pl for recent Lintian changes 2022-07-28 09:25:55 +02:00
Jay Ta'ala
ddc587933d Split container parents should be redrawn when swapping child containers (within parent) (#4765)
Redraw split container parents when swapping child containers

Split container parents should be redrawn when swapping child containers  so they show the correct window ordering (note without this higher level split parent container titles will only update when changing layout or moving child cons in/out.
2022-06-30 20:21:14 +02:00
Josh Soref
458c148934 cleanup-bintray: remove remaining bintray references (#5038)
* The `cleanup-bintray.pl` script is just unused
* The `dh_builddeb` override is no longer necessary as bintray is no longer used
2022-06-30 08:21:54 +02:00
Kjetil Torgrim Homme
3597cc636e highlight the difference between "workspace N" and "workspace number N" commands 2022-06-28 00:25:06 +02:00
zhiv-git
ce2665ca96 Fix segfault when bindsym command is empty (#5001)
Remove end token from BINDCOMMAND

fixes i3/i3#5000: bindsym command cannot be empty, because NULL string
causes i3 to segfault when copied in configure_binding()
2022-06-08 22:38:21 +02:00
George Rodrigues
6ab64aa5b7 Fix typos (#4989) 2022-06-01 09:49:05 +02:00
Michael Stapelberg
612a9317b0 GitHub Actions: declare /usr/src/i3 as safe directory (#4992) 2022-05-31 18:29:36 +02:00
André Silva
dba30fc987 clear surface on x_push_node (#4577) 2022-03-28 10:18:55 +02:00
takelley1
41cd852f2f Fix typo in comment (#4936)
* Fix typo in comment

* Fix other typo in comment
2022-03-28 10:14:52 +02:00
Ingo Bürk
c822eff1bf Remove Xlib references (#4845)
* remove Xlib import from i3bar

* remove unused Xlib declarations
2022-02-10 10:25:20 +01:00
Gergely Risko
bd5cbbb010 Use proper WM_Sx registration for i3 (#4843)
i3's WM ownership is registered with the X Atom WM_S_S0 (for screen0),
instead of the correct WM_S0.  The relevant xcb-util API didn't
change, this is simply a bug in i3 that has always been there:
https://gitlab.freedesktop.org/xorg/lib/libxcb-util/-/blob/0.4.0/src/atoms.c#L65
2022-02-07 17:43:55 +01:00
Orestis Floros
70288d7b68 Merge pull request #4710 from pstray/title_window_icon-toggle
Implement title_window_icon toggle
2021-12-11 14:33:23 +01:00
Peder Stray
813336e068 Implement title_window_icon toggle
A feature described in i3/i3#4709
2021-12-11 14:20:07 +01:00
Orestis Floros
b17117190d Merge pull request #4717 from orestisfl/janitorial
Remove outdated //-style commented-out code
2021-12-06 22:55:38 +01:00
Orestis Floros
a4ac843cca Remove outdated //-style commented-out code
This makes the whole code-base have zero changes with clang-format
(v13).
2021-12-06 22:14:41 +01:00
sergio
70f23caa9a fix #4697, adds backslashes quotation for exec (#4699)
Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
2021-12-06 09:53:50 +01:00
Chris Templin
729452448b docs: change IPC window_type value (#4668) 2021-12-01 20:38:00 +01:00
Michael Stapelberg
07ea5019c9 debian: bump to libpcre2-dev for autobuilds (#4705)
related to https://github.com/i3/i3/issues/4682
2021-11-29 23:41:07 +01:00
Uli Schlachter
6c7efc4de8 Switch from pcre to pcre2 (#4684)
The issue at [0] was opened and I just took a stab at it. I have no
prior experience with pcre and pcre2, but using [1,2] I hacked together
something that seems to work. Next, Michael told me to turn that
patch/hack into a PR, so here we are.

The dependency in meson.build now uses version:'>=10', but this is more
a random guess than actual knowledge.

There was a while loop in regex_new() that dealt with an error when pcre
was not compiled with UTF-8 support. This loop uses a magic constant of
32 for the error code. I just dropped this loop, because I was just
writing a hack and did not intend to turn this into a PR. Also, a quick "grep
32 /usr/include/pcre.h" does not find anything useful, so... *shrug*

pcre_study() was removed without replacement, so the corresponding code
is also simply removed.

Testing done: The test suite passes for me. YMMV.

[0]: https://github.com/i3/i3/issues/4682
[1]: https://www.pcre.org/current/doc/html/pcre2api.html
[2]: https://www.pcre.org/current/doc/html/pcre2demo.html

Signed-off-by: Uli Schlachter <psychon@znc.in>
Fixes: https://github.com/i3/i3/issues/4682
2021-11-29 18:20:54 +01:00
Ingo Bürk
298c3aede9 Merge pull request #4698 from orestisfl/user_output_names_find_next
user_output_names_find_next: Always initialize target_output
2021-11-27 23:38:13 +01:00
Orestis Floros
854616ed2e user_output_names_find_next: Always initialize target_output
This way, if the user has provided a valid, existing output in the list
of outputs, the focus & move workspace to output commands will not
report a misleading failure.

Side-effect is that the command code will try to execute a no-op e.g. by
moving the workspace to the output it already is on. But that's what the
user is actually requesting in this case and it shouldn't be a problem.

Fixes #4691
2021-11-27 22:52:48 +01:00
Ingo Bürk
d44e1442c2 Merge pull request #4485 from ToxicGLaDOS/long_commands_crash
Fix bug where long commands crash i3
2021-11-18 22:35:23 +01:00
Ingo Bürk
46bdd537a8 Merge pull request #4622 from orestisfl/focus-output-next
Focus output next
2021-11-18 22:33:13 +01:00
Ingo Bürk
52c831ca22 Merge pull request #4651 from orestisfl/docs-ipc-socket
docs: Make more clear that an IPC socket is always created
2021-11-18 22:31:35 +01:00
Ingo Bürk
b7056a82f4 Merge pull request #4667 from orestisfl/transient_for-loop
Fix transient_for endless loop
2021-11-18 22:31:19 +01:00
Orestis Floros
e1d3e6b2f6 Fix transient_for endless loop
Other approaches would be:
- Slow/fast pointer technique.
- Using a set/associative map to save 'seen' nodes. i3 does not have
  such data structure.

Counting the total amount of windows is the simpler to implement.

I've also extracted the logic in a function and re-used it in render.c.

Fixes #4404
2021-11-11 20:29:02 +01:00
Orestis Floros
43e805a00d Merge pull request #4656 from stapelberg/flaky
Fix flaky tests: sync after kill
2021-11-07 13:51:55 +01:00
Michael Stapelberg
673185a63b t/219-ipc-window-focus.t: sync after kill 2021-11-07 11:56:06 +01:00
Michael Stapelberg
c4fdcc5dbc fix flaky testcases/t/185-scratchpad.t: sync after kill command 2021-11-07 11:47:42 +01:00
Orestis Floros
8e9da491f4 Merge pull request #4648 from orestisfl/formatting-new-action
Move clang-format and safe-wrappers check in new job
2021-11-06 14:16:09 +01:00
Orestis Floros
7f3316269d Release notes script fixes (#4652)
* release-notes: Sort filenames

* release-notes: Fix print-urls
2021-11-06 14:13:18 +01:00
Orestis Floros
93b2b44893 cmd_focus_output: Multiple outputs 2021-11-05 18:34:54 +01:00
Orestis Floros
34ef7f8c33 tests: Extract focused_output in library 2021-11-05 18:33:14 +01:00
Orestis Floros
bc4f35a6bb Extract common functions out of cmd_move_con_to_output 2021-11-05 18:33:14 +01:00
Orestis Floros
680ddc7e10 Move clang-format, safe-wrappers, release notes check in new job
Benefits:
- Faster feedback in case of error
- More checks run in parallel
- Removes stuff from Dockerfiles
- Uses newest available clang-format (in ubuntu repos)
2021-11-05 18:29:42 +01:00
Ingo Bürk
20d0591e77 Merge pull request #4604 from orestisfl/fix-focus-warp
Fix focus issue when moving windows across outputs
2021-11-05 15:32:07 +01:00
Orestis Floros
117fb13177 Merge pull request #4650 from orestisfl/focused_tab_title
Add title tab color
2021-11-05 15:24:25 +01:00
Anton Älgmyr
863a9eada4 Fix focus issue when moving windows across outputs
Fixes #3518

This fix avoids the issue of consuming our own warp events by never
calling warp on the wrong container.

Tried to add a test but it also succeeds with version before patch,
see #4604 for discussion

Co-Authored-By: Orestis <orestisflo@gmail.com>
2021-11-05 15:21:59 +01:00
Orestis Floros
f36050b303 Add title tab color
Fixes #4575
2021-11-05 15:19:18 +01:00
Orestis Floros
3c81e8ddaa Merge pull request #4610 from orestisfl/release-notes-next
Keep each release note in a single file
2021-11-05 10:36:24 +01:00
Orestis Floros
38cf8a21ef Update release notes
https://github.com/i3/i3/pull/4638
https://github.com/i3/i3/pull/4647
2021-11-05 10:13:30 +01:00
Orestis Floros
c083e023b6 Keep each release note in a single file
To avoid annoying merge conflicts.

Perl script is provided for convenience and simple format checking in
PRs.
2021-11-05 10:13:22 +01:00
Orestis Floros
220144361a userguide: Make more clear that an IPC socket is always created
Follow-up from #4647
2021-11-04 21:47:55 +01:00
Orestis Floros
3e0fc25b6b Merge pull request #4649 from orestisfl/fix-errno
Fix compilation error on debian
2021-11-04 19:31:44 +01:00
Orestis Floros
ce0d08cc6d Fix compilation error on debian 2021-11-04 19:27:40 +01:00
Uli Schlachter
445cea8e3a Do not replace existing IPC socket (#4638)
Imagine you are a happy i3 user and want to also write patches for i3.
You use "Xephyr :1" to get another X11 server and then start your newly
build i3 in it with "DISPLAY=:1 ./i3". You test your changes and
everything seems fine. You are happy. Later that day, you try to log
out, but the $mod+Shift+e key binding from the default config no longer
works. i3-msg cannot connect to the IPC socket because "No such file or
directory". What is going on?

The problem boils down to $I3SOCK having something like two meanings.
When i3 starts, it sets the environment variable $I3SOCK to the path of
its IPC socket. That way, any process started from i3 inherits this and
i3-msg knows how to talk to i3. However, when this variable is already
set when i3 starts, then i3 will replace the existing socket. Thus, in
the earlier experiments, the "separate i3" that was used for
experimenting stole the "main i3"'s socket and replaced it with its own.
When it exited, it deleted that socket.

This commit adds half a work around to this problem: When creating the
IPC socket, i3 will now first try to connect() to the socket. If this
succeeds, it will complain and refuse to use this socket. If the
connect() call fails, it will proceed as usual and create the socket.

Note that trying to connect() to a socket that no process listens on
will fail. Thus, this new code only really "triggers" when some process
is actively listening on this socket and accepting connections.

Example output for when the socket is already in use:

$ I3SOCK=/tmp/sdfdsf DISPLAY=:2 ./i3
31.10.2021 17:03:55 - [libi3] ERROR: Refusing to create UNIX socket at /tmp/sdfdsf: Socket is already in use
31.10.2021 17:03:55 - ERROR: Could not create the IPC socket, IPC disabled

This commit sadly only provides part of the solution. i3 will still
delete the socket when shutting down, even if it failed to create the
IPC socket. Thus, the ipc socket will still break, but now only later.
This will be fixed separately.

First-step-towards-fixing: https://github.com/i3/i3/issues/4381
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-11-04 17:22:22 +01:00
Michael Stapelberg
d83940a8fc Merge branch 'release-4.20.1' 2021-11-03 09:23:23 +01:00
Michael Stapelberg
53f52beb09 Update debian/changelog 2021-11-03 09:23:23 +01:00
Michael Stapelberg
63aec362c9 Restore non-git version suffix 2021-11-03 09:23:23 +01:00
Michael Stapelberg
f97268dbd8 Merge branch 'stable' into next 2021-11-03 09:23:23 +01:00
Michael Stapelberg
b952e74145 release i3 4.20.1 2021-11-03 09:23:07 +01:00
Michael Stapelberg
6fe33394e1 post-release release.sh changes 2021-11-03 09:14:58 +01:00
Baptiste Daroussin
c6ea9bbace portability: use getcwd() instead of get_current_dir_name() (#4645) 2021-11-03 09:03:33 +01:00
Baptiste Daroussin
058ebb0d42 portability: add missing headers
libi3.h defins a macors with the default modes to create a directory.
Those modes are defined in sys/stat.h, so include the necessary header
2021-11-03 09:03:28 +01:00
lycurgus
884717489f Correct short form of raw option in i3-msg manpage 2021-11-03 09:03:14 +01:00
Jakob Haufe
b895d9d3cc Extend title length for xmlto
man.th.title.max.length defaults to 20 which leads to a broken .TH line
for i3-migrate-config-to-v4.1:

.TH "I3\-MIGRATE\-CONFIG\" "1" "02/01/2021" "i3 4\&.19\&.1" "i3 Manual"
2021-11-03 09:03:09 +01:00
rvalieris
39ff5699d6 check for both arguments NULL on strings_differ 2021-11-03 09:03:03 +01:00
Orestis Floros
ecc4f91fb4 Merge pull request #4647 from psychon/refuse-start-without-ipc-socket
Refuse to start without IPC socket
2021-11-02 23:13:52 +01:00
Uli Schlachter
03a0375e7f Refuse to start without IPC socket
This change was (basically) suggested by @orestisfl in
https://github.com/i3/i3/pull/4638#issuecomment-958093518

Testing done:

$ I3SOCK=/dev/null DISPLAY=:2 LC_ALL=C build/i3
bind(): Address already in use
i3: Could not create the IPC socket: /dev/null

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-11-02 21:08:42 +01:00
Baptiste Daroussin
aceb36ae60 portability: use getcwd() instead of get_current_dir_name() (#4645) 2021-11-02 20:14:24 +01:00
Orestis Floros
e4d3ec9217 Merge pull request #4644 from bapt/portability-nits
portability: add missing headers
2021-11-02 19:50:58 +01:00
Baptiste Daroussin
e4a3f6e4cd portability: add missing headers
libi3.h defins a macors with the default modes to create a directory.
Those modes are defined in sys/stat.h, so include the necessary header
2021-11-02 10:43:27 +01:00
Orestis Floros
40b0c8e5b8 Merge pull request #4618 from Jonta/patch-3
Docs: Testsuite: Grammar
2021-11-01 21:42:49 +01:00
Orestis Floros
b0632bddfc Merge pull request #4637 from lycurgus/patch-1
Correct short form of raw option in i3-msg manpage
2021-10-31 09:36:30 +01:00
lycurgus
8e46943985 Correct short form of raw option in i3-msg manpage 2021-10-31 19:01:32 +11:00
Ingo Bürk
36f9f86714 Merge pull request #4629 from sur5r/xmlto-titlelength
Extend title length for xmlto
2021-10-28 08:40:08 +02:00
Jakob Haufe
a352cecc6a Extend title length for xmlto
man.th.title.max.length defaults to 20 which leads to a broken .TH line
for i3-migrate-config-to-v4.1:

.TH "I3\-MIGRATE\-CONFIG\" "1" "02/01/2021" "i3 4\&.19\&.1" "i3 Manual"
2021-10-27 19:15:01 +00:00
Jonta
9cc9cc2be0 Docs: Testsuite: Grammar
Incorporating orestisfl's suggestion, and expanding a little
2021-10-24 17:38:14 +02:00
Orestis Floros
b7af69cba8 Merge pull request #4617 from rvalieris/fix
check for both arguments NULL on strings_differ
2021-10-22 17:40:27 +02:00
Jonta
19252515bc Docs: Testsuite: Grammar 2021-10-22 14:21:16 +02:00
rvalieris
64021b6143 check for both arguments NULL on strings_differ 2021-10-22 07:51:07 -03:00
Orestis Floros
e938cae8a0 Merge pull request #4609 from stapelberg/post-release
post-release release.sh changes
2021-10-19 20:05:27 +02:00
Michael Stapelberg
93e8ccd792 post-release release.sh changes 2021-10-19 18:16:34 +02:00
Michael Stapelberg
46f4fe4ecc debian: update changelog 2021-10-19 08:45:28 +02:00
Michael Stapelberg
d854dc597b Update debian/changelog 2021-10-19 08:38:14 +02:00
Michael Stapelberg
1d05918961 Merge branch 'release-4.20' 2021-10-19 08:38:14 +02:00
Michael Stapelberg
533b76378a Merge branch 'next' into stable 2021-10-19 08:38:14 +02:00
Michael Stapelberg
2472f8b8b4 Restore non-git version suffix 2021-10-19 08:38:14 +02:00
Michael Stapelberg
d216a5c9d3 release i3 4.20 2021-10-19 08:37:58 +02:00
Ingo Bürk
e05af2650e Merge pull request #4599 from stapelberg/docs-release
Docs and release notes prep for the next release
2021-10-18 08:10:30 +02:00
Michael Stapelberg
b37c3e3d25 release notes: plug headline features, order and clarify changelog 2021-10-17 20:01:54 +02:00
Michael Stapelberg
b04f206e39 userguide: use “all” criterion in title_window_icon examples 2021-10-17 20:01:41 +02:00
Orestis Floros
ab389e1d76 Merge pull request #4565 from stapelberg/skip
i3-dmenu-desktop: ignore duplicate files and directories
2021-10-07 23:38:47 +02:00
Michael Stapelberg
25bf911537 i3-dmenu-desktop: ignore duplicate files and directories
This is required when e.g. mpv is installed in the NixOS global system
environment *and* in the user environment.

Standalone reproducer:

mkdir -p test1/share/applications test2/share
ln -svf /usr/share/applications/i3.desktop test1/share/applications
ln -svf $PWD/test1/share/applications test2/share
export XDG_DATA_DIRS='test1/share:test2/share'
i3-dmenu-desktop

fixes #4522
2021-10-07 23:22:23 +02:00
Orestis Floros
8323108ca1 Merge pull request #4566 from stapelberg/spelling
fix travis/check-spelling.pl for updated API
2021-10-07 16:01:02 +02:00
Michael Stapelberg
b3d4281b8b fix travis/check-spelling.pl for updated API 2021-10-06 18:23:46 +02:00
Orestis Floros
eada44be1e Merge pull request #4538 from psychon/log-focus-out
Log FocusOut events
2021-09-25 13:53:22 +02:00
Uli Schlachter
16b09672c8 Log FocusOut events
Currently, i3 only logs FocusIn events. Thus, a debug log tells us when
some window gets the focus. However, we don't know when it loses the
focus. This commit remedies this by adding some log messages for this.

Since I had no idea what to log, this just logs all the fields from the
event plus tries to find a name for the window.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Idea-in-context-of: https://github.com/i3/i3/issues/4532
2021-09-25 13:47:36 +02:00
Michael Stapelberg
535da94536 GET_CONFIG: add raw/variable-processed contents of all config files (#4528)
We do this by adding to included_files as i3 processes the configs.

This should allow for easy debugging, without having to change how i3 processes
config files.

related to #4192
2021-09-22 08:54:37 +02:00
Orestis Floros
d3ff9afbb5 Merge pull request #4436 from psychon/check-cairo-status
Check cairo status in draw_util_surface_free()
2021-09-16 19:07:07 +02:00
Uli Schlachter
d2f5e7e46e Fix a minor memory leak
When xcb_request_check() returns an error, something has to clean up and
free this error.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-09-15 18:14:37 +02:00
Uli Schlachter
2e500f0817 Check cairo status in draw_util_surface_free()
When "something goes wrong" in cairo-land, the corresponding cairo
object goes into an error state. These errors are sticky. Thus, it is
enough to check for errors before destroying the context.

This commit adds a check in draw_util_surface_free() to check the cairo
context's status and print a log message if anything is wrong.

The idea here is to help debugging drawing issues. Instead of "nothing
visible", the corresponding log message hopefully helps debugging.

This code would have saved me lots of time in figuring out why my pull
request #4379 did not work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-09-15 18:14:37 +02:00
Ingo Bürk
a0938bd606 Update docs to Discussions (#4503) 2021-09-10 09:18:01 +02:00
Ingo Bürk
3686cef63c Merge pull request #4469 from vincentbernat/fix/handler-xrandr
handlers.c: send an "output" event on monitor configuration change
2021-09-10 08:09:32 +02:00
Vincent Bernat
381d7e6a98 doc: fix version number in release notes 2021-09-10 08:04:59 +02:00
Vincent Bernat
f9e6d5dd7a handlers.c: send an "output" event on monitor configuration change
When adding/removing a monitor, the outputs are likely to be modified.
Send an IPC event "output", like when there is a screen configuration
change.

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
2021-09-10 08:04:38 +02:00
Ingo Bürk
3d2a1ef80a Merge pull request #4502 from orestisfl/discussion-template
Add option to start a new discussion in the templates
2021-09-10 07:18:58 +02:00
Ingo Bürk
570138eb72 Merge pull request #4501 from orestisfl/window-logs
Make window id logging hex everywhere
2021-09-10 07:17:27 +02:00
Orestis Floros
e1ca00d164 Add option to start a new discussion in the templates 2021-09-10 00:51:19 +02:00
Orestis Floros
af23c0febf Make window id logging hex everywhere
Right now some logs use %d and some use %08x and it can be confusing to
follow.
2021-09-09 21:05:24 +02:00
Orestis Floros
ce2c21885d Merge pull request #4497 from orestisfl/icons-title-align
Make window icons follow title alignment
2021-09-09 09:27:30 +02:00
Orestis Floros
cc44d9a999 Make window icons follow title alignment
Fixes #4464.

Inspired by changes from #4453 but I didn't end up using the original
code.

For ALIGN_LEFT and ALIGN_CENTER icon offset is calculated first and then
title offset is based on that. For ALIGN_RIGHT title offset is
calculated first but we make sure that the icon fits in the window.

Additionally, icons will now hide if there is not enough space to render
them + their padding. Realistically, this won't happen in normal
usecases.

Effectively, icons have higher precedence over text: draw_util_text will
hide text when it exceeds the max width and the code takes this into
consideration. Icons will only hide when they can't fit at all, not in
order to assure that the text can be displayed fully.
2021-09-09 08:51:14 +02:00
Ingo Bürk
579973b1ef Merge pull request #4499 from orestisfl/gh-actions-logs
GH actions: Archive complete logs on test failure
2021-09-08 07:26:20 +02:00
Ingo Bürk
f45d5d1a53 Merge pull request #4498 from orestisfl/memleak
Free window role & machine
2021-09-08 06:41:30 +02:00
Orestis Floros
3ba7599aa4 GH actions: Archive complete logs on test failure
https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy

> By default, the artifacts and log files generated by workflows are
> retained for 90 days before they are automatically deleted.
2021-09-08 00:05:11 +02:00
Orestis Floros
8649a7e229 Free window role & machine 2021-09-07 22:52:14 +02:00
Ingo Bürk
3bdea50548 Merge pull request #4495 from kgilmer/config-directives-no-file-no-error
Lower severity of missing include path specified from error to info.
2021-09-06 12:18:34 +02:00
Ken Gilmer
46cffcc059 Lower severity of missing include path specified from error to info. Addresses https://github.com/i3/i3/issues/4494. 2021-09-05 22:14:25 -07:00
Ingo Bürk
986292c662 Merge pull request #4491 from i3/orestisfl-patch-1
Add #4409 to release notes
2021-09-01 07:48:40 +02:00
Orestis Floros
603e26baa8 Add #4409 to release notes 2021-08-31 23:58:10 +02:00
Orestis Floros
9a02399cee Merge pull request #4454 from vincentbernat/feature/i3-notify
main: signal readiness by notifying systemd
2021-08-30 15:26:58 +02:00
Vincent Bernat
5b6a564190 main: signal readiness by notifying systemd
This is useful if we want to be able to start some services depending
on i3, notably some script using the socket or third-party bars like
polybar. To make use of this change, user is expected to use the
following stanza:

```
[Unit]
Description=i3 window manager
PartOf=graphical-session.target

[Service]
Type=notify
ExecStart=/usr/bin/i3
ExecStopPost=/bin/systemctl --user stop graphical-session.target
Restart=on-failure
```

Something similar is already possible using socket activation. For
example, we could use:

```
[Unit]
Description=i3 window manager socket
PartOf=graphical-session.target

[Socket]
ListenStream=%t/i3.sock
ExecStartPost=/bin/systemctl --user set-environment I3SOCK=%t/i3.sock
```

And other units could `Requires=i3.socket`. Unfortunately, not
everything is using I3SOCK. Notably, `i3 --get-socketpath` does not
and that's what i3ipcpp is doing. An alternative would be to patch `i3
--get-socketpath` to use I3SOCK if present, however, this may be a bit
risky. Should we check the environment variable first or the root
attribute?

Another alternative not requiring any modification is to have a
dedicated `i3-session.target`:

```
[Unit]
Description=i3 session
BindsTo=graphical-session.target
Wants=wallpaper.service
Wants=wallpaper.timer
Wants=polybar.service
Wants=i3-companion.service
```

And trigger it from i3:

```
exec_always --no-startup-id systemctl --user start --no-block i3-session.target
```

The proposed change being quite small, it seems harmless and
low-maintenance.

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
2021-08-30 15:20:04 +02:00
Uli Schlachter
7b6e864823 Implement support for the WM_Sn selection (#4374)
Closes #536

When the WM_Sn selection is already owned at startup, this now either
errors out or waits for the old selection owner to exit.
2021-08-28 01:01:38 +02:00
Jeff Smith
01ba240272 Fix bug where long commands crash i3
Commands with more than 10 words would result in i3 crashing. The root
cause is that the stack which holds arguments with identifiers is
only 10 big, but generate-command-parser.pl was giving every word an
identifier of "".
2021-08-24 16:34:30 -05:00
Michael Stapelberg
36ba1043d5 ipc: document scratchpad_state (#4466)
fixes https://github.com/i3/i3/issues/4465
2021-07-30 22:48:40 +02:00
Ingo Bürk
fee005bc87 Merge pull request #4460 from iscgar/isaac/all-criterion
Implement 'all' matching criterion
2021-07-26 08:05:25 +02:00
Isaac Garzon
3a818c0f20 Implement 'all' matching criterion
This criterion matches all open windows, as a more readable (and
correct) version of the 'class=".*"' criterion (more correct because
it'll also match windows which don't have WM_CLASS set yet).
2021-07-24 22:18:58 +03:00
tomty89
fc65ca36b1 Use mkdirp() in get_process_filename() (#4397)
Avoids race condition in case multiple i3 instances are started in parallel with e.g. systemd user units for multiple X(vfb) servers.
2021-07-05 17:21:21 +02:00
Michael Stapelberg
abbf6a85d7 Implement showing window icons in titlebar (#4439)
This feature defaults to off, and can be turned on for individual windows,
or (with for_window) for all new windows. See the userguide change.

This commit is partially based on work by:

• Marius Muja
• mickael9
• Esteve Varela Colominas
• Bernardo Menicagli
2021-06-13 08:35:52 +02:00
Michael Stapelberg
eaa5e636f9 Implement include config directive (#4420)
The implementation uses wordexp(3) just like sway:
https://github.com/i3/i3/issues/1197#issuecomment-226844106

Thanks to jajm for their implementation at
bb55709d0a

This required refactoring the config parser to be re-entrant
(no more global state) and to return an error instead of dying.

In case a file cannot be opened, i3 reports an error but proceeds with the
remaining configuration.

Key bindings can be overwritten or removed using the new --remove flag of the
bindsym/bindcode directive.

All files that were successfully included are displayed in i3 --moreversion.

One caveat is i3 config file variable expansion, see the note in the userguide.

fixes #4192
2021-06-02 21:01:43 +02:00
Ingo Bürk
4c93f61353 Merge pull request #4430 from stapelberg/actions
README: update build status badge for GitHub Actions
2021-05-23 16:35:38 +02:00
Michael Stapelberg
e4b3f46366 README: update build status badge for GitHub Actions 2021-05-23 16:06:13 +02:00
Michael Stapelberg
c94f41b2da switch from Travis to GitHub actions for continuous integration (CI) (#4428) 2021-05-23 15:44:28 +02:00
Vladimir Panteleev
e44aa7a9a9 docs/ipc: Explicitly state null as a possible type
This helps write correct descriptions of the JSON schema for strongly
typed languages that support deserializing to native types (and
require a different type for null).
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
d4c23ec24b docs/ipc: Add descriptions of all message payloads
These seemed to be inconsistently specified.

Particularly, the "SYNC" message payload was not described anywhere.

Even when the payload is empty, it is helpful to specify that
explicitly, as it prevents the reader from having to guess whether if
it's really empty, or otherwise somehow implicitly obvious.

The "Reply format" section is now "Messages and replies", and covers
both the reply format and the format of sent messages.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
8db3bef66d docs/ipc: Explicitly state that reply types correspond to message types
Help avoid some squinting to make sure everything actually matches.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
63099f7a83 docs/ipc: Fix inconsistent whitespace 2021-05-20 21:47:43 +02:00
Vladimir Panteleev
1f75e8d321 docs/ipc: Re-order and clarify reply format
- Make sure to place the description of the packet before the
  description of the payload.

- Describe the relationship of messages and replies.

- Add note on pipelining.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
73bcbbe1b1 docs/ipc: Fix grammar
Add missing "it". Also add two instances of "a", which sounds more
correct to me.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
bb6ee88440 docs/ipc: Clarify i3 --get-socketpath text 2021-05-20 21:47:43 +02:00
Kjetil Torgrim Homme
2245db63ab add cross reference to directive default_border from command border (#4273)
Added a couple of examples to make usage clearer with a cursory glance.
2021-05-20 21:47:20 +02:00
Uli Schlachter
d65a7ed250 Drop xcb_flush() before xcb_aux_sync() (#4378)
xcb_flush() flushes xcb's output buffer. Thus, after this call, all
previous requests are surely written to the connection with the X11
server.

xcb_aux_sync() synchronises with the X11 server. It makes sure all
previous requests were sent to the X11 server and already processed. It
does this via free(xcb_get_input_focus_reply(xcb_get_input_focus())): It
sends a request and waits for its reply. It is guaranteed that the X11
server processes requests in-order.

This means that the sequence xcb_flush(); xcb_aux_sync() first writes
whatever is in the output buffer and then does another write for the
four bytes of the GetInputFocus request from xcb_aux_sync().

Put differently: xcb_flush(); xcb_aux_sync() doesn't do anything more
than just xcb_aux_sync(). In fact, it has slightly more overhead for the
same result.

Thus, this commit drops all calls to xcb_flush() immediately after
xcb_aux_sync().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-20 21:44:13 +02:00
Uli Schlachter
60542da091 Do not "set" the wallpaper during startup (#4373)
"Set" the wallpaper during startup only sometimes

Since commit 4f5e0e7, i3 would take a screenshot and set that as the
background pixmap of the root window during startup. This is the easy
part of setting a proper X11 wallpaper.

The code in question was added because something either set the
background pixmap of the root window to NONE or the X11 server was
started with "-background none". This is apparently done by default by
e.g. gdm to avoid some flickering while the X11 server starts up.

This commit makes this code conditional: Only when no wallpaper is
detected is a screenshot taken.

Since I could not find any way to query the background of a window, a
more direct approach is taken to detect this situation: First, we find
some part of the root window that is not currently covered. Then we open
a white window there, close it again and grab a screenshot. If a
wallpaper is set, the X11 server will draw this wallpaper after the
window is closed and something else will be visible in the screenshot.

However, the wallpaper could have a white pixel at the tested position.
Thus, this procedure is repeated with a black window.

Only when this procedure produces two different pixel values is a
screenshot taken and set as the wallpaper.

Fixes: https://github.com/i3/i3/issues/4371
Fixes: https://github.com/i3/i3/issues/2869
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-20 21:37:35 +02:00
j-jzk
fcae64f7fd Increase test timeout (#4416)
Default of 30 seconds can time-out on slower hardware
2021-04-29 15:59:23 +02:00
Ingo Bürk
91e751d5a2 Merge pull request #4411 from alarsyo/fix-broken-pango-link
docs: fix broken link to Pango documentation
2021-04-26 16:29:32 +02:00
Antoine Martin
00d4836ee4 docs: fix broken link to Pango documentation 2021-04-26 16:13:27 +02:00
Michael Stapelberg
9db03797da fix crash with “layout default”: ipc.c won’t dump L_DEFAULT layout (#4409)
fixes #4408
2021-04-20 09:04:07 +02:00
Michael Stapelberg
c8158875b4 default config: use dex for XDG autostart (#4405)
fixes #4402
2021-04-17 15:26:45 +02:00
Ingo Bürk
9bf9cb9926 Merge pull request #4377 from lbonn/signed-container-positions
ipc: return signed int for container positions
2021-04-10 16:24:43 +02:00
lbonn
496364fdbf ipc: return signed int for container positions
If we use json as a language-agnostic representation, it makes sense to
use proper signed integers here.
2021-04-10 14:17:00 +02:00
Orestis Floros
fcf4c235d2 Merge pull request #4394 from jaykhandkar/fix-userguide
docs/userguide - comment out TODO line
2021-04-06 12:59:17 +02:00
Jay Khandkar
e150b99ba8 docs/userguide - comment out TODO line
commented out TODO line in userguide which was showing up in the
online documentation.
2021-03-28 15:34:59 +05:30
Ingo Bürk
39376a94ab Merge pull request #4387 from ivanmilov/milov/ipc-floating-doc
Added floating field to _tree_reply in ipc documentation
2021-03-16 16:52:15 +01:00
Ivan Milov
52afb16391 Added floating field to _tree_reply in ipc documentation 2021-03-15 10:42:39 +01:00
Uli Schlachter
1c67683406 Make this sound less "X11 is horrible"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
Uli Schlachter
fd500ee99d Add a section on the sync IPC command
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
Uli Schlachter
8a5eac3457 Improve the docs for I3_SYNC
I was confused by the previous state of the docs since I imagined that
there is still a race possible. Thus, the images are updated to
explicitly include the IPC reply from i3 (since that is an important
synchronisation component). I also tried to clarify some of the text.

Fixes: https://github.com/i3/i3/issues/4365
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
Ingo Bürk
af2171d01d Merge pull request #4363 from psychon/more-prefetch
Prefetch some information through xcb
2021-03-06 19:06:16 +01:00
Uli Schlachter
db5a7dc22a Only prefetch xinerama if it is likely needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-06 18:43:46 +01:00
Ingo Bürk
42c3dbe025 Merge pull request #4362 from psychon/no-temp-cairo-surface2
Some follow-up to
2021-03-06 11:10:57 +01:00
Uli Schlachter
f8bc7052ea Remove unused member from surface_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-06 09:27:15 +01:00
Uli Schlachter
bae1f4b354 Prefetch some information through xcb
This commit makes libxcb prefetch some information that will be needed
later anyway. This avoids some round-trips to the X11 server since the
information is already present when needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-05 14:16:52 +01:00
Ingo Bürk
757b3dd573 Merge pull request #4361 from psychon/no-temp-cairo-surface
No temporary cairo surface for font drawing
2021-03-05 14:06:57 +01:00
Uli Schlachter
b23c8875f7 font: Get rid of temporary cairo surface
i3 actually manages to have two different cairo surfaces referring to
the same drawable. One comes from the code in draw_util. The second is
temporarily created while rendering text via draw_text(). No idea how
well cairo handles this case.

This commit instead changes the code to pass the already existing cairo
surface from the caller through.

This might or might not fix https://github.com/i3/i3/pull/4357. My
thinking here is that cairo now knows the actual size of the drawable
and thus does not clip the drawing to a smaller size.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-05 11:37:03 +01:00
Uli Schlachter
8d645d0de6 Remove draw_text_ascii()
This function is unused since commit fa488d721d from 2017.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-05 11:36:09 +01:00
Michael Stapelberg
46bc841162 Merge branch 'release-4.19.2' 2021-02-27 10:38:13 +01:00
Michael Stapelberg
7da136dca4 Update debian/changelog 2021-02-27 10:38:13 +01:00
Michael Stapelberg
4ef47087d4 Restore non-git version suffix 2021-02-27 10:38:13 +01:00
Michael Stapelberg
98e0a07f15 Merge branch 'stable' into next 2021-02-27 10:38:13 +01:00
Michael Stapelberg
ddebebd26b release i3 4.19.2 2021-02-27 10:37:57 +01:00
Michael Stapelberg
0e1a828003 cherry-pick release.sh changes into stable branch
related to https://github.com/i3/i3/issues/4350
2021-02-27 10:20:16 +01:00
Michael Stapelberg
b95bab0e34 mark travis/push-balto.sh as executable (#4347)
related to https://github.com/i3/i3/issues/4340
2021-02-13 10:10:59 +01:00
Michael Stapelberg
521949b567 travis: push i3 autobuild packages to balto instead of bintray (#4345)
related to https://github.com/i3/i3/issues/4340
2021-02-13 09:56:15 +01:00
Orestis Floros
5df0b4b571 Merge pull request #4336 from tbgiles/next
Clear framebuffer for containers with visible windows
2021-02-07 19:10:23 +01:00
Orestis Floros
e8949c7df1 Merge pull request #4338 from orestisfl/move-workspaces-to-multiple-outputs
Move workspaces to multiple outputs
2021-02-06 12:52:08 +01:00
Orestis Floros
8ff8db3c36 Accept multiple outputs in move container|workspace to output
Fixes #4337
2021-02-06 11:00:16 +01:00
Orestis Floros
f2243a7a90 Tests: Fix get_output_for_workspace
In the case of more than one workspaces in an output
2021-02-06 10:59:16 +01:00
Michael Stapelberg
36b6fef990 Merge branch 'release-4.19.1' 2021-02-01 09:04:01 +01:00
Michael Stapelberg
ab2a22a78b Update debian/changelog 2021-02-01 09:04:01 +01:00
Michael Stapelberg
001577c58c Set non-git version to 4.19.1-non-git. 2021-02-01 09:04:01 +01:00
Michael Stapelberg
33bbce6c38 Merge branch 'stable' into next 2021-02-01 09:04:01 +01:00
Michael Stapelberg
0fb9123da9 release i3 4.19.1 2021-02-01 09:03:45 +01:00
Imran Virani
77d5bbb9b5 Properly quote rofi call in i3 config 2021-02-01 08:54:48 +01:00
Orestis Floros
b35be84131 Comment-out duplicate i3-dmenu-desktop bindcode
Fixes #4304
2021-02-01 08:54:26 +01:00
Anaël Beutot
0c09bc24ff Fix workspace assignements after output changes
Fix #4261

The previous method was modifying the same list it was iterating upon
causing an erronous iteration and thus not every workspace got assigned
back to were they should (only the first one).
2021-02-01 08:53:36 +01:00
Tristan Giles
09e2bdaeba Clear framebuffer on containers that are visible windows 2021-01-30 22:44:43 -08:00
Orestis Floros
ef12e9a5ab Merge pull request #4331 from ImranVirani/patch-1
Properly quote rofi call in i3 config
2021-01-29 16:20:15 +01:00
Imran Virani
60213accae Properly quote rofi call in i3 config 2021-01-29 14:01:51 +01:00
Orestis Floros
62367c686d Merge pull request #4007 from xzfc/3981-client-machine
Match WM_CLIENT_MACHINE
2021-01-28 14:52:50 +01:00
Albert Safin
32c10a19f2 Add "machine" criterion to match WM_CLIENT_MACHINE
Closes #3981

Add "%machine" title_format placeholder
Add "machine" to the IPC and layout saving/restoring
2021-01-28 12:52:10 +01:00
Orestis Floros
921226783f Merge pull request #4330 from orestisfl/revert-clear-framebuffer
Revert "Clear framebuffer before drawing borders (#4308)"
2021-01-26 10:37:49 +01:00
Orestis Floros
8c8d5dc019 Revert "Clear framebuffer before drawing borders (#4308)"
This reverts commit 057a635279.
2021-01-25 08:13:15 +01:00
Michael Stapelberg
dcd6079c9b i3-dump-log -f: switch from pthreads to UNIX sockets
fixes #4117
2021-01-20 21:40:24 +01:00
Michael Stapelberg
131a6158c8 move set_nonblock, create_socket and path_exists to libi3 2021-01-20 21:40:24 +01:00
Orestis Floros
e4f12ac349 Merge pull request #4322 from orestisfl/i3bar-version
i3bar log version & correct exit code
2021-01-17 00:52:37 +01:00
Orestis Floros
ba134d3c7c i3bar: Exit with 1 on wrong argument 2021-01-15 23:35:31 +01:00
Orestis Floros
6668d03157 i3bar: LOG version on startup 2021-01-15 23:28:33 +01:00
Orestis Floros
9c7616cc98 Merge pull request #4315 from orestisfl/i3bar-fixes
I3bar fixes
2021-01-12 09:10:22 +01:00
Orestis Floros
1a29b28fa5 i3bar: No reason to get_workspaces after output event
got_output_reply() requests this information anyway and if it is
received before the output reply, the information will be erased by
get_output_reply().
2021-01-12 08:56:38 +01:00
Orestis Floros
6e0b29a65b i3bar: properly restart status command after config change 2021-01-12 08:56:38 +01:00
Orestis Floros
0370c5e297 i3bar: Properly close FDs 2021-01-12 08:35:41 +01:00
Orestis Floros
31580ddc7f Merge pull request #4231 from orestisfl/i3bar-default-bar_id
i3bar: Add default bar_id
2021-01-03 19:49:25 +01:00
Orestis Floros
052c4bea5c Merge pull request #4309 from i3/orestisfl-patch-1
Add release note for framebuffer fix
2021-01-03 10:26:55 +01:00
Orestis Floros
c1ec2ad19b i3bar: Add default bar_id
Instead of erroring, request the list of bar configs from i3 and use the
first one.
2021-01-03 10:17:43 +01:00
Orestis Floros
fb5d2a05c2 i3bar: Update manpage/help with options 2021-01-03 10:17:39 +01:00
Orestis Floros
2a2c350eb6 Add release note for framebuffer fix
#4308
2021-01-03 09:48:27 +01:00
Tristan Giles
057a635279 Clear framebuffer before drawing borders (#4308)
Clear framebuffer before copying surface to prevent visual garbage

Fixes #3481
Corrects problems of #4280
2021-01-03 09:36:43 +01:00
Ingo Bürk
d3d2612eba Merge pull request #4307 from i3/revert-4280-next
Revert "Clear pixmap to black before starting to draw"
2021-01-03 08:18:03 +01:00
Orestis Floros
5bf58a4c87 Revert "Clear pixmap to black before starting to draw" 2021-01-03 01:11:21 +01:00
Orestis Floros
bfa22cafea Merge pull request #4280 from tbgiles/next
Clear pixmap to black before starting to draw
2021-01-03 00:36:31 +01:00
Tristan Giles
337dd653ae Clear framebuffer before copying surface to prevent visual garbage
Fixes #3481
2021-01-02 23:54:11 +01:00
Orestis Floros
8d0b8b59c4 Merge pull request #4305 from i3/orestisfl-patch-1
Comment-out i3-dmenu-desktop bindcode
2021-01-02 23:09:06 +01:00
Orestis Floros
3f063bcb6f Comment-out duplicate i3-dmenu-desktop bindcode
Fixes #4304
2021-01-02 21:54:36 +01:00
Orestis Floros
b638ca593d Merge pull request #4230 from Xyene/tab-focus
Implement context-sensitive tab-clicking behavior
2021-01-01 22:17:27 +01:00
Tudor Brindus
f2ec5a4e77 Implement context-sensitive tab-clicking behavior
This commit makes it so that when clicking on a tab for the first time,
its inactive-focused child is focused. This matches i3 behavior when
scrolling on tabs.

A second click on the tab titlebar focuses the tab container itself.

Subsequent clicks cycle between these two states.

Closes #4225.
2021-01-01 16:04:33 -05:00
Orestis Floros
b2af112a04 Merge pull request #4284 from sojito/next
Add missing SYNC Reply type in IPC docs
2021-01-01 15:57:04 +01:00
Orestis Floros
87f033fbd4 Merge pull request #4299 from abeutot/fix_workspace_assignment_on_screen_change
Fix workspace assignment on screen change
2020-12-30 23:33:08 +01:00
Anaël Beutot
d539c6e288 Fix workspace assignements after output changes
Fix #4261

The previous method was modifying the same list it was iterating upon
causing an erronous iteration and thus not every workspace got assigned
back to were they should (only the first one).
2020-12-30 23:01:50 +01:00
Orestis Floros
5354eaa27e Merge pull request #4300 from abeutot/cleanup_remaining_cmdparse
Remove unused header file and references to it
2020-12-30 22:09:09 +01:00
Anaël Beutot
b1fb440345 Remove unused header file and references to it 2020-12-30 21:40:54 +01:00
Ingo Bürk
1d06cb976e Merge pull request #4297 from Airblader/feature-requests-doc
[Proposal] Update CONTRIBUTING and issue template(s) for feature requests
2020-12-30 20:17:32 +01:00
Ingo Bürk
b6ced01676 Update CONTRIBUTING and issue template(s) for feature requests 2020-12-29 20:29:48 +01:00
Michael Stapelberg
74b461e25e build.i3wm.org: disallow search engine indexing (#4295)
related to https://github.com/i3/i3.github.io/issues/41
2020-12-29 20:05:59 +01:00
Orestis Floros
da1a720782 Merge pull request #4296 from stapelberg/spelling
check-spelling: exempt typo until upstream merges the fix
2020-12-29 17:37:59 +01:00
Michael Stapelberg
3a1e44da68 check-spelling: exempt typo until upstream merges the fix
This must have come in with a new version of clang.
2020-12-29 17:13:11 +01:00
Romuald Brunet
146305d6c6 Remove small bulge in i3 SVG logo (#4281)
* Upgrade logo's inkscape SVG attributes

Inscape changed their attribute handling with version 1.0, this commit
is dedicated to this change

* Update logo to remove small bulge
2020-12-28 23:22:22 +01:00
Ralph Gutkowski
679335f19b Add missing SYNC Reply type in IPC docs 2020-12-16 16:36:55 +01:00
ajakk
27ff84ff42 Use docdir for all docs when building (#4269) 2020-12-08 08:11:59 +01:00
Orestis Floros
be4790802e Merge pull request #4244 from ekarpp/nagbar
i3-nagbar: add possibility to open bar on focused monitor
2020-11-29 23:34:43 +01:00
ekarpp
b6690045ed i3-nagbar: add possibility to open bar on focused monitor
Closes #3692

i3-nagbar will open by default on the monitor with input focus and using the flag -p on the primary monitor.
2020-11-29 22:36:49 +01:00
Orestis Floros
37ebd2a179 Merge pull request #4252 from orestisfl/create_workspace_on_output-duplicate-num
create_workspace_on_output: Prevent duplicate workspace nums
2020-11-28 23:41:49 +01:00
Orestis Floros
13757ac1ca workspace.c: Make small consistency changes 2020-11-28 23:22:55 +01:00
Orestis Floros
68258785ac create_workspace_on_output: Prevent duplicate workspace nums
When going through the `binding_workspace_names` to prioritize
user-specified names, we only check if the workspace exists, not the
workspace number. If the user specified a `bindsym … workspace number X`
directive, then it is appended in `binding_workspace_names` and a
workspace is created using that number even though from the POV of a
user that uses numbers to change workspaces, that workspace already
exists.

In similar code here:
1d9160f2d2/src/workspace.c (L997)
we do the check.

Fixes #4238
2020-11-28 23:22:55 +01:00
Dmitri Goutnik
d0067077ed declare parser generated sources as deps (#4264) 2020-11-21 19:18:24 +01:00
Michael Stapelberg
eb83b37936 userguide: clarify home row / vi navigational key relation (#4260)
Before this commit, the userguide mentioned “compatibility with most keyboard
layouts”, but that seems to not have been the intention of vi author(s).
2020-11-16 11:10:03 +01:00
Michael Stapelberg
9f3a3a1d98 i3-sensible-terminal: prioritize terminals with good accessibility (#4259)
We never did (and still do not) guarantee any order in which terminal emulators
are tried. Quoting from the i3-sensible-terminal man page:

> Please don’t complain about the order: If the user has any preference, they
> will have $TERMINAL set or modified their i3 configuration file.

This commit moves mate-terminal to the beginning of the list, which is
considered the most accessible terminal emulator among blind users.

fixes https://github.com/i3/i3/issues/4256
2020-11-16 09:56:49 +01:00
Michael Stapelberg
4b1ea08eef release.sh and release notes changes post-release (#4258) 2020-11-15 19:22:09 +01:00
Michael Stapelberg
a901498758 debian: update changelog 2020-11-15 18:28:25 +01:00
Michael Stapelberg
e6af0a5427 Merge branch 'next' into stable 2020-11-15 18:23:15 +01:00
Michael Stapelberg
2e59f512e3 Merge branch 'release-4.19' 2020-11-15 18:23:15 +01:00
Michael Stapelberg
8ac9a815f3 Restore non-git version suffix 2020-11-15 18:23:15 +01:00
Michael Stapelberg
969e6bc8c4 release i3 4.19 2020-11-15 18:23:00 +01:00
Michael Stapelberg
93d3f9cc6a remove now-unnecessary I3_VERSION file
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
Michael Stapelberg
f4d784b5a7 debian/rules: remove now-unnecessary override
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
Michael Stapelberg
60c89296c1 gitignore: remove now-unused autotools files
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
Michael Stapelberg
a4c12432cf travis: remove autotools build in favor of meson
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
Michael Stapelberg
358471a5f2 remove autotools files in favor of meson
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
Michael Stapelberg
8c0077c058 Update compilation instructions throughout our docs
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
Orestis Floros
e9610b84f6 Merge pull request #4249 from wlhlm/issue-3889-v2
Only swallow windows once v2
2020-11-10 18:54:13 +01:00
Wilhelm Schuster
c246f176eb Add regression test for #3888 2020-11-10 17:16:56 +01:00
izzel
377f7d7ab2 added remanage swallow check 2020-11-10 16:58:43 +01:00
Orestis Floros
1d9160f2d2 Merge pull request #4243 from stapelberg/parseerror
ipc: document parse_error COMMAND reply field
2020-11-03 11:51:42 +01:00
Michael Stapelberg
829b4d2b7c config: specify --no-startup-id for dmenu_run
fixes #4216
2020-11-03 11:35:40 +01:00
Michael Stapelberg
c22b35c293 ipc: document parse_error COMMAND reply field
fixes #4166
2020-11-03 09:48:28 +01:00
Orestis Floros
19fbe1d30c Merge pull request #4240 from stapelberg/may
userguide: may → might in most places (thanks Bruce)
2020-11-01 21:13:23 +01:00
Michael Stapelberg
6a1806931b userguide: may → might in most places (thanks Bruce)
Quoting https://www.freelists.org/post/i3-discuss/Grammar-check-in-the-doc

May inquires only into permission.
Might inquires into probability.
Can inquires into possibility.
Will/shall inquires into certainty.
2020-11-01 10:09:43 +01:00
Michael Stapelberg
8a7ac068c8 meson.build: fix typo in summary: docs → mans 2020-10-28 21:34:48 +01:00
Michael Stapelberg
5c565d0ad4 debian/rules: explicitly enable building manpages
This fixes a build failure in dh_installwms.

fixes #4136
2020-10-28 21:34:48 +01:00
Orestis Floros
e54e88b9e5 Merge pull request #4229 from stapelberg/next
travis: fix bintray deploy step
2020-10-25 22:42:09 +01:00
Michael Stapelberg
466f7c16f9 travis: fix bintray deploy step
Commit be1065f62d moved the Debian/Ubuntu package
builds into the distbuild/ directory.

fixes #4179
2020-10-25 21:54:07 +01:00
Orestis Floros
a24c9b65e1 Merge pull request #4195 from mschuwalow/i3bar-nonprimary-output
i3bar: add support for nonprimary output
2020-10-24 14:29:17 +02:00
Maxim Schuwalow
90e7a156a2 i3bar: add support for nonprimary output
Added a new output option `nonprimary` that causes the bar to be
displayed on all outputs except the primary one.

Fixes #4083
2020-10-24 11:44:34 +02:00
Orestis Floros
3cd1c45eba Merge pull request #4214 from burik666/i3bar-output_xy
Add coordinates relative to the current output in i3bar click events
2020-10-23 13:56:57 +02:00
Andrey Burov
60384d446b Add coordinates relative to the current output in i3bar click events
Currently i3bar click events provide x and y coordinates relative to all monitors.
I've added coordinates relative to the current output.

+-----------+-----------+
|           |   i3bar   |
|           +-----------+
|   HDMI-0  |    DP-0   |
| 1920x1080 | 2560x1080 |
+-----------+-----------+

When you click in the top right corner of the DP-0,
i3bar will provide something like this:

{
  "x": 4480,
  "y": 10,
  "output_x": 2560,
  "output_y": 10,
}

This is useful for creating a rofi menu or something else.
rofi -show run -location 1 -xoffset ${I3_OUTPUT_X} -yoffset ${I3_OUTPUT_Y}
2020-10-23 12:51:21 +03:00
Orestis Floros
e6f419b882 Merge pull request #4189 from acheronfail/feat-3519/ppt-move-position
allow ppt values in move direction and move position commands
2020-10-20 11:20:20 +02:00
Orestis Floros
ffad26beb0 Merge pull request #3957 from xzfc/clang-format-typenamemacros
clang-format: use TypenameMacros
2020-10-20 09:43:24 +02:00
Alessandro Vinciguerra
9e059ccc55 Add situational exit codes (#4107)
Add situational exit codes

Distinguish user canceled and other errors
Closes #3705
2020-10-20 09:38:35 +02:00
Albert Safin
e3a1c5b294 clang-format: use TypenameMacros
This commit removes line breaks and extra empty lines introduced in
commit fff3f79da9.
2020-10-20 09:36:44 +02:00
acheronfail
fae10f6df7 allow ppt values in move direction and move position commands
make ppt values clear in userguide

chore: move is_ppt and DLOG out of TAILQ_FOREACH loop
2020-10-20 17:48:26 +11:00
Michael Stapelberg
83078a1e16 debian: update changelog 2020-10-19 23:41:16 +02:00
Michael Stapelberg
036903e8b2 Merge branch 'release-4.18.3' 2020-10-19 23:17:05 +02:00
Michael Stapelberg
ce01babc7c Update debian/changelog 2020-10-19 23:17:05 +02:00
Michael Stapelberg
4da7e318e5 Set non-git version to 4.18.3-non-git. 2020-10-19 23:17:05 +02:00
Michael Stapelberg
e6b4e1314a Merge branch 'stable' into next 2020-10-19 23:17:05 +02:00
Michael Stapelberg
b2ac041ffa release i3 4.18.3 2020-10-19 23:16:56 +02:00
Orestis Floros
eaac9125a9 meson: Mark complete-run.pl as executable (#4224)
Fixes problem described in
https://github.com/i3/i3/issues/4086#issuecomment-711774506
2020-10-19 22:10:14 +02:00
Orestis Floros
3b2f15e613 Merge pull request #4023 from orestisfl/ws-assignment
Fix 2 workspace assignment bugs
2020-10-19 10:41:39 +02:00
Mark Guptill
654e2cefa6 kick tray clients before destroying the bar 2020-10-19 09:45:51 +02:00
Orestis Floros
71c059d033 i3-dmenu-desktop: Manually search for topdir (#4033)
Since 3a672bc, using follow or follow_fast, does not set
$File::Find::topdir, breaking our deduplication.

Fixes #4031
2020-10-18 20:02:37 +02:00
Orestis Floros
b6024122dc Fix conflicting workspace assignments when renaming
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes #4021
2020-10-18 17:28:55 +02:00
Orestis Floros
0d5a7eeff8 init_ws_for_output: Change loop that assigns existing workspaces
I find the new loop more straightforward and easy to understand.

Old loop used to be:
    foreach assignment:
        foreach assignment2:
            // find if this is the first valid output in this assignment
        foreach workspace:
            // find matching by assignment name
        if workspace:
            move workspace to output
New loop is:
    foreach workspace:
        foreach assignment:
            if workspace is assigned to this output:
                move workspace to output

With this, workspace assignments triggered by numbers during output
changes should be handled correctly.

Fixes #3685
2020-10-18 17:28:53 +02:00
Orestis Floros
6b2d8cb4d6 Make get_assigned_output public 2020-10-18 17:28:14 +02:00
Orestis Floros
9d2c855fcd workspace_get: Remove useless argument
Also reworks the structure a bit
2020-10-18 17:28:14 +02:00
Orestis Floros
9b295fbb57 Remove dead declarations in header files 2020-10-18 17:28:09 +02:00
Orestis Floros
440268f454 Merge pull request #4116 from ammgws/patch-1
Update WORKSPACES reply docs
2020-10-15 09:41:54 +02:00
Orestis Floros
fff8b0c0e8 Merge pull request #4172 from jorgheymans/patch-1
increase font-size for kbd in refcard
2020-10-13 10:29:18 +02:00
Orestis Floros
144c483b08 Merge pull request #4197 from zero77/patch-1
Update README.md
2020-10-13 10:26:54 +02:00
zero77
9c826655a3 Update README.md
This quickly shows all package versions across different distros at a glance.
2020-09-15 13:41:34 +00:00
Mike Sharov
04c489043c Reformat LICENSE so github sees it as BSD-3-Clause. (#4181)
This changes LICENSE text to the standard BSD-3-Clause text.
	The wording is almost identical, with only "copyright holders
	and contributors" replacing "Michael Stapelberg and contributors"
	in the license text.
2020-09-02 11:42:05 +02:00
Orestis Floros
f33a49372f i3bar: Remove duplicate call to kick_tray_clients (#4163)
Fixes #4159
Fixes #4162
2020-08-31 08:58:46 +02:00
Jorg Heymans
fa94d2d8a9 increase font-size for kbd in refcard
fixes https://github.com/i3/i3/issues/4135
2020-08-10 22:53:44 +02:00
Orestis Floros
e5992eed16 Merge pull request #4145 from i3/orestisfl-patch-2
route_click: Correctly eat the event
2020-08-01 09:43:26 +02:00
Michael Stapelberg
15e51ca38c Update debian/changelog 2020-07-26 10:25:37 +02:00
Michael Stapelberg
5af9ea65fe Merge branch 'release-4.18.2' 2020-07-26 10:11:49 +02:00
Michael Stapelberg
6bb01bbe83 Merge branch 'stable' into next 2020-07-26 10:11:49 +02:00
Michael Stapelberg
768fd7f21c Set non-git version to 4.18.2-non-git. 2020-07-26 10:11:49 +02:00
Michael Stapelberg
82450c9508 release i3 4.18.2 2020-07-26 10:11:37 +02:00
Orestis Floros
68904aeb38 Fix i3bar Xorg memory leak (#4140)
The `*_free_*` calls in this branch:
51b0583578/i3bar/src/xcb.c (L1854)
are never called when we remove the output from the tailq during a
refresh.

Fixes #4123
2020-07-22 09:33:19 +02:00
Orestis Floros
551d0a5b13 get_output_by_name: guard output->primary with require_active
This is related to #4048 but might not fix it completely. Either way,
this should be the correct behaviour of the function.
2020-07-22 09:32:29 +02:00
Orestis Floros
96639c0410 floating_maybe_reassign_ws: only re-focus if previously focused
Fixes #3979
2020-07-22 09:24:24 +02:00
Orestis Floros
e674073027 Merge pull request #4147 from compguy284/kick_tray_clients
kick tray clients before destroying the bar
2020-06-30 11:19:36 +02:00
Mark Guptill
838b600fea kick tray clients before destroying the bar 2020-06-30 04:34:32 -04:00
Orestis Floros
1449d4890f Merge pull request #4146 from lukaskern/next
Fixed a typo in the user's guide
2020-06-29 21:00:12 +02:00
Lukas Kern
2c1b18b1ac Fixed a typo in the user's guide 2020-06-29 20:34:35 +02:00
Orestis Floros
65e468edd7 route_click: Correctly eat the event
Restores original intention of 93e96f4 after #4144
2020-06-29 10:47:50 +02:00
Ingo Bürk
a45eb8156c Merge pull request #4144 from i3/orestisfl-patch-2
route_click: Fix regression: release mouse
2020-06-29 10:25:00 +02:00
Orestis Floros
874d862507 route_click: Fix regression: release mouse
Fixes #4143
2020-06-29 09:55:11 +02:00
Orestis Floros
025743eaf9 Fix i3bar Xorg memory leak (#4140)
The `*_free_*` calls in this branch:
51b0583578/i3bar/src/xcb.c (L1854)
are never called when we remove the output from the tailq during a
refresh.

Fixes #4123
2020-06-27 00:10:53 +02:00
Ingo Bürk
51b0583578 Merge pull request #4133 from VasilyFomin/patch-1
Fixed a typo in the docs
2020-06-25 08:34:53 +02:00
Vasily Fomin
24e30a81c3 Fixed a typo in the docs 2020-06-24 17:51:05 -07:00
Orestis Floros
5bc5fc188b Merge pull request #4131 from stapelberg/bindingstate
binding state post-submit review fixes
2020-06-17 11:22:23 +02:00
Michael Stapelberg
b402ce2cc9 binding state post-submit review fixes 2020-06-16 22:28:58 +02:00
Jason
4e676ef73e i3-msg: add missing option (#4128) 2020-06-16 22:27:39 +02:00
Michael Stapelberg
4085c4be3b the stable version can now be found in the stable branch (#4129)
fixes #4127
2020-06-15 12:00:24 +02:00
Jason
209bef7ea3 Update WORKSPACES reply docs 2020-06-14 08:22:10 +09:00
Ingo Bürk
cf09cc790c Merge pull request #4125 from orestisfl/move-fullscreen-to-ws
_con_move_to_con: Traverse below con to check for fullscreen
2020-06-10 08:14:11 +02:00
Orestis Floros
4d9c3131ad _con_move_to_con: Traverse below con to check for fullscreen
Fixes #4124
2020-06-10 03:44:02 +02:00
Ingo Bürk
f4964faef0 Merge pull request #4122 from stapelberg/bindingstate
Introduce GET_BINDING_STATE IPC command
2020-06-07 00:17:34 +02:00
Michael Stapelberg
45feaac54c Introduce GET_BINDING_STATE IPC command
fixes #3892
2020-06-06 20:39:05 +02:00
Orestis Floros
50160eb13b Merge pull request #4120 from stapelberg/meson-i3test
add i3test_pm dependency after all
2020-06-06 14:25:16 +02:00
Michael Stapelberg
ac5368770e add i3test_pm dependency after all
I suppose the now-conditional docs building had previously pulled in i3test_pm
implicitly.

related to #4086
2020-06-06 14:14:24 +02:00
Michael Stapelberg
ff77b67101 switch from clang-format-6 to clang-format-9 (#4121)
No changes required, but this unbreaks our CI
2020-06-06 14:03:31 +02:00
Orestis Floros
db2526c39c Merge pull request #4109 from i3/orestisfl-patch-2
i3-input: Fix memory leaks
2020-05-31 12:15:45 +02:00
Orestis Floros
c9f8183841 Merge pull request #4114 from orestisfl/i3bar-regression
Fix swapped cmd_bar_{mode,hidden_state}
2020-05-31 12:15:20 +02:00
Ingo Bürk
51d6ddf323 Merge pull request #4115 from ammgws/pwoerdocs
i3bar: improve docs for battery saving feature
2020-05-31 11:07:58 +02:00
Jason Nader
cf94ce6c2b i3bar: improve docs for battery saving feature 2020-05-31 17:06:07 +09:00
Orestis Floros
ae9613576f Fix swapped cmd_bar_{mode,hidden_state}
Mentioned in
fb2677f5f4 (r39550195)
2020-05-30 16:46:14 +02:00
Orestis Floros
128f9c0109 i3-input: Fix memory leaks
Mentioned in #4107
2020-05-28 10:23:40 +02:00
Orestis Floros
dd13398e04 Merge pull request #4106 from orestisfl/nagbar
Improve handling of nagbar processes
2020-05-24 15:16:08 +02:00
Orestis Floros
00ffa68a6c Move nagbar cleanup to i3_exit
Otherwise, each time we start a nagbar, a cleanup handler is created.
However, each of these handlers tries to kill the same process (->data
is a pointer to config_error_nagbar_pid / command_error_nagbar_pid).

With this commit, both potential nagbar processes are killed once.
2020-05-24 13:04:33 +02:00
Orestis Floros
78595f1f68 Improve handling of nagbar processes
Other changes in nagbar_exited:
- Remove ERROR from ELOG as it shows up as "ERROR: ERROR:"
- Make sure to reset the PID even when the process did not exit
normally.
- Use ELOG when exitcode != 0
- Remove the not found error: if nagbar is not in $PATH, exec_i3_utility
prints an error as well.

For the record, I also implemented a more complicated approach with a
new watcher data structure:
bd3aaf3a33
While writing the commit message, it occurred to me to compare
watcher->pid with *watcher->data, which fixes the problems mentioned in
that patch.

Fixes #4104
2020-05-24 13:04:33 +02:00
Orestis Floros
6e087d4a20 kill_nagbar: No need for pointer to pid_t 2020-05-24 13:04:33 +02:00
Orestis Floros
9aa28f357f Merge pull request #4100 from stapelberg/meson-fixes
meson: only install docs/man pages when they exist (release tarball)
2020-05-19 22:44:47 +02:00
Michael Stapelberg
bec3887fc8 meson: only install docs/man pages when they exist (release tarball)
related to #4086
2020-05-19 22:28:21 +02:00
Michael Stapelberg
d09ed08668 Merge pull request #4098 from stapelberg/meson-fixes
More CI fixes
2020-05-19 22:12:06 +02:00
Michael Stapelberg
abf9b18f12 docs.sh: no longer rely on now-deleted debian/i3-wm.{manpages,docs}
related to #4086
2020-05-19 20:27:50 +02:00
Michael Stapelberg
be1065f62d debian-build: s/build/distbuild/
related to #4086
2020-05-19 20:27:50 +02:00
Michael Stapelberg
4544a6d595 travis: build dist tarball after running tests
This way, users get more detailed feedback about new test failures.

related to #4086
2020-05-19 20:27:50 +02:00
Michael Stapelberg
0c0aef84fa Merge pull request #4096 from stapelberg/meson-fixes
meson fixes for unbreaking the Debian/Ubuntu package builds on Travis
2020-05-19 19:59:42 +02:00
Michael Stapelberg
571eec861e debian: remove i3-wm.{docs,manpages}, meson installs them
related to #4086
2020-05-19 19:36:56 +02:00
Michael Stapelberg
315f646876 meson: install docs from release tarball
related to #4086
2020-05-19 19:36:56 +02:00
Michael Stapelberg
2e23412f5d debian-build: use release tarball from build step
…instead of building a release tarball over and over again.

This has become an issue as meson insists on running tests before creating a
release tarball (which is a good policy).

related to #4086
2020-05-19 19:36:56 +02:00
Michael Stapelberg
0bea175b51 disable dh_autoreconf
We still have autotools in the tree, so this is not a no-op yet.

related to #4086
2020-05-19 19:07:53 +02:00
Michael Stapelberg
ff6c2d2214 debian: set buildsystem to meson, not meson+ninja
The latter fails on Ubuntu, presumably due to an older debhelper version.

related to #4086
2020-05-19 19:07:51 +02:00
Michael Stapelberg
97e477777e meson: install static documentation files
related to #4086
2020-05-19 19:07:48 +02:00
Michael Stapelberg
693eee0c03 meson: make docdir configurable
The debian package wants to install docs to $datadir/doc/i3-wm.

related to #4086
2020-05-19 19:07:45 +02:00
Michael Stapelberg
aba6ec3e52 add meson build files (#4094)
Motivation:

• faster builds (on an Intel Core i9-9900K):
  ( ../configure --disable-sanitizers && make -j8; )
  19,47s user 2,78s system 395% cpu 5,632 total

  ( meson .. -Dmans=true -Ddocs=true -Dprefix=/usr && ninja; )
  38,67s user 3,73s system 1095% cpu 3,871 total

• more approachable build system configuration in the
  python-esque meson domain specific language instead of
  the autotools m4 macro language

• built-in language server support thanks to ninja:
  the required compile_commands.json is built automatically
  and only needs to be linked from the source dir, e.g.:
  ln -s build/compile_commands.json .

Changes:

• the embedded vcs version info format changed from e.g.
  4.18-282-gabe46f69 (2020-05-16, branch "next")
  to:
  4.18-282-gabe46f69
  I think it’s better to lose a little bit of detail for
  the gained cleanliness of using meson’s vcs_tag()

• Drop unused xcb-event dependency.

• We can no longer enable sanitizers and debug options
  based on whether we are in a release or non-release build,
  because our new version logic runs at ninja build time,
  not at meson configure time.

  The new behavior is probably for the better in terms of
  what people expect, and we can make the CI use address sanitizer
  explicitly to ensure it is still exercised.

• We lose the AX_EXTEND_SRCDIR behavior, i.e. including the
  path component of the parent of the source dir in all paths.
  This was a trick we used for easier debugging, so that stack
  traces would contain e.g. ../i3-4.18.1/src/main.c, instead of
  just src/main.c.

  The other mechanism (_i3_version symbol) that we have for including
  the version number in the “backtrace full” (but not merely
  “backtrace”) output of gdb still works.

• Release tarballs now use tar.xz. Why not.

Migration plan

This commit adds the meson build files to the tree, but does not remove
autotools yet. For the development phase, we will keep both build systems
functional (and built on travis).

Then, just before the i3 v4.19 release, we will remove autotools from the tree
and the release tarball will require meson to compile.

This way, we incentivize maintainers to change, while also offering them an easy
way out (if desired) by reverting the most recent commit. In practice, switching
a distribution package from autotools to meson should only be a few line change,
easier than applying the provided patch :). Take a look at the debian/ changes
in this commit for an example.

meson is broadly available everywhere that i3 is available: Both xorg-server and
systemd gained meson build files in 2017, so we can follow suit:
https://anholt.livejournal.com/52574.html
https://in.waw.pl/~zbyszek/blog/systemd-meson.html

How do I?

For producing a coverage report, enable the b_coverage meson base option
and run ninja coverage-html:
% cd build
% meson .. -Db_coverage=true
% ninja
% ninja test
% ninja coverage-html
See also https://mesonbuild.com/howtox.html#producing-a-coverage-report

For using the address sanitizer, memory sanitizer or undefined behavior
sanitizer, use the b_sanitize meson base option:
% cd build
% meson .. -Db_sanitize=address
% ninja
See also https://mesonbuild.com/Builtin-options.html#base-options

related to #4086
2020-05-19 14:45:06 +02:00
Michael Stapelberg
ef8935b1db autotools: place binaries in top level of build dir, not in subdirs (#4093)
meson only supports the top level (no subdirs), so this makes the transition
easier.

For this to work with autotools, we need to *disable* the subdir-objects option,
that autotools wants us to enable for forward-compatibility.

This results in a bunch of warnings at autoreconf-time, but we don’t care, given
that we intend to switch away from autotools. Both build systems working next to
each other (as best as they can) is more important.

related to #4086
2020-05-18 22:18:00 +02:00
Orestis Floros
75963cd088 Merge pull request #4092 from stapelberg/fixup
update forgotten srcdir AnyEvent-I3 reference, remove xmacro files
2020-05-18 21:23:43 +02:00
Michael Stapelberg
ddebce8a7f update forgotten srcdir AnyEvent-I3 reference, remove xmacro files
Both oversights in the previous commits.
2020-05-18 20:40:07 +02:00
Orestis Floros
7a4354f42a Merge pull request #4088 from stapelberg/san
free(socket_path) to suppress leak sanitizer false-positive with -O2
2020-05-18 18:25:19 +02:00
Michael Stapelberg
ed0d6acebd free(socket_path) to suppress leak sanitizer false-positive with -O2
related to #4086 (triggered by our meson config)
related to #4087 (sanitizer cleanup tracking bug)
2020-05-18 17:08:53 +02:00
Orestis Floros
f233245a6c Merge pull request #4089 from stapelberg/xmacro
xmacro: declare in header files, instantiate instead of include
2020-05-18 09:54:51 +02:00
Orestis Floros
c06fd161f8 Merge pull request #4090 from stapelberg/any
build AnyEvent::I3 in build dir, not source dir
2020-05-18 00:30:15 +02:00
Michael Stapelberg
84397ceb54 build AnyEvent::I3 in build dir, not source dir
related to #4086
2020-05-17 17:27:03 +02:00
Michael Stapelberg
1b8ddd5fd1 xmacro: declare in header files, instantiate instead of include
This works better with meson, where .h files can be declared as being part of an
executable easily, but I couldn’t find a way to declare
e.g. include/atoms.xmacro as a dependency.

related to #4086
2020-05-17 16:38:43 +02:00
Ingo Bürk
08052ddeb9 Merge pull request #4084 from orestisfl/get_output_by_name_primary_active
get_output_by_name: guard output->primary with require_active
2020-05-15 10:02:58 +02:00
Orestis Floros
0fb56a92d0 get_output_by_name: guard output->primary with require_active
This is related to #4048 but might not fix it completely. Either way,
this should be the correct behaviour of the function.
2020-05-14 21:53:21 +02:00
Ingo Bürk
4d929003ea Merge pull request #4081 from orestisfl/i3bar-regression
i3bar mode: Fix regression: bar_id can be NULL
2020-05-14 08:34:48 +02:00
Orestis Floros
fb2677f5f4 cmd_bar: Fix regression with invalid modes
This is another regression from #4014: multiple arrows in a row mean
optional values. Re-introduce new states to force matching & proper
parser errors.
2020-05-14 00:40:09 +02:00
Orestis Floros
9eb2458b55 cmd_bar: Fix regression: bar_id can be NULL
Regression introduced by #4014
Fixes #4080
2020-05-14 00:39:25 +02:00
Orestis Floros
f63a4bef54 cmd_bar improvements (#4014)
- Split cmd_bar into 2 functions, improving errors and reducing strcmps
- Only update barconfig when something has changed
- Only update barconfig for the specific bar that has changed

Fixes #3958
2020-05-07 09:22:03 +02:00
Orestis Floros
142b3fa945 Merge pull request #4054 from orestisfl/randr-ewmh
randr_query_outputs: call ewmh_update_desktop_properties
2020-05-06 17:32:45 +02:00
Orestis Floros
0877e35439 Merge pull request #4055 from orestisfl/rofi
Mention rofi in default config file
2020-05-06 17:31:09 +02:00
Orestis Floros
e4629d678e Merge pull request #4057 from orestisfl/hacking-howto
Update first 1/3 of hacking-howto document
2020-05-06 17:30:58 +02:00
Orestis Floros
94b619e118 randr_query_outputs: call ewmh_update_desktop_properties
Fixes #4053
2020-05-06 17:26:49 +02:00
Orestis Floros
9a1c272900 Mention rofi in default config file
Fixes #2482
2020-05-06 17:25:52 +02:00
Orestis Floros
4b97027034 hacking-howto: Add warning 2020-05-06 17:25:28 +02:00
Orestis Floros
cdf5ccbed8 hacking-howto: Update 'data structures' section
- Includes updated bigpicture.png from dump-asy.pl script
- The X11 root window is not a container
- Adds some extra information

bigpicture.png is created by converting the .asy to an .eps with `asy
bigpicture .eps` and then using the following gs command:
gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -r600 -sDEVICE=pngalpha -sOutputFile=bigpicture.png bigpicture.eps
2020-05-06 17:25:28 +02:00
Orestis Floros
c7b6edf810 hacking-howto: Update 'files' section
Instead of sorting alphanumerically, use a more opinionated order,
listing more "important" files towards the beginning.

Info in this section was a bit outdated. First of all, i3 contains many
more files that were not mentioned. Instead of trying to include
everything, I deleted some files with very obvious descriptions. We can
always re-add something if we want to add more details to it.
2020-05-06 17:25:28 +02:00
Orestis Floros
516363a86b hacking-howto: Mention "stacking" window managers 2020-05-06 17:25:28 +02:00
Orestis Floros
a0ca5ffe70 hacking-howto: Update git section
This still had some leftovers from the patch era. Since git and
specifically GitHub-like developing is much more mainstream now we don't
need to link introductions or even mention the idea of "patching".

The deleted "them" was referencing an old sentence referring to patches,
generated by the git cli. As emailing patches is not common at all for
GitHub repos, I removed the sentence altogether.

Also simplifies the 'branches' subsection a bit. Asking people to verify
their patch on master seems too much preliminary work and I doubt that
anyone does it anyway.
2020-05-06 17:25:28 +02:00
Orestis Floros
4f0a93c3d9 hacking-howto: Update 'build system' section
Mention new --disable flags
2020-05-06 17:25:27 +02:00
Orestis Floros
0963159368 hacking-howto: Normalize code highlighting 2020-05-06 17:25:14 +02:00
Orestis Floros
b8f3c5b284 Re-add v4.18.1 release notes (#4071)
Fixes travis builds on next (non-PR)

Closes #4040
2020-05-05 19:14:04 +02:00
Orestis Floros
6a37114af1 Makefile.am: Use BUILT_SOURCES for GENERATED headers (#4068)
The previous fix when using _DEPENDENCIES was wrong because that
dependency is only created for the final executable. However, the build
fails when building the object file. The manual explicitly mentions that
using _DEPENDENCIES is wrong for source files:
> In rare cases you may need to add other kinds of files such as linker
> scripts, but listing a source file in _DEPENDENCIES is wrong. If some
> source file needs to be built before all the components of a program
> are built, consider using the BUILT_SOURCES variable instead (see
> Sources).
https://www.gnu.org/software/automake/manual/automake.html#Linking

Instead, using BUILT_SOURCES works, as mentioned in the manual.
https://www.gnu.org/software/automake/manual/automake.html#Sources

I have also removed the dependencies from i3_SOURCES since AFAIK
dependencies to header files don't do anything. I have verified that
modifying the header correctly re-triggers the build for i3 &
i3-config-wizard.
> Header files listed in a _SOURCES definition will be included in the
> distribution but otherwise ignored. In case it isn’t obvious, you
> should not include the header file generated by configure in a
> _SOURCES variable; this file should not be distributed. Lex (.l) and
> Yacc (.y) files can also be listed; see Yacc and Lex.
https://www.gnu.org/software/automake/manual/automake.html#Program-Sources

An alternative instead of BUILT_SOURCES that should also work in our
case is found in this section:
https://www.gnu.org/software/automake/manual/automake.html#Built-Sources-Example
see "Recording Dependencies manually". The syntax would be:
    foo.$(OBJEXT): $(config_parser_SOURCES) $(command_parser_SOURCES)
The benefit of this over BUILT_SOURCES is that it will work for targets
other than 'all', 'check' and 'install'. However, since we don't really
have such targets we don't need to do this right now.

Tested extensively using this script:
    #!/bin/bash
    set -x

    autoreconf -fi
    while mkdir build && cd build && ../configure && make -j; do
        cd ..
        rm -rf build
    done

Fixes #3670
2020-05-05 18:13:19 +02:00
Konstantin Kharlamov
666906b517 Makefile.am: make sure i3-config-wizard depends on libi3.a (#4069)
i3-config-wizard uses libi3.a as part of its build process. When
parallel build is enabled, build of i3-config-wizard may start before
libi3.a finished building. Fix this by adding dependency on libi3.a

Fixes: #4020
2020-05-05 18:00:11 +02:00
Orestis Floros
2fb2ef60de travis: Dockerfile: Add build-essential (#4065)
Fixes the recent travis failures
2020-05-05 17:37:32 +02:00
Ingo Bürk
d7d4f0a95b Merge pull request #3969 from ghost/patch-1
clean up math calculating width of last tab
2020-05-01 09:47:25 +02:00
Ingo Bürk
b61a28f156 Merge pull request #4025 from xzfc/always-clear-parent-pixmap
x_draw_decoration: always clear parent pixmap when rendering the first child
2020-05-01 09:46:07 +02:00
Ingo Bürk
e58f104f1e Merge pull request #4051 from orestisfl/format-placeholders
placeholder_t: Make char*s const
2020-05-01 09:43:43 +02:00
Ingo Bürk
151281aaf1 Merge pull request #4050 from orestisfl/config-details-bug-template
Bug template: Add collapsible for config file
2020-05-01 09:40:46 +02:00
Orestis Floros
c6cf0d32b9 placeholder_t: Make char*s const
Similarly to https://github.com/i3/i3status/pull/412
2020-05-01 01:13:12 +02:00
Orestis Floros
5f9cbb12b8 Add RELEASE-NOTES for next release (#4046)
* Add RELEASE-NOTES template for next

The placeholder items are useful instead of having to find the •
character for every new release.

Closes #4040

* Remove leftover bugfix release notes from tree
2020-04-30 21:07:11 +02:00
Orestis Floros
c6b46e1e01 Bug template: Add collapsible for config file
As discussed in #4022
2020-04-30 20:31:26 +02:00
Orestis Floros
eae996c579 Merge pull request #4049 from stapelberg/have
Fix #ifndef statements: HAVE_ variables are all upper case
2020-04-30 18:34:23 +02:00
Michael Stapelberg
5ee7690af3 Fix #ifndef statements: HAVE_ variables are all upper case
The autoconf manual states:

   define HAVE_function (in all capitals) if it is available

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Generic-Functions.html#Generic-Functions

Thanks to @sur5r for the report
2020-04-30 18:20:51 +02:00
Ingo Bürk
10646eb002 Merge pull request #4041 from orestisfl/floating_enable-bool
Only set FLOATING_AUTO_ON when floating_enable succeeds
2020-04-30 09:04:22 +02:00
Ingo Bürk
f1824fd10b Merge pull request #4043 from i3/orestisfl-patch-2
con.c: Reorder use after free
2020-04-30 09:03:43 +02:00
Orestis Floros
0c9c9fb35f con.c: Reorder use after free
This shows up in various static analysis tools. I doubt that it is dangerous in any way but the end result is the same.
2020-04-28 21:41:13 +02:00
Orestis Floros
9c2b8f8b31 Merge pull request #4028 from orestisfl/headers
Header file cleaning
2020-04-28 08:28:00 +02:00
Orestis Floros
5e2f13a28c Only set FLOATING_AUTO_ON when floating_enable succeeds
Fixes #4039

Crash with docking clients where the floating field is set even though
floating_enable refuses to make them floating.

See issue for example with logs.
2020-04-27 13:43:53 +02:00
Ingo Bürk
4d55bba7f8 Merge pull request #4032 from stapelberg/release-sh
release.sh fixes from last release
2020-04-22 11:07:17 +02:00
Michael Stapelberg
8f0b92cae2 release.sh: update versions 2020-04-22 09:33:11 +02:00
Michael Stapelberg
c4ffc0f5e1 release.sh: docker build: use --no-cache
This avoids issues with stale caches. We rather don’t use caching at all:
release.sh is only run once per release.
2020-04-22 09:32:38 +02:00
Michael Stapelberg
f5ab2c919f release.sh: use diff --color
colordiff is no longer necessary, and not installed on many systems.
2020-04-22 09:32:22 +02:00
Michael Stapelberg
f9ed0db694 Update debian/changelog 2020-04-22 09:24:59 +02:00
Michael Stapelberg
dae37a902b Merge branch 'release-4.18.1' 2020-04-22 09:21:15 +02:00
Michael Stapelberg
1e5a022acb Merge branch 'master' into next 2020-04-22 09:21:15 +02:00
Michael Stapelberg
fe3d0b6752 Set non-git version to 4.18.1-non-git. 2020-04-22 09:21:15 +02:00
Michael Stapelberg
10eef6c12d release i3 4.18.1 2020-04-22 09:21:08 +02:00
Heman Gandhi
45468a36f0 Move parent nodes in scratchpad correctly (#3793)
* Move parent nodes in scratchpad across workspaces

Co-Authored-By: Orestis <orestisflo@gmail.com>
2020-04-22 08:57:00 +02:00
Orestis Floros
81671d454e Call cont_child() more liberally (#3996)
Following the reproduction instructions from
https://github.com/i3/i3/issues/3242#issuecomment-436175346

For me, #3242 happened when the following sequence executed:
1. Fullscreening window correctly calls `stop_child()` in
6e24e2ad6f/i3bar/src/xcb.c (L685)
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
6e24e2ad6f/i3bar/src/xcb.c (L1791)
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
6e24e2ad6f/i3bar/src/xcb.c (L677)
because previously `output->visible` was set to `true`

To fix this, I call `cont_child()` more leniently since it is a no-op
when the child is not stopped.

Fixes #3242
Closes #3761
2020-04-22 08:55:41 +02:00
Orestis Floros
ae00468dca Fix load_layout crash when floating node doesn't have CT_FLOATING_CON parent
Fixes #3901
2020-04-22 08:54:55 +02:00
Orestis Floros
d614f26906 Fix SEGFAULT when i3bar receives invalid input
Fixes #3844
2020-04-22 08:54:51 +02:00
Orestis Floros
de0bca6389 Revert "floating_reposition: avoid extra tree_render"
This reverts commit 204eefc679.

workspace_show does not call tree_render
2020-04-22 08:54:40 +02:00
Orestis Floros
fa9e6c2735 Call tree_render if floating move changes workspace
This fixes a bug where moving a floating container with
cmd_move_direction displays a "broken" state if the container crosses
workspace boundaries.
2020-04-22 08:54:36 +02:00
Orestis Floros
20a06462bc Update EWMH properties on workspace move
Closes #3965
Fixes #4001
2020-04-22 08:54:31 +02:00
Orestis Floros
50d2b44325 cmd_focus_sibling: Fix crash on workspace level
Fixes #3997
2020-04-22 08:53:52 +02:00
Orestis Floros
38f28186ec Remove some includes from all.h
Also removes duplicates from other headers

All used std* imports are included once in all.h for easy use

- getopt: Only used in main.c and inject_randr1.5.c
- glob: Not used in i3, only in i3bar & libi3
- inttypes: Only used in util.c
- locale: A bit specific for all.h
- math: Slow according to #4022
- unistd: I feel it's good to explicitly include per file that needs it
- yajl: Specific to yajl_utils.h and ipc.h

Related to #4022

Timing before:

```
Analyzing build trace from ...
**** Time summary:
Compilation (81 times):
  Parsing (frontend):           51.3 s
  Codegen & opts (backend):      7.7 s

**** Files that took longest to parse (compiler frontend):
  1254 ms: build/src/i3-commands.o
   972 ms: build/src/i3-resize.o
   945 ms: build/src/i3-con.o
   921 ms: build/src/i3-scratchpad.o
   907 ms: build/src/i3-main.o
   904 ms: build/src/i3-handlers.o
   904 ms: build/src/i3-config_directives.o
   893 ms: build/src/i3-restore_layout.o
   875 ms: build/src/i3-x.o
   854 ms: build/src/i3-ipc.o

**** Files that took longest to codegen (compiler backend):
   863 ms: build/src/i3-commands.o
   471 ms: build/i3bar/src/i3bar-xcb.o
   377 ms: build/src/i3-con.o
   360 ms: build/src/i3-ipc.o
   306 ms: build/src/i3-x.o
   290 ms: build/src/i3-main.o
   238 ms: build/src/i3-config_parser.o
   237 ms: build/src/i3-handlers.o
   220 ms: build/i3-config-wizard/i3_config_wizard-main.o
   214 ms: build/src/i3-bindings.o

**** Functions that took longest to compile:
   209 ms: main (../../i3/src/main.c)
    95 ms: manage_window (../../i3/src/manage.c)
    57 ms: reconfig_windows (../../i3/i3bar/src/xcb.c)
    55 ms: x_draw_decoration (../../i3/src/x.c)
    49 ms: x_push_node (../../i3/src/x.c)
    48 ms: handle_client_message (../../i3/src/handlers.c)
    48 ms: dump_node (../../i3/src/ipc.c)
    47 ms: GENERATED_call (../../i3/src/config_parser.c)
    45 ms: config_string_cb (../../i3/i3bar/src/config.c)
    44 ms: GENERATED_call (../../i3/src/commands_parser.c)
    42 ms: floating_check_size (../../i3/src/floating.c)
    40 ms: con_swap (../../i3/src/con.c)
    40 ms: parse_config (../../i3/src/config_parser.c)
    39 ms: main (../../i3/i3-nagbar/main.c)
    39 ms: cmd_rename_workspace (../../i3/src/commands.c)
    38 ms: window_update_normal_hints (../../i3/src/window.c)
    38 ms: cmd_swap (../../i3/src/commands.c)
    37 ms: dump_bar_config (../../i3/src/ipc.c)
    36 ms: translate_keysyms (../../i3/src/bindings.c)
    35 ms: tree_close_internal (../../i3/src/tree.c)
    34 ms: match_matches_window (../../i3/src/match.c)
    34 ms: floating_enable (../../i3/src/floating.c)
    34 ms: json_string (../../i3/src/load_layout.c)
    33 ms: x_push_changes (../../i3/src/x.c)
    33 ms: main (../../i3/i3-config-wizard/main.c)
    31 ms: free_configuration (../../i3/src/config.c)
    30 ms: parse_file (../../i3/src/config_parser.c)
    28 ms: load_font (../../i3/libi3/font.c)
    28 ms: handle_configure_request (../../i3/src/handlers.c)
    28 ms: parse_command (../../i3/src/commands_parser.c)

**** Function sets that took longest to compile / optimize:

*** Expensive headers:
29287 ms: ../../i3/include/libi3.h (included 78 times, avg 375 ms), included via:
  i3-resize.o all.h data.h  (576 ms)
  a-g_utf8_make_valid.o  (491 ms)
  a-dpi.o  (491 ms)
  a-get_colorpixel.o  (483 ms)
  a-is_debug_build.o  (478 ms)
  a-strndup.o  (478 ms)
  ...

29221 ms: ../../i3/include/all.h (included 39 times, avg 749 ms), included via:
  i3-resize.o  (946 ms)
  i3-scratchpad.o  (895 ms)
  i3-restore_layout.o  (865 ms)
  i3-handlers.o  (839 ms)
  i3-drag.o  (830 ms)
  i3-config_directives.o  (793 ms)
  ...

5195 ms: /usr/include/xcb/xcb.h (included 79 times, avg 65 ms), included via:
  i3-handlers.o all.h  (113 ms)
  i3-restore_layout.o all.h  (108 ms)
  a-g_utf8_make_valid.o libi3.h  (108 ms)
  i3bar-xcb.o common.h  (105 ms)
  i3-scratchpad.o all.h  (95 ms)
  a-get_colorpixel.o libi3.h  (89 ms)
  ...

4100 ms: /usr/include/math.h (included 41 times, avg 100 ms), included via:
  i3-scratchpad.o all.h  (180 ms)
  i3-fake_outputs.o all.h  (138 ms)
  i3-regex.o all.h  (130 ms)
  i3-restore_layout.o all.h  (128 ms)
  i3-xcb.o all.h  (121 ms)
  i3-move.o all.h  (119 ms)
  ...

4046 ms: ../../i3/i3bar/include/common.h (included 9 times, avg 449 ms), included via:
  i3bar-main.o  (503 ms)
  i3bar-xcb.o  (501 ms)
  i3bar-workspaces.o  (472 ms)
  i3bar-parse_json_header.o  (446 ms)
  i3bar-child.o  (438 ms)
  i3bar-ipc.o  (434 ms)
  ...

2713 ms: ../../i3/include/i3.h (included 41 times, avg 66 ms), included via:
  i3-xcursor.o  (450 ms)
  i3-config_directives.o all.h ipc.h configuration.h  (87 ms)
  i3-config.o all.h ipc.h configuration.h  (71 ms)
  i3-manage.o all.h ipc.h configuration.h  (70 ms)
  i3-window.o all.h ipc.h configuration.h  (68 ms)
  i3-x.o all.h ipc.h configuration.h  (61 ms)
  ...

1492 ms: /usr/include/xcb/xkb.h (included 42 times, avg 35 ms), included via:
  i3-config_directives.o all.h ipc.h configuration.h i3.h  (50 ms)
  i3-config.o all.h ipc.h configuration.h i3.h  (45 ms)
  i3-window.o all.h ipc.h configuration.h i3.h  (43 ms)
  i3-x.o all.h ipc.h configuration.h i3.h  (42 ms)
  i3-manage.o all.h ipc.h configuration.h i3.h  (41 ms)
  i3-config_parser.o all.h ipc.h configuration.h i3.h  (38 ms)
  ...

1432 ms: /usr/include/stdlib.h (included 79 times, avg 18 ms), included via:
  i3-scratchpad.o all.h  (48 ms)
  i3-restore_layout.o all.h  (36 ms)
  i3-regex.o all.h  (32 ms)
  i3-key_press.o all.h  (28 ms)
  i3-commands.o all.h  (28 ms)
  i3-bindings.o all.h  (24 ms)
  ...

1349 ms: /usr/include/pthread.h (included 79 times, avg 17 ms), included via:
  i3bar-xcb.o common.h xcb.h  (33 ms)
  a-ucs2_conversion.o libi3.h xcb.h  (32 ms)
  i3-match.o all.h xcb.h  (27 ms)
  i3-scratchpad.o all.h xcb.h  (25 ms)
  a-g_utf8_make_valid.o libi3.h xcb.h  (25 ms)
  i3_config_wizard-main.o xcb.h  (24 ms)
  ...

1151 ms: /usr/include/X11/Xlib.h (included 45 times, avg 25 ms), included via:
  i3-output.o all.h data.h sn-launcher.h sn-common.h  (50 ms)
  i3-config_parser.o all.h data.h sn-launcher.h sn-common.h  (43 ms)
  i3-x.o all.h data.h sn-launcher.h sn-common.h  (34 ms)
  i3-config_directives.o all.h data.h sn-launcher.h sn-common.h  (32 ms)
  i3_config_wizard-main.o sn-launchee.h sn-common.h  (30 ms)
  i3-drag.o all.h data.h sn-launcher.h sn-common.h  (29 ms)
  ...
```

Timing after:

```
Analyzing build trace from ...
**** Time summary:
Compilation (81 times):
  Parsing (frontend):           47.6 s
  Codegen & opts (backend):      7.6 s

**** Files that took longest to parse (compiler frontend):
  1154 ms: build/src/i3-commands.o
   929 ms: build/src/i3-display_version.o
   852 ms: build/src/i3-bindings.o
   847 ms: build/src/i3-con.o
   806 ms: build/src/i3-ipc.o
   801 ms: build/src/i3-floating.o
   792 ms: build/src/i3-main.o
   792 ms: build/src/i3-drag.o
   792 ms: build/src/i3-window.o
   776 ms: build/src/i3-config_directives.o

**** Files that took longest to codegen (compiler backend):
   885 ms: build/src/i3-commands.o
   422 ms: build/i3bar/src/i3bar-xcb.o
   382 ms: build/src/i3-con.o
   348 ms: build/src/i3-x.o
   288 ms: build/src/i3-ipc.o
   268 ms: build/src/i3-handlers.o
   254 ms: build/src/i3-main.o
   251 ms: build/src/i3-floating.o
   249 ms: build/src/i3-config_parser.o
   194 ms: build/src/i3-randr.o

**** Functions that took longest to compile:
   186 ms: main (../../i3/src/main.c)
    95 ms: manage_window (../../i3/src/manage.c)
    65 ms: floating_check_size (../../i3/src/floating.c)
    63 ms: x_draw_decoration (../../i3/src/x.c)
    58 ms: handle_client_message (../../i3/src/handlers.c)
    55 ms: x_push_node (../../i3/src/x.c)
    54 ms: match_matches_window (../../i3/src/match.c)
    51 ms: parse_config (../../i3/src/config_parser.c)
    49 ms: dump_node (../../i3/src/ipc.c)
    47 ms: reconfig_windows (../../i3/i3bar/src/xcb.c)
    47 ms: config_string_cb (../../i3/i3bar/src/config.c)
    45 ms: GENERATED_call (../../i3/src/config_parser.c)
    45 ms: GENERATED_call (../../i3/src/commands_parser.c)
    43 ms: floating_enable (../../i3/src/floating.c)
    42 ms: handle_configure_request (../../i3/src/handlers.c)
    40 ms: con_swap (../../i3/src/con.c)
    36 ms: main (../../i3/i3-input/main.c)
    36 ms: main (../../i3/i3-msg/main.c)
    36 ms: main (../../i3/i3-nagbar/main.c)
    36 ms: cmd_move_con_to_workspace_number (../../i3/src/commands.c)
    35 ms: json_string (../../i3/src/load_layout.c)
    35 ms: tree_restore (../../i3/src/tree.c)
    35 ms: cmd_swap (../../i3/src/commands.c)
    34 ms: x_push_changes (../../i3/src/x.c)
    32 ms: main (../../i3/i3-config-wizard/main.c)
    32 ms: ewmh_setup_hints (../../i3/src/ewmh.c)
    31 ms: match_parse_property (../../i3/src/match.c)
    30 ms: cmd_mark (../../i3/src/commands.c)
    30 ms: translate_keysyms (../../i3/src/bindings.c)
    30 ms: window_update_normal_hints (../../i3/src/window.c)

**** Function sets that took longest to compile / optimize:

*** Expensive headers:
29596 ms: ../../i3/include/libi3.h (included 78 times, avg 379 ms), included via:
  a-get_config_path.o  (539 ms)
  i3_dump_log-main.o  (522 ms)
  i3_config_wizard-main.o  (501 ms)
  a-fake_configure_notify.o  (500 ms)
  a-root_atom_contents.o  (488 ms)
  i3-display_version.o all.h  (466 ms)
  ...

26054 ms: ../../i3/include/all.h (included 41 times, avg 635 ms), included via:
  i3-display_version.o  (901 ms)
  i3-drag.o  (775 ms)
  i3-ewmh.o  (703 ms)
  i3-startup.o  (693 ms)
  i3-commands.o  (687 ms)
  i3-xcb.o  (680 ms)
  ...

5345 ms: /usr/include/xcb/xcb.h (included 79 times, avg 67 ms), included via:
  i3-display_version.o all.h  (173 ms)
  i3_input-keysym2ucs.o keysym2ucs.h  (106 ms)
  i3-ewmh.o all.h  (106 ms)
  a-fake_configure_notify.o libi3.h  (103 ms)
  a-get_config_path.o libi3.h  (95 ms)
  i3bar-parse_json_header.o common.h  (93 ms)
  ...

4127 ms: ../../i3/i3bar/include/common.h (included 9 times, avg 458 ms), included via:
  i3bar-child.o  (524 ms)
  i3bar-mode.o  (486 ms)
  i3bar-outputs.o  (464 ms)
  i3bar-parse_json_header.o  (463 ms)
  i3bar-config.o  (457 ms)
  i3bar-ipc.o  (448 ms)
  ...

1542 ms: /usr/include/xcb/xkb.h (included 42 times, avg 36 ms), included via:
  i3-con.o all.h ipc.h configuration.h i3.h  (60 ms)
  i3-render.o all.h ipc.h configuration.h i3.h  (56 ms)
  i3-bindings.o all.h ipc.h configuration.h i3.h  (56 ms)
  i3-sighandler.o all.h ipc.h configuration.h i3.h  (48 ms)
  i3-xcb.o all.h ipc.h configuration.h i3.h  (47 ms)
  i3-resize.o all.h ipc.h configuration.h i3.h  (39 ms)
  ...

1456 ms: /usr/include/stdlib.h (included 79 times, avg 18 ms), included via:
  i3-drag.o all.h  (60 ms)
  i3-display_version.o all.h  (55 ms)
  i3-fake_outputs.o all.h  (39 ms)
  i3-config_directives.o all.h  (33 ms)
  i3-xcursor.o all.h  (30 ms)
  i3bar-mode.o common.h libi3.h pango.h pango-attributes.h pango-font.h pango-coverage.h glib-object.h gbinding.h glib.h gasyncqueue.h gthread.h gutils.h  (29 ms)
  ...

1136 ms: /usr/include/X11/Xlib.h (included 44 times, avg 25 ms), included via:
  i3-con.o all.h data.h sn-launcher.h sn-common.h  (35 ms)
  i3-resize.o all.h data.h sn-launcher.h sn-common.h  (34 ms)
  i3-util.o all.h data.h sn-launcher.h sn-common.h  (33 ms)
  i3-assignments.o all.h data.h sn-launcher.h sn-common.h  (33 ms)
  i3-sighandler.o all.h data.h sn-launcher.h sn-common.h  (31 ms)
  i3-xcb.o all.h data.h sn-launcher.h sn-common.h  (31 ms)
  ...

808 ms: /usr/include/stdio.h (included 79 times, avg 10 ms), included via:
  i3-drag.o all.h  (19 ms)
  i3-fake_outputs.o all.h  (18 ms)
  a-font.o libi3.h  (16 ms)
  i3bar-child.o common.h libi3.h  (15 ms)
  a-safewrappers.o libi3.h  (15 ms)
  a-ipc_send_message.o libi3.h  (13 ms)
  ...

770 ms: /usr/include/xcb/randr.h (included 42 times, avg 18 ms), included via:
  i3-click.o all.h data.h  (29 ms)
  i3-commands.o all.h data.h  (27 ms)
  i3-assignments.o all.h data.h  (25 ms)
  i3-xcb.o all.h data.h  (21 ms)
  i3-resize.o all.h data.h  (21 ms)
  i3-sighandler.o all.h data.h  (20 ms)
  ...

688 ms: /usr/include/math.h (included 6 times, avg 114 ms), included via:
  a-dpi.o  (145 ms)
  i3-render.o  (127 ms)
  i3-floating.o  (106 ms)
  a-root_atom_contents.o  (106 ms)
  i3-window.o  (102 ms)
  i3-bindings.o  (99 ms)
  ...
```
2020-04-20 05:54:17 +02:00
Orestis Floros
af7c4ae76b generate-command-parser: Add '#pragma once' 2020-04-20 04:25:45 +02:00
Orestis Floros
2954125324 nagbar: Remove i3-nagbar.h 2020-04-20 04:25:45 +02:00
Orestis Floros
0b62129224 Remove unused headers
With help from
https://github.com/include-what-you-use/include-what-you-use/
2020-04-20 04:25:06 +02:00
Orestis Floros
3c522d9f2f Sort includes in *.c files
Not enabling in .clang-format because it breaks headers files.

Used:
    IncludeCategories:
      - Regex:           '^<config'
        Priority:        0
      - Regex:           '^".*"'
        Priority:        1
      - Regex:           '^<(xcb|xkb|yajl|X11)'
        Priority:        3
      - Regex:           '.*'
        Priority:        2
2020-04-19 09:58:25 +02:00
Albert Safin
7419400a8d x_draw_decoration: always clear parent pixmap when rendering the first child
Previously, i3 used to clean the parent pixmap only if the first child
has a titlebar.

This worked well for case `V[a b]` when both `a` and `b` have titlebars
(clearing is required), or both haven't (clearing is not required).
However, in case if `a` has no titlebar, but `b` has, this could lead
to graphical glitches.

This commit rearranges the order of conditions to make sure that the
parent pixmap is cleared regardless of the border style of the first
child.
2020-04-18 04:21:16 +00:00
Ingo Bürk
0bce0d86bf Merge pull request #4018 from orestisfl/reorder-docks
Sort dock clients by class and instance
2020-04-15 08:36:10 +02:00
Orestis Floros
7df88f18eb Sort dock clients by class and instance
This is similar to #3820 but does not use qsort but an insertion sort in
con_attach.

Since each bar block automatically gets its own incremental bar id,
bards end up being sorted according to their definition order in the
config file.

For i3bar, the WM_CLASS is modified to include an instance name which
depends on the bar_id. This could be useful for other reason, e.g. users
targeting a specific bar instance.

Fixes #3491
2020-04-14 20:47:51 +02:00
Orestis Floros
4212fb6488 i3bar: Set WM_CLASS instance to bar_id 2020-04-14 20:46:49 +02:00
Orestis Floros
831a52de9a Move content for non-existing output containers (#3767)
Probably fixes various related issues:
Closes #2276
Closes #2459
Closes #2936
Closes #3766

Tested using
bindsym $mod+Shift+i exec xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-I-1 --off, restart

The core issue here is that the JSON read during a restart might contain
invalid outputs when the new process is done reading it.
2020-04-12 13:52:05 +02:00
Orestis Floros
ae757c6848 Extend tiling/floating criteria with optional auto/user values (#4006)
The default `tiling` and `floating` behavior is preserved and matches
both cases.

Adds a new handler to `remanage_window` on A_I3_FLOATING_WINDOW change.

Mainly in order to `run_assignments`, this makes `for_window [floating]`
directives to work for windows which where initially opened as tiling.
Now, when floating is enabled, `for_window` will trigger correctly. Same
applies to `for_window [tiling]`.

The obvious solution of `run_assignments` after
`floating_{enable,disable}` doesn't work because `run_assignments`
modifies the parser state in src/assignments.c:51.

Fixes #3588

Co-Authored-By: Michael Stapelberg <michael@stapelberg.de>
2020-04-12 13:49:08 +02:00
Michael Stapelberg
e7191af8b3 pod2html: render without stylesheet by default (#4016)
fixes #3956
2020-04-12 11:07:43 +02:00
Ingo Bürk
46e940efba Merge pull request #4013 from orestisfl/i3-dmenu-desktop-symlinks
i3-dmenu-desktop: Support symlinks
2020-04-12 09:15:40 +02:00
Ingo Bürk
adbef0c7e7 Merge pull request #4015 from orestisfl/layout-restore-crash-floating
Fix load_layout crash when floating node doesn't have CT_FLOATING_CON parent
2020-04-12 09:12:16 +02:00
Orestis Floros
a87e8c8d5b Fix load_layout crash when floating node doesn't have CT_FLOATING_CON parent
Fixes #3901
2020-04-12 00:48:01 +02:00
Orestis Floros
3a672bc930 i3-dmenu-desktop: Support symlinks
follow_fast is passed to find() in order to support this. Since we check
ourselves for duplicates, the fast option can be used.

Fixes #3973
2020-04-11 22:57:29 +02:00
Ingo Bürk
62279aba45 Merge pull request #4005 from orestisfl/route_click_clutter
route_click readability improvements
2020-04-11 19:51:00 +02:00
Ingo Bürk
f4b1da7f23 Merge pull request #4011 from orestisfl/floating_reposition-needs_tree_render
Call tree_render if floating move changes workspace
2020-04-11 19:50:14 +02:00
Ingo Bürk
93bb2022bb Merge pull request #4012 from orestisfl/floating_maybe_reassign_ws_focus
floating_maybe_reassign_ws: only re-focus if previously focused
2020-04-11 19:49:53 +02:00
Ingo Bürk
e47d5f6a3e Merge pull request #4008 from orestisfl/limit-run_command-LOG
Limit log length with IPC commands
2020-04-11 19:49:24 +02:00
Ingo Bürk
1e9fbd7186 Merge pull request #4010 from orestisfl/trailing-whitespace-log
Fix trailing whitespace in a DLOG
2020-04-11 19:49:05 +02:00
Orestis Floros
5eab604a10 floating_maybe_reassign_ws: only re-focus if previously focused
Fixes #3979
2020-04-11 11:10:51 +02:00
Orestis Floros
755d306df3 Revert "floating_reposition: avoid extra tree_render"
This reverts commit 204eefc679.

workspace_show does not call tree_render
2020-04-11 11:08:55 +02:00
Orestis Floros
bb8f2927ae Call tree_render if floating move changes workspace
This fixes a bug where moving a floating container with
cmd_move_direction displays a "broken" state if the container crosses
workspace boundaries.
2020-04-11 10:52:35 +02:00
Orestis Floros
e4cfb80a05 Fix trailing whitespace in a DLOG 2020-04-11 10:10:44 +02:00
Orestis Floros
964456b628 Limit log length with IPC commands
Fixes #3525
2020-04-10 16:59:46 +02:00
Orestis Floros
57a37f8af4 run_command: Update outdated docstring 2020-04-10 16:41:36 +02:00
Heman Gandhi
b247896a75 Move parent nodes in scratchpad correctly (#3793)
* Move parent nodes in scratchpad across workspaces

Co-Authored-By: Orestis <orestisflo@gmail.com>
2020-04-10 16:27:40 +02:00
Ingo Bürk
e2b2a28625 Merge pull request #4004 from orestisfl/i3bar-segfault
Fix SEGFAULT when i3bar receives invalid input
2020-04-10 14:00:51 +02:00
Ingo Bürk
312d3dfbd3 Merge pull request #4003 from orestisfl/update_desktop_properties_on_move
Update EWMH properties on workspace move
2020-04-10 14:00:26 +02:00
Ingo Bürk
1e6b510497 Merge pull request #4002 from orestisfl/DLOG_CHILD
i3bar: Add a macro to log child info
2020-04-10 13:59:55 +02:00
Michael Stapelberg
960df0dbfc Makefile: add bear target for using clangd/ccls language servers (#3953)
After installing clangd and/or ccls (Emacs eglot defaults to ccls),
run e.g. make bear -j32 and restart your editor (or just its language server).
2020-04-10 12:26:03 +02:00
Orestis Floros
58d383b1a0 route_click: Remove condition that is always true
For reference:
typedef enum { CLICK_BORDER = 0,
               CLICK_DECORATION = 1,
               CLICK_INSIDE = 2 } click_destination_t;
2020-04-10 12:24:18 +02:00
Orestis Floros
07c7384272 route_click: Add some const bools for readability 2020-04-10 12:22:24 +02:00
Orestis Floros
b401cc994b Merge pull request #3954 from xzfc/floating-tiling-resize
Make floating-tiling resize code consistent with plain tiling resize
2020-04-10 12:17:26 +02:00
Orestis Floros
59108ec299 Merge pull request #3816 from sandsmark/martin/empty-matches
Match empty window properties (e. g. no title set) #3308
2020-04-10 11:44:46 +02:00
Orestis Floros
91ec14f2bc Fix SEGFAULT when i3bar receives invalid input
Fixes #3844
2020-04-10 11:38:19 +02:00
Orestis Floros
ed67eaca2c Update EWMH properties on workspace move
Closes #3965
Fixes #4001
2020-04-10 04:40:11 +02:00
Orestis Floros
c46fdc8363 Merge pull request #3995 from xzfc/refactor-property-handlers
Refactor property handlers
2020-04-10 03:58:12 +02:00
Orestis Floros
40697a233c i3bar: Add a macro to log child info
Mentioned in #3242
2020-04-10 03:22:34 +02:00
Ingo Bürk
c611b9e0e0 Merge pull request #4000 from orestisfl/revert-3983-resize-behind-fullscreen
Correctly handle mouse resize in fullscreen containers
2020-04-09 16:41:43 +02:00
Orestis Floros
6fa2cd32a0 handle_button_press and route_click do not need to return int 2020-04-09 16:16:30 +02:00
Orestis Floros
93e96f4e6b Do not propagate $mod+right click to clients 2020-04-09 16:08:41 +02:00
Orestis Floros
b590ca076c Avoid resizing fullscreen container with non-fullscreen
Another option is to modify resize_find_tiling_participants but this
would also affect resizing of tiling containers in scripts, so I chose
to make this change specific to resizing with the mouse.

Follow-up after #3983
Fixes #3980
2020-04-09 15:49:09 +02:00
Orestis Floros
4922b245c1 Revert "Avoid resizing fullscreen container"
This reverts commit 1a2882d740.

As mentioned in
https://github.com/i3/i3/issues/3980#issuecomment-611515497, this
disables resizing children of fullscreen containers.
2020-04-09 15:11:46 +02:00
Ingo Bürk
26cbca3d27 Merge pull request #3999 from orestisfl/cmd_focus_sibling_workspace_crash
cmd_focus_sibling: Fix crash on workspace level
2020-04-09 11:47:32 +02:00
Orestis Floros
4b4f1f604f cmd_focus_sibling: Fix crash on workspace level
Fixes #3997
2020-04-09 11:29:14 +02:00
Orestis Floros
016d4a3f45 Call cont_child() more liberally (#3996)
Following the reproduction instructions from
https://github.com/i3/i3/issues/3242#issuecomment-436175346

For me, #3242 happened when the following sequence executed:
1. Fullscreening window correctly calls `stop_child()` in
6e24e2ad6f/i3bar/src/xcb.c (L685)
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
6e24e2ad6f/i3bar/src/xcb.c (L1791)
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
6e24e2ad6f/i3bar/src/xcb.c (L677)
because previously `output->visible` was set to `true`

To fix this, I call `cont_child()` more leniently since it is a no-op
when the child is not stopped.

Fixes #3242
Closes #3761
2020-04-09 10:43:48 +02:00
Albert Safin
d9d366a656 handlers.c: cb_property_handler_t: take Con instead of xcb_window_t
Since every handler calls con_by_window_id() and checks for NULL, it is
better to move this call into property_notify().
2020-04-08 08:37:40 +00:00
Albert Safin
e03fdef3e5 handlers.c: property_notify(): DLOG and return in case of an error 2020-04-08 08:37:40 +00:00
Albert Safin
5716ff541f handlers.c: remove redundant property fetching
Some property handlers trying to fetch property again if `prop == NULL`.
This is redundant since these properties are either fetched by
property_notify() just before or deleted.
2020-04-08 08:37:40 +00:00
Albert Safin
148ff54f18 handlers.c: remove unused arguments from cb_property_handler_t
Also, use `conn` global variable instead of passing it as an argument.
2020-04-08 08:02:17 +00:00
Orestis Floros
6e24e2ad6f Merge pull request #3985 from orestisfl/userguide-button6-7
userguide: Add button{6,7}
2020-04-07 20:20:00 +02:00
Orestis Floros
f3762cd041 userguide: Add button{6,7}
Related to #3984
2020-04-07 20:10:29 +02:00
Ingo Bürk
47732a4d9b Merge pull request #3994 from stapelberg/lintian
check-spelling: update to new Lintian::Profile API
2020-04-07 17:47:46 +02:00
Michael Stapelberg
72a6ad2013 check-spelling: update to new Lintian::Profile API
This changed between Lintian 2.62.0 and 2.64.0.
2020-04-07 17:41:56 +02:00
Ingo Bürk
cf505eaea8 Merge pull request #3983 from orestisfl/resize-behind-fullscreen
Avoid resizing fullscreen container
2020-03-31 09:52:46 +02:00
Orestis Floros
1a2882d740 Avoid resizing fullscreen container
Fixes #3980
2020-03-31 08:52:53 +02:00
Ingo Bürk
164336099d Merge pull request #3970 from ianyfan/ipc
ipc: always include marks property in TREE reply
2020-03-09 13:01:11 +01:00
Ian Fan
d02cda4241 ipc: always include marks property in TREE reply 2020-03-07 11:12:47 +00:00
6144
1d422dfc3a clean up math calculating width of last tab. 2020-03-07 09:05:41 +01:00
Ingo Bürk
cae3b294ad Merge pull request #3964 from ammgws/_PATH_BSHELL
Use _PATH_BSHELL in nagbar script as well
2020-03-01 08:28:28 +01:00
Jason Nader
9a3318b622 Fix error message 2020-03-01 13:25:42 +09:00
Jason Nader
191c394db8 Use _PATH_BSHELL in nagbar script as well 2020-03-01 12:46:30 +09:00
Ingo Bürk
d2acdcc69f Merge pull request #3960 from ammgws/patch-2
Remove comment referencing old source code
2020-03-01 01:29:30 +01:00
Ingo Bürk
daa2ea0d05 Merge pull request #3961 from ammgws/patch-1
i3-nagbar: Use _PATH_BSHELL
2020-03-01 01:28:57 +01:00
Jason
5024a13b8b Remove comment referencing old source code
Behaviour was changed in f691a55923
2020-03-01 05:03:41 +09:00
Jason
a516bdbb92 Use _PATH_BSHELL
Possibly overlooked in f691a55923850a4d315450925fc98733d07b69c9?
2020-03-01 04:53:35 +09:00
xzfc
47be36410c Assume xcb_cursor_context_new never fails (#3955)
According to libxcb-cursor code, the only condition in which
xcb_cursor_context_new() returns a non-zero result is a memory
allocation failure[1].  Thus, it is safe to assume that
xcursor_supported is always true, and remove dead code.

[1]: https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/blob/0.1.3/cursor/cursor.c#L131-132
2020-02-24 08:48:58 +01:00
Albert Safin
d36829d6e2 Make floating-tiling resize code consistent with plain tiling resize
Now dragging an inner border of a floating split triggers a tiling
resize (as expected) instead of a floating resize.
2020-02-22 23:35:55 +00:00
Michael Stapelberg
0ba325c5f3 Makefile.am: respect configure --program-suffix (#3944)
related to #3838
2020-02-22 13:47:49 +01:00
Joseph
967ec2e0ea Fix test case 180-fd-leaks when running on Fedora (#3911) 2020-02-22 10:09:11 +01:00
Orestis Floros
a376d1e52f Merge pull request #3950 from xzfc/small-fixes
Small fixes
2020-02-21 19:01:40 +01:00
Ingo Bürk
c5d50ac5fd Merge pull request #3951 from txtor/next
typo
2020-02-21 10:59:35 +01:00
Francesc Hervada-Sala
80f9bb6dbe typo 2020-02-21 10:53:02 +01:00
Albert Safin
b98b055459 i3 --moreversion: erase the line before writing over
The trailing part of the line (`abort…)`) has often been appearing in
bug reports.
2020-02-21 02:07:23 +00:00
Albert Safin
83c7aff089 Limit workspace numbers within 0..INT32_MAX
Before this commit, large workspace numbers treated oddly:

   $ i3-msg 'rename workspace to 1234567890'
   # displayed in i3bar as `0`

   $ i3-msg 'rename workspace to 4294967200'
   $ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
   -96 # int32_t overflow

   $ i3-msg 'rename workspace to 99999999999999999999'
   $ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
   -1 # treated as unnumbered

This commit puts a consistent limit on workspace numbers.  Now
workspaces with numbers beyond INT32_MAX are treated as unnumbered.
2020-02-21 02:07:04 +00:00
Albert Safin
d3976fee8c Code style: fix misaligned and trailing whitespaces 2020-02-21 02:06:48 +00:00
Orestis Floros
854885ea9d Merge pull request #3949 from xzfc/overlap
Sanitize window dimensions and handle decoration overlap
2020-02-19 11:41:58 +01:00
Albert Safin
670c23600f Decoration click/mouse move: iterate children in reverse order
In the case of decoration overlap, we should handle the one that is
drawn on top, i.e., the last one.
2020-02-19 11:33:49 +01:00
Albert Safin
e6ca7ca06f Sanitize con and window rect dimensions
Make sure they're neither zero (prohibited by X11) nor overflown during
subtraction.
2020-02-19 11:33:49 +01:00
xzfc
1f0c628cde clang-format: bring back ForeachMacros (#3948)
* clang-format: bring back ForeachMacros

ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.

* Add curly braces

Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2020-02-19 11:31:09 +01:00
Ingo Bürk
e3f120c0b6 Merge pull request #3946 from phy1729/i3bar_command-exec
Prepend "exec " to default i3bar_command
2020-02-18 09:16:27 +01:00
Ingo Bürk
13ca970bfe Merge pull request #3945 from stapelberg/deps
Makefile.am: i3-config-wizard: add dependency on config parser
2020-02-18 09:16:06 +01:00
Michael Stapelberg
12095103fa Makefile.am: i3-config-wizard: add dependency on config parser
fixes #3670
2020-02-17 21:49:47 +01:00
Michael Stapelberg
30e886b031 debian: update changelog 2020-02-17 18:31:40 +01:00
Michael Stapelberg
b2c25cec54 Update debian/changelog 2020-02-17 18:27:46 +01:00
Michael Stapelberg
0dd60756af Merge branch 'release-4.18' 2020-02-17 18:27:46 +01:00
Michael Stapelberg
53718d354b Merge branch 'next' into master 2020-02-17 18:27:46 +01:00
Michael Stapelberg
949aff3016 Set non-git version to 4.18-non-git. 2020-02-17 18:27:46 +01:00
Michael Stapelberg
9929949d26 release i3 4.18 2020-02-17 18:27:38 +01:00
Ingo Bürk
2914c7fb43 Merge pull request #3942 from stapelberg/iconv
configure.ac: test for iconv_open with #include <iconv.h>
2020-02-16 18:50:54 +01:00
Michael Stapelberg
91b00c5605 configure.ac: test for iconv_open with #include <iconv.h>
The previously used AC_SEARCH_LIBS uses AC_LANG_CALL, which is discouraged
because it intentionally violates the C type system: it has no way of specifying
function parameters, so it does not include the required headers to suppress
type warnings:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Generating-Sources.html

The new code does what AC_SEARCH_LIBS does, but uses AC_LANG_PROGRAM instead of
AC_LANG_CALL. It explicitly includes iconv.h and calls iconv_open with the
correct number and type of arguments.

This fixes compilation on systems where libiconv’s iconv.h is discovered first,
but glibc also provides iconv. Previously, this would result in configure
discovering glibc’s iconv, and make failing to compile because -liconv wasn’t
specified, but iconv.h pulled in libiconv.
2020-02-16 18:38:44 +01:00
Michael Stapelberg
f517b5aa57 Merge pull request #3918 from orestisfl/fno-common
Fix fno-common problems with gcc10
2020-02-15 12:25:58 +01:00
Ingo Bürk
c3bf7288b3 Merge pull request #3928 from Iskustvo/improve_window_properties_documentation
Improved documentation for "window_properties" field in GET_TREE reply.
2020-02-11 09:06:55 +01:00
Iskustvo
36a8bc6463 Improved documentation for "window_properties" field in GET_TREE reply. 2020-02-08 11:41:48 +01:00
Ingo Bürk
4338c3ea55 Merge pull request #3931 from acheronfail/chore/add-docs-for-window-type
docs: add window_type to ipc documentation
2020-02-07 10:44:42 +01:00
acheronfail
a1736f4df6 docs: add window_type to ipc documentation 2020-02-07 19:50:23 +11:00
Orestis Floros
b9b0774733 Merge pull request #3926 from stapelberg/next
configure: deal with git worktree checkouts, where .git is a file
2020-02-02 13:12:20 +01:00
Michael Stapelberg
2edae71570 configure: deal with git worktree checkouts, where .git is a file
fixes #3013
2020-02-02 11:17:02 +01:00
Orestis Floros
cb1012e608 Travis: Default to -fno-common
See #3914
2020-02-01 17:41:19 +01:00
Orestis Floros
2eac53fada atoms: Properly declare as global variables
See #3914
2020-02-01 17:34:01 +01:00
Orestis Floros
d14e59b3a7 i3bar: Make header declarations extern
See #3914
2020-02-01 17:33:53 +01:00
Orestis Floros
e9f011397a libi3: Make visual_type extern
See #3914
2020-02-01 17:32:54 +01:00
Orestis Floros
d11e862919 Delete duplicate definition of ewmh_window
See #3914
2020-02-01 17:32:53 +01:00
Matthew Martin
a2cba79f9c Prepend "exec " to default i3bar_command
Avoids leaving around a useless shell process.
2020-01-30 21:02:50 -06:00
Ingo Bürk
fc01ece365 Merge pull request #3909 from orestisfl/bug-3903
Do not error on exec not matching a container
2020-01-18 17:42:17 +01:00
Orestis Floros
f76b11327f Do not error on exec not matching a container
See #3903, #3905
2020-01-18 11:09:14 +01:00
Ingo Bürk
110bdcbee5 Merge pull request #3905 from Airblader/bug-3903
Respect match criteria for exec command
2020-01-16 22:19:25 +01:00
Ingo Bürk
f002584509 Respect match criteria for exec command
We currently do not evaluate match criteria for the exec command
since generally executing the same command multiple times is
unlikely to make sense.

However, it does make sense when the match is empty and this should
prevent the command from running, which currently does not happen.

For consisteny we execute the command as many times as there are
matched criteria, but print a warning if it matches more than one
container.

fixes #3903
2020-01-16 22:07:37 +01:00
Ingo Bürk
b3faf9fca9 Merge pull request #3906 from orestisfl/exit_codes
Exit codes
2020-01-16 09:47:54 +01:00
Orestis Floros
0ed94fc788 Use EXIT_SUCCESS/FAILURE instead of 0/1 2020-01-16 09:27:05 +01:00
Orestis Floros
f7aee6b908 Exit with success on -h 2020-01-16 09:21:16 +01:00
Ingo Bürk
d21c3a09f4 Merge pull request #3898 from dvarrazzo/socket-dir-docs
Fixed location of the IPC socket in the docs
2020-01-09 12:47:39 +01:00
Daniele Varrazzo
ddb5075399 Fixed location of the IPC socket in the docs 2020-01-08 17:59:37 +00:00
Ingo Bürk
dab223cabc Merge pull request #3894 from Iskustvo/extend_GET_WORKSPACES_response
Extended GET_WORKSPACE response with workspace ID.
2020-01-08 09:21:50 +01:00
Iskustvo
5835bbc385 Added workspace ID in GET_WORKSPACES response. 2020-01-08 09:07:53 +01:00
Martin T. H. Sandsmark
afab4d6789 Allow matching on empty properties (class, title, etc.)
Fixes #3308
2019-12-25 15:42:47 +01:00
Michael Stapelberg
d341b91b0a Merge pull request #3824 from orestisfl/ac_replace_funcs
Use AC_REPLACE_FUNCS
2019-12-25 12:27:21 +01:00
Ingo Bürk
50cd151523 Merge pull request #3868 from ben4ever/patch-1
userguide: Add missing anchor
2019-12-04 13:25:52 +01:00
Benjamin Dopplinger
314509d7d4 userguide: Add missing anchor 2019-12-04 21:02:01 +11:00
Ingo Bürk
8fdc38d25f Merge pull request #3797 from acheronfail/feat/add-window-type-ipc
feat: add window_type to ipc response
2019-11-29 08:16:57 +01:00
Ingo Bürk
1679bcc89a Merge pull request #3871 from geshido/ipc-marks-in-get-tree-reply
added marks field to get_tree reply in ipc documentation
2019-11-28 11:36:54 +01:00
Yury Ignatev
7427d61f7f added marks field to get_tree reply in ipc documentation 2019-11-28 16:17:23 +07:00
Ingo Bürk
71b82fa3b8 Merge pull request #3872 from stapelberg/spelling
travis/check-spelling.pl: check_spelling moved to Lintian::Spelling
2019-11-28 08:55:46 +01:00
Michael Stapelberg
f01a75cee8 travis/check-spelling.pl: check_spelling moved to Lintian::Spelling 2019-11-28 08:51:26 +01:00
Ingo Bürk
9a3eb4fc71 Merge pull request #3841 from DamienCassou/fix-pango-markup-url
Documentation: fix links pointing to Pango markup
2019-10-22 07:56:41 +02:00
Damien Cassou
b8de4bccd2 Documentation: fix links pointing to Pango markup 2019-10-22 06:45:40 +02:00
Ingo Bürk
7330778223 Merge pull request #3840 from orestisfl/unused-parameters
Remove various unused parameters
2019-10-21 08:41:26 +02:00
Orestis Floros
17d0cd7034 Remove various unused parameters 2019-10-20 16:14:20 +03:00
Orestis
428cb94e29 Merge pull request #3839 from orestisfl/remanage_window-crash
remanage_window: avoid crash when nc->window == NULL
2019-10-18 16:51:42 +03:00
Orestis Floros
812507c4a1 remanage_window: avoid crash when nc->window == NULL
Temporary solution until we find the root cause. Not that it is a bad
idea to check for NULL either way.

Related to #3731
2019-10-18 11:58:08 +03:00
Ingo Bürk
6011e245e9 Merge pull request #3835 from orestisfl/tree_flatten_crash
Fix crash with moving container that is to be flattened
2019-10-18 09:24:32 +02:00
Ingo Bürk
cb535a4267 Merge pull request #3837 from orestisfl/scratchpad-fullscreen
scratchpad_move: un-fullscreen correct container
2019-10-18 09:22:39 +02:00
Orestis Floros
95d4ce3ed6 scratchpad_move: un-fullscreen correct container
Fixes https://github.com/i3/i3/issues/2857#issuecomment-496264445
2019-10-17 18:14:21 +03:00
Ingo Bürk
879fd6c08b Merge pull request #3836 from orestisfl/userguide
userguide: Remove mention of config directives with 'command equivalents'
2019-10-17 12:06:46 +02:00
Orestis Floros
72765bbb94 userguide: Remove mention of config directives with 'command equivalents'
See #3657
2019-10-17 12:56:29 +03:00
Orestis
9138bb37f1 Merge pull request #3834 from Airblader/bug-3819
Reparent windows to their current position on unmanage
2019-10-16 10:42:35 +03:00
Ingo Bürk
9118ee6029 Merge pull request #3833 from orestisfl/move-to-position+scratchpad
Do not show scratchpad windows after 'move to position'
2019-10-16 09:06:05 +02:00
Orestis Floros
359d75cd3c Fix crash with moving container that is to be flattened
Same can happen with move_to_output_directed but it is not so easy to
write a test about it.

Fixes #3831
2019-10-16 01:32:05 +03:00
Ingo Bürk
1b3d8650a7 Reparent windows to their current position on unmanage
When unmanaging a window we need to reparent it back to the root
window. With this patch we do so at the current position of the
container such that we don't throw away the geometry position.

This fixes cases where clients withdraw a window and reparent it
later on, expecting to keep the same geometry (in particular dock
clients) but then end up on a wrong output.

fixes #3819
2019-10-15 22:32:48 +02:00
Orestis Floros
b48ff2c5ec Do not show scratchpad windows after 'move to position'
Fixes #3832
2019-10-15 18:40:59 +03:00
Ingo Bürk
cb9620c60a Merge pull request #3407 from orestisfl/tree_next
tree_next refactor & enhancements
2019-10-15 13:47:24 +02:00
Ingo Bürk
ebb8d89021 Merge pull request #3830 from orestisfl/i3bar-leak
Fix i3bar leak on handle_destroy_notify
2019-10-15 12:50:28 +02:00
Orestis Floros
33634fbacd Fix i3bar leak on handle_destroy_notify 2019-10-14 17:34:38 +03:00
Ingo Bürk
a638e0408e Merge pull request #3829 from orestisfl/move_to_mark_focus
_con_move_to_con: focus_next only if in different workspaces
2019-10-14 15:27:13 +02:00
Orestis Floros
2821270949 _con_move_to_con: focus_next only if in different workspaces 2019-10-14 15:38:44 +03:00
Orestis Floros
24a58d2952 Implement focus_wrapping workspace
I had a dilemma about the behaviour here:
1. Prohibit focus leaving the workspace in any case unless if
get_tree_next's initial argument is a workspace. This is what this
commit does (also i3-cycle).
2. Leave the workspace if no warp is possible (eg workspace with single
container or `focus right` with `V[a b c*]`).

Fixes #2180
2019-10-14 13:02:33 +03:00
Ingo Bürk
9c408396d9 Merge pull request #3828 from orestisfl/i3-nagbar
Minor i3-nagbar changes
2019-10-14 11:45:40 +02:00
Orestis Floros
ffde51e50f i3-nagbar: Fix small leak 2019-10-14 12:26:10 +03:00
Orestis Floros
a3f94783e5 i3-nagbar: get_window_position: Improve logging 2019-10-14 12:26:04 +03:00
Orestis Floros
b1723f0549 i3-nagbar: Don't use DLOG
debuglog() is empty and no option to enable it exists
2019-10-14 12:24:30 +03:00
Ingo Bürk
3127a94c0d Merge pull request #3827 from orestisfl/i3bar-leak
Fix small leak in i3bar's main
2019-10-14 09:54:32 +02:00
Orestis Floros
ee30c34b5c Fix small leak in i3bar's main
If -s is used, the socket_path returned by getenv is never freed.

Also some small rearrangements.
2019-10-14 03:54:48 +03:00
Orestis Floros
bbc4c99c72 Refactor tree_next
- Makes `tree_next` not recursive.
- Adds `focus next|prev [sibling]` command. See (1.) and (2.) in
https://github.com/i3/i3/issues/2587#issuecomment-378505551 (Issue also
requests move command, not implemented here).
- Directional focus command now supports command criteria.

Wrapping is not implemented inside a floating container. This was also
true before the refactor so I am not changing it here.
2019-10-14 03:31:24 +03:00
Orestis Floros
f402f45702 Introduce CMD_FOCUS_WARN_CHILDREN 2019-10-14 02:38:53 +03:00
Orestis Floros
1e8e4d3e7f Introduce direction / orientation / position conversion functions 2019-10-14 02:38:53 +03:00
Orestis Floros
e5c430e419 tree_move: Use direction_t 2019-10-14 02:31:11 +03:00
Orestis Floros
0cd7250f41 Add testcases/t/308-focus_wrapping.t
These tests pass with and without the following refactoring.
2019-10-14 02:30:06 +03:00
Orestis Floros
b0d6f44779 Use AC_REPLACE_FUNCS
strndup is removed from AC_CHECK_FUNCS since it will be provided if not
found.

Fixes #2610
2019-10-13 13:17:40 +03:00
Orestis Floros
70c850ac13 Remove memmem implementation
Not used after 3bd5e6e5c8
2019-10-13 13:10:06 +03:00
Ingo Bürk
5f54971425 Merge pull request #3821 from orestisfl/deterministic_tray_icon_order
reorder_trayclients_cmp: Correct comment
2019-10-11 18:43:38 +02:00
Orestis Floros
98d96c3a2c reorder_trayclients_cmp: Correct comment 2019-10-11 19:32:58 +03:00
Ingo Bürk
8088c357e4 Merge pull request #3820 from orestisfl/deterministic_tray_icon_order
Deterministic tray icon order
2019-10-11 17:37:42 +02:00
Orestis Floros
eda814755a Make tray icon order deterministic
Fixes #3573
2019-10-11 18:25:22 +03:00
Orestis Floros
d5a3b8af02 Introduce trayclient_and_output_from_window
Saves some code repetition
2019-10-11 16:12:48 +03:00
Orestis
0b4d4e799b Merge pull request #3817 from orestisfl/rect
Remove outdated comment from Rect
2019-10-09 16:12:40 +03:00
Orestis Floros
961f98eb15 Remove outdated comment from Rect
This has changed after #3787.

The packed attribute was added in
75aac5bc02 for _NET_WORKAREA. However,
eec80838ab removed _NET_WORKAREA support.
I did some quick greping for `memcpy.+Rect` and didn't find any similar
code that could theoretically lead to problems.
2019-10-09 16:08:18 +03:00
Ingo Bürk
736ac40b10 Merge pull request #3814 from orestisfl/net_active_fullscreen
handlers.c: new focus should not end up behind fullscreen
2019-10-09 13:25:38 +02:00
Orestis
5e1094e994 Merge pull request #3815 from xzfc/3694-baf-rename
When renaming a workspace, update the previous_workspace_name too
2019-10-09 12:38:48 +03:00
Orestis
ea216f88d8 Merge pull request #3559 from xzfc/3555-drag-threshold
Drag threshold
2019-10-09 12:38:30 +03:00
Albert Safin
7e4eb51d23 When renaming a workspace, update the previous_workspace_name too
Fixes #3694
2019-10-09 08:09:24 +00:00
Orestis Floros
6f82d21c39 handlers.c: new focus should not end up behind fullscreen
This was raised here:
https://www.reddit.com/r/i3wm/comments/df18aa/popup_during_fullscreen_not_behaving_the_way_i/

With this commit, _NET_ACTIVE_WINDOW requests are more similar to
focusing with cmd_focus.
2019-10-09 02:38:40 +03:00
Orestis Floros
34c217acc8 Introduce con_activate_unblock 2019-10-09 02:31:52 +03:00
Orestis
465447a96b Merge pull request #3812 from xzfc/move-to-parent
Fix "move con to parent" trick
2019-10-08 11:54:40 +03:00
Albert Safin
beb96ad18c Move container to marked workspace: refine corner case
This commit should fix "move con to parent" trick (see below) in the
case when con->parent->parent is a workspace.

The trick:

    mark _a, focus parent, focus parent, mark _b,
    [con_mark=_a] move window to mark _b, [con_mark=_a] focus

The trick got broken in commit 626af81232
in order to fix an i3 crash (#2003).  Reverting said commit fixes the
trick.  The crash is caused by the fact that empty workspace isn't
considered a split (checked in src/con.c:1324), so the moved window ends
up as a sibling of the target workspace, not as its child.
2019-10-07 18:15:03 +00:00
Ingo Bürk
ba0868e593 Merge pull request #3728 from cdlscpmv/next
Add setting for minimal width of workspace buttons
2019-10-06 00:22:44 +02:00
Albert Safin
371dc23101 Tiling resize drag: use threshold 2019-10-03 06:09:57 +00:00
Albert Safin
c6b56b09ab Floating move drag: use threshold 2019-10-03 06:09:57 +00:00
Albert Safin
551ec20941 drag_pointer(): add use_treshold parameter 2019-10-03 06:09:57 +00:00
Albert Safin
2795c51d4b drag_pointer(): drop unused parameter border 2019-10-03 06:05:34 +00:00
Albert Safin
454473ac6c Move drag_pointer() to its own source file
Move drag_pointer() and related definitions from floating.c to new file
drag_pointer.c since it's applicable not only to floating windows but
also to resizing of tiled windows.
2019-10-03 06:05:34 +00:00
Orestis
d22f0342b2 Merge pull request #3809 from xzfc/3606-floating-xterm
Fix regression: floating xterm created partially off screen
2019-10-02 10:52:40 +03:00
Albert Safin
67217822b8 do not try to center floating window on itself
Some apps including XTerm start with a WM_CLIENT_LEADER property
containing their own window ID.  Before this commit, i3 tried to center
such windows onto itself and did it wrong since
`leader->rect == {0,0,0,0}` at this moment.

The first affected commit is 128122e766,
however, before it such windows already was misplaced, but got sanitized
afterward [1].

[1]: 8a3ef3a81b/src/floating.c (L329-L335)

Fixes #3606
2019-10-02 04:00:05 +00:00
Orestis
94fdb92d7c Merge pull request #3799 from xzfc/3527-workspace-number
extract_workspace_names_from_bindings: handle optional flags
2019-09-28 08:41:27 +03:00
acheronfail
46cf9fb91b feat: add window_type to ipc response 2019-09-27 15:44:13 +10:00
Albert Safin
ff73ddeeee extract_workspace_names_from_bindings: handle optional flags
fixes #3527
2019-09-23 08:21:30 +00:00
Ingo Bürk
7db0d179a3 Merge pull request #3784 from Iskustvo/next
Added documentation for "fullscreen_mode" in GET_TREE reply.
2019-09-20 23:23:31 +02:00
Orestis
cfb74c01ff Merge pull request #3783 from erwinvaneijk/fix_lcov_version
fix lcov support
2019-09-03 11:52:20 +03:00
Ingo Bürk
0e73396d28 Merge pull request #3787 from orestisfl/rect
Remove packed attribute from Rect
2019-09-03 09:59:34 +02:00
Orestis Floros
a73510026f Remove packed attribute from Rect
Fixes #3785 -- the issue where the Travis build failed because of gcc's
-Werror=address-of-packed-member.

Adds an equality function to avoid relying on memcmp().
2019-09-03 10:43:36 +03:00
Iskustvo
148bdeefdc Added documentation for "fullscreen_mode" in GET_TREE reply. 2019-09-02 19:58:22 +02:00
Erwin J. van Eijk
1e4ffcafaa fix lcov support
Ubuntu 18.10 comes with lcov 1.13, which is now added.
2019-09-01 19:19:12 +02:00
Michael Stapelberg
39a65166c4 update debian/changelog 2019-08-30 23:46:42 +02:00
Michael Stapelberg
225ebb0d58 Merge branch 'release-4.17.1' 2019-08-30 23:06:59 +02:00
Michael Stapelberg
942a33d0ec Set non-git version to 4.17.1-non-git. 2019-08-30 23:06:59 +02:00
Michael Stapelberg
c0f987fd66 Update debian/changelog 2019-08-30 23:06:59 +02:00
Michael Stapelberg
2ec14630fd Merge branch 'master' into next 2019-08-30 23:06:59 +02:00
Michael Stapelberg
f0f3821ff0 release i3 4.17.1 2019-08-30 23:06:47 +02:00
Michael Stapelberg
e6662df114 default config: use workspace number, not just workspace
This is strictly better: if the configured name does not match the current name,
the correct workspace will still be used.

When creating a new workspace, the configured name is still used.
2019-08-30 18:06:11 +02:00
Michael Stapelberg
1059277f28 default config: mention loginctl lock-session alongside xss-lock 2019-08-30 18:05:58 +02:00
Michael Stapelberg
3d7b25a857 default config: add XF86AudioMicMute 2019-08-30 18:05:55 +02:00
Michael Stapelberg
fced643980 default config: immediately refresh i3status after volume changes 2019-08-30 18:05:52 +02:00
Ingo Bürk
c6b0c61e25 Merge pull request #3747 from stapelberg/default-config-numbers
default config: use workspace number, not just workspace
2019-08-28 08:58:44 +02:00
David Shen
482f9e0ba7 Unset _I3_RESTART_FD after restart (#3775)
Closes #3764
Closes #3765
2019-08-28 08:54:33 +02:00
David Shen
efe84764b0 Unset _I3_RESTART_FD after restart (#3775)
Closes #3764
Closes #3765
2019-08-28 08:54:10 +02:00
Orestis
7b33e06b9d Merge pull request #3776 from RedSoxFan/move-mark-scratchpad-hidden
cmd_move_to_mark: fix move to scratchpad hidden
2019-08-22 09:45:51 +03:00
Brian Ashworth
741e94ae4f cmd_move_to_mark: fix move to scratchpad hidden
This fixes the case where moving a container to a scratchpad hidden
container via a mark would cause the container to be tiling on the
__i3_scratch workspace. This still moves the container to the
__i3_scratch workspace, but properly adds it to the scratchpad so that
it becomes usable instead of requiring criteria to regain access to.
2019-08-21 19:58:49 -04:00
Ingo Bürk
a4b5deed73 Merge pull request #3771 from stapelberg/lock
default config: mention loginctl lock-session alongside xss-lock
2019-08-15 22:02:16 +02:00
Michael Stapelberg
61ae2f17df default config: mention loginctl lock-session alongside xss-lock 2019-08-15 21:16:12 +02:00
Ingo Bürk
81c90895ef Merge pull request #3770 from stapelberg/mic
default config: add XF86AudioMicMute
2019-08-15 21:12:02 +02:00
Michael Stapelberg
31fd13aa1b default config: add XF86AudioMicMute 2019-08-15 20:57:34 +02:00
Ingo Bürk
9e2f00e297 Merge pull request #3769 from stapelberg/refresh
default config: immediately refresh i3status after volume changes
2019-08-15 20:53:49 +02:00
Michael Stapelberg
98b50d7dd0 default config: immediately refresh i3status after volume changes 2019-08-15 20:33:33 +02:00
Ingo Bürk
ac9e55caa5 Merge pull request #3768 from orestisfl/get_first_output
get_first_output changes
2019-08-15 17:23:41 +02:00
Orestis Floros
14d2a4c7f6 Correctly select output when pointer query fails 2019-08-13 16:54:55 +03:00
Orestis Floros
fd7e51927d get_first_output: prefer primary output
Used in two cases:
- When the pointer location can't be found but some initial container
needs to be focused
- When moving disabled outputs
2019-08-13 16:44:45 +03:00
izzel
0845d7b264 Remanage window after property updates (like titles) (#3759) 2019-08-13 08:50:48 +02:00
Antoine
3b88e41dd8 move workspace to output: don’t create duplicatively numbered workspaces (#3746)
fixes #3745
2019-08-08 07:43:01 +02:00
Michael Stapelberg
840d9202d1 release.sh changes for v4.17 2019-08-03 15:29:04 +02:00
Michael Stapelberg
c36311f614 debian: update changelog 2019-08-03 15:22:06 +02:00
Michael Stapelberg
cddaa2c57b Update debian/changelog 2019-08-03 15:14:53 +02:00
Michael Stapelberg
f2b612d271 Merge branch 'release-4.17' 2019-08-03 15:14:52 +02:00
Michael Stapelberg
ea00565ad3 Merge branch 'next' into master 2019-08-03 15:14:52 +02:00
Michael Stapelberg
18f50893f6 Set non-git version to 4.17-non-git. 2019-08-03 15:14:52 +02:00
Michael Stapelberg
79c690248a release i3 4.17 2019-08-03 15:14:38 +02:00
Iskustvo
ac100e36d9 Updated the documentation for COMMAND reply. (#3754) 2019-08-02 14:56:48 -07:00
Ingo Bürk
8cc2743bd6 Merge pull request #3748 from stapelberg/default-config
default config: start xss-lock+i3lock, nm-applet, pactl (volume key)
2019-07-31 15:20:46 +02:00
Michael Stapelberg
72975d6764 default config: start xss-lock+i3lock, nm-applet, pactl (volume key)
This change will make things strictly better for new users (without an existing
configuration file) and has no effect on existing users.

The tools should be fairly uncontentious, I hope, especially as they only serve
as a starting point anyway: users can quickly delete what they don’t want, or
change it into what they prefer.

But having something is strictly better than having nothing :)

We make some space in the config file by removing the old paragraph about pixel
fonts, which seems rather outdated and irrelevant to me.
2019-07-31 15:06:27 +02:00
Michael Stapelberg
5bb7b73a4a restart: make reply an array, add forgotten test to git (#3750)
related to #3565
2019-07-29 13:21:34 -07:00
Michael Stapelberg
ecffbed45f default config: use workspace number, not just workspace
This is strictly better: if the configured name does not match the current name,
the correct workspace will still be used.

When creating a new workspace, the configured name is still used.
2019-07-28 08:58:39 -07:00
Michael Stapelberg
e4ecc6e4a1 Make restart IPC command send a reply once restart completed (!) (#3743)
This is achieved by retaining the IPC connection which is sending the restart
command across the restart.

This is the cleaner fix for https://github.com/i3/go-i3/issues/3

fixes #3565
2019-07-21 14:52:12 +02:00
Ingo Bürk
1eabe1b2b1 Merge pull request #3742 from stapelberg/docipc
docs/ipc: fix code block header/footer mismatches
2019-07-19 22:18:16 +02:00
Michael Stapelberg
1ac117bb51 docs/ipc: fix code block header/footer mismatches
This is required to get the document rendered with the asciidoctor
implementation of asciidoc.
2019-07-19 21:23:57 +02:00
Michael Stapelberg
865f807976 unflake t/291-swap.t (#3741) 2019-07-19 21:10:40 +02:00
Ingo Bürk
8b88b0cb3e Merge pull request #3740 from stapelberg/strace
strace: switch from deprecated -F to -fvy
2019-07-19 21:01:36 +02:00
Michael Stapelberg
48d3d17d47 strace: switch from deprecated -F to -fvy 2019-07-19 20:39:53 +02:00
Konst Mayer
94228fd902 Add setting for minimal width of workspace buttons 2019-06-25 13:10:01 +07:00
Ingo Bürk
ca82f95812 feat: added support for user-defined border widths in i3bar blocks (#3726)
This change introduces support for four new properties on the i3bar
protocol, namely "border_top", "border_right", "border_bottom"
and "border_left".

If a block is drawn with a border, these values define the width of
the corresponding edge in pixels. They all default to 1 if not
specified to preserve compatibility.

fixes #3722
2019-06-22 22:18:29 +02:00
Ingo Bürk
48af067dfe feat: support transparency (RGBA) in i3bar (#3727)
We introduce a --transparency flag for i3bar in order to enable a mode which
supports the use of RGBA colors.

An important constraint here is that tray icons will always have
a fully transparent background.

fixes #3723
2019-06-22 17:23:21 +02:00
Ingo Bürk
19ca55858c Merge pull request #3709 from okraits/patch-1
docs: describe for_window with the correct term
2019-06-03 08:19:38 +02:00
Oliver Kraitschy
e658788895 docs: describe for_window with the correct term
for_window is a directive or option, not a command.
2019-06-03 07:42:43 +02:00
Ingo Bürk
3c63e2cd7d Merge pull request #3706 from orestisf1993/swap
Fix: delete decoration cache after swap
2019-05-25 11:17:59 +02:00
Orestis Floros
573574b301 Fix: delete decoration cache after swap
Fixes a regression after 8e1687a where swapping 2 containers across
different workspaces would not update their titles.
2019-05-25 00:05:18 +03:00
Ingo Bürk
f2c7e26a0c Merge pull request #3701 from orestisf1993/click-events
i3bar: If click events disabled, use whole bar for other events
2019-05-14 15:23:28 +02:00
Orestis Floros
baf1067087 i3bar: If click events disabled, use whole bar for other events
Fixes #3700
2019-05-13 12:56:04 +03:00
Ingo Bürk
b6485c98a2 Merge pull request #3697 from orestisf1993/ewmh
Fix ewmh atom issues
2019-05-03 16:01:42 +02:00
Orestis Floros
c9efa6dffe Call all ewmh_update_* functions together when necessary
The testcase is changed because it was actually incorrect. Easy to
verify because:
> _NET_CURRENT_DESKTOP
> …
> The index of the current desktop. This is always an integer between 0
> and _NET_NUMBER_OF_DESKTOPS - 1.

Fixes #3696.
Also updates the viewports.

Finally, fixes an issue with _NET_CURRENT_DESKTOP not being updated
after a workspace rename. Example:
- workspaces 1, 2, 3
- rename workspace 1 to 5
- All workspaces changed their index but _NET_CURRENT_DESKTOP was not
updated
2019-05-03 16:19:11 +03:00
Orestis Floros
830465b39f ewmh: Cache idx to avoid xcb_change_property calls
Updates ewmh_update_current_desktop, ewmh_update_number_of_desktops
2019-05-03 16:16:22 +03:00
Orestis Floros
8c25bc1bd4 tree_close_internal: Log workspace name in EWMH message 2019-05-03 15:39:04 +03:00
Orestis Floros
4a37d20602 ewmh: Introduce FOREACH_NONINTERNAL macro 2019-05-03 15:38:37 +03:00
Orestis
a574346964 Merge pull request #3680 from bobnye/next
Fix memory leak

Fixes #3621
2019-04-11 10:29:43 +03:00
Jeremy Klotz
58c808a961 Fix memory leak 2019-04-10 19:56:30 -04:00
Ingo Bürk
56bbc528d7 Merge pull request #3674 from orestisf1993/janitorial
Janitorial
2019-04-03 19:13:10 +02:00
Orestis Floros
cc9b227978 Make small DLOG improvements
- manage_window: log the window in the start of the function so that the
reader knows what the rest of the messages refer to, even if the
function exits prematurely.
- con_is_floating: Message is spammy
2019-04-03 18:51:34 +03:00
Orestis Floros
8b88f00117 window.c: Reduce code in window_update_* functions 2019-04-03 18:51:34 +03:00
Orestis Floros
ea6068a02d Replace scalloc + strncpy with sstrndup 2019-04-03 18:51:34 +03:00
Ingo Bürk
88912d6f00 Merge pull request #3671 from orestisf1993/full_render_width
child_handle_button: Call only if x >= offset
2019-03-29 15:21:27 +01:00
Orestis Floros
8903f29795 child_handle_button: Call only if x >= offset
c2a1b6e9 was a bit overzealous, other actions should be executed if the
button was pressed after the workspace buttons but before the
statusline.

Also, should we allow other actions everywhere in the bar if click
events are disabled by the child?
2019-03-29 16:10:19 +02:00
Ingo Bürk
1b7e613d01 Merge pull request #3669 from orestisf1993/config
Allow checking for duplicate bindings with -C
2019-03-29 14:15:53 +01:00
Orestis Floros
08cdc3a6ae Allow checking for duplicate bindings with -C
- Having both parse_configuration and parse_file is excessive now
- We detect if we are parsing only by checking if conn is NULL, not with
use_nagbar
- font.pattern needs to be set to NULL because it is freed in
free_font()

Fixes #3660
2019-03-29 12:30:04 +02:00
Orestis Floros
7754de900a Move code clearing the config to a new function 2019-03-29 12:26:00 +02:00
Orestis Floros
4a2cacebf6 load_configuration: Remove conn argument 2019-03-29 02:49:10 +02:00
Orestis Floros
f9c4011691 Update configuration.h
- parse_configuration was mentioning outdated config file order
- kill_configerror_nagbar was not used anywhere
2019-03-29 02:49:10 +02:00
Ingo Bürk
a9e476e899 Merge pull request #3666 from orestisf1993/full_render_width
handle_button: Fix issues with clicks on statusline
2019-03-28 21:04:35 +01:00
Ingo Bürk
823345435b Merge pull request #3667 from orestisf1993/etc/config
etc/config: Mention ~/.config/i3/config
2019-03-28 21:03:35 +01:00
Ingo Bürk
4257b758a9 Merge pull request #3665 from lasers/add-markup
docs/i3bar-protocol: add markup to all possible entries example
2019-03-28 21:02:55 +01:00
Orestis Floros
6f1350865b etc/config: Mention ~/.config/i3/config 2019-03-28 21:29:09 +02:00
Orestis Floros
c2a1b6e91f handle_button: Introduce child_handle_button
Also fixes an issue where action would be called if the button press was
on a separator. For example, if a user scrolled on a separator, the
workspace would change.

Applies to --release commands as well.
2019-03-28 21:05:43 +02:00
Orestis Floros
03d2ccdeef handle_button: Use full render width for calculations
Fixes #3664

Also, click events' width will now always be >= min_width.
2019-03-28 21:05:29 +02:00
lasers
ae16a55616 docs/i3bar-protocol: add markup to all possible entries example 2019-03-28 11:43:08 -05:00
Ingo Bürk
feb2912e57 Merge pull request #3659 from orestisf1993/git-log-to-rev-list-3656
Use git plumbing commands to get the I3_VERSION
2019-03-22 14:53:59 +01:00
Orestis Floros
fefeedf8da Use git plumbing commands to get the I3_VERSION
Fixes #3656
2019-03-22 15:08:40 +02:00
Ingo Bürk
24a8eac134 Merge pull request #3658 from orestisf1993/workspace_move_to_output
Workspace move to output
2019-03-22 11:18:54 +01:00
Orestis Floros
d4e4cbfd25 workspace_move_to_output: Avoid operations when workspace already at destination
Closes #3635.
Probably the bug can still happen when a tree_close_internal happens
inside a workspace_show but modifying the code to avoid them seems to
not be worth it.
2019-03-22 10:47:49 +02:00
Orestis Floros
7fc3bf660e cmd_focus_output: Avoid assertion crash
Happened when the command criteria didn't match any windows. For
example: `[con_mark=doesnotexist] focus output left`.
2019-03-22 10:47:48 +02:00
Ingo Bürk
343007b9d4 Merge pull request #3657 from jeffhuxen/next
Added note which config directives could be used at runtime
2019-03-22 09:40:08 +01:00
Ingo Bürk
f6e42d103f Merge pull request #3643 from Iskustvo/next
Adding new IPC library(i3-ipc++) in documents.
2019-03-22 09:39:37 +01:00
Ingo Bürk
47d045d075 Merge pull request #3655 from orestisf1993/workspace_output_spaces
cfg_workspace: Accept outputs with spaces again
2019-03-22 09:38:02 +01:00
Orestis Floros
351d891f4c get_output_for_con: Assert result != NULL
- The result from con_get_output was always not NULL because
con_get_output asserts so
- get_output_by_name should always be able to get an output from the
corresponding container
- workspace_move_to_output doesn't return bool anymore since it can't
fail
2019-03-22 03:10:00 +02:00
Orestis Floros
d0ab51db85 workspace_move_to_output: Make stylistic changes 2019-03-22 03:09:27 +02:00
Jeffrey Huxen
ac2489240e Added to note to clarify which config directives could be used at runtime. 2019-03-21 17:07:23 -05:00
Iskustvo
214ed78154 Added new IPC library(i3-ipc++) in documents. 2019-03-21 22:44:00 +01:00
Orestis Floros
8ce99cdacb cfg_workspace: Accept outputs with spaces again
This is a regression from bce088679.

An other way to fix this would be to concatenate strings inside the
strtok loop when an output starts with a double quote but I'd rather
let the parser do the word splitting.

Fixes #3646
2019-03-21 21:31:30 +02:00
Ingo Bürk
3aa42cf795 Merge pull request #3654 from chrhasse/next
Add explicit reference to glib2 in automake
2019-03-21 08:44:13 +01:00
Christopher Hasse
4e5ce56188 Add explicit reference to glib2 to automake 2019-03-20 23:51:13 -05:00
Orestis
297abe0edd Merge pull request #3637 from i3/stapelberg-patch-1
x.c: correctly free con->frame_buffer in _x_con_kill
2019-03-19 11:16:30 +02:00
Michael Stapelberg
79b052230c x.c: correctly free con->frame_buffer in _x_con_kill
This fixes a crash which I could not reproduce in a testcase with reasonable effort, but the user reported the fix works.

Compare with src/x.c:946.

fixes #3554
fixes #3645
2019-03-19 09:50:22 +01:00
Michael Stapelberg
9bd2224520 travis: remove deprecated docker login -e flag (#3651) 2019-03-19 09:49:59 +01:00
Orestis
0cae9b236b Merge pull request #3640 from orestisf1993/partial-ucs2
convert_utf8_to_ucs2: Allow partial conversion
2019-03-19 10:36:52 +02:00
Orestis Floros
bd58d67ea8 convert_utf8_to_ucs2: Allow partial conversion
Fixes #3638.
2019-03-19 10:31:34 +02:00
Michael Stapelberg
6ec7b91cff fix travis build by switching away from deprecated-2017Q3 (#3650)
Also remove “sudo: false” as per
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2019-03-19 09:30:04 +01:00
Ingo Bürk
80ecadbe31 Merge pull request #3614 from NilsIrl/next
Add proper return code for i3-msg
2019-03-11 19:38:10 +01:00
Ingo Bürk
9d9b552b70 Merge pull request #3632 from orestisf1993/workspace_init
create_workspace_on_output: send workspace init event
2019-02-23 21:52:22 +01:00
Orestis Floros
098b0e6976 create_workspace_on_output: send workspace init event
Fixes #3595
Like the issue mentions:
> instead of the newly created workspace (not referenced by variable
> here) the `"init"` event is fired with the current workspace (`ws`).

Plus, there was another issue where duplicate workspace init events
where being sent because of workspace_get().

304-ipc-workspace-init.t: Subtest "move workspace to output" fails with
current next.

Fixes #3631
No event was being sent here:
2d6e09a66a/src/randr.c (L487)

533-randr15.t: I confirmed that SKIP still works if the xrandr command
fails.
Added test fails with current next.
2019-02-23 12:00:55 +02:00
Nils ANDRÉ-CHANG
72ccd341fc Add proper return code for i3-msg 2019-02-21 19:52:55 +00:00
Michael Stapelberg
2d6e09a66a i3-dump-log: make log message a little more clear (#3618)
This came up when trying to debug an issue.
2019-02-12 09:22:26 +01:00
Ingo Bürk
e2d6117b8c Merge pull request #3607 from vacuus/3546-fix-misleading-doc
Clear up confusion between event and reply types.
2019-02-01 08:24:34 +01:00
Alejandro Angulo
85e6742686 Reword documentation to make clear the difference in enumeration between event and reply types. 2019-01-31 23:00:00 -08:00
Michael Stapelberg
a4309cb871 Merge branch 'release-4.16.1' 2019-01-27 16:45:31 +01:00
Michael Stapelberg
becd97e2fb Set non-git version to 4.16.1-non-git. 2019-01-27 16:45:31 +01:00
Michael Stapelberg
b4f9ff91d4 release i3 4.16.1 2019-01-27 16:45:19 +01:00
Orestis Floros
f7b6ae2836 Fix: render_con shows floating containers on wrong workspace
After 204eefc. Alternative fix:
    diff --git a/src/floating.c b/src/floating.c
    index f5c61782..6dd79668 100644
    --- a/src/floating.c
    +++ b/src/floating.c
    @@ -954,7 +954,7 @@ bool floating_reposition(Con *con, Rect newrect) {
             con->scratchpad_state = SCRATCHPAD_CHANGED;

         /* Workspace change will already result in a tree_render. */
    -    if (!reassigned) {
    +    if (!reassigned && workspace_is_visible(con_get_workspace(con))) {
             render_con(con);
             x_push_node(con);
         }
but I don't think that the extra complexity is worth it.

Change in handlers.c because of d2d6d6e0 where the bug also appears.

Fixes #3567
2019-01-23 21:30:52 +01:00
Orestis
f0e19d112c cmd_exit: Let i3_exit handle shutdown (#3600)
- __lsan_do_leak_check() will terminate the process, so move it to the
end of the function.
- ev_loop_destroy() must be called after ipc_shutdown() because the
latter calls ev_ functions.

Fixes #3599
2019-01-23 21:21:46 +01:00
Orestis Floros
4f768c6eda Fix crash with popups when fullscreen is non-leaf
Introduced in b3e69ed12

Fixes #3582
2019-01-23 21:21:34 +01:00
Orestis
54e7a31568 Use ipc queue for all messages (#3585)
I was able to reproduce #3579 in Linux by running:
`sudo sysctl net.core.wmem_default=10000`

If a subscription message was too big to be sent at once, it was
possible to break a client by sending a reply to an other message sent
by the client. Eg:
- Write 8192 out of 11612 bytes of a workspace event.
- Blockingly write the reply to a workspace change message.
- Write the rest 3420 bytes of the workspace event.

This commit fixes this by utilizing the ipc queue for all types of
writes.

ipc_receive_message can only be called from a callback started in
ipc_new_client. This callback uses the same file descriptor with the
client also created in ipc_new_client. When the client is deleted, the
read callback is now also stopped. Thus, we can assume that whenever
ipc_receive_message is called, the corresponding client should still
exist.

- ipc_client now contains pointers to both write and read watchers. When
freed, a client will stop both of them.
- IPC_HANDLERs now work with ipc_clients instead of fds.

Fixes #3579.
2019-01-23 21:21:28 +01:00
Orestis Floros
cf375927f0 attach_to_workspace: set new parent before tree_render
on_remove_child calls tree_close_internal which calls tree_render and
the tree is in an invalid state if con->parent still points to the old
parent.

Fixes #3556
2019-01-23 21:20:08 +01:00
Orestis Floros
f43f412771 Apply title_align to non-leaf containers
Additionally, marks will now display for non-leaf containers.

Fixes #3540.
2019-01-23 21:20:04 +01:00
Orestis Floros
0377970dab Truncate wm_name utf8 strings to first zero byte
Fixes #3515
2019-01-23 21:20:00 +01:00
Orestis
02bb2693f9 cmd_exit: Let i3_exit handle shutdown (#3600)
- __lsan_do_leak_check() will terminate the process, so move it to the
end of the function.
- ev_loop_destroy() must be called after ipc_shutdown() because the
latter calls ev_ functions.

Fixes #3599
2019-01-22 21:35:44 +01:00
Ingo Bürk
82a35a2418 Merge pull request #3590 from nejni-marji/next
Make binding modes case sensitive

closes #3587
2019-01-18 23:37:09 +01:00
Jonathan Woodlief
2a1ca0951e Update userguide to describe border styles better
Describe the difference between normal and pixel titlebars better

Thanks to @JonWoodlief
2019-01-18 23:35:47 +01:00
nejni-marji
22ac5827b0 Make binding modes case sensitive 2019-01-16 19:32:24 -06:00
Orestis
5aa0459be0 Use ipc queue for all messages (#3585)
I was able to reproduce #3579 in Linux by running:
`sudo sysctl net.core.wmem_default=10000`

If a subscription message was too big to be sent at once, it was
possible to break a client by sending a reply to an other message sent
by the client. Eg:
- Write 8192 out of 11612 bytes of a workspace event.
- Blockingly write the reply to a workspace change message.
- Write the rest 3420 bytes of the workspace event.

This commit fixes this by utilizing the ipc queue for all types of
writes.

ipc_receive_message can only be called from a callback started in
ipc_new_client. This callback uses the same file descriptor with the
client also created in ipc_new_client. When the client is deleted, the
read callback is now also stopped. Thus, we can assume that whenever
ipc_receive_message is called, the corresponding client should still
exist.

- ipc_client now contains pointers to both write and read watchers. When
freed, a client will stop both of them.
- IPC_HANDLERs now work with ipc_clients instead of fds.

Fixes #3579.
2019-01-12 13:13:03 +01:00
Ingo Bürk
e2e964151e Merge pull request #3584 from orestisf1993/popup-SIGSEGV
Fix crash with popups when fullscreen is non-leaf
2019-01-11 14:01:56 +01:00
Orestis Floros
0abb4f7e88 Fix crash with popups when fullscreen is non-leaf
Introduced in b3e69ed12

Fixes #3582
2019-01-11 14:46:13 +02:00
Orestis
00bb9a8483 Merge pull request #3574 from pclouds/no-newline-in-errx
Remove \n from errx and die messages
2019-01-02 14:30:17 +02:00
Nguyễn Thái Ngọc Duy
6462cf1ca3 Remove \n from errx and die messages
errx() already appends \n internally. "\n" in the error message will
result in a blank line after the message. die() is just a wrapper around
errx() so it receives the same treatment.
2019-01-02 14:23:56 +02:00
Ingo Bürk
3e3257af18 Merge pull request #3563 from CyberShadow/doc-mark-todo
userguide: Un-hide a TODO block completed in 2011
2018-12-16 09:36:02 +01:00
Ingo Bürk
982ede5901 Merge pull request #3568 from orestisf1993/floating_reposition-render_con
Fix: render_con shows floating containers on wrong workspace
2018-12-16 09:33:25 +01:00
Orestis Floros
318528e3fc Fix: render_con shows floating containers on wrong workspace
After 204eefc. Alternative fix:
    diff --git a/src/floating.c b/src/floating.c
    index f5c61782..6dd79668 100644
    --- a/src/floating.c
    +++ b/src/floating.c
    @@ -954,7 +954,7 @@ bool floating_reposition(Con *con, Rect newrect) {
             con->scratchpad_state = SCRATCHPAD_CHANGED;

         /* Workspace change will already result in a tree_render. */
    -    if (!reassigned) {
    +    if (!reassigned && workspace_is_visible(con_get_workspace(con))) {
             render_con(con);
             x_push_node(con);
         }
but I don't think that the extra complexity is worth it.

Change in handlers.c because of d2d6d6e0 where the bug also appears.

Fixes #3567
2018-12-16 03:49:21 +02:00
Ingo Bürk
a68542c8f7 Merge pull request #3566 from orestisf1993/focus-events
Focus events
2018-12-15 18:29:46 +01:00
Orestis Floros
fb1ae61d1c Invalidate last_focused when focusing the EWMH support window
Fixes #3562
2018-12-14 23:47:48 +02:00
Orestis Floros
dd708199ea Fix: killing unfocused window shouldn't produce focus event 2018-12-14 23:46:21 +02:00
Orestis Floros
f70c3b168d Update tree_close_internal documentation in tree.h
After f90840337
2018-12-14 23:46:21 +02:00
Vladimir Panteleev
7d89e90137 userguide: Un-hide a TODO block completed in 2011
The userguide contained a commented-out section for marks, which
included the line:

> TODO: make i3-input replace %s

The line was added in a26a11c609 (May
2011), at which point i3-input did not have a -F switch. The switch
was added only in 1737a78fcd (September
2011), but the documentation was never updated to enable the
commented-out examples.
2018-12-14 13:16:11 +00:00
Orestis
e6be6fea74 Merge pull request #3560 from CyberShadow/doc-mark-replace
userguide: Document mark --replace flag
2018-12-14 10:39:49 +02:00
Vladimir Panteleev
fdda9763b7 userguide: Document mark --replace flag
- Explicitly document --replace, which was previously only mentioned
  in the command syntax.

- Improve wording: "a window can only have one mark" is slightly
  misleading because it appears to describe the limitation as a
  property of the model, whereas this actually pertains the mark
  command.
2018-12-14 08:33:42 +00:00
Ingo Bürk
be6619ff11 Merge pull request #3557 from orestisf1993/regress-float-move
attach_to_workspace: set new parent before tree_render
2018-12-12 21:02:41 +01:00
Orestis Floros
605b6ba00f attach_to_workspace: set new parent before tree_render
on_remove_child calls tree_close_internal which calls tree_render and
the tree is in an invalid state if con->parent still points to the old
parent.

Fixes #3556
2018-12-12 19:12:01 +02:00
Orestis
376833db45 Merge pull request #3510 from orestisf1993/tree.t
Introduce cmp_tree test function
2018-12-12 13:19:43 +02:00
Orestis Floros
90c08a52f0 Introduce cmp_tree test function
Related to #3503
2018-12-12 13:09:15 +02:00
Ingo Bürk
32188d7b2c Merge pull request #3551 from xzfc/baf-restart
Preserve back_and_forth during restart
2018-12-11 20:53:08 +01:00
Albert Safin
64ab1f42b7 Preserve back_and_forth during restart
Add new key "previous_workspace_name" to the json dump of the root container.
2018-12-11 20:46:06 +07:00
Ingo Bürk
6a4d41c5c2 Merge pull request #3553 from stapelberg/hidpi
userguide: add a section about hidpi displays
2018-12-10 18:34:51 +01:00
Michael Stapelberg
d3e954befd userguide: add a section about hidpi displays
This is a continuation of #3438.
2018-12-10 18:18:23 +01:00
Ingo Bürk
f08119298e Merge pull request #3549 from xzfc/small-fixes
Small fixes
2018-12-09 18:13:13 +01:00
Ingo Bürk
b35c56687d Merge pull request #3550 from tlercher/3535-display-check
Fix #3535 - Check for DISPLAY when requesting version information
2018-12-09 18:10:42 +01:00
TAL
b479dc1a0f Fix #3535 - Check for DISPLAY when requesting version information 2018-12-09 02:20:47 +01:00
Albert Safin
27030c8566 Code style: fix misaligned and misindented comments 2018-12-09 08:04:55 +07:00
Albert Safin
b6282b47bc Remove unused con_get_next()
This function has unused for a long time since the commit
8f4b9ddaa4.
2018-12-09 08:04:41 +07:00
Albert Safin
0eb07dea5c Remove unnecessary code in route_click()
This case is handled by resize_find_tiling_participants() anyway which
is introduced in the commit dbec5eb905.
2018-12-09 07:48:40 +07:00
Albert Safin
9a1eb7a783 commands.c: Add missing error replies 2018-12-09 07:41:19 +07:00
Orestis
b192bf4bd2 Merge pull request #3547 from stapelberg/conn
Bugfix: use restore_conn, not conn
2018-12-08 14:49:04 +02:00
Michael Stapelberg
01c1b5dec2 Bugfix: use restore_conn, not conn
Using the wrong X11 connection breaks the libev event handling model:
xcb_flush() must be called immediately before handing control to libev.

Before this fix:

1. xcb_prepare_cb would read and flush conn
2. restore_xcb_prepare_cb would read and flush restore_conn,
   BUT also inadvertantly call xcb_flush(conn), resulting in new
   events being filled into the XCB event queue
3. libev waits for new events
4. after 1 minute, libev times out and the events are processed

Diagnosed using strace on testcases/complete-run.pl.

related to commit 0d8b6714e3

related to #3510
2018-12-08 13:31:53 +01:00
Orestis
620e90bed8 Merge pull request #3541 from orestisf1993/title_align
Apply title_align to non-leaf containers
2018-12-05 13:09:09 +02:00
Orestis Floros
a81e22a277 Apply title_align to non-leaf containers
Additionally, marks will now display for non-leaf containers.

Fixes #3540.
2018-12-04 20:50:32 +02:00
Ingo Bürk
52d785fb37 Merge pull request #3514 from xzfc/2742-shape
Add input and bounding shapes support (#2742)
2018-12-03 20:16:47 +01:00
Albert Safin
1a85619498 Add input and bounding shapes support (#2742)
Basic idea: if the window has a shape, set the parent container shape as
the union of the window shape and the shape of the frame borders.

Co-authored-by: Uli Schlachter <psychon@znc.in>
2018-12-01 11:52:41 +07:00
Albert Safin
9273f67734 Log window id in state_for_frame() 2018-12-01 10:31:11 +07:00
Michael Stapelberg
7ade46c61f switch to clang-format-6.0 (#3533) 2018-11-28 17:38:16 +01:00
Ingo Bürk
a080551f26 Merge pull request #3432 from orestisf1993/aspect-ratio
Fix aspect ratio bugs
2018-11-17 16:08:22 +01:00
Ingo Bürk
8ad84f06c9 Merge pull request #3524 from orestisf1993/regress-randr
randr.c: Fix regression with focusing NULL container
2018-11-15 12:57:59 +01:00
Orestis Floros
a84b30f8a9 randr.c: Fix regression with focusing NULL container
This was introduced in db3b9e4187 which
removed the NULL check for next.

Fixes #3523.
2018-11-15 13:49:26 +02:00
Ingo Bürk
299e9b9fdd Merge pull request #3521 from c-edw/feature/StripWorkspaceDocs
Update userguide docs for strip_workspace_*.
2018-11-13 10:24:11 +01:00
Connor E
3463406df7 Update userguide docs for strip_workspace_*. 2018-11-13 08:46:16 +00:00
Orestis Floros
d2d6d6e0a8 Re-render floating cons alone when possible 2018-11-12 19:05:51 +02:00
Orestis Floros
100d05a2a6 render_con: Get rid of render_fullscreen argument
Only true for the fullscreen container and doesn't affect any of its
children. Thus, we can get the same result by checking
->fullscreen_mode.
2018-11-12 19:05:50 +02:00
Orestis Floros
29f2510fa9 Fix aspect ratio bugs
- ICCCM says: > If a base size is not provided, the minimum size is to
be used in its place and vice versa.
i3 didn't obey the "vice versa" part. Min size and base size are both
saved without replacements in window_update_normal_hints,
floating_check_size makes the needed replacements if either was not
provided.
- Aspect ratio is now saved correctly in manage_window because
window_update_normal_hints is called.
- i3 didn't save the aspect ratio if the window conformed the given
aspect ratio range when handle_normal_hints was called. If the window
was resized to a size outside of the given bounds, i3 didn't correct it.
- Aspect ratio now affects only tiling windows, like the rest of the
normal size hints
- The aspect ratio calculation is now done without a loop

A real life example of how these changes affect the workflow:
An mpv window, when playing a video, sets its min == max aspect ratio
during mapping. i3 ignored these hints. When resized, the window's
aspect ratio was not preserved. With this commit, resizing floating mpv
windows will always preserve the aspect ratio.
2018-11-12 18:45:00 +02:00
Orestis Floros
f397698d43 floating_resize: Use uint32_t 2018-11-12 18:45:00 +02:00
Orestis Floros
01960f956f floating_check_size: Use window variable 2018-11-12 18:44:45 +02:00
Ingo Bürk
90c39a4bf6 Merge pull request #3484 from xzfc/3476-export-i3sock
Export I3SOCK
2018-11-10 22:12:01 +01:00
Ingo Bürk
56bb806b52 Merge pull request #3397 from orestisf1993/randr-enable-disable
Fix bugs in enabling & disabling randr outputs
2018-11-10 21:56:34 +01:00
Ingo Bürk
cf553ce31e Merge pull request #3516 from orestisf1993/truncate-utf8
Truncate wm_name utf8 strings to first zero byte
2018-11-09 21:01:57 +01:00
Orestis Floros
11bc25b70b Truncate wm_name utf8 strings to first zero byte
Fixes #3515
2018-11-09 19:42:32 +02:00
Orestis
665b16807f Merge pull request #3511 from aksel/247-gaps-resize-fix
For resizing, convert pixel diff to percentage, based on parent.
2018-11-09 00:31:06 +02:00
aksel
bbfa140c0f For resizing, convert pixel diff to percentage, based on parent.
Previously, it first calculated one of the containers' next percentage, and then subtracted the previous percentage to find the actual change.

Now it directly calculates the change, and subtracts and adds the change to the two affected containers.

Added util function con_rect_size_in_orientation.

Removed px_resize_to_percent; inlined, using con_rect_size_in_orientation.

Also, prematurely return when pixel diff is 0, as no action is necessary.

This is related to [this issue on i3-gaps](https://github.com/Airblader/i3/issues/247).
2018-11-08 23:15:23 +01:00
Ingo Bürk
44e8fddc28 Merge pull request #2954 from orestisf1993/swap-for-floating
Rewrite con_swap to work only with queue operations
2018-11-07 13:13:41 +00:00
Ingo Bürk
4e1c20c871 Merge pull request #3508 from orestisf1993/load_layout-marks
load_layout: Correctly mark non-leaf containers
2018-11-07 07:11:21 +00:00
Orestis Floros
eb53ec83b9 load_layout: Correctly mark non-leaf containers
Example problematic layout:
    {
        "layout": "splith",
        "marks": ["H1"],
        "nodes": [
            {
                "swallows": [
                    {
                        "class": "^a$"
                    }
                ]
            }
        ]
    }

Since the marks were added to the json_node during end_map, the
container that ended up getting the "H1" mark was the child instead of
the parent.
2018-11-07 02:32:12 +02:00
Ingo Bürk
3649ecb71e Merge pull request #3482 from hamishimac/next
Do not assume STDIN_FILENO is available for input from child
2018-11-05 22:32:54 +01:00
Ingo Bürk
21cbb1000d Merge pull request #3504 from Foxboron/morten/i3-man-path
Change config order in manpage
2018-11-05 22:32:27 +01:00
Ingo Bürk
584ca21032 Merge pull request #3485 from xzfc/3412-outer-border
Draw outer header borders for all layouts
2018-11-05 22:31:35 +01:00
Orestis
f4a1482000 Merge pull request #3505 from stapelberg/release-docs
release.sh: save docs first
2018-11-05 20:45:59 +02:00
Michael Stapelberg
3a3f0f18e6 release.sh: save docs first
Otherwise, as @orestisf1993 pointed out, the saved documentation will have the
wrong version number.
2018-11-05 19:32:29 +01:00
Albert Safin
7926c817a2 Draw outer header borders for all layouts 2018-11-05 20:17:01 +07:00
Morten Linderud
e3ad800902 Change config order in manpage
This brings the headline for the configuration files inline with the
recent move to XDG directories.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2018-11-05 14:15:07 +01:00
Ingo Bürk
6e998cf4e3 Merge pull request #3499 from orestisf1993/docs
userguide: break long comment
2018-11-04 15:53:15 +01:00
Michael Stapelberg
07e5747c8c travis: move (failing) ubuntu build from xenial to bionic
Ubuntu’s apt started refusing to load package files from unauthenticated
repositories, but the package for which we did that (xcb-xrm) is available in
newer versions of Ubuntu, so I just removed that part altogether.

Apparently this has been broken since April, and nobody noticed :-/
2018-11-04 15:24:10 +01:00
Michael Stapelberg
86bcb21dbc update release.sh for the 4.16 release 2018-11-04 15:07:24 +01:00
Michael Stapelberg
cb09db94dc update debian/changelog 2018-11-04 14:55:50 +01:00
Michael Stapelberg
e6f2255ed2 Update debian/changelog 2018-11-04 14:47:46 +01:00
Michael Stapelberg
3ae8a45c56 Merge branch 'release-4.16' 2018-11-04 14:47:46 +01:00
Michael Stapelberg
1847938d4e Merge branch 'next' into master 2018-11-04 14:47:46 +01:00
Michael Stapelberg
a26a342b35 Set non-git version to 4.16-non-git. 2018-11-04 14:47:46 +01:00
Michael Stapelberg
d617f71b22 release i3 4.16 2018-11-04 14:47:34 +01:00
Orestis Floros
af10b710bf userguide: break long comment 2018-11-04 12:23:45 +02:00
Orestis
dc16df439e Update ewmh focused only when new focus is different (#3496)
Fixes #3495.
2018-11-03 13:39:49 +01:00
Orestis
a0105dd2f2 Merge pull request #3497 from stapelberg/clang-format
switch to clang-format-4.0
2018-11-03 10:42:50 +02:00
Michael Stapelberg
eedb257655 switch to clang-format-4.0
clang-format-3.8 is old enough to have vanished from Debian testing, which we
use for our CI.
2018-11-03 09:16:16 +01:00
Ingo Bürk
f16afef7b3 Merge pull request #3486 from orestisf1993/regress-move-floating
Fix regression with moving floating windows
2018-10-29 14:59:25 +01:00
Orestis Floros
64c493ef1f Fix regression with moving floating windows
This fixes a regression introduced in 6d983b5. Consider 2 outputs:
fake-0: workspace '1'
fake-1: workspaces '2','3'
Workspace 1 focused, workspace 2 visible.
Open a floating window in 1 and move it to 3. Now, the floating window
appears in workspace 2 and disappears once focus is switched to
that workspace.

Instead of focusing 'old_focus' which might refer to a container in a
different output, we should restore focus by focusing the previously
focused workspace of the output.
2018-10-29 15:46:28 +02:00
Ingo Bürk
04d1fcbe2d Merge pull request #3483 from soumya92/next
Update badges in README
2018-10-26 20:46:53 +02:00
Soumya
ce7e1b9177 Update badges in README
issuestats.com seems to have moved on, using shields.io instead.
2018-10-26 09:58:04 -07:00
Hamish Macdonald
5084a881af Do not assume STDIN_FILENO is available for input from child 2018-10-26 09:31:43 -04:00
Albert Safin
aa20358620 Export I3SOCK (#3476) 2018-10-26 15:40:59 +07:00
Ingo Bürk
37e2b58226 Merge pull request #3465 from soumya92/next
Add "modifiers" to events sent by i3bar
2018-10-26 09:49:35 +02:00
Soumya
3745e6f484 Add "modifiers" to events sent by i3bar 2018-10-25 16:02:06 -07:00
Orestis
2ddf4f2c6d Merge pull request #3473 from soumya92/pango-font-alignment
Always center text vertically
2018-10-24 22:57:31 +03:00
Orestis
5d70e2850f Merge pull request #3475 from Gravemind/fix-i3bar-re-hidden-on-any-modifier
i3bar: Fix i3bar re-hidden by any modifier (#3474)
2018-10-23 18:41:11 +03:00
Ingo Bürk
64e7646c7e Merge pull request #3452 from orestisf1993/title_align
Add title_align config directive
2018-10-23 16:41:54 +02:00
Ingo Bürk
48524e1f0a Merge pull request #3451 from orestisf1993/tray
Close & reopen tray selwin when needed
2018-10-23 15:45:45 +02:00
Orestis Floros
e240c118c7 Close & reopen tray selwin when needed
Fixes #1329
Fixes #3317 (duplicate)
Examples where the tray "disappeared":
- Start without a "tray_output", reload config with "tray_output none",
remove "tray_output none" and reload.
- Start with "tray_output primary" (or "tray_output <output>"), disable
the primary output and then reconnect it.

Fixes #2010
Cached in output_for_tray
2018-10-23 16:41:09 +03:00
Ingo Bürk
ffc7ea8c50 Merge pull request #3469 from yablonsky/patch-1
Update userguide "Focus Parent": add the default
2018-10-23 15:37:12 +02:00
Ingo Bürk
0ed29f5678 Merge pull request #3448 from orestisf1993/sticky
Fix sticky focus when switching to workspace on different output
2018-10-23 15:31:57 +02:00
Ingo Bürk
66d504f3cd Merge pull request #3445 from orestisf1993/flaky
Fix flakyness in t/189-floating-constraints.t
2018-10-23 15:30:11 +02:00
Ingo Bürk
74a7bf31a5 Merge pull request #3444 from orestisf1993/move
Some move.c fixes
2018-10-23 15:29:48 +02:00
Ingo Bürk
db0add0f11 Merge pull request #3433 from orestisf1993/janitorial
Janitorial
2018-10-23 15:27:50 +02:00
Gravemind
c40c79538e i3bar: Fix i3bar re-hidden by any modifier (#3474)
The bug was introduced in 4.15-next fe6b3b7474
2018-10-23 15:17:30 +02:00
Soumya
81eea19e1e Always center text vertically 2018-10-22 12:59:08 -07:00
Andriy Yablonskyy
b971c0e50f add missing parenthesis 2018-10-21 13:42:19 -04:00
Andriy Yablonskyy
3de950e0d9 Update userguide "Focus Parent": add the default
While reading the UserGuide, I had to refer to the TL;DR image on top to find the default keybind for "Focus Parent" since it's not mentioned in the text.
This pr fixes it.
2018-10-21 13:38:58 -04:00
Ingo Bürk
a319860cd1 Merge pull request #3467 from orestisf1993/userguide
userguide: Use anchor for list of commands
2018-10-21 12:28:11 +02:00
Orestis Floros
5295266cf2 userguide: Use anchor for list of commands
Fixes #3464
2018-10-21 13:20:45 +03:00
Michael Stapelberg
02284acba8 debian/control: remove dependency on x11-utils (#3455)
This was a introduce in commit a61e34d277 in 2009,
and we haven’t used xmessage in any way in a long time.

fixes https://bugs.debian.org/910997
2018-10-15 18:00:43 +02:00
Orestis
7013ea6c99 Merge pull request #3456 from stapelberg/travis
travis: fix mk-build-deps call by providing changelog file
2018-10-15 11:16:20 +03:00
Michael Stapelberg
40bf2192f0 travis: fix mk-build-deps call by providing changelog file
mk-build-deps started using the changelog file to get the version number, but a
bug prevents it from falling back correctly to 1.0 if no changelog is
present. This has been fixed upstream in
4b15abd4f0,
but we can just ship the changelog file until that fix lands.
2018-10-15 08:40:00 +02:00
Orestis Floros
07dfb8450b Fix typo: childs -> children 2018-10-13 21:10:11 +03:00
Orestis Floros
204eefc679 floating_reposition: avoid extra tree_render 2018-10-13 21:10:11 +03:00
Orestis Floros
36a972d851 Use open_floating_window arguments for rect 2018-10-13 21:10:10 +03:00
Orestis Floros
8c17e4e38d manage_window: cleaner variable declarations 2018-10-13 21:10:10 +03:00
Orestis Floros
966915cfb2 borders_to_hide doesn't need to be initialized 2018-10-13 21:10:10 +03:00
Orestis Floros
4219eb213b root is externally declared 2018-10-13 21:10:10 +03:00
Orestis Floros
052e96d323 Use lround instead of (long)round 2018-10-13 21:10:10 +03:00
Orestis Floros
e4d2b38552 Make comment style more consistent 2018-10-13 21:10:10 +03:00
Orestis Floros
a65914f338 Fix missing prototypes
i3 will now compile with no warnings when -Wmissing-prototypes is used.
2018-10-13 21:10:10 +03:00
Orestis Floros
2a9522dda4 Enforce strict prototypes
i3 will now compile with no warnings when -Wstrict-prototypes is used.
2018-10-13 21:10:09 +03:00
Orestis Floros
a15fff2370 Use path_exists 2018-10-13 21:10:09 +03:00
Orestis Floros
50880db2c5 Reduce some code around frees 2018-10-13 21:10:09 +03:00
Orestis
565d38c5af Merge pull request #3454 from alanbarr/cppcheck_fixes_2
Cppcheck Fixes
2018-10-13 21:07:17 +03:00
Alan Barr
7c0994dafc Fixes for undefined behaviour on signed shift (#3453)
Fixes for undefined behaviour on signed shift

Change literal 1 to unsigned to allow safe bitshift of 31.
Caught by cppcheck.

Make 0xFF unsigned to prevent a left shift into signed bit.
Spotted by @orestisf1993
2018-10-13 21:04:40 +03:00
Alan Barr
687238b79b Typecast void* before doing pointer arithmetic
Caught by cppcheck
2018-10-13 17:41:50 +01:00
Alan Barr
88c378154a Remove redundant NULL check
copy has been used before this point - so it is too late to be concerned
about a NULL pointer now.

This is OK as sstrdup() calls err() on NULL return from the underlying
strdup() call.

Raised by cppcheck.
2018-10-13 17:41:50 +01:00
Aestek
6d82753d53 Add title_align config directive
Controls the window titles alignment in title bars. Possible values are:
- left
- center
- right

Co-authored-by: Orestis Floros <orestisf1993@gmail.com>
- Made title_align a config directive instead of a command. Helps with
some tree_render() issues we had.
- Made title_max_width the same for all 3 cases.
- Modified title offset calculations and added explanations for each
case.
- Append title_padding to mark_width if a mark exists.

Fixes #1750
2018-10-12 19:58:48 +03:00
Orestis Floros
b09090fa7d Fix sticky focus when switching to workspace on different output
See the testcase for the exact steps to reproduce the problem.
2018-10-11 12:27:57 +03:00
Orestis Floros
6728696ec8 output_push_sticky_windows: Make a bit easier to understand 2018-10-11 12:27:56 +03:00
Orestis Floros
ba8c64c4d9 285-sticky.t: Use kill_all_windows 2018-10-11 12:04:38 +03:00
Orestis Floros
e2d095cb7a Fix flakyness in t/189-floating-constraints.t
Related to #3009.
2018-10-10 19:15:45 +03:00
Orestis Floros
8e1687a317 Rewrite con_swap to work only with queue operations
Benefits are that we don't open a fake container and don't call many
complicated functions that can lead to redraws (x_push_changes calls) as
discussed in #2954.

Fixes #2810:
Windows exchange floating mode & window rects.
Swap will still not work with CT_FLOATING_CONs but this doesn't make
much sense.

Fixes #3280:
The behaviour is not very user friendly but swap behaves exactly as it
should. The rest is a tree_flatten issue. Attached pictures in #2954.
2018-10-10 17:09:26 +03:00
Orestis Floros
11dd2dbc66 tree_move: Don't change focus order when swapping containers
The call to ewmh_update_wm_desktop is removed since the change happens
under the same parent.
2018-10-09 22:39:38 +03:00
Orestis Floros
9380a75186 move.c: Fix move_to_output_directed problems
- Use workspace_show that correctly updates _NET_CURRENT_DESKTOP, warps
mouse.
- Use TAILQ_INSERT_TAIL only for focus_head. Focus order is not related
to direction.
- Call con_focus only if con was focused before. See testcase for
directional move with command criteria.
- Correct first call of move_to_output_directed in tree_move which
didn't call ipc_send_window_event("move", con) and
ewmh_update_wm_desktop().
- Don't produce events when the move doesn't happen. Correct
276-ipc-window-move.t as well.
2018-10-09 22:35:04 +03:00
Orestis
dfe89cc4f1 i3-nagbar: add option for button that runs commands without a terminal (#3258)
Fixes #2199.
2018-10-07 22:43:24 +02:00
Orestis
c583f81c80 Merge pull request #3441 from stapelberg/template
add specific GitHub issue templates
2018-10-07 22:09:28 +03:00
Orestis
f20467ac86 Merge pull request #3440 from stapelberg/disable
configure.ac: add conditionals for building docs/mans
2018-10-07 22:02:43 +03:00
Michael Stapelberg
824d691640 add specific GitHub issue templates
I learnt about this from the GitHub blog:
https://blog.github.com/2018-05-02-issue-template-improvements/
2018-10-07 20:41:42 +02:00
Orestis
2be4975f18 resolve_tilde: strncpy + strlen is pointless (#3436)
strlen already assumes that the string is NULL-terminated.

Like in https://github.com/i3/i3status/pull/312 but for whatever reason
gcc didn't warn about this here.
2018-10-07 20:26:37 +02:00
Orestis
18dbfe699a userguide: Mention know issues for assign (#3434)
Fixes #3222
Fixes #3293
Related to #2060
2018-10-07 20:24:09 +02:00
Michael Stapelberg
acea46e16a configure.ac: add conditionals for building docs/mans
fixes #3378
2018-10-07 20:09:35 +02:00
Orestis
5720ba65ab Merge pull request #3435 from vivien/i3-msg/subscribe
i3-msg/subscribe
2018-10-05 12:16:04 +03:00
Vivien Didelot
cff4fadd72 i3-msg: add support for SUBSCRIBE message type
If i3-msg is invoked with -t subscribe, it will wait for the first event
matching the given payload, before exiting.

For instance, get the number of the next focused workspace with:

    i3-msg -t subscribe '[ "workspace" ]' | jshon -e current -e num

Like inotifywait, the -m flag allows to wait indefinitely for events,
instead of exiting right after receiving the first one.

For example, continuously monitor the names of focused windows with:

    i3-msg -t subscribe -m '[ "window" ]' | jq .container.name
2018-10-04 12:54:45 -04:00
Vivien Didelot
d722d1b0e6 i3-msg: check reply in quiet mode
i3-msg currently exits right after sending the IPC message if the quiet
flag is set. This means that if an error occurred when issuing a
command, e.g. "i3-msg -q foobar", it gets silently ignored.

What we really want is to just skip printing but still check the reply.

At the same time, explicitly print the reply when we need to, instead of
using an exit label.
2018-10-03 10:43:09 -04:00
Orestis
3b73edb511 Merge pull request #3430 from Synray/aspect_ratio
[RFC] Correctly calculate max_aspect
2018-10-02 03:04:21 +03:00
Thomas Fischer
0ede8b9365 Correctly calculate max_aspect 2018-09-28 17:34:18 -07:00
Michael Stapelberg
b8b5a61a2d Merge pull request #3415 from orestisf1993/g_utf8_make_valid
Check g_utf8_make_valid availability
2018-09-28 18:00:06 +02:00
Ingo Bürk
ebf40889a1 Merge pull request #3424 from orestisf1993/con_num_windows
con_num_windows: Count floating windows
2018-09-28 09:27:58 +02:00
Orestis Floros
5e1d327e43 con_num_windows: Count floating windows
Fixes #3423.
2018-09-26 20:04:17 +03:00
Ingo Bürk
27afc572c1 Merge pull request #3421 from Streetwalrus/iconic-state
Reject requests for WM_STATE_ICONIC
2018-09-26 09:07:16 +02:00
Dan Elkouby
6877205ac1 Reject requests for WM_STATE_ICONIC
For compatiblity reasons, Wine will request iconic state and cannot
ensure that the WM has agreed on it; immediately revert to normal to
avoid being stuck in a paused state.
2018-09-25 15:04:55 +03:00
Orestis Floros
daf5ca111f Provide g_utf8_make_valid if not available
See #3415 for licensing discussion.

Fixes Airblader/i3#236
2018-09-25 10:28:20 +03:00
Orestis Floros
aa8215194c Fix typo: terminaison -> termination 2018-09-24 20:53:36 +03:00
Ingo Bürk
bec227236b Merge pull request #3420 from orestisf1993/sncontext==NULL-3419
i3-nagbar & i3-config-wizard: check sncontext != NULL
2018-09-23 20:12:16 +02:00
Orestis Floros
d080f58299 i3-nagbar & i3-config-wizard: check sncontext != NULL
From
07237ff25d/libsn/sn-common.c (L87-L171)
it appears that SnDisplay can't be NULL, so I skipped the check.

Fixes #3419
2018-09-23 17:06:29 +03:00
Ingo Bürk
ac88d06632 Merge pull request #3416 from orestisf1993/530-bug-2229.t
530-bug-229.t: Get rid of smartmatch
2018-09-20 18:52:33 +02:00
Orestis Floros
bf9da466db 530-bug-229.t: Get rid of smartmatch 2018-09-20 19:37:50 +03:00
Orestis
7c21b5995d Merge pull request #3400 from Synray/next
Respect max size from WM_NORMAL_HINTS
2018-09-20 11:36:22 +03:00
Thomas Fischer
690e6d1f0e Respect max size in WM_NORMAL_HINTS 2018-09-20 11:31:19 +03:00
Ingo Bürk
bde4f40b67 Merge pull request #3408 from orestisf1993/__focused__-crash
match_matches_window: Check if focused->window exists
2018-09-19 14:42:28 +02:00
Ingo Bürk
ea559966b5 Merge pull request #3410 from orestisf1993/min_width
docs/i3bar-protocol: Mention skipping blocks with empty full_text
2018-09-17 16:06:27 +02:00
Ingo Bürk
2b898f4c90 Merge pull request #3386 from orestisf1993/click-event
Fix "relative_x" and "width" of click events
2018-09-16 15:48:36 +02:00
Orestis Floros
9b06f1ab05 docs/i3bar-protocol: Mention skipping blocks with empty full_text
Closes #3405.
2018-09-16 15:04:20 +03:00
Orestis Floros
fed059a2b7 Fix "relative_x" and "width" of click events
Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.

Fixes #3380.
2018-09-16 14:58:20 +03:00
Orestis Floros
515dd45f59 match_matches_window: Check if focused->window exists
Fixes #3406.
2018-09-16 14:55:27 +03:00
Ingo Bürk
633583de4a Merge pull request #3409 from orestisf1993/sb_hoff_px
i3bar: Include sb_hoff_px only when needed
2018-09-16 11:11:47 +02:00
Orestis Floros
9936d049cf i3bar: Include sb_hoff_px only when needed
Fixes #3404.
2018-09-15 13:27:18 +03:00
Ingo Bürk
18f705a978 Merge pull request #3403 from orestisf1993/issue-3402
_con_move_to_con: Move upwards only on CT_FLOATING_CON
2018-09-14 15:17:13 +02:00
Orestis Floros
d407393d0d _con_move_to_con: Move upwards only on CT_FLOATING_CON
If target is inside a floating container but not its direct child, the
move can be completed as is.

Fixes #3402.
2018-09-14 16:13:41 +03:00
Ingo Bürk
c7132ec5b0 Merge pull request #3401 from orestisf1993/dump-asy-floating
dump-asy.pl: Include floating_nodes
2018-09-14 13:29:07 +02:00
Orestis Floros
702e83c95e dump-asy.pl: Include floating_nodes 2018-09-14 14:05:51 +03:00
Ingo Bürk
ede954128a Merge pull request #3342 from orestisf1993/tree_close_internal
Simplify tree_close_internal
2018-09-14 12:24:54 +02:00
Ingo Bürk
badcb152f9 Merge pull request #3399 from orestisf1993/156-fullscreen-focus
Make t/156-fullscreen-focus.t easier to work with
2018-09-14 08:19:00 +02:00
Ingo Bürk
9c2ff947e1 Merge pull request #3398 from orestisf1993/i3-save-tree
i3-save-tree: Exclude unsupported "transient_for" property
2018-09-14 08:18:32 +02:00
Orestis Floros
68628e153f Make t/156-fullscreen-focus.t easier to work with
- Add routine that will refocus the expected window on test failure.
Thus, failure on one test will not make others fail.
- Remove some redundant commands, prefer fresh_workspace for screen
changing.
- Kill previous windows between sections if the next section does not
depend on the previous layout.
2018-09-13 17:18:34 +03:00
Orestis Floros
f6bb1e22bb init_ws_for_output: Remove content argument 2018-09-12 16:53:20 +03:00
Orestis Floros
5976381012 output_init_con: Restore focus if possible
Before this, i3 would focus newly created workspaces on output init
2018-09-12 16:47:18 +03:00
Orestis Floros
db3b9e4187 randr_disable_output: Always restore focus
con_detach and con_attach modify the focus stack.

This will make sure that the currently focused workspace will remain
focused after disabling an output.
2018-09-12 16:46:47 +03:00
Orestis Floros
4d21f4cfc2 init_ws_for_output: use workspace_move_to_output
This fixes a crash produced with the following config:
    # i3 config file (v4)
    workspace 1 output $screen1
    workspace 2 output $screen2

    exec --no-startup-id "i3-msg workspace 1, open && i3-msg workspace 2 && xrandr --output $screen2 --off && xrandr --output $screen1 --auto --output $screen2 --auto --right-of $screen1 "

Which results in:
ERROR: AddressSanitizer: heap-use-after-free on address …
READ of size 8 at 0x614000001f48 thread T0
    #0 0x5563df6e73a8 in init_ws_for_output i3/src/randr.c:468
    #1 0x5563df6ef3b4 in randr_query_outputs i3/src/randr.c:940
    #2 0x5563df68dbe1 in handle_screen_change i3/src/handlers.c:450

… is located 264 bytes inside of 448-byte region …
freed by thread T0 here:
    #1 0x5563df634b0a in con_free i3/src/con.c:96
    #2 0x5563df7151e6 in tree_close_internal i3/src/tree.c:344
    #3 0x5563df7280fe in workspace_show i3/src/workspace.c:499
    #4 0x5563df6e7315 in init_ws_for_output i3/src/randr.c:457
    #5 0x5563df6ef3b4 in randr_query_outputs i3/src/randr.c:940
    #6 0x5563df68dbe1 in handle_screen_change i3/src/handlers.c:450

Which is similar to #3228, #3248.
2018-09-12 16:46:47 +03:00
Orestis Floros
a66048a956 i3-save-tree: Exclude unsupported "transient_for" property
Even if i3 supported matching windows through "transient_for", it
wouldn't be useful for the purpose of i3-save-tree.
2018-09-12 14:13:56 +03:00
Ingo Bürk
484854d52f Merge pull request #3395 from lousyd/next
clarify JSON standard non-compliance
2018-09-12 10:24:30 +02:00
Ingo Bürk
1a6c971052 Merge pull request #3396 from orestisf1993/commands
commands.c: Improve error replies
2018-09-12 10:24:06 +02:00
Orestis Floros
e67be1ccd3 commands.c: Improve error replies
- Improve / add various error messages.
- Replace all `LOG(…); ysuccess(false);` with `yerror(…);`.
- switch_mode: Remove redundant "ERROR:" ELOG string.
- cmd_move_con_to_workspace*: Make sure that we don't try to move an
empty workspace to another workspace. This can be problematic when we
match a workspace using command criteria (eg marks) and the target is a
non-existing workspace. We create the new workspace but since nothing is
moved there, we are left with an empty workspace. See added testcase.
2018-09-11 08:35:58 +03:00
Todd Walton
3bfcbb88bf clarify JSON standard non-compliance
Modified section on the layout file's non-compliance with the JSON
standard. The section previously stated that having multiple top-level
JSON texts is non-compliant. This isn't the case. It's just that most
JSON parsers will treat that as if it is non-compliant.
2018-09-10 16:31:25 -04:00
Michael Stapelberg
83327abae4 Merge pull request #3394 from orestisf1993/validate-utf8
libi3: validate UTF8 strings
2018-09-10 09:00:54 +02:00
Orestis Floros
6a1f653508 libi3: validate UTF8 strings
Will validate container / window titles.

Fixes #3156.
2018-09-10 02:00:32 +03:00
Orestis Floros
a3dcee35f3 tree_restore: Check croot
Related to #2414, #3156.
2018-09-09 16:11:48 +03:00
Ingo Bürk
9dc4df81ea Merge pull request #3391 from orestisf1993/yajl-utf8
tree_append_json: Allow strings that are not valid UTF8
2018-09-06 14:15:54 +02:00
Orestis Floros
be6faa3161 tree_append_json: Allow strings that are not valid UTF8
Fixes #3156.

I couldn't reproduce the problem in a "natural" way so I cheated:
1. Start i3 with gdb
2. Set breakpoing on tree_restore
3. Run, open window, i3-msg restart
5. Open the file in *path with a hex editor
6. Edit the "name" field of the window and insert bytes that are not
valid UTF8
7. Continue

After parsing fails, all nodes including croot are incomplete, meaning
they have to be deleted. We can't recover in any reasonable way so we
have to allow non-UTF8 characters to avoid this situation altogether.
2018-09-06 14:58:31 +03:00
Orestis Floros
e8d2b9b7b5 tree_append_json: don't focus freed container 2018-09-06 14:48:21 +03:00
Ingo Bürk
cb6da7169a Merge pull request #3389 from orestisf1993/resize-ensure-1px
Ensure containers have a size of at least 1px after resize
2018-09-06 08:41:00 +02:00
Ingo Bürk
9edb7c7a3b Merge pull request #3390 from orestisf1993/resize-tile
resize set for tiling: default to px when not specified
2018-09-06 08:38:53 +02:00
Ingo Bürk
7257c3b528 Merge pull request #3388 from orestisf1993/cmd_rename_workspace
cmd_rename_workspace: correct order of events
2018-09-06 08:38:03 +02:00
Orestis Floros
64142eeef2 resize set for tiling: default to px when not specified 2018-09-06 05:58:51 +03:00
Orestis Floros
23c1c13d34 Ensure containers have a size of at least 1px after resize
Fixes #2226.
Fixes #2776.
Fixes #3241.
Related to #3194.
2018-09-06 04:56:31 +03:00
Orestis Floros
6846ac98c0 cmd_rename_workspace: correct order of events
1. Rename happens
2. Workspace is moved because of assignments
3. Workspace closes because it is empty (#3248)

Fixes #3248.
2018-09-06 03:42:07 +03:00
Orestis Floros
7c3c50c5cc Improve comment from #3245 2018-09-06 03:42:06 +03:00
Michael Stapelberg
09683d21a9 configure.ac: fix AC_SEARCH_LIBS([shm_open]) for static linking (#3379)
Without specifying -pthread, the conftest fails and -lrt is missing during
compilation of i3, resulting in a failing build.
2018-08-31 08:59:08 -06:00
Ingo Bürk
9595263142 Merge pull request #3376 from orestisf1993/floating-disable-scratchpad
Don't disable floating in internal workspaces
2018-08-28 13:30:57 +02:00
Orestis Floros
9718e38a7a Don't disable floating in internal workspaces 2018-08-28 11:26:20 +03:00
Ingo Bürk
f454a5c2dd Merge pull request #3375 from orestisf1993/ipc_client_timeout
ipc_client_timeout: Fix build when not on linux
2018-08-28 10:20:45 +02:00
Orestis Floros
37b879f4ad ipc_client_timeout: Fix build when not on linux
Also moved the 'end' label because it is unused otherwise.

Reported here: https://github.com/Airblader/i3/issues/233
2018-08-27 22:21:59 +03:00
Ingo Bürk
08a53611f9 Merge pull request #3374 from orestisf1993/startup-notification
Support startup-notification in i3-nagbar & i3-config-wizard
2018-08-27 11:19:26 +02:00
Orestis Floros
bf1cb39b4b Support startup-notification in i3-nagbar & i3-config-wizard
The default i3 config uses the `exec` command without `--no-startup-id`
to launch:
1. i3-nagbar
4cba9fcbda/etc/config (L150)
2. i3-config-wizard
4cba9fcbda/etc/config (L194)

A user that opens i3 for the first time will be greeted with a "loading"
cursor because of i3-config-wizard.
2018-08-25 14:54:16 +03:00
Orestis Floros
a8b90317a0 i3-config-wizard: fix small memleak 2018-08-25 14:54:16 +03:00
Ingo Bürk
4cba9fcbda Merge pull request #3368 from orestisf1993/render_root
(floating) global fullscreen bugs & others
2018-08-24 09:49:41 +02:00
Ingo Bürk
9a53d65e18 Merge pull request #3372 from orestisf1993/direction
Resize tile px
2018-08-24 09:43:20 +02:00
Orestis Floros
096cff0aad Make resize set ppt more accurate
See the testcase for the usecase.
2018-08-24 04:13:25 +03:00
Orestis Floros
51d230ad4c Make resize set px work with tiling containers 2018-08-24 04:13:25 +03:00
Orestis Floros
f28c50b631 541-resize-set-tiling.t: fix "my" variable mask warnings 2018-08-24 04:13:25 +03:00
Orestis Floros
423e20b960 cmd_resize* statics: remove useless 'way' argument 2018-08-24 04:13:25 +03:00
Orestis Floros
26bbaf6237 Make cmd_resize_tiling_width_height work with pixels 2018-08-24 04:13:25 +03:00
Orestis Floros
2ead7745d6 Make cmd_resize_tiling_direction work with pixels
Introduces resize_neighboring_cons in resize.c which is also used by
resize_graphical_handler.

Co-authored-by: Andrew Laucius <andrewla@gmail.com>
Authored original code and tests in #3240. I rewrote most of the
resizing code and fixed the failing tests.
2018-08-24 04:13:03 +03:00
Orestis Floros
ea43507bed precalculate_sizes: don't malloc needlessly 2018-08-24 04:12:24 +03:00
Orestis Floros
7b9318a541 precalculate_sizes: round sizes instead of flooring them
This will lead to more accurate and consistent container sizes.

Needed to fix the failing test of #3240.
2018-08-24 04:12:14 +03:00
Orestis Floros
db294f4505 Improve resize_graphical_handler code style
- int return type is not useful
- Consistent comment style
2018-08-23 22:04:22 +03:00
Orestis Floros
9522b46f1b Introduce parse_direction
Also fixes the following bug: in the fix for #1011 in
cmd_resize_floating direction "width" is not considered.

Influenced by #3240.
2018-08-23 15:45:24 +03:00
Orestis Floros
6e1b79e057 Introduce orientation_from_direction 2018-08-23 15:36:23 +03:00
Ingo Bürk
72cc719c5d Merge pull request #3369 from orestisf1993/clang-format
Apply compatible changes from clang-format 6.0.1
2018-08-22 20:29:32 +02:00
Orestis Floros
e6202d43f5 Apply compatible changes from clang-format 6.0.1
These are the changes that clang-format 6.0.1 makes to the codebase that
clang-format-3.8 doesn't change back.

Useful for those that use a more recent version of clang-format in their
local machines.
2018-08-22 14:51:17 +03:00
Orestis Floros
e1a83d057f handle_configure_request: check for scratchpad once 2018-08-22 14:23:01 +03:00
Orestis Floros
9190a9ab70 handle_configure_request: use 'goto out' 2018-08-22 14:11:26 +03:00
Orestis Floros
9ae84593ba handle_configure_request: reuse 'workspace' variable 2018-08-22 14:10:42 +03:00
Orestis Floros
0ac75bea5a con_border_style: check con->fullscreen_mode directly 2018-08-22 14:09:05 +03:00
Orestis Floros
efc78de4ee Introduce con_get_fullscreen_covering_ws
This commit will also fix the following bugs:
1. click.c: Users could drag global fullscreen floating containers.
2. render.c: Floating containers would get rendered with a global fullscreen container in another
workspace.
2018-08-22 14:05:50 +03:00
Orestis Floros
b3e69ed12a render_root: fix popup_during_fullscreen logic
The first issue is that there seems to be a typo: fullscreen->window
should have been child->window. The corrected check is redundant since
the while loop checks if the transient_con has a window.

The second issue is that popup_during_fullscreen is never checked even
though the behaviour should be exclusive to the "smart" option.
2018-08-22 03:45:35 +03:00
Ingo Bürk
2f3c8b6484 Merge pull request #3365 from orestisf1993/DRAG_REVERT
floating_drag_window: return on DRAG_REVERT
2018-08-21 20:39:26 +02:00
Ingo Bürk
e906cdad66 Merge pull request #3366 from orestisf1993/NUM_HANDLERS
property_notify: use NUM_HANDLERS
2018-08-21 20:38:31 +02:00
Ingo Bürk
6d3fc089f9 Merge pull request #3367 from orestisf1993/dragloop_callback
Call dragloop callback on DRAG_SUCCESS
2018-08-21 20:37:56 +02:00
Orestis Floros
2c78f2458c Call dragloop callback on DRAG_SUCCESS
A race condition is possible. For example, if we first receive a
XCB_MOTION_NOTIFY event and then, while drain_drag_events is still
running, a XCB_BUTTON_RELEASE event the first event is never handled
because we return.

This fixes the flakiness of the tests in #3085.
2018-08-21 21:19:57 +03:00
Orestis Floros
5d89bd344f floating_drag_window: return on DRAG_REVERT
Right now tree_render() is called twice on DRAG_REVERT since
floating_reposition calls it.
Also, on DRAG_REVERT the scratchpad state shouldn't change since the
user canceled the action.
2018-08-21 21:06:00 +03:00
Orestis Floros
b1aa2fb1c4 property_notify: use NUM_HANDLERS 2018-08-21 21:04:46 +03:00
Ingo Bürk
e8dee4308a Merge pull request #3364 from orestisf1993/warp-randr_query
randr_query_outputs: con_activate -> workspace_show
2018-08-17 11:55:15 +02:00
Orestis Floros
789a09a6e7 Use con_focus instead of con_activate for workspace 2018-08-17 12:49:34 +03:00
Orestis Floros
ba29290123 Typo: output -> content 2018-08-17 12:49:34 +03:00
Orestis Floros
7010644964 randr_query_outputs: con_activate -> workspace_show
workspace_show will call x_set_warp_to if needed.

Fixes #3333
2018-08-17 12:49:15 +03:00
Ingo Bürk
2d3c2f0615 Merge pull request #3363 from orestisf1993/regress-scratchpad-focus
Call con_activate after moving scratchpad window to current ws
2018-08-17 11:42:29 +02:00
Orestis Floros
cac28b69d4 Call con_activate after moving scratchpad window to current ws
Fixes #3361
2018-08-17 12:34:20 +03:00
Ingo Bürk
4b3ff9cdd4 Merge pull request #3353 from orestisf1993/free_ws_assignments
Free ws_assignments on reload
2018-08-09 16:49:21 +02:00
Orestis Floros
01e971b51e Free ws_assignments on reload
This fixes an unreported bug where deleting a workspace assignment and
reloading the config file would keep the assignment.
2018-08-09 17:28:05 +03:00
Michael Stapelberg
5a54a1ab04 Merge pull request #3263 from orestisf1993/misbehaving-ipc-queue-2999
Kill misbehaving subscribed clients instead of hanging
2018-08-08 19:14:15 +02:00
Orestis Floros
37d0105c83 Kill misbehaving subscribed clients instead of hanging
This change only affects clients that are subscribed to events, which
should be the main cause of our problems.

In the common case (no buffered data) the behaviour doesn't change at
all: the message is sent directly, no ev_io / ev_timeout callback is
enabled. Once a write to a client's socket is not completed fully
(returns with EAGAIN error), we put the message in the tail of a queue
and init an ev_io callback and a corresponding timer. If the timer is
triggered first, the socket is closed and the client connection is
removed. If the socket becomes writeable before the timeout we either
reset the timer if we couldn't push all the buffered data or completely
remove it if everything was pushed.

We could also replace ipc_send_message() for all client connections in
i3, not just those subscribed to events.

Furthermore, we could limit the amount of messages stored and increase
the timeout (or use multiple timeouts): eg it's ok if a client is not
reading for 10 seconds and we are only holding 5KB of messages for them
but it is not ok if they are inactive for 5 seconds and we have 30MB of
messages held.

Closes #2999
Closes #2539
2018-08-08 19:14:56 +03:00
Harry Lawrence
3ea3935e6a Added libiconv to search libs for OpenBSD patch (#3336) 2018-08-04 18:27:25 +01:00
Ingo Bürk
65eb54c0ba Merge pull request #3319 from Stunkymonkey/format_placholders-case_sensitive
make format_placeholders case-sensitive
2018-08-04 09:23:11 +02:00
Ingo Bürk
d47b841f1a Merge pull request #3344 from downzer0/chore/i3-sensible-terminal--hyper
enhancement: adds hyper as a sensible terminal option
2018-08-02 17:05:29 +02:00
downzer0
42c5feb22f enhancement: adds hyper as a sensible terminal option
- hyper.is
2018-08-01 08:21:44 -05:00
Orestis Floros
b0bbe53d04 Introduce free_ipc_client 2018-07-31 14:39:07 +03:00
Orestis Floros
f908403376 Simplify tree_close_internal
This commit makes multiple changes in tree_close_internal. I didn't
split them because they are not completely independent.

- Remove force_set_focus parameter
This parameter was always set to `false` throughout the code base except
for one case where it was set to `(con == focused)`, when killing a
floating con's parent (the one with type CT_FLOATING_CON). But this case
is not needed anymore since the special handling of CT_FLOATING_CONs in
con_next_focused was removed in #2941.
- Assume that con_next_focused does not returned a container of type
CT_DOCKAREA. This is reasonable since con_next_focused uses the
focus_head stack and has special handling of CT_DOCKAREA containers.
- Remove is_mapped
This variable was only used in the if block towards the end of
tree_close_internal. Ignoring the, now removed, dockarea code and the
use of force_set_focus this block performed only one useful action:
focus the `next` container when `con == focused`. `con == focused` was a
necessary and sufficient condition for the con_activate call:
if `con != focused` we could reach the inner if blocks because of the
other conditions but would never focus another container. If `con ==
focused` then all other conditions would be irrelevant.
- Remove special handling of floating containers
Since the `next` focused container is calculated through the parent for
floating containers, I moved this code to con_next_focused.
Also, because of the removal of force_set_focus, it appears that we can
call con_on_remove_child for floating containers as well.
2018-07-30 19:41:24 +03:00
Ingo Bürk
715cea61af Merge pull request #3340 from PandorasFox/next
fix height offset calculation in pango text drawing
2018-07-29 12:10:26 +02:00
Cassandra Fox
ad236dbaec fix height offset calculation in pango text drawing 2018-07-28 19:31:32 -07:00
Ingo Bürk
d7022c7011 Merge pull request #3329 from lasers/next
docs/i3bar-protocol: fix typo
2018-07-16 16:11:04 +02:00
lasers
809eea2630 docs/i3bar-protocol: fix typo 2018-07-16 08:54:08 -05:00
Ingo Bürk
a1351138d1 Merge pull request #3254 from orestisf1993/issue-555
Multiple assignments of workspaces to outputs (#555)
2018-07-12 16:18:13 +02:00
Orestis Floros
bce088679a Allow multiple assignments of workspaces to outputs
Also makes get_assigned_output work with the primary output:
    workspace X output primary
will now work.

Fixes #555.
2018-07-12 17:07:01 +03:00
Ingo Bürk
dbf4e1b95d Merge pull request #3327 from orestisf1993/rename-mouse-bug
cmd_rename_workspace: always call con_focus
2018-07-12 06:27:56 +02:00
Ingo Bürk
4808334b66 Merge pull request #3328 from orestisf1993/next
Fix ISSUE_TEMPLATE typo
2018-07-12 06:27:13 +02:00
Orestis Floros
4cd223f80a Fix ISSUE_TEMPLATE typo 2018-07-12 03:49:07 +03:00
Orestis Floros
d1652ca7cd cmd_rename_workspace: always call con_focus
This was introduced in 252db3b8c (#3245). That commit moved the
con_activate line inside the loop, meaning it wouldn't always be called.

When the mouse moved after a rename with focus_follows_mouse enabled,
check_crossing_screen_boundary (src/handlers.c:111) called
con_descend_focused that used the wrong focus order.

I also change con_activate to con_focus since we don't really want to
raise floating containers there.

Fixes #3325
2018-07-12 03:42:38 +03:00
Felix Buehler
37ea56c221 make format_placeholders case-sensitive 2018-07-10 23:24:50 +02:00
Ingo Bürk
b8505bb611 Merge pull request #3324 from orestisf1993/xdg_config
Correct XDG paths precedence for config files
2018-07-10 08:23:32 +02:00
Orestis Floros
fd70ea6b31 Correct XDG paths precedence for config files
Fixes #3323
2018-07-10 05:04:34 +03:00
Orestis Floros
d525eb80ae Use get_assigned_output for numbers
This prohibits the usage of workspaces assigned to other outputs in
create_workspace_on_output.

Eg, with config:
    workspace 1 output fake-0
    workspace 2 output fake-0
and 2 screens workspace 2 would be used for the second screen even
though it is assigned to the first one.

Also introduces a test for workspace assignments that includes the case
described above and some tests that don't fail in the next branch.
2018-06-27 14:56:50 +03:00
Orestis Floros
1d5b43c18f Move get_output_for_workspace() to i3test 2018-06-27 14:56:50 +03:00
Orestis Floros
bc439de755 Introduce get_assigned_output
This also replaces code in create_workspace_on_output() that is
theoretically more efficient but:
1. It isn't a huge difference since it depends on the number of outputs,
that shouldn't be high.
2. get_assigned_output will be modified and used for #555, then its
logic should be followed in create_workspace_on_output() too.

Another note for create_workspace_on_output: if assigned is not NULL the
condition (assigned != output->con) should never be false, ie if there
is an assigned output to this name, it isn't the current one. This
happens because the current callers check for assignments before calling
create_workspace_on_output().
2018-06-27 14:56:31 +03:00
Ingo Bürk
6339427f01 Merge pull request #3179 from orestisf1993/issue-2733
Correctly handle bindings for the same key with and without --release
2018-06-22 14:39:02 +02:00
Ingo Bürk
d8bb8273da Merge pull request #3313 from czak/fix-border-artifacts
Border artifacts when moving window
2018-06-22 13:48:15 +02:00
Łukasz Adamczak
606050a700 Consider rect changed when its position changes 2018-06-22 12:34:11 +02:00
Ingo Bürk
6c34063f95 Merge pull request #3309 from orestisf1993/detectable-autorepeat
Enable detectable autorepeat
2018-06-20 08:38:46 +02:00
Ingo Bürk
8bd31842e1 Merge pull request #3310 from KJoke70/patch-1
Update i3-msg.man: added get_config and send_tick
2018-06-15 14:55:49 +02:00
Martin
5debba0d1c Update i3-msg.man: added get_config and send_tick
Added get_config and send_tick which are mentioned [here](https://i3wm.org/docs/ipc.html).
2018-06-15 14:37:14 +02:00
Orestis Floros
b87bc70cd6 Enable detectable autorepeat
https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Detectable_Autorepeat

Detectable autorepeat should only affect --release bindings. Currently,
when a user keeps a key pressed, we get multiple KeyPress and KeyRelease
events. With this change, we still get multiple KeyPress events, which
means that you can still keep a key pressed to repeatedly execute a
normal binding, but only one KeyRelease event when the key is physically
released.

Unfortunately, this change is not currently testable because detectable
autorepeat doesn't seem to work under Xephyr. AwesomeWM experienced the
same problem:
6f2424e901

Fixes #3306
2018-06-15 13:56:31 +03:00
Ingo Bürk
997459a1db Merge pull request #3307 from orestisf1993/link
Fix link
2018-06-07 22:52:05 +02:00
Orestis Floros
5ab8c766c4 Fix link
Equivalent from the same version:
https://cgit.freedesktop.org/xorg/xserver/tree/xkb/xkbEvents.c?h=xorg-server-1.17.2#n927
2018-06-07 23:07:16 +03:00
Ingo Bürk
00a8a91c00 Merge pull request #3303 from orestisf1993/back_and_forth
docs: link workspace_auto_back_and_forth from workspace command
2018-06-02 17:17:15 +02:00
Orestis Floros
97536f04df docs: link workspace_auto_back_and_forth from workspace command
The current text is confusing. '--no-auto-back-and-forth' doesn't
disable the 'workspace back_and_forth' command, the flag is not even
valid for that command.
2018-06-02 18:03:34 +03:00
Ingo Bürk
05a1dc0f6e Merge pull request #3301 from Streetwalrus/swallow-reframe
Reframe swallowed windows if depth doesn't match
2018-06-02 14:51:18 +02:00
Dan Elkouby
7ac37d8ae4 Reframe swallowed windows if depth doesn't match
X will not allow a window with ParentRelative background to be created
or reparented under a window with mismatching color depth.
Deal with this by destroying the container frame and creating a new one
with the right depth upon swallowing.
Defer destruction of the frame window until after the updated tree has
been rendered to avoid some distracting flickering.

Fixes #3297
2018-06-02 14:32:47 +03:00
Ingo Bürk
26f50898fd Updated ISSUE_TEMPLATE.md (#3295) 2018-05-20 16:51:26 +02:00
Ingo Bürk
ef378d87b6 Merge pull request #3282 from orestisf1993/strncpy-to-memcpy
Replace strncpy call with memcpy when result is not NUL-terminated
2018-05-09 14:34:00 +02:00
Orestis Floros
f4981f97bc Replace strncpy call with memcpy when result is not NUL-terminated
This fixes a new warning from GCC 8.1, -Wstringop-truncation:
https://gcc.gnu.org/gcc-8/changes.html
https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wstringop-truncation

Replacing with memcpy is what gcc suggests:
> As another example, the following call to strncpy results in copying
> to d just the characters preceding the terminating NUL, without
> appending the NUL to the end. Assuming the result of strncpy is
> necessarily a NUL-terminated string is a common mistake, and so the
> call is diagnosed. To avoid the warning when the result is not
> expected to be NUL-terminated, call memcpy instead.
>    void copy (char *d, const char *s)
>    {
>      strncpy (d, s, strlen (s));
>    }
2018-05-08 17:05:46 +03:00
Orestis
1cdb1ab721 Merge pull request #3279 from Streetwalrus/next
Activate the focused child when scrolling over tab/stack decorations
2018-05-05 13:49:13 +03:00
Dan Elkouby
94bc401680 Activate the focused child when scrolling over tab/stack decorations
fbce834b introduced a bug where scrolling over the decoration while
another container is focused would not focus the tabbed/stacked
container itself, but would instead move focus through the currently
focused container.
2018-05-05 13:30:48 +03:00
Ingo Bürk
d302af2312 Merge pull request #3272 from orestisf1993/fake-outputs
Fix: ConfigureNotify can crash i3 with fake-outputs
2018-05-04 21:58:01 +02:00
Ingo Bürk
ae9e2dd86f Merge pull request #3277 from orestisf1993/resize-set
Resize set improvements
2018-05-04 21:57:12 +02:00
Orestis Floros
c50bf50f09 resize set: accept 'width' and 'height' keywords
Fixes #3275
2018-05-02 19:02:38 +03:00
Orestis Floros
b901fc9464 resize set for floating: interpret 0 as 'no change'
Fixes #3276
2018-05-02 19:02:38 +03:00
Orestis Floros
64b8b4b766 252-floating-size.t: Reduce code duplication 2018-05-02 18:12:10 +03:00
Ingo Bürk
981e901b79 Merge pull request #3274 from orestisf1993/DEPENDS
Fix DEPENDS table
2018-05-01 19:13:08 +02:00
Orestis Floros
37e3663c77 Fix DEPENDS table
- Align right border
- Add a missing '/' in libsn's and util-xrm's link for consistency
- Replace wrong character for border next to pango's min version
- Correct the Pod::Simple link
2018-05-01 13:49:55 +03:00
Oliver Graff
252db3b8cf Don't refocus a workspace cleaned up by workspace_show during rename
When moving a workspace to the current output by way of a rename, if the
current workspace is empty, it will be removed by `workspace_show`.
Attempting to restore focus to this removed workspace causes a crash.
Follow the pattern in workspace.c:996 to only restore the original focus if the
original workspace still exists.

Add a test to ensure that the renamed workspace moves to its appropriate
output and that a crash does not occur.

Fixes #3228
2018-05-01 11:25:13 +03:00
Ingo Bürk
e8057b2fbc Merge pull request #3270 from orestisf1993/ADD_TRANSLATED_KEY
Define ADD_TRANSLATED_KEY once
2018-04-30 10:02:34 +02:00
Orestis Floros
1f74f8d2c1 Fix: ConfigureNotify can crash i3 with fake-outputs
handle_screen_change() and handle_configure_notify() call
randr_query_outputs() where root_output is not initialized because
randr_init() is never called when config.fake_outputs is not NULL.
2018-04-30 03:54:38 +03:00
Orestis
6f11b6fa4a send_tick: set "first" field (#3271)
According to the docs, the tick event should return:
    {
     "first": false,
     "payload": "arbitrary string"
    }
2018-04-28 14:47:28 +02:00
Orestis Floros
1681ab4496 Define ADD_TRANSLATED_KEY once 2018-04-28 12:21:39 +03:00
Ingo Bürk
5813525c62 Merge pull request #3268 from orestisf1993/janitorial
Janitorial
2018-04-27 11:14:45 +02:00
Ingo Bürk
19596981a0 Merge pull request #3267 from orestisf1993/cmd_shmlog
cmd_shmlog: use parse_long()
2018-04-27 08:38:29 +02:00
Orestis Floros
16f8fe28d9 main.c: remove redundant 'focused' declaration
Previously declared in tree.h:17.
2018-04-27 01:16:42 +03:00
Orestis Floros
0b5a2092a0 Fix redundant casts to the same type
Found using clang-tidy's google-readability-casting.
2018-04-27 00:09:42 +03:00
Orestis Floros
aca7790217 Fix redundant return statements
… at the end of a function with a void return type.

Found using clang-tidy's readability-redundant-control-flow.
2018-04-27 00:09:42 +03:00
Orestis Floros
2f2053284e cmd_shmlog: use parse_long() 2018-04-26 23:47:45 +03:00
Ingo Bürk
55dd5b8d84 Merge pull request #3261 from orestisf1993/swap-3259
Don't call con_fullscreen_permits_focusing with ignore_focus
2018-04-22 16:35:25 +02:00
Orestis Floros
b5f887287a Don't call con_fullscreen_permits_focusing with ignore_focus
When we don't modify the focus we aren't risking giving focus to a
container behind the current fullscreen one.

_con_move_to_con can with ignore_focus is called through the swap
command or through con_move_to_workspace for floating containers. This
change shouldn't break the expectations of the callers there.

Fixes issue #3259.
2018-04-22 16:56:36 +03:00
Orestis Floros
799e3951a2 con_swap: exit when first _con_move_to_con fails
This is enough to fix the crash discussed in #3259 even though the next
commit can fix it independently. This commit is useful because it
generally makes sense to abort the command when the first call to
_con_move_to_con fails.
2018-04-22 03:48:50 +03:00
Ingo Bürk
5a0f02b7ff Merge pull request #3230 from hwangcc23/fix-3227
Make "scratchpad show" return correct info
2018-04-21 17:57:54 +02:00
Ingo Bürk
53648511b3 Merge pull request #3256 from orestisf1993/REQUIRED_OPTION
Remove obsolete macro REQUIRED_OPTION
2018-04-21 17:56:06 +02:00
Ingo Bürk
4b95e2c1e0 Merge pull request #3260 from orestisf1993/cmd_border
cmd_border: improve width selection
2018-04-21 17:55:51 +02:00
Orestis Floros
bd7a5ee48a cmd_border: improve width selection
- 'border toggle' now accepts an optional pixel argument which will be
ignored when switching to BS_NONE.
- 'border pixel' now defaults to 1 pixel instead of 2.
- Calling 'border normal' or 'border pixel' will use the configured
default_border_width if one exists. Also applies to floating windows.
2018-04-21 16:50:57 +03:00
hwangcc23
4869becfee Make "scratchpad show" return correct info
Fix the issue #3227(https://github.com/i3/i3/issues/3227).

1).Make cmd_scratchpad_show() use the information coming from scratchpad_show().
2).Add a test case 298-scratchpad-show.t.
2018-04-20 22:30:41 +08:00
Orestis Floros
8fba543719 Remove obsolete macro REQUIRED_OPTION
Was used for the removed option 'terminal' and for 'font'. 'font' is no
longer this aggressive and doesn't use the macro.

Killing i3 when an option is missing would be super backwards
incompatible so I doubt we are going to use this ever again.
2018-04-20 13:05:23 +03:00
Ingo Bürk
a40bcef438 Merge pull request #3255 from orestisf1993/FOR_TABLE
Remove obsolete macro FOR_TABLE
2018-04-20 05:30:51 +02:00
Orestis Floros
0254228861 Remove obsolete macro FOR_TABLE
Was added in 38c8541807, should have been
removed in c145f7e529.
2018-04-20 06:13:40 +03:00
Orestis
ff543b8b56 Merge pull request #3253 from stapelberg/sync
Makefile.am: add forgotten include/sync.h
2018-04-19 21:20:44 +03:00
Michael Stapelberg
0c3f5f343c Makefile.am: add forgotten include/sync.h 2018-04-19 20:10:54 +02:00
Ingo Bürk
26ba03930f Merge pull request #3250 from rtgnx/next
docs/ipc: update tree node with window_properties
2018-04-18 22:30:22 +02:00
Adrian Cybulski
7381ae3e20 docs/ipc: update tree node with window_properties 2018-04-18 12:11:07 +01:00
Ingo Bürk
3c66f615e2 Merge pull request #3246 from orestisf1993/bar-modifier-3234
i3bar: make modifier behave like floating_modifier
2018-04-17 13:13:18 +02:00
Orestis Floros
fe6b3b7474 i3bar: make modifier behave like floating_modifier
Pressed modifiers are determined like in click.c:handle_button_press.

Fixes #3234.
2018-04-17 02:00:03 +03:00
Ingo Bürk
67a60a9454 Merge pull request #3244 from orestisf1993/issue-3220
i3bar: don't reset verbosity when parsing config values
2018-04-16 11:59:49 +02:00
Orestis Floros
0a72f2d535 i3bar: don't reset verbosity when parsing config values
When i3bar is called with the -V flag but there is no 'verbose yes'
directive in the bar {} config, the verbosity config value is reset.

This will introduce the opposite, negligible issue: you can't disable
i3bar's verbosity by deleting the 'verbose yes' directive in the bar {}
config. To fix this we would need an enum for config.verbose.

Closes #3220.
2018-04-16 01:37:18 +03:00
Ingo Bürk
ab47d664c2 Merge pull request #3243 from avindra/next
man: Fix title markers
2018-04-15 21:43:52 +02:00
Takashi Iwai
1f551052de man: Fix title markers
The title marker lines have to be aligned with the previous lines.
The error was caught by asciidoctor, which tends to be picker than
asciidoc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-15 15:34:40 -04:00
Ingo Bürk
1e5aaa2d10 Merge pull request #3236 from hwangcc23/fix-3220
Add an i3bar flag: --verbose
2018-04-14 14:39:54 +02:00
hwangcc23
e26fd91cf8 Add an i3bar flag: --verbose
Fix the issue #3220. (https://github.com/i3/i3/issues/3220)
2018-04-13 23:09:44 +08:00
Ingo Bürk
b688164235 Merge pull request #3231 from orestisf1993/target-is-a-workspace
Fix crash when moving container to marked workspace
2018-04-07 21:13:41 +02:00
Orestis Floros
626af81232 Fix crash when moving container to marked workspace
Was a small typo.

This also has the (positive) side-effect of allowing to move all the
content of a marked workspace next to the target container, see added
tests.
2018-04-07 21:58:55 +03:00
Ingo Bürk
a92acadfc0 Merge pull request #3223 from orestisf1993/minor
Minor changes
2018-04-05 10:59:34 +02:00
Orestis
bfe047e8bc Merge pull request #3221 from ograff/issue-3208
Issue #3208
2018-04-05 11:32:38 +03:00
Oliver Graff
e4a184e77e Workspace renaming: Interpret outputs as nondirectional
Currently when renaming outputs, an output assignment of "left" will
cause the workspace to move left. Treat this assignment as a proper name
instead (even though it is unlikely an output will be named "left").

Move logic for determining output to move to out of
`workspace_move_to_output`

Add test for ignoring direcionality during rename.

Fixes #3208.
2018-04-04 13:37:59 -04:00
Orestis Floros
0aa636b207 Prefer compiler warnings to assertions for unhandled switch cases
Using 'default:' cases can hide logical errors which would lead to i3
crashes for users. With this change the compiler will print a warning
when a case is not handled. For example, if I add a new value in the
Font.type enum:
../../i3/libi3/font.c: In function ‘draw_text’:
../../i3/libi3/font.c:378:5: warning: enumeration value ‘NEWFONT’ not handled in switch [-Wswitch]
     switch (savedFont->type) {
     ^~~~~~
2018-04-04 19:20:55 +03:00
Orestis Floros
393412a204 A__NET_REQUEST_FRAME_EXTENTS: use render_font_height() 2018-04-04 18:09:34 +03:00
Ingo Bürk
bc760c2036 Merge pull request #3215 from orestisf1993/focus-next-prev
Small window decoration scrolling bugfix
2018-04-03 20:42:00 +02:00
Orestis Floros
96ee336a0b Use con_orientation instead of ternary operator 2018-04-01 12:18:27 +03:00
Orestis Floros
fbce834b20 Window decoration scrolling: don't focus sibling
The current behaviour is buggy in the following layout:
T [ A* V [ B C ] ], where the focus stack in V is B > C.
When the user scrolls down, focus correctly moves to B but if the user
scrolls down again the whole vertical container is focused.

This happens because 'bool scroll_next_possible' is false but
con_activate is called on the tabbed container's sibling - the vertical
container.
2018-04-01 12:18:27 +03:00
Ingo Bürk
666aa9e0dd Merge pull request #2941 from orestisf1993/issue-2938
Fix focus order in floating_disable & floating_enable for unfocused windows
2018-03-31 20:34:17 +02:00
Ingo Bürk
8a805cdd5c Merge pull request #3214 from stapelberg/sync
unflake t/525-i3bar-mouse-bindings.t
2018-03-30 21:33:03 +02:00
Michael Stapelberg
874151bb09 t/525-i3bar-mouse-bindings.t: sync with i3 _and_ i3bar
See the comment in the code for rationale.
2018-03-30 21:14:53 +02:00
Michael Stapelberg
145ac532aa i3bar: forward the sync request via IPC, not X11
i3bar’s X11 output is not what our testcases are testing — the state
manipulations which i3bar triggers via IPC messages to i3 are what we are
interested in.
2018-03-30 21:14:51 +02:00
Michael Stapelberg
eca8fae2de introduce the sync IPC command
Sending the sync command via IPC ensures pending IPC messages are handled by i3
before the sync response is read. This is rarely useful for direct IPC
connections to i3, but becomes useful when synchronizing with i3bar, which might
have pending IPC messages in response to button clicks.
2018-03-30 21:09:52 +02:00
Michael Stapelberg
725ee3ce62 move i3 sync code into sync_respond (for following commits) 2018-03-30 21:05:32 +02:00
Orestis Floros
791e407fd3 Remove special handling of floating containers in con_next_focused
Explanation for the changed test:
After $third is switched to floating, the test moves focus to $second.
So, the parent of $second (the stacked container) is above $third in the
focus stack and it's children ($first, $second) should get focused
before $second. When $second is switched to floating the correct focus
order for the workspace should be $second->parent (floating con is the
parent) > $first->parent (stacked con) > $third.

Fixes #1975
2018-03-30 18:29:33 +03:00
Orestis Floros
2c6da57e81 Add testcases for toggling floating windows from different workspaces 2018-03-30 18:29:33 +03:00
Orestis Floros
3a89f88fb6 Fix focus order in floating_enable for unfocused windows
Partially fixes issue #2938
2018-03-30 18:29:32 +03:00
Orestis Floros
10a3c1e827 Fix focus order in floating_disable for unfocused windows
Partially fixes issue #2938
2018-03-30 18:20:40 +03:00
Orestis Floros
60875c7bcb Use con_detach instead of TAILQ_REMOVE in floating 2018-03-30 18:20:40 +03:00
Joona
4e0bf58109 Add --modifier flag to i3-config-wizard (#3210)
Add --modifier flag to i3-config-wizard

The --modifier flag accepts either alt or win, and will generate the
configuration file without opening a window.

Also adds i3-config-wizard's flags to the manpage.

Fixes #3136.
2018-03-30 13:57:41 +03:00
Ingo Bürk
63133c878f Merge pull request #3213 from orestisf1993/issue-2535
Fix memory leak when _XKB_RULES_NAMES can't be found
2018-03-30 12:48:12 +02:00
Orestis Floros
4143f3abfc Fix memory leak when _XKB_RULES_NAMES can't be found
Steps to reproduce:

1. Force the branch to be taken:

diff --git a/src/bindings.c b/src/bindings.c
index fe77bc8f..caa5848c 100644
--- a/src/bindings.c
+++ b/src/bindings.c
@@ -941,7 +941,7 @@ bool load_keymap(void) {

     struct xkb_keymap *new_keymap = NULL;
     int32_t device_id;
-    if (xkb_supported && (device_id = xkb_x11_get_core_keyboard_device_id(conn)) > -1) {
+    if (0) {
         if ((new_keymap = xkb_x11_keymap_new_from_device(xkb_context, conn, device_id, 0)) == NULL) {
             ELOG("xkb_x11_keymap_new_from_device failed\n");
             return false;

2. Run `python2 ./xproperty.py _XKB_RULES_NAMES ''` (from
https://github.com/siemer/xproperty) in the xinitrc
3. Memory sanitizers detect memory leaks.

Note: We don't (and didn't) pass NULL in xkb_keymap_new_from_names() but
an xkb_rule_names structures with NULL fields (fill_rmlvo_from_root only
fills its argument when there are no errors) should be equivalent:
767fa86d42/NEWS (L349-L351)
> The function xkb_keymap_new_from_names() now accepts a NULL value for
the 'names' parameter, instead of failing. This is equivalent to passing
a 'struct xkb_rule_names' with all fields set to NULL.

Fixes #2535.
2018-03-29 17:46:41 +03:00
Ingo Bürk
77bfa595df Merge pull request #3200 from orestisf1993/_con_move_to_con
_con_move_to_con: don't change focus when moving to active workspace
2018-03-29 12:06:29 +02:00
Ingo Bürk
145a93d5b4 Merge pull request #3207 from orestisf1993/get_workspace_by_
Introduce get_workspace_by_* functions
2018-03-29 12:06:05 +02:00
Orestis
6dfa348960 Merge pull request #3192 from Exagone313/next
translate_keysyms: fix potential memory leak
2018-03-29 12:16:12 +03:00
Orestis Floros
0b5799412a Introduce get_existing_workspace_by_num 2018-03-28 15:18:43 +03:00
Orestis Floros
6a2728ba79 Introduce get_existing_workspace_by_name 2018-03-28 15:18:43 +03:00
Orestis Floros
6d983b5ee0 _con_move_to_con: don't change focus when moving to active workspace
Seems to be the intention, indicated by this comment (con.c:1307-1309):
    /* For split containers, we use the currently focused container within it.
     * This allows setting marks on, e.g., tabbed containers which will move
     * con to a new tab behind the focused tab. */

Related to #3085.
2018-03-28 15:10:11 +03:00
Elouan Martinet
e6bd2006bc Fix potential memory leak
xkb_state_new uses calloc and may fail in a rare case, which would cause a memory leak.
Note that xkb_state_unref checks if the parameter given is not null (!state) before freeing.
Calls to xkb_state_new have been grouped to remove code duplication.

Signed-off-by: Elouan Martinet <exa@elou.world>
2018-03-27 10:23:16 +00:00
Ingo Bürk
45be56be33 Merge pull request #3205 from orestisf1993/free
cmd_append_layout: resolve_tilde already allocates memory
2018-03-27 09:02:28 +02:00
Orestis Floros
e424a31307 cmd_append_layout: resolve_tilde already allocates memory
Fixes a small memory leak with all append_layout commands.
2018-03-27 03:37:57 +03:00
Ingo Bürk
6f4b0e1fdd Merge pull request #3204 from orestisf1993/focus_next
_con_move_to_con: focus_next isn't always con_next_focused(con)
2018-03-26 21:35:12 +02:00
Orestis
a0309cbd52 xcb_drag_prepare_cb: drain events (#3193)
As discussed in PR #3085, X11 events can appear while
dragloop->callback() is running.

Co-authored-by: Michael Stapelberg <michael@stapelberg.de>
2018-03-26 17:59:34 +02:00
Orestis Floros
c7dde08673 _con_move_to_con: focus_next isn't always con_next_focused(con)
con_next_focused uses con's parent. But since con can be inside an
unfocused container this means that one of it's siblings could become
focused in the current workspace.
2018-03-26 00:09:26 +03:00
Ingo Bürk
f560519f5c Merge pull request #3203 from orestisf1993/free
memory leaks
2018-03-25 20:12:16 +02:00
Orestis Floros
b0997234ab con_toggle_layout: free(tm_dup) outside loop 2018-03-25 20:48:20 +03:00
Orestis Floros
e19a120961 Free A_TO_WORKSPACE_NUMBER assignments 2018-03-25 20:35:53 +03:00
Orestis Floros
a5014dc7f8 cfg_workspace: memleak on duplicate workspace assignment
assignment->output is set but lost since TAILQ_INSERT_TAIL is never
called when duplicate is set.
This essentially happens on every reload.
2018-03-25 20:27:07 +03:00
Orestis Floros
ee1f551195 startup.c: free timer
Small memleak. The timer is not called used again since ev_timer_init is
called with repeat = 0.
2018-03-25 20:04:31 +03:00
Ingo Bürk
6c3533b615 Merge pull request #3202 from orestisf1993/issue-3201
Prefer fullscreen floating containers when on directional focus
2018-03-25 14:31:39 +02:00
Orestis Floros
37106aa84b Prefer fullscreen floating containers when on directional focus
Fixes #3201
2018-03-25 14:47:45 +03:00
Ingo Bürk
b849fe3e44 Merge pull request #3196 from orestisf1993/_con_move_to_con
_con_move_to_con cleanup
2018-03-24 18:49:26 +01:00
Ingo Bürk
16a707cd19 Merge pull request #3199 from orestisf1993/workspace_show
workspace_show: remove redundant if
2018-03-24 18:39:37 +01:00
Orestis Floros
9e3b48dd22 con_activate -> con_focus when it is used as a building block 2018-03-24 15:21:11 +02:00
Orestis Floros
9a1fcff4e0 _con_move_to_con: remove outdated comment 2018-03-24 15:21:11 +02:00
Orestis Floros
037b1c3710 _con_move_to_con: showing target_ws is useless
The current_ws is shown latter anyway:
    if (!ignore_focus) {
        workspace_show(current_ws);
        ...

This also causes the following bug:
- Open a window in an empty workspace
- Switch to another workspace
- seturgent to the first window
- Move another window to the first workspace
- Urgent flag is now reset
2018-03-24 15:19:49 +02:00
Orestis Floros
f46bb0396e workspace_show: remove redundant if 2018-03-24 15:15:02 +02:00
Ingo Bürk
a41912430a Merge pull request #3198 from orestisf1993/_workspace_show
_workspace_show -> workspace_show
2018-03-24 13:47:59 +01:00
Orestis Floros
4097769105 _workspace_show -> workspace_show
a9b57a44a9 removed the extra parameter of
workspace_show.
2018-03-24 14:26:11 +02:00
Ingo Bürk
83ac1c0e72 Merge pull request #3184 from orestisf1993/issue-1341
floating_enable & floating_maybe_reassign_ws changes
2018-03-23 19:17:12 +01:00
Orestis Floros
8e9b26fc90 floating_maybe_reassign_ws: use get_output_from_rect
This significantly reduces the number of ELOGs while dragging floating
containers. The behaviour is improved since floating containers in the
edge of the screen will still get reassigned to their closest workspace.

For example, consider this setup:
fake-outputs 500x500+0+0,500x500+500+0

Now, open a window in the right output and run:
i3-msg floating enable, move position 0 px 450 px
The window is on the bottom edge of the left workspace but if you run:
i3-msg focus mode_toggle
focus will go to the right workspace since floating_maybe_reassign_ws
didn't change the assigned workspace of the floating container.
2018-03-23 17:42:39 +02:00
Orestis Floros
128122e766 floating_enable: change reassign logic
This allows the floating container's top left corner to be mapped
outside any output as long as they are contained partially by one. This,
for example, will allow:
mpv --geometry +1+1 video.mp4

For windows mapped to (0, 0) see comment in floating.c:270-273:
/* Some clients (like GIMP’s color picker window) get mapped
 * to (0, 0), so we push them to a reasonable position
 * (centered over their leader) */

 The floating_reassign_ws call is removed since we try to place the new
 floating container in the current output:
 /* Sanity check: Are the coordinates on the appropriate output? If not, we
  * need to change them */

Fixes #1341
2018-03-23 17:42:39 +02:00
Orestis Floros
8a3ef3a81b Introduce get_output_from_rect 2018-03-23 17:42:39 +02:00
Orestis Floros
e09861f73f contained_by_output: return output and rename to output_containing_rect 2018-03-23 17:40:03 +02:00
Ingo Bürk
8e198a2105 Merge pull request #3195 from orestisf1993/issue-2993
Improve directional moving of fullscreen containers
2018-03-23 14:52:48 +01:00
Ingo Bürk
9f273f3356 Merge pull request #3178 from orestisf1993/pr-2314
Support _NET_WM_STATE_FOCUSED
2018-03-23 14:50:46 +01:00
Orestis Floros
3ccaf11eab Improve directional moving of fullscreen containers
Fixes #2993.
2018-03-23 15:46:40 +02:00
Tony Crisci
c42de09b1b Support _NET_WM_STATE_FOCUSED
_NET_WM_STATE_FOCUSED is set on _NET_WM_STATE to indicate that the
window is focused. It must be set when the window is newly focused and
removed once the window no longer has focus.

> _NET_WM_STATE_FOCUSED indicates whether the window's decorations are
> drawn in an active state. Clients MUST regard it as a read-only hint.
> It cannot be set at map time or changed via a _NET_WM_STATE client
> message.

For example, this is used by GTK applications to show the decoration in
an active or inactive state. This change can be tested by opening a GTK
application (like evince), focusing the window and unfocusing the
window, and observing a change in the window decorations.

Fixes #2273
2018-03-23 14:30:57 +02:00
Ingo Bürk
7411dfa5ef Merge pull request #3185 from orestisf1993/cmd_move_window_to_position
Remove 'method' from cmd_move_window_to_position
2018-03-21 08:38:41 +01:00
Orestis Floros
5e8a3f3f0c cmd_move_window_to_position: improve error message 2018-03-20 16:59:06 +02:00
Orestis Floros
174dc389ff Remove 'method' from cmd_move_window_to_position
For command:
move window to [absolute] position X px Y px
if the optional keyword 'absolute' is provided the end result is the
same even though it is implemented differently. Only difference is that
with absolute the floating window can move completely outside of any
output.

This commit removes the 'method' argument and only keeps the sane
implementation.
2018-03-20 16:59:06 +02:00
Ingo Bürk
ddc80ab305 Merge pull request #3191 from orestisf1993/userguide
Fix userguide link
2018-03-20 08:39:23 +01:00
Orestis Floros
dc0337d2e5 Reset B_UPON_KEYRELEASE_IGNORE_MODS bindings when switching modes
With example config:
    mode "a_mode" {
        bindcode 27 --release mode "default"
    }
    bindsym $mod+r mode "a_mode"

The first time $mod+r is pressed "a_mode" is activated like normal. When
r (bindcode 27) is pressed to exit the mode:
- On the KeyPress event the corresponding bind->release is correctly
marked as B_UPON_KEYRELEASE_IGNORE_MODS.
- On the KeyRelease event the command 'mode "default"' is executed but
bind->release is still B_UPON_KEYRELEASE_IGNORE_MODS since they are only
reset on KeyPress events.
The second time $mod+r is pressed and "a_mode" is activated and when the
r key is released the 'mode "default"' is executed even though the mods
are not matching since bind->release == B_UPON_KEYRELEASE_IGNORE_MODS.

This still doesn't catch 2 cases:
1. When the order is: press $mod -> press r -> release $mod -> release
    r. Since 'r' is released without any modifiers the binding matches.
2. With:
        mode "resize" {
            bindsym --release r mode "default"
        }
        bindsym r mode "resize"
    This is arguably correct: on the KeyPress event we switch to the mode and
    on the KeyRelease we switch back.
2018-03-20 04:09:34 +02:00
Orestis Floros
ff579ef22f Correctly handle bindings for the same mod key with and without --release
Before this commit, get_binding() exited on the first match without
marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS.

Similarly, once it found a --release binding during a KeyPress event it
would stop searching for a matching key press binding.

Example config, placing the --release line first will trigger the second
problem:

# i3 config file (v4)
bindsym Super_L exec notify-send "press"
# or
# bindcode 133 exec notify-send "press"
bindsym --release Super_L exec notify-send "release"
# or
# bindcode --release 133 exec notify-send "release"

Fixes #2733
2018-03-20 04:09:25 +02:00
Orestis Floros
130b3ce3a9 Check for B_UPON_KEYRELEASE_IGNORE_MODS with bindsyms
From 548d74015c:
> 1. press $mod, press x, release x, release $mod
> 2. press $mod, press x, release $mod, release x

case (2.) didn't work, now it should be fixed.
2018-03-20 04:00:47 +02:00
Orestis Floros
b467937808 Fix userguide link
[[move_to_outputs]] doesn't work currently:
https://i3wm.org/docs/userguide.html#move_to_outputs
This does:
https://i3wm.org/docs/userguide.html#_moving_containers_workspaces_to_randr_outputs

This combines a 'BlockId Element' with an 'anchor'. Both should work
now.
2018-03-19 18:30:22 +02:00
Ingo Bürk
670dfa0bba Merge pull request #3189 from orestisf1993/run_assignments
run_assignments: check for A_COMMAND early
2018-03-19 14:32:54 +01:00
Ingo Bürk
b4e24a6d5f Merge pull request #3188 from orestisf1993/free_ran_assignments
Free ran_assignments
2018-03-19 07:04:45 +01:00
Ingo Bürk
b721a40fdb Merge pull request #3187 from orestisf1993/assign-memleak
Fix memleak: FREE(assign->dest.output)
2018-03-19 07:03:47 +01:00
Orestis Floros
6306acdb65 run_assignments: check for A_COMMAND early 2018-03-19 03:17:32 +02:00
Orestis Floros
98df2e21fa Free ran_assignments
When we run 'reload' all the assignments are freed:
e3e09119bf/src/config.c (L99-L109)

Assignments are saved to each window after they are executed:
e3e09119bf/src/assignments.c (L41-L46)

This means that the pointers stored in window->ran_assignments are
invalid (shouldn't be dangerous currently but could lead to a segfault
if the code is modified) after a 'reload'.
2018-03-19 03:00:35 +02:00
Orestis Floros
1fe4e635b5 Fix memleak: FREE(assign->dest.output) 2018-03-19 02:02:59 +02:00
Ingo Bürk
e3e09119bf Merge pull request #3186 from orestisf1993/i3-msg
i3-msg: only print input + errorposition if they exist
2018-03-18 07:51:50 +01:00
Orestis Floros
124e64767e i3-msg: only print input + errorposition if they exist
Before:
$ i3-msg floating disable, move window to position 100 px 100 px
ERROR: Your command: (null)
ERROR:               (null)
ERROR: Cannot change position of a window/container because it is not floating.
[{"success":true},{"success":false,"error":"Cannot change position of a window/container because it is not floating."}]

After:
$ i3-msg floating disable, move window to position 100 px 100 px
ERROR: Cannot change position of a window/container because it is not floating.
[{"success":true},{"success":false,"error":"Cannot change position of a window/container because it is not floating."}]
2018-03-18 03:38:06 +02:00
Tony Crisci
9cd4b53231 testcases: remove assumption from state atoms test
Remove the assumption that only two atoms can possibly be set in
t/253-multiple-net-wm-state-atoms.t so that the tests will pass when
more atoms are supported that may be set during this test.
2018-03-18 00:11:55 +02:00
Ingo Bürk
a9512c6345 Merge pull request #3180 from chrisduerr/next
Add alacritty to `i3-sensible-terminal`
2018-03-17 07:31:48 +01:00
Christian Duerr
b266574c30 Add alacritty to i3-sensible-terminal 2018-03-16 22:53:39 +01:00
Michael Stapelberg
8f5c1cb6b8 Merge pull request #2975 from orestisf1993/move-con_focus
Fix move's focus bugs
2018-03-16 09:31:53 +01:00
Orestis Floros
9d22d2efce Reduce repetition in get_binding() 2018-03-16 03:08:47 +02:00
Ingo Bürk
965ef8d33f Merge pull request #3177 from orestisf1993/trailing
Remove trailing whitespace from Perl scripts
2018-03-15 20:41:47 +01:00
Orestis Floros
3f4268561d Remove trailing whitespace from Perl scripts 2018-03-15 21:33:45 +02:00
Orestis Floros
d66fa51f33 Don't call con_focus in tree_move
Fixes:
- Issue where moving an urgent (unfocused) window resets it's urgency
hint.
- Moving an unfocused container to a new parent should not move it to
the top of the focus stack.
2018-03-15 19:57:30 +02:00
Orestis Floros
6222ab1084 Correct insert_con_into's focus handling
Change from always putting con on the head of the new parent. Important
for moving unfocused containers.
2018-03-15 19:49:17 +02:00
Ingo Bürk
c1e622be27 Merge pull request #3176 from orestisf1993/dump-asy-marks
dump-asy.pl: Add marks
2018-03-14 14:24:00 +01:00
Ingo Bürk
6cc3a2bfe8 Merge pull request #3175 from orestisf1993/dump-asy
dump-asy.pl: Add options
2018-03-14 14:23:39 +01:00
Orestis Floros
774a61b47e dump-asy.pl: Add marks 2018-03-14 14:59:26 +02:00
Orestis Floros
dda340cbc6 dump-asy.pl: Add --save option 2018-03-14 14:43:12 +02:00
Orestis Floros
883cf4041d dump-asy.pl: Add --gv option 2018-03-14 14:32:16 +02:00
Orestis Floros
9521f69e11 dump-asy.pl: Add POD usage 2018-03-14 12:12:44 +02:00
Ingo Bürk
c0bcd37153 Merge pull request #3172 from klorax/patch-1
Docs [#3164]: Clarification about X resource value
2018-03-11 19:54:39 +01:00
Klorax
9017a17e39 Docs [#3164]: Clarification about X resource value
Clarification about X resource value: they are loaded verbatim and must therefore be in the format that i3 uses.
Solves #3164.
2018-03-11 18:04:32 +01:00
Ingo Bürk
dfc330fcb8 Merge pull request #3167 from hwangcc23/fix-3163
Add strip_workspace_name
2018-03-11 16:33:10 +01:00
hwangcc23
2269b2e795 Add strip_workspace_name
See the issue #3163 (https://github.com/i3/i3/issues/3163).

Add strip_workspace_name to strip off the workspace name.
2018-03-11 12:17:42 +08:00
Ingo Bürk
c54f500839 Merge pull request #3171 from i3/revert-3170-master-merge
Partially revert "Fix incorrect merge *sigh*"
2018-03-10 21:48:14 +01:00
Michael Stapelberg
010e86605d Partially revert "Fix incorrect merge *sigh*" 2018-03-10 21:45:42 +01:00
Ingo Bürk
74c0e1b866 Merge pull request #3170 from stapelberg/master-merge
Fix incorrect merge *sigh*
2018-03-10 21:37:53 +01:00
Michael Stapelberg
ffcf2bca85 Fix incorrect merge *sigh* 2018-03-10 21:35:14 +01:00
Ingo Bürk
69eec7e5b2 Refocus focused window for FOCUS_IN events on the root window. (#3097)
This deals with (admittedly somewhat misbehaving) clients which
use XSetInputFocus to take focus, but then don't properly restore
focus. This has been observed with TK apps, but also, e.g., Steam.

fixes #2722
fixes #3096
2018-03-10 19:18:44 +01:00
Ingo Bürk
ec5a048792 Merge pull request #3166 from Hritik14/next
Fixed typo
2018-03-10 19:11:55 +01:00
Ingo Bürk
eafe55a9d8 Merge pull request #3168 from stapelberg/release-fixes
Release fixes
2018-03-10 19:08:19 +01:00
Michael Stapelberg
a05ba370cd update release.sh after release 2018-03-10 18:53:20 +01:00
Michael Stapelberg
c74dd61f59 release: new-enough dput no longer needs an explicit file name 2018-03-10 18:53:04 +01:00
Michael Stapelberg
a07980f70b release: also build a Debian source-only upload 2018-03-10 18:52:50 +01:00
Michael Stapelberg
8513107f09 release: disable git’s rename protection (prevented merging) 2018-03-10 18:52:27 +01:00
Michael Stapelberg
e6b2fefe26 debian: update changelog 2018-03-10 18:35:11 +01:00
Michael Stapelberg
de0ff844e0 Update debian/changelog 2018-03-10 18:29:21 +01:00
Michael Stapelberg
b96529503f Merge branch 'release-4.15' 2018-03-10 18:29:21 +01:00
Michael Stapelberg
cdf9a8f77e Merge branch 'next' into master 2018-03-10 18:29:21 +01:00
Michael Stapelberg
5a32c1282a Set non-git version to 4.15-non-git. 2018-03-10 18:29:21 +01:00
Michael Stapelberg
c15a9af3d5 release i3 4.15 2018-03-10 18:29:14 +01:00
Hritik Vijay
8ee4a4a3e1 Fixed typo 2018-03-10 02:38:47 +05:30
Ingo Bürk
29dc14dda3 Merge pull request #3165 from stapelberg/nagbar
Bugfix: ignore ConfigureNotify with width == 0 || height == 0
2018-03-09 08:40:19 +01:00
Michael Stapelberg
021d40f666 Bugfix: ignore ConfigureNotify with width == 0 || height == 0
fixes #3132
2018-03-09 08:25:07 +01:00
Ingo Bürk
4b4fba0e74 Merge pull request #3087 from orestisf1993/focus_order
Fix focus order issues when encapsulating workspaces
2018-02-27 07:59:37 +01:00
Orestis Floros
cb73fd5e31 Fix focus order issues when encapsulating workspaces
See new tests for an explanation of the problem.
2018-02-26 23:08:57 +02:00
Orestis Floros
dc2363a665 Introduce *focus_order functions 2018-02-26 23:06:04 +02:00
Ingo Bürk
0ee3ca01b7 Merge pull request #3153 from orestisf1993/issue-2990
Don't raise floating windows when workspace is shown
2018-02-26 21:50:59 +01:00
Orestis Floros
60200b1d3c Don't raise floating windows when workspace is shown
From comment:
https://github.com/i3/i3/issues/2990#issuecomment-368345169

To easily reproduce:
1. Open 2 floating windows
2. Focus (with `focus_follows_mouse`) the one behind
3. Move the mouse to the other workspace
4. Move the mouse inside the previous workspace (without it even
touching a window)
2018-02-26 03:26:05 +02:00
Michael Stapelberg
27e60bd9d0 Makefile: include contrib/ in dist tarballs (#3152)
unbreaks the debian package build
2018-02-25 13:55:30 +01:00
Ingo Bürk
a4b07b2c5e Merge pull request #3147 from walker0643/next
dump-asy: add prerequisites check; fix empty container names warnings
2018-02-24 09:48:04 +01:00
Ingo Bürk
8acddcab93 Merge pull request #3150 from stapelberg/examples
debian: install contrib/ scripts as examples (Thanks anarcat)
2018-02-24 09:42:14 +01:00
Ingo Bürk
3b48cf0fed Merge pull request #3151 from stapelberg/gzip
debian: explicitly use gzip compression
2018-02-24 09:41:49 +01:00
Michael Stapelberg
b280f103cf debian: explicitly use gzip compression
fixes #3146
2018-02-24 08:57:35 +01:00
Michael Stapelberg
128f4dcb2e debian: install contrib/ scripts as examples (Thanks anarcat) 2018-02-24 08:24:53 +01:00
walker0643
5f453914a0 contrib/dump-asy.pl: add prerequisites check and fix warnings about empty container names 2018-02-21 16:55:55 -05:00
Ingo Bürk
d2e86da84f Merge pull request #3145 from DebianWall/gvim
Added gVim to i3-sensible-editor
2018-02-19 16:03:55 +01:00
Ingo Bürk
47cce28d68 Merge pull request #3144 from DebianWall/guaketilda
Added guake and tilda.
2018-02-19 15:42:30 +01:00
DebianWall
acc58a6763 Added gVim to i3-sensible-editor 2018-02-19 15:39:46 +01:00
DebianWall
49f7e6bed0 Added guake and tilda. 2018-02-19 15:35:01 +01:00
Ingo Bürk
2cffb978f0 Merge pull request #3138 from clawoflight/default-border
[WIP] Add default_{,floating_}border
2018-02-19 07:03:03 +01:00
Ingo Bürk
57a9741a28 Merge pull request #3142 from jcrben/patch-1
Remove hardcoded 2013 date from user guide
2018-02-19 06:58:43 +01:00
Ben Creasy
306a7e46d3 Remove hardcoded 2013 date
The front page and docs landing page emphasize documentation, but the user guide looks like it hasn't been updated since 2013. It seems from the history of the file that this number is misleading. Let me know if I'm missing anything.
2018-02-18 18:44:40 -08:00
Ingo Bürk
6c99b712b6 Merge pull request #3135 from op8867555/update_ewmh_atoms
Update EWMH atoms when closing inactive workspace
2018-02-15 16:29:29 +01:00
Bennett Piater
f8d6c10d7c Add default_{,floating_}border to config
userguide: document default_{,floating_}border

201-config-parser.t: add new tokens to $expected_all_tokens

201-config-parser-t: fix whitespace

closes i3/i3#2702
2018-02-15 16:25:56 +01:00
Alex Lu
147d3c354a Update EWMH atoms when closing a workspace container
fix #3126
2018-02-13 12:00:56 +08:00
Ingo Bürk
e9abc064de Merge pull request #3131 from EdwardBetts/patch-1
Correct spelling a mistake.
2018-02-11 15:48:55 +01:00
Edward Betts
9ea5c238e1 Correct spelling a mistake. 2018-02-07 08:01:26 +00:00
Ingo Bürk
9610dc29b8 Merge pull request #3080 from orestisf1993/cmd_move_con_to_workspace
Reduce repetition in cmd_move_con_to_workspace*
2018-01-17 21:26:09 +01:00
Ingo Bürk
17fd50999f Merge pull request #3102 from jolange/fix3071
tiling resize: remove minimum size (was 5%)
2018-01-17 21:24:52 +01:00
Ingo Bürk
eda440d6ae Merge pull request #3104 from jolange/testcase_warnings
Testcase warnings
2018-01-17 21:24:00 +01:00
Michael Stapelberg
fe95ac56bb Merge pull request #2998 from orestisf1993/issue-2990
Don't raise floating windows when focused because of focus_follows_mouse
2018-01-14 18:22:44 +01:00
Orestis Floros
0c2fbeedc2 Don't raise floating windows when focused because of focus_follows_mouse
Fixes #2990.
2018-01-14 15:45:33 +02:00
livanh
7b59da8a4f Implement 'resize set <width> ppt <height> ppt' command for tiling windows (#3036) 2018-01-08 23:25:08 +01:00
Ingo Bürk
1a04608796 Send success response for nop. (#3113)
fixes #3112
2018-01-06 23:24:33 +01:00
livanh
c0378f737b Improve resize_find_tiling_participants() and simplify cmd_resize_tiling_width_height() (#3111) 2018-01-06 17:59:27 +01:00
Ingo Bürk
2f29fce801 Merge pull request #3110 from DikiCook/config
Add comment $mod+r in back to normal when resize window
2018-01-05 18:43:51 +01:00
Diki Ananta
c2483e415c config: add comment $mod+r in back to normal when resize window 2018-01-05 07:14:57 +07:00
Ingo Bürk
59e2b7d48e Merge pull request #3101 from tpraxl/feature/workspace-variables
Add workspace vars to support DRY when customizing
2018-01-02 09:34:54 +01:00
Orestis Floros
2b5b6330dc Add testcases for focus_follows_mouse 2017-12-31 14:47:48 +02:00
Orestis Floros
e0f1579669 cmd_move_con_to_workspace_number: rename workspace->ws
For consistency with other cmd_move_con_to_workspace* functions.
2017-12-27 20:56:37 +02:00
Orestis Floros
a2e9b1461f Reduce repetition in cmd_move_con_to_workspace* 2017-12-27 20:55:22 +02:00
Ingo Bürk
0af1edd19a Merge pull request #3105 from clonejo/feat/pango-markup
Docs: state that pango markup in i3bar requires the use of a pango font.
2017-12-27 18:22:32 +01:00
clonejo
eb679bfabd Docs: state that pango markup requires the use of a pango font. 2017-12-27 17:41:55 +01:00
Johannes Lange
dc6a099bed fixing uninitialized warnings in testcases 2017-12-27 09:24:35 +01:00
Johannes Lange
80ea18624a fixing redeclaration warnings in testcases 2017-12-27 09:24:34 +01:00
Johannes Lange
8f30a04425 tiling resize: remove minimum size (was 5%)
fixes #3071
2017-12-26 12:02:00 +01:00
Thomas Praxl
941fe9ab4f Shorten comment for workspace variables
The old comments gave the impression that you had to define workspace names upfront, which is not true. This also keeps the overall config as brief as possible.
2017-12-26 11:29:42 +01:00
Ingo Bürk
320246ab47 Merge pull request #3100 from jolange/fix3086
free last_motion_notify before returning
2017-12-25 09:52:09 +01:00
Johannes Lange
0b25259370 free last_motion_notify before returning
fixes #3086
2017-12-24 09:44:52 +01:00
Thomas Praxl
0600b11d2b Add workspace vars to support DRY when customizing
Relabeling the workspaces required the user to update the labels at least in two places of the i3 config file (switch to workspace + move focused container to workspace) to keep a consistent state.

This got even worse when the user started to reference the workspaces elsewhere, e.g. for assigning containers to specific workspaces.

This change supports the DRY principle for users. Relabeling the workspaces is now merely a matter of changing the respective variable ($ws1, $ws2, … $ws10).
2017-12-23 12:28:03 +01:00
Ingo Bürk
2f1fc7f610 Merge pull request #3095 from pallavagarwal07/next
Add support for relative coordinates in i3bar click events
2017-12-20 18:33:21 +01:00
Pallav Agarwal
161db6f17d Add relative coordinates in JSON for i3bar click events (fixes #2767)
Add support for relative coordinates in i3bar click events

Rename {x,y}_rel to relative_{x,y}

Update i3bar-protocol doc to mention the added fields in click events
2017-12-20 22:51:14 +05:30
Michael Stapelberg
eb227c2332 Merge pull request #2969 from orestisf1993/issue-1819
Make 'focus' disable blocking fullscreen windows
2017-12-18 08:54:45 +01:00
Ingo Bürk
36449ba22d Merge pull request #3079 from orestisf1993/generate-command-parser
generate-command-parser.pl: remove trailing characters
2017-12-12 16:49:48 +01:00
Orestis Floros
2403c43f7b Make 'focus' disable blocking fullscreen windows
The problem here is that con_fullscreen_permits_focusing() does not
check if there is a blocking fullscreen container in the workspace that
the container to be focused belongs. This makes it possible to focus a
container behind a fullscreen window if it's in an unfocused workspace.

This commit introduces a change in the 'focus' command behaviour. When
focusing a container blocked by a fullscreen container, either CF_OUTPUT
or CF_GLOBAL, the blocking container loses its fullscreen mode and the
target container is focused like normal.

This should not affect directional focus commands: left, right, up,
down, parent, child.

Fixes issue #1819.
2017-12-11 19:14:33 +02:00
Orestis Floros
994a479558 userguide: mention <criteria> in focus 2017-12-11 19:14:33 +02:00
Orestis Floros
759e051374 Move is_num_fullscreen to Test.pm 2017-12-11 19:14:33 +02:00
Orestis Floros
2592c63603 Add error reply to cmd_focus_window_mode 2017-12-11 19:14:33 +02:00
Orestis Floros
df437aa87e Use con_has_parent in con_fullscreen_permits_focusing 2017-12-11 14:00:14 +02:00
Orestis Floros
5225e34b9d generate-command-parser.pl: remove trailing whitespace 2017-12-11 00:41:52 +02:00
Orestis Floros
de3c122337 generate-command-parser.pl: remove trailing comma 2017-12-11 00:41:52 +02:00
Ingo Bürk
57ee66ad25 Merge pull request #3078 from orestisf1993/issue-3075
Fix sticky-related crash (#3075)
2017-12-10 22:02:10 +01:00
Orestis Floros
d134745c4f Prevent access of freed workspace in _workspace_show
The bug triggers when _workspace_show calls tree_close_internal and
old == old_focus. Ie, when the old workspace was empty and needs to be
closed but then is accessed as output_push_sticky_windows's argument:
Breakpoint 1, output_push_sticky_windows (to_focus=0x55555589c8a0) at ../../i3/src/output.c:102
102	                    con_move_to_workspace(current, visible_ws, true, false, current != to_focus->parent);
(gdb) print con_exists(to_focus)
$1 = false

The access violation can also be prevented by checking if
con_exists(old_focus) but it shouldn't be necessary: the old_focus
container can only be killed when it is an empty workspace.

With --enable-sanitizers this causes i3 to exit but with
--disable-sanitizers the access violation doesn't reliably cause a crash
and the con_move_to_workspace call continues with:
(gdb) print current != to_focus->parent
$2 = 1

Since current->type is CT_FLOATING_CON and to_focus->type is
CT_WORKSPACE, in this specific case ignore_focus would always be true.
So, in this case, passing NULL instead of old_focus to
output_push_sticky_windows doesn't change the behaviour of i3.

Fixes #3075.
2017-12-10 21:37:43 +02:00
Ingo Bürk
8cbe705674 Merge pull request #3076 from orestisf1993/v3-to-v4-issue
minor V3 to v4 issues
2017-12-09 19:42:30 +01:00
Orestis Floros
1890517f96 migrate_config: scalloc converted config
Prevents a false-positive error eg with config file:
set $mod Mod4
bindsym $mod+h split h
bindsym $mod+v split v

ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set ', ...
ERROR: CONFIG: Line   8:     status_command i3status
ERROR: CONFIG: Line   9: }
ERROR: CONFIG: Line  10: <BE><BE><BE><BE><BE><BE>
2017-12-09 20:07:58 +02:00
Orestis Floros
ed22785909 Fix v3 to v4 crash with a variable with longer name than value 2017-12-09 19:50:43 +02:00
Ingo Bürk
9d2d602d60 Merge pull request #3074 from orestisf1993/issue-2921
Fix workspace_show-related issues
2017-12-09 15:52:01 +01:00
Orestis Floros
cf28147c5e Show workspace in _tree_next
Fixes a regression introduced by #2980.
2017-12-09 16:39:33 +02:00
Orestis Floros
9ced77384b Remove useless check in _tree_next
con_descend_focused on an empty workspace should return the workspace.
2017-12-09 16:39:33 +02:00
Orestis Floros
87ed8df4fa floating_maybe_reassign_ws: show workspace before focusing
With this change i3 will correctly switch to the focused workspace.
This fixes bug with moving floating windows with 'move <direction>' or by dragging like _NET_CURRENT_DESKTOP not getting updated or 'workspace back_and_forth' not working.

Fixes #2921.
2017-12-09 16:39:33 +02:00
Ingo Bürk
23cfbc54c5 Merge pull request #3073 from veselov/i3-3072
Fixes #3072, Xft.dpi can be floating point
2017-12-09 15:34:13 +01:00
Pawel S. Veselov
d2b35388b4 Fixes #3072, Xft.dpi can be floating point 2017-12-09 15:12:25 +01:00
Ingo Bürk
90dd84ee62 Merge pull request #3070 from orestisf1993/issue-3068
Add '--release' flag for bindsym in the bar block
2017-12-08 14:29:17 +01:00
Orestis Floros
315ff17563 Add '--release' flag for bindsym in the bar block
i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE
events. During these button release events, only custom commands are
checked to avoid sending multiple workspace ipc messages.

The way this patch is implemented will allow to assign a custom command
for both the press and release of the same button:
bar {
  ...
  bindsym buttonX exec command1
  bindsym --release buttonX exec command2
}

Fixes #3068.
2017-12-08 12:16:22 +02:00
Ingo Bürk
ee0c016091 Merge pull request #3066 from orestisf1993/xvfb-opt
complete-run.pl: accept the xvfb option from command line
2017-12-05 07:29:10 +01:00
Orestis Floros
b6bbb91479 complete-run.pl: accept the xvfb option from command line 2017-12-05 00:22:14 +02:00
Ingo Bürk
458e2a2e46 Merge pull request #3022 from orestisf1993/i3bar-leaks
Fix i3bar leaks
2017-12-03 19:51:25 +01:00
Orestis Floros
54c79e4b2f i3bar: free output data structures 2017-12-03 20:25:34 +02:00
Ingo Bürk
730264d9b2 Merge pull request #3065 from orestisf1993/issue-3064
Skip internal workspaces with 'move workspace to output'
2017-12-03 18:46:34 +01:00
Orestis Floros
e3f8939a58 Skip internal workspaces with 'move workspace to output'
Fixes #3064.
2017-12-01 17:11:32 +02:00
Ingo Bürk
f6f198c3fe Merge pull request #3058 from d-e-s-o/fix-FREE
do not check for NULL in FREE macro
2017-11-29 08:33:27 +01:00
Daniel Mueller
3e34122de4 Perform proper cleanup for signals with 'Term' action (#3057)
Issue #3049 describes a case where terminating i3 by means of SIGTERM
causes it to leak the runtime directory and all its contents. There are
multiple issues at play: first, any cleanup handlers registered via
atexit are never invoked when a signal terminates the program (see
atexit(3)). Hence, the log SHM log cleanup performed in i3_exit is not
invoked in that case. Second, compared to the shutdown path for the
'exit' command, we do not unlink the UNIX domain socket we create,
causing it to be leaked as well. Third, a handler for SIGTERM is not
registered at all despite handle_signal claiming to be the handler for
all 'Term' signals.
This change addresses all three problems and results in a graceful exit
including cleanup to happen when we receive a signal with the default
action 'Term'. It addresses issue #3049.
2017-11-28 23:29:47 -08:00
Ingo Bürk
e4d6458cc3 Merge pull request #3052 from d-e-s-o/remove-magic-numbers
i3bar: replace magic numbers with more meaningful constructs
2017-11-29 08:22:51 +01:00
Michael Stapelberg
f9efc09b98 Merge pull request #3059 from stapelberg/debuglog
i3-dump-log: enable shmlog on demand
2017-11-26 23:34:10 -08:00
Michael Stapelberg
02b237b14d shmlog: remote atom when disabled 2017-11-26 18:07:13 +01:00
Michael Stapelberg
1facb450c0 i3-dump-log: enable shmlog on demand
fixes #3055
2017-11-26 18:07:02 +01:00
Michael Stapelberg
c07936d91b no-op refactoring: make ipc_connect find socket path 2017-11-26 16:41:59 +01:00
Daniel Mueller
865bd462b4 do not check for NULL in FREE macro
free(3) is safe to invoke on a NULL pointer, in which case no action is
taken. This change adjusts the FREE macros to omit this unnecessary
check.
2017-11-23 15:41:33 -08:00
Ingo Bürk
2eabfc88fe Merge pull request #3050 from d-e-s-o/fix-typo
fix typo in src/main.c
2017-11-18 19:19:25 +01:00
Daniel Mueller
2481301dfc fix typo in src/main.c 2017-11-18 09:49:41 -08:00
Daniel Mueller
222d8210ab i3bar: replace magic numbers with more meaningful constructs
In i3bar/src/config.c we compare string lengths agains magic numbers.
This change replaces those numbers with the lengths of the strings they
represent.
2017-11-17 06:58:12 -08:00
Ingo Bürk
d1f8266df0 Merge pull request #3041 from d-e-s-o/update-userguide
docs/userguide: Correct mark/goto i3-input commands
2017-11-17 15:09:50 +01:00
Ingo Bürk
a78c9ab82f Merge pull request #3040 from jchook/next
$mod+r toggles resize mode
2017-11-13 22:01:06 +01:00
Ingo Bürk
0617b9f2a7 Merge pull request #3042 from Mayeu/kitty-terminal
add the kitty terminal in i3-sensible-terminal
2017-11-12 13:38:52 +01:00
Cast
22ba46e2a3 add the kitty terminal in i3-sensible-terminal 2017-11-12 16:48:21 +08:00
Daniel Mueller
3a22c6e765 docs/userguide: Correct mark/goto i3-input commands
The userguide still mentions an old 'goto' command which no longer
exists and will be ignored silently (when used in the i3 config) or
causes an error to be reported (when invoked from the command line).
This change updates the userguide to correct this problem. In addition
to that it also updates the i3-input command shown to no longer use the
deprecated -p flag but -F instead.
2017-11-11 17:06:43 -08:00
xzfc
103e78e04a Bugfix: avert endless loop on unexpected EOF at ipc messages (#3021)
Fix freeze on invalid ipc commands like

    echo -n $'i3-ipc\0\0\0\xa\0\0\0\0focus left' | socat - `i3 --get-socketpath`

Also, treat incomplete headers as IPC violation. Example of incomplete header:

    echo -n i3-ip | socat - `i3 --get-socketpath`
2017-11-09 11:18:23 -08:00
Ingo Bürk
c207921949 Merge pull request #2980 from orestisf1993/issue-1160-pr
Use con_descend_focused for workspaces in _tree_next
2017-11-05 17:42:31 +01:00
Ingo Bürk
b18f507b9b Merge pull request #3030 from tylerbrazier/next
config: use ascii single quote
2017-11-05 17:37:53 +01:00
Ingo Bürk
01029da840 Merge pull request #3023 from orestisf1993/issue-2816
Add support to resize floating container in percentage
2017-11-05 17:27:48 +01:00
Wes Roberts
0afe714e2b $mod+r toggles resize mode 2017-10-30 21:19:12 -04:00
Tyler Brazier
e0287e00d9 config: use ascii single quote
The unicode quote doesn’t render very well in terminals that don't
support unicode
2017-10-25 15:26:44 -05:00
Michael Stapelberg
787e799e3c Merge pull request #3028 from stapelberg/flakes2
Eliminate causes of flakyness
2017-10-25 08:56:02 +02:00
Michael Stapelberg
0d8b6714e3 Move XCB event handling into xcb_prepare_cb.
Previously, we used ev_check watchers, which are executed at the beginning of an
event loop iteration.

This was problematic if one of the handlers happened to fill the XCB event
queue, e.g. by reading a reply from X11 and an event happened in the meantime.

In that situation, we would hand control to the event loop, entirely ignoring
the pending event. This would manifest itself as a 1-minute hang,
reproducible (sometimes) in the i3 testsuite.

issue #2790 describes an instance of this issue in i3bar, and we fixed that by
changing the watcher priority to run last. Handling events in xcb_prepare_cb has
the same effect, as ev_prepare watchers are run just before the event loop goes
to sleep.
2017-10-23 21:06:13 +02:00
Michael Stapelberg
1946cc6cab t/525: remove flaky focus check 2017-10-23 21:06:13 +02:00
Michael Stapelberg
7a672a9d41 i3test: blockingly wait for events
…as polling the xcb file descriptor directly is not reliable.
2017-10-23 21:06:07 +02:00
Michael Stapelberg
8e528d2de8 skip ConfigureNotify events with --force_xinerama
This prevents an i3 crash under certain conditions when running the tests.
2017-10-23 21:04:20 +02:00
Michael Stapelberg
7208df2d38 i3test: reliably warp the pointer to (0, 0) before tests start 2017-10-23 21:04:20 +02:00
Michael Stapelberg
5d55f93eb3 tests: add sync_with_i3 after open_window
We need to set dont_map => 1 on the sync window to prevent an endless loop.

Further, t/219-ipc-window-focus.t made assumptions about windows being named
incrementally, and that assumption is broken by the sync window opened by the
first sync_with_i3 call from open_window, so use the more reliable ->name.
2017-10-23 21:04:20 +02:00
Michael Stapelberg
4f751610c2 _NET_ACTIVE_WINDOW: invalidate focus to force SetInputFocus call (#3027)
The sender of the _NET_ACTIVE_WINDOW client message might know better when to
set focus than i3, as i3 does not know about unmanaged (override_redirect=1)
windows.

related to https://github.com/i3/i3lock/issues/35
2017-10-22 22:16:15 +02:00
Orestis Floros
b17e7b82c6 Add support to resize floating container in percentage
resize set is modified to accept both 'px' and 'ppt' height and width.

Fixes #2816.
2017-10-18 02:07:11 +03:00
Orestis Floros
a05663c59e i3bar: avoid possible va_args leak 2017-10-17 04:28:07 +03:00
Orestis Floros
a7bae0341d i3bar: free fontname 2017-10-17 04:28:07 +03:00
Ingo Bürk
d4eaea8289 Merge pull request #2849 from Streetwalrus/next
Create a new split container when switching a workspace container to split layout
2017-10-15 22:23:40 +02:00
Michael Stapelberg
906a88e92b docs: full-size, so-called (#3019)
As per Michael Siegel, who studied the English language :).
2017-10-15 14:22:41 +02:00
Michael Stapelberg
4f03e49c3a userguide: explain why Mod4 is usually preferred (#3018) 2017-10-15 12:17:22 +02:00
Dan Elkouby
26014ca1a2 Default to L_SPLITH with toggle split when last_split_layout hasn't been initialized 2017-10-14 12:27:56 +03:00
hwangcc23
a34a0048a1 Add regression tests for #2846
1). Add one regression test in 167-workspace_layout.t:
    - Get a fresh workspace
    - Set the layout to something
    - Create windows
    - Try to switch to another layout
    - Check if successful
    - Repeat for all 12 possible transitions
2). Add another regression test in 167-workspace_layout.t:
    - Check that the command 'layout toggle split' works regardless of
      what layout we're using
2017-10-14 12:27:32 +03:00
Dan Elkouby
c028f0cb17 Create a new split container when switching a workspace container to split layout
The behavior before 52ce8c8 was to do it regardless of what layout we're
switching to.

Fixes #2846
2017-10-14 12:26:47 +03:00
Michael Stapelberg
44a6efb5b0 tests: run under Xvfb by default (if available) (#2951)
This shaves off two seconds of wall-clock time (10s → 8s).
2017-10-13 00:18:49 -07:00
Michael Stapelberg
28ca1e8529 Fix AnyEvent->timer call (#3008)
And make the remaining AnyEvent->condvar and AnyEvent->timer calls
consistent.
2017-10-05 13:03:33 -07:00
Orestis
464c158d9a dump-asy.pl: use layout instead of orientation for names (#3004) 2017-09-30 10:17:20 -07:00
Michael Stapelberg
ffa228e653 Merge pull request #3005 from stapelberg/tick
Implement the tick event
2017-09-30 10:16:43 -07:00
Michael Stapelberg
21cdcdb07c Fix compilation warnings on all Debian architectures. (#3007)
stbuf.st_size is of type off_t, which the standard defines as “extended signed
integral type”¹, and for which there is no correct printf format string. Hence,
we need to cast it into a hopefully-large-enough type (ugh) and use the
corresponding format string. In our case, int64_t should do it, as config files
really shouldn’t be anywhere close to those numbers.

① http://pubs.opengroup.org/onlinepubs/007908799/xsh/systypes.h.html
2017-09-30 10:16:21 -07:00
Michael Stapelberg
962750eb64 Fix memory leak when config conversion fails (#3006)
This happens on an empty config file, for example.
2017-09-30 10:15:58 -07:00
Michael Stapelberg
2bff4f1dba Synchronize with i3bar+i3, not just i3. 2017-09-30 13:04:20 +02:00
Michael Stapelberg
ce21de8dde Implement the tick event
This makes our tests less flaky, shorter, and more readable.

fixes #2988
2017-09-30 11:41:57 +02:00
Michael Stapelberg
14c8cf8622 tests: implement xtest_sync_with_i3
The regular sync_with_i3 is not sufficient because i3test::XTEST uses a separate
X11 connection.
2017-09-30 11:28:20 +02:00
Michael Stapelberg
c08ef36199 docs/ipc: include new Go package, reference example byteorder code (#3000) 2017-09-29 14:02:18 -07:00
Ingo Bürk
7a7481e578 Deal with UTF8 in per-workspace-layout.pl. (#2997)
fixes #2996
2017-09-28 13:12:51 -07:00
Orestis Floros
af78331ee7 Use con_descend_focused for workspaces in _tree_next
This way, when changing focus between outputs, the directional focus
command will focus the focused window within the parent container that
is next in the given direction.

Previously, the next window of the given direction was focused which is
Inconsistent with changing focus inside the same output.

Fixes #1160.
2017-09-28 16:48:50 +03:00
Ingo Bürk
a05773e18b Merge pull request #2992 from orestisf1993/next
i3bar: fix segfault when no status_command is provided
2017-09-27 21:47:52 +02:00
Ingo Bürk
9aa016cffd Merge pull request #2995 from orestisf1993/dump-asy-basename
dump-asy.pl: use correct tmp dirname instead of hardcoded /tmp
2017-09-27 21:46:00 +02:00
Michael Stapelberg
54d61b510d Merge pull request #2953 from CyberShadow/focus_wrapping
Add "focus_wrapping" option
2017-09-27 09:31:39 -07:00
Orestis Floros
828ce9c640 dump-asy.pl: use correct tmp dirname instead of hardcoded /tmp
For example, on some systems, $rep might be saved in /tmp/$USER/ instead
of /tmp/.
2017-09-27 15:26:33 +03:00
Orestis Floros
4257107509 i3bar: fix segfault when no status_command is provided
Fixes #2933.
2017-09-26 02:50:10 +03:00
Vladimir Panteleev
50edf495aa Merge "force_focus_wrapping" option into "focus_wrapping force"
Allow enabling forced focus wrapping by specifying "focus_wrapping
force" in i3's configuration. This syntax supersedes the previous
"force_focus_wrapping yes" one, which remains available for backwards
compatibility.
2017-09-25 18:58:12 +00:00
Pietro Cerutti
999bebc692 WIFEXITED needs sys/wait.h (#2989) 2017-09-25 09:11:15 -07:00
Ingo Bürk
f4f3d649e2 Merge pull request #2985 from orestisf1993/next
Correct remaining string length for fill_rmlvo_from_root
2017-09-25 09:09:56 +02:00
Michael Stapelberg
89d6287110 update debian/changelog and release.sh after release (#2987) 2017-09-25 09:04:31 +02:00
Orestis Floros
65d00e0305 Correct remaining string length for fill_rmlvo_from_root
Fixes #2538.
2017-09-25 04:43:00 +03:00
Michael Stapelberg
2eca0f0287 Merge branch 'release-4.14.1' 2017-09-24 19:21:41 +02:00
Michael Stapelberg
f7270b3324 Set non-git version to 4.14.1-non-git. 2017-09-24 19:21:41 +02:00
Michael Stapelberg
83a62267dc release i3 4.14.1 2017-09-24 19:21:26 +02:00
Michael Stapelberg
918ac865df docs/ipc: document the GET_CONFIG request (#2984)
This was neglected in commit a6d8ed9b1a

related to #2856
2017-09-24 17:26:06 +02:00
Michael Stapelberg
362cbe6c5f docs/ipc: document the GET_CONFIG request (#2984)
This was neglected in commit a6d8ed9b1a

related to #2856
2017-09-24 17:25:41 +02:00
Michael Stapelberg
1aaf9f2e52 tests: replace http:// with https:// where appropriate
This was done automatically using:

% sed -i 's,http://build.i3wm.org,https://build.i3wm.org,g' testcases/t/*.t
2017-09-24 17:07:16 +02:00
Michael Stapelberg
aa0b1f599f Replace http:// with https:// where applicable
The testcases will be updated automatically in a separate commit.
2017-09-24 17:07:15 +02:00
Orestis Floros
eadc9a8461 Check container existance during drag events
This fixes a crash that occurs when disabling floating for a container
while it is being moved or resized.

@Deiz describes the problem:
> It occurs because the command that disables floating runs before the
event loop. So, the window is tiled, its floating parent is destroyed,
but then a key event is handled which causes the position/size of the
now-destroyed parent to be modified.

Fixes #1627
2017-09-24 17:07:13 +02:00
Orestis Floros
2e83d2193e Add con_exists function
Checks the all_cons queue and returns true if a given con is found.
2017-09-24 17:07:12 +02:00
Orestis Floros
8653bfe8d3 Raise floating window to top when it gets focus
Applied for:
1. '[...] focus' for a floating container raises it to the top.
2. Focusing a window through a focus event raises it to the top.

Fixes #2572
2017-09-24 17:07:07 +02:00
Martin T. H. Sandsmark
683e33199d Don't put new floating windows on top unless they're focused 2017-09-24 17:06:59 +02:00
Michael Stapelberg
55bc674179 Merge pull request #2981 from stapelberg/https
Replace http:// with https:// where applicable
2017-09-24 13:11:01 +02:00
Michael Stapelberg
7ad32fd2d1 tests: replace http:// with https:// where appropriate
This was done automatically using:

% sed -i 's,http://build.i3wm.org,https://build.i3wm.org,g' testcases/t/*.t
2017-09-24 10:19:50 +02:00
Michael Stapelberg
d968d39b27 Replace http:// with https:// where applicable
The testcases will be updated automatically in a separate commit.
2017-09-24 10:19:07 +02:00
Ingo Bürk
9fe508b791 Merge pull request #2977 from orestisf1993/issue-1627
Check container existance during drag events
2017-09-23 10:40:34 +02:00
Ingo Bürk
4ad9199a5c Merge pull request #2978 from orestisf1993/issue-2572
Issue 2572
2017-09-23 10:21:16 +02:00
Orestis Floros
414d23fb7a Check container existance during drag events
This fixes a crash that occurs when disabling floating for a container
while it is being moved or resized.

@Deiz describes the problem:
> It occurs because the command that disables floating runs before the
event loop. So, the window is tiled, its floating parent is destroyed,
but then a key event is handled which causes the position/size of the
now-destroyed parent to be modified.

Fixes #1627
2017-09-23 11:19:56 +03:00
Orestis Floros
be9a2bb7f8 Add con_exists function
Checks the all_cons queue and returns true if a given con is found.
2017-09-23 03:22:20 +03:00
Orestis Floros
76214b04e8 Raise floating window to top when it gets focus
Applied for:
1. '[...] focus' for a floating container raises it to the top.
2. Focusing a window through a focus event raises it to the top.

Fixes #2572
2017-09-23 02:41:58 +03:00
Vladimir Panteleev
28f7e14650 Add "focus_wrapping" option
Fixes #2352.
2017-09-22 23:40:41 +00:00
Martin T. H. Sandsmark
bf7aeced30 Don't put new floating windows on top unless they're focused 2017-09-22 21:45:28 +03:00
Ingo Bürk
dd13cae5c0 Merge pull request #2959 from orestisf1993/issue-2764
Allow assign to output
2017-09-22 16:24:26 +02:00
Vladimir Panteleev
536f60e230 docs/userguide: Update description of focus wrapping
Focus wrapping applies to all kinds of containers, not just
tabbed/stacked ones.
2017-09-21 15:32:44 +00:00
Vladimir Panteleev
8144a0f480 Do not canonicalize special output names
canonicalize_output_name allowed the "primary" special output name to
be canonicalized, thus converting it to the name of whatever output
was the primary output at the time. This caused settings
(specifically, i3bar output and tray_output settings) to be stored as
specific output names, instead of the intended special names whose
referred output may change as the system's configuration (i.e. current
primary output) changes.

Add a check to canonicalize_output_name to return the name as-is if it
is the special name "primary".
2017-09-19 18:58:35 +02:00
Vladimir Panteleev
e4bfb4dae3 fake_outputs: Allow designating a fake output as primary
Allow appending 'P' to the fake output specification to set the
created output's "primary" flag, to allow writing test cases that
depend on the presence of a primary output.
2017-09-19 18:58:32 +02:00
Vladimir Panteleev
c932c88ea9 fake_outputs: Don't read past the end of string
fake_outputs_init would unconditionally increase the string read
pointer variable (walk) by one character more than the number of
characters that have been read, to skip past the character delimiting
records (a comma). However, when the input string was not terminated
by a comma, it would cause the function to read past the null
terminator instead.

Avoid this by explicitly checking for the expected delimiter.
2017-09-19 18:58:28 +02:00
Vladimir Panteleev
4ddf18ef6b fake_outputs: Use %n format specifier instead of sprintf
fake_outputs_init used a sprintf invocation with a throw-away buffer
to estimate how many characters the sscanf invocation consumed. This
was unnecessary, and also potentially incorrect, as differences
between the read and formatted strings (such as leading zeros) could
lead to fake_outputs_init to lose its track.

Instead, use the %n format specifier which allows saving the number of
characters consumed by sscanf so far. %n is part of C99.
2017-09-19 18:58:25 +02:00
Michael Stapelberg
919e66399b Merge pull request #2970 from CyberShadow/i3bar-primary-output
Do not canonicalize special output names
2017-09-19 18:57:55 +02:00
Vladimir Panteleev
760b2e1b4a Do not canonicalize special output names
canonicalize_output_name allowed the "primary" special output name to
be canonicalized, thus converting it to the name of whatever output
was the primary output at the time. This caused settings
(specifically, i3bar output and tray_output settings) to be stored as
specific output names, instead of the intended special names whose
referred output may change as the system's configuration (i.e. current
primary output) changes.

Add a check to canonicalize_output_name to return the name as-is if it
is the special name "primary".
2017-09-19 14:57:08 +00:00
Vladimir Panteleev
caae4db0bc fake_outputs: Allow designating a fake output as primary
Allow appending 'P' to the fake output specification to set the
created output's "primary" flag, to allow writing test cases that
depend on the presence of a primary output.
2017-09-19 14:57:08 +00:00
Vladimir Panteleev
19b00346e5 fake_outputs: Don't read past the end of string
fake_outputs_init would unconditionally increase the string read
pointer variable (walk) by one character more than the number of
characters that have been read, to skip past the character delimiting
records (a comma). However, when the input string was not terminated
by a comma, it would cause the function to read past the null
terminator instead.

Avoid this by explicitly checking for the expected delimiter.
2017-09-19 14:57:08 +00:00
Vladimir Panteleev
755b223278 fake_outputs: Use %n format specifier instead of sprintf
fake_outputs_init used a sprintf invocation with a throw-away buffer
to estimate how many characters the sscanf invocation consumed. This
was unnecessary, and also potentially incorrect, as differences
between the read and formatted strings (such as leading zeros) could
lead to fake_outputs_init to lose its track.

Instead, use the %n format specifier which allows saving the number of
characters consumed by sscanf so far. %n is part of C99.
2017-09-19 14:57:03 +00:00
Michael Stapelberg
da72a5be91 tests: unflake tests by not starting i3bar 2017-09-19 16:13:27 +02:00
Michael Stapelberg
69a6887ab2 tests: remove the (broken) exit_gracefully check
I previously tried to fix the check, but could only come up with a fix which
required removing our module pre-loading, which makes the tests considerably
more expensive. Instead, let’s just remove the check.
2017-09-19 16:13:24 +02:00
Michael Stapelberg
e5ee11d896 tests: use i3_config arg instead of precisely one launch_with_config
This way, tests are shorter, and i3test’s invocation of launch_with_config
parallelizes work better, using dont_block => 1.
2017-09-19 16:13:21 +02:00
Michael Stapelberg
28bfeadbb0 i3test::XTEST: don’t “use i3test” to avoid clobbering state
Before this commit, the $i3_autostart variable was accidentally overridden.
2017-09-19 16:13:17 +02:00
Michael Stapelberg
5d9db61dda Reorder tests to not use the same number (#2947)
Distinct numbers make re-running individual tests easier by helping with
tab-completion.

Completeness verified using:
% for i in $(seq 0 600)
do
  files=$(ls testcases/t/$(printf "%03d" $i)-*.t 2>&- | wc -l)
  [ "$files" != "0" ] && [ "$files" != "1" ] && echo "clash: $i"
done
2017-09-19 16:13:14 +02:00
Michael Stapelberg
31834b3ce4 Kill windows between tests 2017-09-19 16:12:42 +02:00
Michael Stapelberg
4fd05e4db2 i3test: add kill_all_windows convenience function 2017-09-19 16:12:38 +02:00
Michael Stapelberg
dbd3ca749c 529-net-wm-desktop: avoid timeout, avoid restarts, split
This shaves off almost half a second of the wall-clock time (from 5.9s to 5.6s).
2017-09-19 16:12:34 +02:00
Michael Stapelberg
e46dc19f82 165-for_window: merge config and re-use i3 instance, split remainder
This reduces total test wall-clock time by 1.5s (from 7.5s down to 5.9s).
2017-09-19 16:12:31 +02:00
Michael Stapelberg
ee1546386b t/265-swap: don’t start new i3 instances with the same config
$config is never touched after being initially set up.
Not restarting i3 between each test case reduces the runtime of this test by an
order of magnitude.
2017-09-19 16:12:26 +02:00
Michael Stapelberg
501dfd6eb8 ipc: document how to detect i3’s byte order in memory-safe languages (#2961)
related to issue #2958
2017-09-19 15:47:06 +02:00
Michael Stapelberg
7726b9a759 Bugfix: avert crash by fixing focus when creating output containers (#2966)
fixes #2854
2017-09-19 15:47:01 +02:00
Michael Stapelberg
0b6d851d7c Bugfix: don’t invalidate layout upon invalid 'layout toggle' params (#2965)
fixes #2903
2017-09-19 15:46:58 +02:00
Michael Stapelberg
910bcd68bc docs/ipc: "urgent": complete the list of container types (#2967)
Thanks chressie!
2017-09-19 15:46:53 +02:00
Kent Fredric
5acddc259b Migrate tooling to ExtUtils::MakeMaker (#2963) 2017-09-19 15:46:49 +02:00
Michael Stapelberg
3bc91118c8 ipc: rename COMMAND to RUN_COMMAND for consistency (#2956)
All other message types are verbs, only our first-ever message COMMAND wasn’t.

While we’re here, also change the message type dictionary into a table with
clickable links to the corresponding reply type.

Authors of downstream IPC libraries are encouraged to keep the old name around
so as to not break existing code, but mark it as deprecated.
2017-09-19 15:46:38 +02:00
Orestis Floros
395dc7bebd Fix use of err after it is freed 2017-09-19 15:46:32 +02:00
Orestis Floros
b5583d6cf4 Fix wrong call to free
To confirm, assign n to a constant value and try to use the
append_layout command.

Without the change i3 crashes.
2017-09-19 15:46:28 +02:00
Orestis Floros
5dad79ff34 Prevent freeing of uninitialized pointer
> variable 'buf' is used uninitialized whenever 'if' condition is true

Note: freeing a NULL pointer is fine.
2017-09-19 15:46:24 +02:00
Michael Stapelberg
f1e9da71f0 ipc: tree reply: document focus, nodes and floating_nodes (#2955)
These haven’t ever changed, but were only included in the example, not in the
list, so people might not have realized that these are safe for use.
2017-09-19 15:46:19 +02:00
Vladimir Panteleev
ba7a76e367 Fix erratic behavior with single container child jumping outputs
This fixes a regression introduced in commit
4e88c10564: when attempting to move the
single child of a container in the direction of another output, i3
would move the window to the output, despite the window not being at
the edge of its output, instead of moving it to its parent container.

The bug occurred because the check for moving containers across
outputs with non-default workspace layouts (issue #1603) did not
actually verify that the moved window lies at the edge of the
workspace, despite what its comment said.

Fixes issue #2466.
2017-09-19 15:46:07 +02:00
Vladimir Panteleev
8e520deb89 Fix typo in con_parent_with_orientation description 2017-09-19 15:46:04 +02:00
Michael Stapelberg
b421799d9c tests: unflake t/257-keypress-group1-fallback.t (#2946)
fixes #2944
2017-09-19 15:45:42 +02:00
Orestis
a3a7d04a43 291-swap.t: make tests fail less (#2964) 2017-09-18 18:02:38 +02:00
Michael Stapelberg
8e5731bde8 ipc: document how to detect i3’s byte order in memory-safe languages (#2961)
related to issue #2958
2017-09-18 17:15:28 +02:00
Michael Stapelberg
e48441ecbd Bugfix: avert crash by fixing focus when creating output containers (#2966)
fixes #2854
2017-09-18 16:37:34 +02:00
Michael Stapelberg
d1296cd1cf Bugfix: don’t invalidate layout upon invalid 'layout toggle' params (#2965)
fixes #2903
2017-09-18 16:36:57 +02:00
Michael Stapelberg
39415fe16d docs/ipc: "urgent": complete the list of container types (#2967)
Thanks chressie!
2017-09-18 16:36:34 +02:00
Kent Fredric
54a7e559ed Migrate tooling to ExtUtils::MakeMaker (#2963) 2017-09-18 13:03:54 +02:00
Michael Stapelberg
607e97e651 ipc: rename COMMAND to RUN_COMMAND for consistency (#2956)
All other message types are verbs, only our first-ever message COMMAND wasn’t.

While we’re here, also change the message type dictionary into a table with
clickable links to the corresponding reply type.

Authors of downstream IPC libraries are encouraged to keep the old name around
so as to not break existing code, but mark it as deprecated.
2017-09-17 15:25:00 +02:00
Orestis Floros
a35854ddf4 Allow assign to output
Implements the "assign" part of issue #2764.
2017-09-17 15:37:17 +03:00
Orestis Floros
45d1e51857 Fix userguide formatting error 2017-09-17 15:37:17 +03:00
Orestis Floros
716a5b3660 166-assign.t: improve open_special call 2017-09-17 15:37:17 +03:00
Orestis Floros
1c975a1b8c 166-assign.t: fix typo 2017-09-17 15:37:17 +03:00
Orestis Floros
e2bacc7df8 Add con_move_to_output_name function 2017-09-17 15:37:17 +03:00
Ingo Bürk
d726d09d49 Merge pull request #2960 from orestisf1993/next
Fix possible errors related to free()
2017-09-17 12:05:04 +02:00
Orestis Floros
91c8c00afc Fix use of err after it is freed 2017-09-17 01:14:47 +03:00
Orestis Floros
f7a7c7778b Fix wrong call to free
To confirm, assign n to a constant value and try to use the
append_layout command.

Without the change i3 crashes.
2017-09-17 00:24:15 +03:00
Orestis Floros
205dd76096 Prevent freeing of uninitialized pointer
> variable 'buf' is used uninitialized whenever 'if' condition is true

Note: freeing a NULL pointer is fine.
2017-09-16 23:54:12 +03:00
Michael Stapelberg
5062dd61bc ipc: tree reply: document focus, nodes and floating_nodes (#2955)
These haven’t ever changed, but were only included in the example, not in the
list, so people might not have realized that these are safe for use.
2017-09-16 17:28:44 +02:00
Ingo Bürk
9a9ade88ef Merge pull request #2902 from orestisf1993/swap-for-fullscreen
Make swap work with fullscreen windows
2017-09-16 13:07:21 +02:00
Orestis Floros
fa5d8a0209 Make swap work with fullscreen windows
Swap works like normal with fullscreen windows but swaps the fullscreen
mode of the 2 containers after it's done.

Fixes #2811
2017-09-16 13:49:20 +03:00
Orestis Floros
71e309597c Add SWAP util macro 2017-09-16 13:49:19 +03:00
Ingo Bürk
8cad1c1fa6 Merge pull request #2887 from orestisf1993/next
Allow assign to workspace by number
2017-09-15 21:26:35 +02:00
Michael Stapelberg
6b8e3560ef Merge pull request #2950 from CyberShadow/pull-20170914-153533
Fix erratic behavior with single container child jumping outputs
2017-09-15 11:31:33 +02:00
Vladimir Panteleev
480f688b44 Fix erratic behavior with single container child jumping outputs
This fixes a regression introduced in commit
4e88c10564: when attempting to move the
single child of a container in the direction of another output, i3
would move the window to the output, despite the window not being at
the edge of its output, instead of moving it to its parent container.

The bug occurred because the check for moving containers across
outputs with non-default workspace layouts (issue #1603) did not
actually verify that the moved window lies at the edge of the
workspace, despite what its comment said.

Fixes issue #2466.
2017-09-15 09:27:32 +00:00
Orestis
00912add46 Use numeric comparison in sort for $displaynum (#2952)
Eg in the case of sockets:
- X0
- X99
- X100

X99 would be picked instead of X100.
2017-09-15 11:21:35 +02:00
Orestis Floros
eaf7a49e28 Allow assign to workspace by number
Makes "assign [<criteria>] workspace number <number>" work in the same
manner as "move to workspace number <number>" instead of assigning the
window to a workspace named "number <number>".

config.spec is modified to expect a 'number' string and an extra
argument is used in cfg_assign.

For workspaces that don't exist yet, workspace_get is used as a
fallback. This also allows the user to assign to "<number> <workspace>"
eg "2: work" and the full name will be used if workspace number 2
doesn't exist yet.

Fixes #2590.
2017-09-15 03:38:13 +03:00
Vladimir Panteleev
bfa76016de Fix typo in con_parent_with_orientation description 2017-09-15 00:07:40 +00:00
Orestis
6411130c85 Add -name argument for Xephyr (#2937)
This way you can assign the test windows to an empty workspace to avoid
interacting with them (when xvfb-run is not an option):
assign [instance="i3test"] workspace testing
2017-09-14 22:10:16 +02:00
Michael Stapelberg
98a7baf16e Merge pull request #2945 from stapelberg/i3-config
simplify tests which use launch_with_config precisely once
2017-09-14 22:08:36 +02:00
Michael Stapelberg
24462f98ae tests: unflake tests by not starting i3bar 2017-09-14 21:46:20 +02:00
Michael Stapelberg
363417e010 tests: remove the (broken) exit_gracefully check
I previously tried to fix the check, but could only come up with a fix which
required removing our module pre-loading, which makes the tests considerably
more expensive. Instead, let’s just remove the check.
2017-09-14 21:46:20 +02:00
Michael Stapelberg
02786155dc tests: use i3_config arg instead of precisely one launch_with_config
This way, tests are shorter, and i3test’s invocation of launch_with_config
parallelizes work better, using dont_block => 1.
2017-09-14 21:46:20 +02:00
Michael Stapelberg
53e7f18710 i3test::XTEST: don’t “use i3test” to avoid clobbering state
Before this commit, the $i3_autostart variable was accidentally overridden.
2017-09-14 21:45:48 +02:00
Michael Stapelberg
3a31a76b2a Reorder tests to not use the same number (#2947)
Distinct numbers make re-running individual tests easier by helping with
tab-completion.

Completeness verified using:
% for i in $(seq 0 600)
do
  files=$(ls testcases/t/$(printf "%03d" $i)-*.t 2>&- | wc -l)
  [ "$files" != "0" ] && [ "$files" != "1" ] && echo "clash: $i"
done
2017-09-14 17:49:02 +02:00
Michael Stapelberg
a5aed10d09 tests: unflake t/257-keypress-group1-fallback.t (#2946)
fixes #2944
2017-09-14 17:48:37 +02:00
Michael Stapelberg
d0b8f93d4f travis: install xrandr in Docker container for t/533-randr15.t (#2949) 2017-09-14 17:48:22 +02:00
Michael Stapelberg
51da57d5e6 validate JSON before loading
This commit also introduces slurp() which reads a file in its entirety. Using
this function instead of doing IO in the functions in load_layout.c again and
again makes the code cleaner (fixing at least two memory leaks) and avoids
re-reading the same file 3 times.

related to #2755
2017-09-13 18:46:17 +02:00
Michael Stapelberg
f120a9d929 Bugfix: free incomplete containers when JSON parsing fails
related to #2755
2017-09-13 18:46:12 +02:00
Orestis Floros
d35de66f1e scalloc parse_config input to make sure it terminates with '\0'
Otherwise strchr() can crash for files that don't end with '\n' because
it won't find a null char to terminate at.

Fixes #2934
2017-09-13 18:46:04 +02:00
Orestis Floros
919ac9c7ef Don't insert newline at end of config with launch_with_config 2017-09-13 18:46:02 +02:00
Vladimir Panteleev
2159306b94 docs/userguide: Document that i3 can accept RandR output names 2017-09-13 18:45:46 +02:00
Vladimir Panteleev
92ff6fbe24 533-randr15.t: Add test for bar output name canonicalization 2017-09-13 18:45:46 +02:00
Vladimir Panteleev
fb1d9efb27 533-randr15.t: Stop hard-coding the output name
Refactor away all mentions of DP3.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
f5e9b518da 533-randr15.t: Add a fake output connected to the fake monitor
Add an output ID to the simulated RRGetMonitors reply, then add a
simulated RRGetOutputInfo reply describing the added output.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
21dd8c475a testcases/lib: Add inject_randr15_outputinfo argument
Allow tests to specify a file name for inject_randr15's
--getoutputinfo_reply command-line parameter.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
7fb027ad37 inject_randr1.5: Intercept X11 error responses in addition to replies
Allow clients to send garbage to the server, then intercept the
server's error response and substitute it with the supplied simulated
reply data.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
80a937f43c inject_randr1.5: Add RRGetOutputInfo reply injection
Add a --getoutputinfo_reply switch to indicate a filename containing
the RRGetOutputInfo reply data to inject.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
38447ab78c inject_randr1.5: Refactor reading and storing reply buffer to a struct
Allows easier introduction of additional reply buffers in upcoming
changes.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
16e0d5ec06 ipc: Canonicalize output names in bar configuration
Convert the output names specified in the "output" and "tray_output"
fields in bar blocks in i3's configuration to the referred output's
primary name. This allows specifying names other than the primary
output's name in the given fields without changing the IPC protocol.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
c35cacfd78 randr: Look up alternative output names when searching outputs
Update get_output_by_name to look at all additional names added by the
change in the previous commit, not just the primary one.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
08ad82c3bb randr: Register monitors' output names as additional i3 output names
In addition to the name of the monitor itself (which is still used as
the i3 output's primary name), register RandR output names associated
with the RandR monitor as alternative i3 output names.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
6c0e715877 Store output names as a linked list
Currently, only one name is ever added, and only the first name is
ever accessed; actually using the capability to store and access
multiple names comes in the following commits.
2017-09-13 18:45:46 +02:00
Vladimir Panteleev
1b419431cd Introduce output_primary_name function
Currently simply returns output->name, but this will make it easier to
change how output names are stored in the following commits.

Also replace reading output->name with invocations of
output_primary_name. Code which writes output->name is unchanged. Done
using a mostly mechanical replacement of output->name to
output_primary_name(output).
2017-09-13 18:45:46 +02:00
Michael Stapelberg
d0c9e81f04 testsuite: install Module::Install so that AnyEvent-I3/Makefile.PL works (#2940)
As per https://perlmaven.com/cant-locate-inc-module-install-in-inc, the inc/
directory should not be under version control.

fixes #2914
2017-09-13 18:42:47 +02:00
Orestis
0631568b2d Fix userguide bug (#2932)
Fixes #2931
2017-09-13 18:42:43 +02:00
Vladimir Panteleev
c3c94a8e1a docs/hacking-howto: Update section topology
- Promote the "How to build?" sub-section to a top-level
  section ("Building i3")

- Convert the "Introduction" sub-section as the intro to the remaining
  contents of the "Using git / sending patches" section

- Keep "Which branch to use?" as a level-3 sub-section, thus making it
  a sub-section of what used to be the "Introduction" sub-section.
2017-09-13 18:42:37 +02:00
Vladimir Panteleev
83d61e4b81 docs/hacking-howto: Promote "How to build?" sub-section
Move the "How to build?" sub-section to the top of its parent section.
2017-09-13 18:42:32 +02:00
Vladimir Panteleev
bf59c0fbfc docs/hacking-howto: Promote "Using git / sending patches" section
Move the contents of the "Using git / sending patches" section to the
top of the document.
2017-09-13 18:42:27 +02:00
Michael Stapelberg
6203c6cb39 tests: run 533-randr15.t at the very end
The test runs `xrandr setmonitor`, which will otherwise affect any test
scheduled after 533-randr15.t, causing flakyness in t/217-NET_CURRENT_DESKTOP.t
for example.
2017-09-13 18:42:22 +02:00
Michael Stapelberg
6dc164a652 tests: unflake t/263-edge-borders.t 2017-09-13 18:42:18 +02:00
Michael Stapelberg
429af6dbb3 tests: re-seed random number generator in workers 2017-09-13 18:42:13 +02:00
Vladimir Panteleev
2eaf58a553 docs/testsuite: Correct Xephyr package name on Arch Linux (#2913)
The package is called `xorg-server-xephyr`, not `xorg-xserver-xephyr`.
2017-09-13 18:41:51 +02:00
Michael Stapelberg
155e307a3f testcases/Makefile.PL: tell MakeMaker this is a pure-Perl distribution (#2922)
fixes #2914
2017-09-13 18:41:46 +02:00
Orestis
7cb9465db9 Add files generated by make check in AnyEvent-I3/ to .gitignore (#2915) 2017-09-13 18:41:31 +02:00
Michael Stapelberg
083b6a31f4 Include AnyEvent-I3 directory in dist tarballs (#2916)
fixes #2905
2017-09-13 18:41:26 +02:00
Michael Stapelberg
4b0a6ba769 travis: downgrade temporarily due to asan issue
fixes #2912
2017-09-13 18:41:21 +02:00
Michael Stapelberg
a542b3d26c i3bar: ensure get_buffer does not leak memory
This fixes an AddressSanitizer warning which recently popped up.

related to #2907
2017-09-13 18:41:13 +02:00
Michael Stapelberg
75d118203b Merge pull request #2942 from stapelberg/append
Improve append_layout’s invalid JSON handling
2017-09-13 18:38:47 +02:00
Michael Stapelberg
100fad741f Add .editorconfig (see editorconfig.org) (#2943)
This file uses the same settings which we currently have in our vim modeline,
but can be picked up by many different editors without having to add and
maintain editor-specific modelines in all of our source files.
2017-09-13 18:38:27 +02:00
Michael Stapelberg
c45c002bad validate JSON before loading
This commit also introduces slurp() which reads a file in its entirety. Using
this function instead of doing IO in the functions in load_layout.c again and
again makes the code cleaner (fixing at least two memory leaks) and avoids
re-reading the same file 3 times.

related to #2755
2017-09-13 17:41:05 +02:00
Michael Stapelberg
72c972a36c AnyEvent-I3: use Carp for easier debugging (includes stacktraces) 2017-09-13 16:39:44 +02:00
Michael Stapelberg
b23e1f644f Bugfix: free incomplete containers when JSON parsing fails
related to #2755
2017-09-13 16:39:13 +02:00
Michael Stapelberg
17627a5861 Merge pull request #2935 from orestisf1993/issue-2934
Make sure that parse_config input terminates with '\0'
2017-09-13 15:07:21 +02:00
Orestis Floros
7b0f4abf4f scalloc parse_config input to make sure it terminates with '\0'
Otherwise strchr() can crash for files that don't end with '\n' because
it won't find a null char to terminate at.

Fixes #2934
2017-09-13 15:31:53 +03:00
Orestis Floros
fd7319683d Don't insert newline at end of config with launch_with_config 2017-09-13 15:30:37 +03:00
Michael Stapelberg
44e4ad52f6 Merge pull request #2920 from CyberShadow/monitor-output-names
Consider RandR 1.5's monitors' output names in addition to monitor names
2017-09-13 10:58:38 +02:00
Vladimir Panteleev
3b75be1334 docs/userguide: Document that i3 can accept RandR output names 2017-09-13 08:23:27 +00:00
Vladimir Panteleev
9be4199e13 533-randr15.t: Add test for bar output name canonicalization 2017-09-13 08:23:27 +00:00
Vladimir Panteleev
fbeded23a9 533-randr15.t: Stop hard-coding the output name
Refactor away all mentions of DP3.
2017-09-13 08:23:27 +00:00
Vladimir Panteleev
8a0e5f89f9 533-randr15.t: Add a fake output connected to the fake monitor
Add an output ID to the simulated RRGetMonitors reply, then add a
simulated RRGetOutputInfo reply describing the added output.
2017-09-13 08:23:27 +00:00
Vladimir Panteleev
c6e3fbcf19 testcases/lib: Add inject_randr15_outputinfo argument
Allow tests to specify a file name for inject_randr15's
--getoutputinfo_reply command-line parameter.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
de1b578f75 inject_randr1.5: Intercept X11 error responses in addition to replies
Allow clients to send garbage to the server, then intercept the
server's error response and substitute it with the supplied simulated
reply data.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
f88f4fb5d4 inject_randr1.5: Add RRGetOutputInfo reply injection
Add a --getoutputinfo_reply switch to indicate a filename containing
the RRGetOutputInfo reply data to inject.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
dfc5ad9850 inject_randr1.5: Refactor reading and storing reply buffer to a struct
Allows easier introduction of additional reply buffers in upcoming
changes.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
6de9cdd96f ipc: Canonicalize output names in bar configuration
Convert the output names specified in the "output" and "tray_output"
fields in bar blocks in i3's configuration to the referred output's
primary name. This allows specifying names other than the primary
output's name in the given fields without changing the IPC protocol.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
ae8f3c2679 randr: Look up alternative output names when searching outputs
Update get_output_by_name to look at all additional names added by the
change in the previous commit, not just the primary one.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
8d51780d13 randr: Register monitors' output names as additional i3 output names
In addition to the name of the monitor itself (which is still used as
the i3 output's primary name), register RandR output names associated
with the RandR monitor as alternative i3 output names.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev
d01a59b922 Store output names as a linked list
Currently, only one name is ever added, and only the first name is
ever accessed; actually using the capability to store and access
multiple names comes in the following commits.
2017-09-13 08:23:24 +00:00
Vladimir Panteleev
30b1ab38b3 Introduce output_primary_name function
Currently simply returns output->name, but this will make it easier to
change how output names are stored in the following commits.

Also replace reading output->name with invocations of
output_primary_name. Code which writes output->name is unchanged. Done
using a mostly mechanical replacement of output->name to
output_primary_name(output).
2017-09-13 08:22:57 +00:00
Michael Stapelberg
48fbb3e9ef testsuite: install Module::Install so that AnyEvent-I3/Makefile.PL works (#2940)
As per https://perlmaven.com/cant-locate-inc-module-install-in-inc, the inc/
directory should not be under version control.

fixes #2914
2017-09-12 22:16:36 +02:00
Orestis
bcaec96414 Fix userguide bug (#2932)
Fixes #2931
2017-09-11 21:31:29 +02:00
Ingo Bürk
5e5444613f Merge pull request #2928 from CyberShadow/pull-20170911-130032
docs/hacking-howto: Promote "Using git / sending patches" section
2017-09-11 20:49:47 +02:00
Vladimir Panteleev
7116bbaa12 docs/hacking-howto: Update section topology
- Promote the "How to build?" sub-section to a top-level
  section ("Building i3")

- Convert the "Introduction" sub-section as the intro to the remaining
  contents of the "Using git / sending patches" section

- Keep "Which branch to use?" as a level-3 sub-section, thus making it
  a sub-section of what used to be the "Introduction" sub-section.
2017-09-11 13:16:44 +00:00
Vladimir Panteleev
e799bda2da docs/hacking-howto: Promote "How to build?" sub-section
Move the "How to build?" sub-section to the top of its parent section.
2017-09-11 13:16:34 +00:00
Vladimir Panteleev
5c693ec2ae docs/hacking-howto: Promote "Using git / sending patches" section
Move the contents of the "Using git / sending patches" section to the
top of the document.
2017-09-11 13:04:58 +00:00
Michael Stapelberg
0f2bce3916 Merge pull request #2926 from stapelberg/unflake-tests
Unflake tests
2017-09-10 22:08:05 +02:00
Michael Stapelberg
1c94d189c3 tests: run 533-randr15.t at the very end
The test runs `xrandr setmonitor`, which will otherwise affect any test
scheduled after 533-randr15.t, causing flakyness in t/217-NET_CURRENT_DESKTOP.t
for example.
2017-09-10 21:03:14 +02:00
Michael Stapelberg
06e8f75d52 tests: unflake t/263-edge-borders.t 2017-09-10 21:03:14 +02:00
Michael Stapelberg
bed5c9e03a tests: re-seed random number generator in workers 2017-09-10 21:03:13 +02:00
Ingo Bürk
eba177342f Revert "Use OVER operator for drawing text (#2908)" (#2925)
This reverts commit 16160462a3.
2017-09-10 17:03:09 +02:00
Michael Stapelberg
1b18f89422 Merge pull request #2923 from stapelberg/tests-split
Testsuite: avoid starting new i3 instances where possible
2017-09-10 13:41:46 +02:00
Vladimir Panteleev
828c759489 docs/testsuite: Correct Xephyr package name on Arch Linux (#2913)
The package is called `xorg-server-xephyr`, not `xorg-xserver-xephyr`.
2017-09-10 13:02:10 +02:00
Michael Stapelberg
f7565b5f32 Kill windows between tests 2017-09-10 11:31:10 +02:00
Michael Stapelberg
94c76d9e30 i3test: add kill_all_windows convenience function 2017-09-10 11:30:56 +02:00
Michael Stapelberg
6caf4e1cb5 testcases/Makefile.PL: tell MakeMaker this is a pure-Perl distribution (#2922)
fixes #2914
2017-09-10 11:25:43 +02:00
Vladimir Panteleev
65e8c02f2f Add README.md (#2910) 2017-09-10 07:43:53 +02:00
Michael Stapelberg
899ffd872f 529-net-wm-desktop: avoid timeout, avoid restarts, split
This shaves off almost half a second of the wall-clock time (from 5.9s to 5.6s).
2017-09-09 18:39:56 +02:00
Michael Stapelberg
1a2ce3edaf travis: remove clang-analyze (#2917)
• The output currently contains a large number of false-positives and — AFAICT —
  no actual issues.

• Upstream shows little interest in addressing the long-standing issues with the
  TAILQ macros, so the false-positive situation probably won’t change soon:
  https://bugs.llvm.org/show_bug.cgi?id=18222

Currently, we largely spend travis CPU cycles on this, for no additional value.
2017-09-09 18:30:17 +02:00
Michael Stapelberg
ffd0ebd85c 165-for_window: merge config and re-use i3 instance, split remainder
This reduces total test wall-clock time by 1.5s (from 7.5s down to 5.9s).
2017-09-09 18:21:59 +02:00
Michael Stapelberg
c86307864f t/265-swap: don’t start new i3 instances with the same config
$config is never touched after being initially set up.
Not restarting i3 between each test case reduces the runtime of this test by an
order of magnitude.
2017-09-09 17:50:23 +02:00
Jan Alexander Steffens
16160462a3 Use OVER operator for drawing text (#2908)
For opaque text, SOURCE is not any different from OVER. However, when
drawing color glyphs (which consist of RGBA pixels instead of strokes)
SOURCE's handling of alpha is not what we want.

I stumbled across this because cairo 1.15.8 seems to clear the surface
before drawing color emoji if the operator is SOURCE, deleting every-
thing drawn before. Arguably, the area outside the glyph bounds should
not be touched, but even if this is a cairo bug the problem of alpha
within the glyph remains.
2017-09-09 17:32:34 +02:00
Orestis
48fd6416c6 Add files generated by make check in AnyEvent-I3/ to .gitignore (#2915) 2017-09-09 14:47:32 +02:00
Michael Stapelberg
0875b19034 Include AnyEvent-I3 directory in dist tarballs (#2916)
fixes #2905
2017-09-09 14:22:16 +02:00
Michael Stapelberg
448af7ce5f Merge pull request #2911 from i3/asan
i3bar: ensure get_buffer does not leak memory
2017-09-09 11:41:07 +02:00
Michael Stapelberg
3137064efc travis: downgrade temporarily due to asan issue
fixes #2912
2017-09-09 08:15:03 +02:00
Michael Stapelberg
55964fb3be i3bar: ensure get_buffer does not leak memory
This fixes an AddressSanitizer warning which recently popped up.

related to #2907
2017-09-09 06:56:50 +02:00
Orestis Floros
b48cbe42af Set marks to NULL after freeing
realloc() was being called on an already freed pointer.

Fixes #2900
2017-09-07 14:56:17 +02:00
Orestis Floros
f26b00cb67 Improve 267-regress-mark-restart.t
Another window with a mark is needed for issue #2900.
2017-09-07 14:56:12 +02:00
Michael Stapelberg
f54ee70ff9 Merge pull request #2901 from orestisf1993/issue-2900
Set marks to NULL after freeing
2017-09-07 14:55:37 +02:00
Orestis Floros
554775f694 Set marks to NULL after freeing
realloc() was being called on an already freed pointer.

Fixes #2900
2017-09-07 10:51:13 +03:00
Orestis Floros
e5008ca0dc Improve 267-regress-mark-restart.t
Another window with a mark is needed for issue #2900.
2017-09-07 04:20:52 +03:00
Ingo Bürk
3f9b880e1f Merge pull request #2899 from orestisf1993/patch-1
Fix typo in 265-swap.t
2017-09-06 17:08:02 +02:00
Orestis
b12cea0ad2 Fix typo in 265-swap.t 2017-09-06 18:02:52 +03:00
Orestis
369c9ed50f Check if con_id exists in cmd_swap (#2898)
Also adds some testcases for swap using con_id.

Fixes #2895
2017-09-06 07:36:22 +02:00
Ingo Bürk
dedfda1e01 Invert condition to log debug message in correct situation (#2896) 2017-09-06 07:36:18 +02:00
hwangcc23
09ee12d8e5 Properly initialize sigaction struct
The code in handle_signal() wasn't clearing the struct sigaction before passing it to sigaction().
This meant that we would block a random set of signals while executing the default handler, or jump to the uninitialized __sa_sigaction__ (instead of sa_handler).
Initialize properly as we do in setup_signal_handler().
2017-09-06 07:36:13 +02:00
Theo Buehler
e8dbf0171d Avoid use of uninitialized in init_dpi_end
If conn == NULL or display == NULL, init_dpi() jumps to init_dpi_end
before (declaring and) initializing resource. In init_dpi_end, there
is a free(resource) call conditionally on resource != NULL, so this
may lead to a bogus free. Found by clang -Wsometimes-uninitialized.
2017-09-06 07:36:08 +02:00
Orestis
66f2148236 Check if con_id exists in cmd_swap (#2898)
Also adds some testcases for swap using con_id.

Fixes #2895
2017-09-06 07:34:14 +02:00
Ingo Bürk
85eb097677 Invert condition to log debug message in correct situation (#2896) 2017-09-05 09:01:53 +02:00
Ingo Bürk
a5b5eef6c0 Merge pull request #2891 from hwangcc23/init-sigaction
Properly initialize sigaction struct
2017-09-04 18:44:14 +02:00
Ingo Bürk
84394c0025 Merge pull request #2875 from botovq/next
Avoid use of uninitialized in init_dpi_end
2017-09-04 18:43:42 +02:00
Michael Stapelberg
5df53f57c4 debian: update changelog 2017-09-04 08:21:06 +02:00
Michael Stapelberg
e1f6a3e3d3 Update debian/changelog 2017-09-04 07:53:39 +02:00
Michael Stapelberg
ef34b2759f Merge branch 'release-4.14' 2017-09-04 07:53:39 +02:00
Michael Stapelberg
7af2faebd8 Merge branch 'next' into master 2017-09-04 07:53:39 +02:00
Michael Stapelberg
9e2e4881ab Set non-git version to 4.14-non-git. 2017-09-04 07:53:39 +02:00
Michael Stapelberg
abe725cf65 release i3 4.14 2017-09-04 07:53:25 +02:00
Michael Stapelberg
38b777c5fc Revert "i3-nagbar: add button flag to execute action with /bin/sh directly" (#2893) 2017-08-31 22:50:00 +02:00
hwangcc23
92b8196192 Properly initialize sigaction struct
The code in handle_signal() wasn't clearing the struct sigaction before passing it to sigaction().
This meant that we would block a random set of signals while executing the default handler, or jump to the uninitialized __sa_sigaction__ (instead of sa_handler).
Initialize properly as we do in setup_signal_handler().
2017-08-31 22:48:33 +08:00
Michael Stapelberg
4dca8e6e0b Respect focus_on_window_activation for ConfigureRequests (#2889)
fixes #2873
2017-08-28 12:07:56 +02:00
Michael Stapelberg
f41ae5a88f Merge pull request #2888 from stapelberg/leak
Fix memory leak
2017-08-28 12:07:40 +02:00
Chih-Chyuan Hwang
044f03d5c7 Update doc for dependency Module::Install (#2877)
After moving to AnyEvent-I3, a new testsuite dependency is introduced: Module::Install.
Update the doc for this.
See the issue #2876.
2017-08-28 09:43:42 +02:00
Michael Stapelberg
d7e6cba17e do leak check before exiting
related to #2541
2017-08-28 09:23:42 +02:00
Michael Stapelberg
c4474adfd6 Fix memleak: free regex when parsing fails
fixes #2541
2017-08-28 09:22:56 +02:00
Ingo Bürk
f1e6d4ef2d Merge pull request #2882 from jolange/dev
docs markup fixes
2017-08-26 11:38:06 +02:00
Johannes Lange
1b0c9958d0 docs markup fixes 2017-08-26 11:22:34 +02:00
Theo Buehler
d29d908003 Avoid use of uninitialized in init_dpi_end
If conn == NULL or display == NULL, init_dpi() jumps to init_dpi_end
before (declaring and) initializing resource. In init_dpi_end, there
is a free(resource) call conditionally on resource != NULL, so this
may lead to a bogus free. Found by clang -Wsometimes-uninitialized.
2017-08-23 15:48:58 +02:00
Ingo Bürk
c40aaec7ca Merge pull request #2868 from stapelberg/mouse
t/264-keypress-numlock: add mouse binding test
2017-08-20 18:07:34 +02:00
Michael Stapelberg
c9676e0cdb t/264-keypress-numlock: add mouse binding test
fixes #2523
2017-08-20 18:00:58 +02:00
Michael Stapelberg
260bcf283f Respect dont_warp flag when moving containers (#2867)
fixes #2681
fixes #2592
2017-08-20 17:07:23 +02:00
Michael Stapelberg
fdb551f9d5 i3bar: only restart child when command changed (#2866)
this is a follow-up to
98f202dd1b

fixes #2689
2017-08-20 15:30:27 +02:00
Michael Stapelberg
c70fa8078f Focus windows upon ConfigureWindow with stack-mode=Above (#2865)
fixes #2708
fixes #2745
2017-08-20 14:56:44 +02:00
Michael Stapelberg
afdf67924a Merge pull request #2864 from stapelberg/fixconfig
Improve error messages for incorrect config lines starting with “set”
2017-08-20 13:16:53 +02:00
Michael Stapelberg
1e349ae3e1 t/201-config-parser: update expected token list 2017-08-20 13:12:06 +02:00
Michael Stapelberg
c04b8592fd parser: only skip set[\s], not set.*
fixes #2564
2017-08-20 12:59:07 +02:00
Michael Stapelberg
bb0aac6e39 start nagbar when encountering invalid set statements
related to #2564
2017-08-20 12:59:07 +02:00
Michael Stapelberg
8cc11dcb08 Skip lines consisting only of “set” 2017-08-20 12:59:03 +02:00
Michael Stapelberg
dd019f59fa (Re-)initialize optional fields to empty strings 2017-08-20 12:55:55 +02:00
Michael Stapelberg
c25bee0ffc Bugfix: check bounds before accessing memory
This fixes the following issue when having an error early in the config file:

==1562==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6220000180ff at pc 0x55c837edb1d3 bp 0x7ffee7534650 sp 0x7ffee7534648
READ of size 1 at 0x6220000180ff thread T0
    #0 0x55c837edb1d2 in start_of_line ../../i3/src/config_parser.c:238
    #1 0x55c837edc96f in parse_config ../../i3/src/config_parser.c:493
    #2 0x55c837edf527 in parse_file ../../i3/src/config_parser.c:1091
    #3 0x55c837ecf14b in parse_configuration ../../i3/src/config.c:65
    #4 0x55c837ed1ef4 in load_configuration ../../i3/src/config.c:230
    #5 0x55c837f0a8d0 in main ../../i3/src/main.c:539
    #6 0x7fb63ae042b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
    #7 0x55c837e95eb9 in _start (/home/michael/i3/build/i3+0x4beb9)

0x6220000180ff is located 1 bytes to the left of 5165-byte region [0x622000018100,0x62200001952d)
allocated by thread T0 here:
    #0 0x7fb63e590cf8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1cf8)
    #1 0x55c837f59aa6 in smalloc ../../i3/libi3/safewrappers.c:24
    #2 0x55c837edef45 in parse_file ../../i3/src/config_parser.c:1029
    #3 0x55c837ecf14b in parse_configuration ../../i3/src/config.c:65
    #4 0x55c837ed1ef4 in load_configuration ../../i3/src/config.c:230
    #5 0x55c837f0a8d0 in main ../../i3/src/main.c:539
    #6 0x7fb63ae042b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
2017-08-20 12:54:49 +02:00
Ingo Bürk
ad8bb41686 Merge pull request #2863 from stapelberg/fixfreeze
i3bar: Bugfix: avoid freeze after VisibilityNotify
2017-08-20 12:25:06 +02:00
Michael Stapelberg
8106ae7923 i3bar: Bugfix: avoid freeze after VisibilityNotify
fixes #2790
2017-08-20 12:16:43 +02:00
Michael Stapelberg
4d93d26484 Bugfix: consider inactive monitors when querying (#2862)
fixes #2815
fixes #2594
2017-08-20 00:19:45 +02:00
Michael Stapelberg
e6682f862b Merge pull request #2861 from stapelberg/ipcconfig
Introduce the GET_CONFIG IPC request
2017-08-19 19:23:02 +02:00
Michael Stapelberg
d14c9bd6af Bump AnyEvent-I3 to 0.18 2017-08-19 19:08:53 +02:00
Michael Stapelberg
a6d8ed9b1a Introduce the GET_CONFIG IPC request
This introduces memory usage by one copy of the config file, which is an
acceptable trade-off for being able to easily revert data loss.
The default config is 6KB, user configs will be in the same ballpark.

fixes #2856
2017-08-19 19:08:51 +02:00
Michael Stapelberg
6bb9c9e708 Makefile.am: fix anyevent-i3.stamp dependencies 2017-08-19 19:07:13 +02:00
Michael Stapelberg
af24f07020 Merge pull request #2860 from stapelberg/anyevent-i3
Merge the AnyEvent-I3 repository into i3/AnyEvent-I3
2017-08-19 18:32:04 +02:00
Ingo Bürk
65dde35bbf Merge pull request #2859 from stapelberg/fixtests
Fix tests
2017-08-19 18:19:51 +02:00
Michael Stapelberg
a91544b5b3 testcases: remove external AnyEvent::I3 dependency 2017-08-19 18:13:19 +02:00
Michael Stapelberg
062ecdb0b5 Move to AnyEvent-I3 2017-08-19 18:13:19 +02:00
Michael Stapelberg
db35244ee7 tag 0.17 2017-08-19 18:13:19 +02:00
Michael Stapelberg
f7645336cb use lib '.' for Perl 5.25.11+
see also https://rt.cpan.org/Ticket/Display.html?id=120943
2017-08-19 18:13:19 +02:00
Tony Crisci
0940f7b9d1 Add the shutdown event (#2)
The shutdown event is triggered when the ipc shuts down because of
either a restart or when i3 exits.
2017-08-19 18:13:19 +02:00
Michael Stapelberg
538c50c8ef support the barconfig_update and binding event, tag 0.16 2017-08-19 18:13:19 +02:00
Michael Stapelberg
bd1c33588d support the window event, tag 0.15 2017-08-19 18:13:19 +02:00
Michael Stapelberg
85e98d8d7d fix doc error: missing opening brace (Thanks bitonic) 2017-08-19 18:13:19 +02:00
Michael Stapelberg
b008d8b2e9 0.14: add support for the mode event 2017-08-19 18:13:19 +02:00
Michael Stapelberg
879266c40b update Changes file 2017-08-19 18:13:19 +02:00
Michael Stapelberg
c3538c4cad bump version to 0.13 2017-08-19 18:13:19 +02:00
Michael Stapelberg
64fddbe41b Implement the GET_VERSION request (with a fallback to i3 --version) 2017-08-19 18:13:19 +02:00
Michael Stapelberg
d8ad62c36f add a more involved example to the SYNOPSIS 2017-08-19 18:13:19 +02:00
Michael Stapelberg
3a7f5d7912 bump version to 0.12 2017-08-19 18:13:19 +02:00
Michael Stapelberg
b4058790cc remove relative directories from $ENV{PATH} (for taint mode)
Otherwise, the module will die when you use it with PATH=$PATH:. (as is
the case on the OpenBSD cpan testers).
2017-08-19 18:13:19 +02:00
Michael Stapelberg
af6f180c35 bump version to 0.11 2017-08-19 18:13:19 +02:00
Michael Stapelberg
4c97c94a0a taint mode fix for FreeBSD 2017-08-19 18:13:19 +02:00
Michael Stapelberg
2ec58b40f8 bump version to 0.10 2017-08-19 18:13:19 +02:00
Michael Stapelberg
a6a0e11718 update copyright and URL/email 2017-08-19 18:13:19 +02:00
Michael Stapelberg
476e41ddc3 use i3 --get-socketpath by default for determining the socket path
This was introduced in i3 v4.1 (released 2011-11-11, so should be
widespread enough by now).
2017-08-19 18:13:19 +02:00
Michael Stapelberg
7021bb4315 Revert "implement the GET_LOG_MARKERS request" (no longer available)
This reverts commit 7e2ed06447.
2017-08-19 18:13:19 +02:00
Michael Stapelberg
3a9024de63 Bugfix: Also delete callbacks which are triggered due to an error 2017-08-19 18:13:19 +02:00
Michael Stapelberg
ead1557468 implement the GET_LOG_MARKERS request
Requires i3 version 966c654112 or later.
2017-08-19 18:13:19 +02:00
Michael Stapelberg
23beaa83ea Bump version to 0.09 2017-08-19 18:13:19 +02:00
Michael Stapelberg
7a934b94dd Add TYPE_GET_MARKS and accompanying sugar method 2017-08-19 18:13:19 +02:00
Michael Stapelberg
d7bd645863 Fix documentation for get_marks (s/tree/marks) 2017-08-19 18:13:19 +02:00
Michael Stapelberg
9054711650 Bump version to 0.08 2017-08-19 18:13:19 +02:00
Michael Stapelberg
1a272f96a5 Implement support for the TYPE_GET_MARKS request, add ->get_marks sugar method 2017-08-19 18:13:19 +02:00
Michael Stapelberg
6274959029 Bugfix: The synopsis mentioned ->workspaces, but it’s ->get_workspaces 2017-08-19 18:13:19 +02:00
Michael Stapelberg
7176a7074b introduce get_tree request (tree branch only) 2017-08-19 18:13:19 +02:00
Michael Stapelberg
a3a42f30e1 Add check to Makefile to abort in a Windows environment (neither i3 nor unix sockets available)
Hopefully, this will stop CPAN Testers emails about failing tests on windows.
2017-08-19 18:13:19 +02:00
Michael Stapelberg
da94674f8f bump version 2017-08-19 18:13:19 +02:00
Michael Stapelberg
192ef6a827 use getpwuid() to resolve ~ in socket paths instead of glob()
This fixes a warning about using a tainted variable (broke the
tests with newer perl versions).
2017-08-19 18:13:19 +02:00
Michael Stapelberg
e656864838 use new default ipc-socket path, glob() path, bump version 2017-08-19 18:13:19 +02:00
Michael Stapelberg
5d1bb0b0ce Bump version for new CPAN upload, fix MANIFEST 2017-08-19 18:13:19 +02:00
Michael Stapelberg
f12facc184 bump version to 0.02, update MANIFEST 2017-08-19 18:13:19 +02:00
Michael Stapelberg
b9c83fbd26 add testcase for sugar methods 2017-08-19 18:13:19 +02:00
Michael Stapelberg
e34675c3c7 Implement _error callback 2017-08-19 18:13:19 +02:00
Michael Stapelberg
d137f83452 Add sugar methods for easier usage 2017-08-19 18:13:19 +02:00
Michael Stapelberg
45eef6bdf7 Remove obsolete paragraph about the need for a second connection
Due to the event-based handling of incoming data from i3 we do not
suffer from this problem.
2017-08-19 18:13:19 +02:00
Michael Stapelberg
1aac4d3f14 Use $self->message in subscribe 2017-08-19 18:13:19 +02:00
Michael Stapelberg
b57fca1ef9 kill left-over variable 2017-08-19 18:13:19 +02:00
Michael Stapelberg
7ffa4bea31 Use only 'import' of 'Exporter' 2017-08-19 18:13:19 +02:00
Michael Stapelberg
98e32d39a5 reformat perldoc paragraph 2017-08-19 18:13:19 +02:00
Michael Stapelberg
4ba7259f6a use constant instead of magic number 2017-08-19 18:13:19 +02:00
Michael Stapelberg
460f09915f Get rid of _bytelength, use encode_utf8 and length instead. Correctly check for scalar 2017-08-19 18:13:19 +02:00
Michael Stapelberg
8b2db9a238 Bugfix: Handle message_type == 0 2017-08-19 18:13:19 +02:00
Michael Stapelberg
e3f0e5b01c Add new constants 2017-08-19 18:13:19 +02:00
Michael Stapelberg
f6a2605610 update MANIFEST correctly (use MANIFEST.SKIP instead of ignore.txt) 2017-08-19 18:13:19 +02:00
Michael Stapelberg
4c6b8f91e0 Update MANIFEST 2017-08-19 18:13:19 +02:00
Michael Stapelberg
e35d6039d7 Provide constants for message types 2017-08-19 18:13:19 +02:00
Michael Stapelberg
1044c9814b Expand testcase for the get_workspaces message (needs i3 to be running) 2017-08-19 18:13:19 +02:00
Michael Stapelberg
279528a863 Return connection status in condvar in $i3->connect 2017-08-19 18:13:19 +02:00
Michael Stapelberg
7d92e2c3e2 kill boilerplate 2017-08-19 18:13:19 +02:00
Michael Stapelberg
5c9e2833b6 prefix internal subs with _ 2017-08-19 18:13:19 +02:00
Michael Stapelberg
632bdb7d2a Initial commit 2017-08-19 18:13:19 +02:00
Michael Stapelberg
5738ea10bb t/171-config-migrate: escape braces for newer Perl versions 2017-08-19 17:45:37 +02:00
Michael Stapelberg
69efe0176e Prevent accidentally introduced fall-through
This was added in commit e82e26a24d
2017-08-19 17:29:31 +02:00
Ingo Bürk
e4da07e734 Merge pull request #2847 from tmerr/next
Document missing case of workspace event
2017-07-31 11:48:10 +02:00
Trevor Merrifield
a805676197 Document missing case of workspace event
The docs are missing the "move" workspace event emitted from
workspace.c's workspace_move_to_output function.
2017-07-30 01:14:07 -04:00
Trevor Merrifield
6a8a4266f3 Add missing newline to end of file 2017-07-30 00:59:53 -04:00
Ingo Bürk
b23f23b29b Merge pull request #2836 from acrisci/bug/sysconfdir-to-makefile
Move SYSCONFDIR definition to makefile
2017-07-13 06:55:22 +02:00
Ingo Bürk
0016ee8366 Merge pull request #2838 from acrisci/bug/colors-only-hex
Ensure colors are in hex
2017-07-13 06:50:05 +02:00
Tony Crisci
3a914396df libi3: Add basic validation to hex color conversion
Make sure a given hex color is the expected length and begins with a hash in
draw_util_hex_to_color() to avoid memory errors.

fixes #2829
2017-07-12 17:53:15 -04:00
Tony Crisci
1c06f8b797 i3bar: change error block color to hex
Named colors are not supported by the i3bar protocol so give the error block
color in hex.
2017-07-12 17:53:15 -04:00
Tony Crisci
c534a3ea95 Move SYSCONFDIR definition to makefile
Official autoconf docs contraindicate the use of the $sysconfdir
variable in configure.ac. For reference:

https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html

The macro SYSCONFDIR (ordinarilly set to "/etc") is required to find
a system configuration file installed with i3. In some build setups,
this may not be defined properly in when the configure script is
compiled.

Instead, define this variable in AM_CPPFLAGS as the documentation
indicates.

fixes #2832
2017-07-12 10:57:23 -04:00
Ingo Bürk
bf1e4339e6 Merge pull request #2831 from dvejmz/next
Add KDE konsole terminal fallback to i3-sensible-terminal
2017-07-11 16:06:45 +02:00
David Jimenez Sequero
cacd2ae600 Add KDE konsole terminal fallback to i3-sensible-terminal 2017-07-10 12:27:31 +01:00
Ingo Bürk
cea7d135a5 Merge pull request #2827 from akash-akya/next
Fix 'Mouse binding don't work'
2017-07-09 13:23:42 +02:00
akash akya
ec3ffdd7a0 Fix 'Mouse binding don't work' 2017-07-07 01:03:36 +05:30
Ingo Bürk
2a918169f2 Merge pull request #2820 from hwangcc23/fix-2804
i3-msg: Return an exit code upon missing -t arg
2017-06-23 08:31:08 +02:00
hwangcc23
5362876b60 i3-msg: Return an exit code upon missing -t arg
If getopt() returns '?' (option with a missing argument), exit the program with an error code rather than continuing the execution.

Fix the issue #2804 (https://github.com/i3/i3/issues/2804).
2017-06-22 22:53:08 +08:00
Ingo Bürk
78adcdab7f Merge pull request #2808 from hwangcc23/fix-2802
Fix 'rename workspace to tosomething'
2017-06-13 15:15:49 +02:00
hwangcc23
cc4be41674 Fix 'rename workspace to tosomething'
This patch fixes the issue #2802 (https://github.com/i3/i3/issues/2802).

1). Revise the state machine for the 'rename workspace' command.
    These scenarios are considered:
    a). 'rename workspace to to bla'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO -> RENAME_WORKSPACE_LIKELY_TO_NEW_NAME
    b). 'rename workspace to tosomething'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO
    c). 'rename workspace to to'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO
    d). 'rename workspace to bla'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO
    e). 'rename workspace bla to foo'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_TO -> RENAME_WORKSPACE_TO_NEW_NAME

2). Add a test case in 117-workspace.t for the scenario b.
2017-06-12 22:21:21 +08:00
Ingo Bürk
e8f86832ee Merge pull request #2795 from Adaephon-GH/doc-config-load-order
Fix manpage on configuration lookup order
2017-06-12 11:01:58 +02:00
Ingo Bürk
4a66407602 Merge pull request #2799 from hwangcc23/add_compilation_inst
Add compilation instructions to the hacking howto
2017-06-12 11:00:28 +02:00
hwangcc23
e63070607f Add compilation instructions to the hacking howto 2017-06-03 23:21:42 +08:00
Ingo Bürk
d3901fe92e Merge pull request #2796 from Armael/next
Add a link to the ocaml-i3ipc library
2017-05-31 20:33:39 +02:00
Armaël Guéneau
b2ee718f56 Add a link to the ocaml-i3ipc library 2017-05-31 16:53:33 +02:00
Adaephon-GH
ca1b0afca1 Fix manpage on configuration lookup order
The lookup order stated in the i3 manpage was is contratiction to the
actual lookup order, which was introduced with commit
bfa12a5819.
Since that commit (6.5 years ago) the "traditional" paths took precedence
over XDG_CONFIG paths.
2017-05-31 11:26:07 +02:00
Ingo Bürk
a7e8c4dd46 Merge pull request #2772 from loungecube/patch-1
prevent multiple menu items per .desktop entry
2017-05-29 08:37:44 +02:00
Ingo Bürk
29f5b37841 Merge pull request #2784 from stapelberg/numrelease
compare modifiers for equality, not subset
2017-05-24 21:43:33 +02:00
Michael Stapelberg
a4f6387911 compare modifiers for equality, not subset (+test)
Subset comparison was introduced with the rather large commit
bf3cd41b5d, but I now think we should use
equality.

In other words, the following key binding:

    bindsym Mod4+x nop Mod4+x

previously would have been triggered when pressing Mod3+Mod4+x.

Strictly speaking, this is a change of behavior, but it breaks none of our
tests, and using equality instead of subset comparison enables more use-cases.

fixes #2002
2017-05-24 20:42:27 +02:00
Michael Stapelberg
26f5edb97f no-op change: store |button| in the correct data type 2017-05-24 20:41:55 +02:00
Michael Stapelberg
0acd11a8d7 no-op change: move bind->release check into loop
We don’t have to negate the check anymore, making it more readable.
2017-05-24 20:41:17 +02:00
Michael Stapelberg
6d9b165fb4 no-op change: don’t compare keycode for every modifier 2017-05-24 20:40:17 +02:00
Chih-Chyuan Hwang
13372d511a Fix the i3 crash caused by mark + restart commands (#2779)
This patch fixes the issue #2511(https://github.com/i3/i3/issues/2511).

1). Memorize the marks, but only call con_mark once the container has finished parsing. (Credit: This is @Airblader's patch.)

2). Add a test case 267-regress-mark-restart.t for regression test to check if mark and restart command crash i3.
2017-05-23 08:47:11 +02:00
Ingo Bürk
990100317a Merge pull request #2782 from stapelberg/release-bindings
Fix --release bindings broken by previous commit
2017-05-23 08:40:05 +02:00
Michael Stapelberg
2bd3639fbb Fix --release bindings broken by previous commit
fixes #2559
2017-05-23 08:28:56 +02:00
Michael Stapelberg
36f80f2de8 Apply numlock fallback to bindcode where necessary (#2781)
This was broken with commit d77d40173a

fixes #2559
2017-05-22 21:32:05 +02:00
Ingo Bürk
5fc00e2d18 Merge pull request #2777 from hwangcc23/update-testsuite-doc
Update testsuite docs
2017-05-22 08:50:58 +02:00
hwangcc23
bbfdcfddfe Update testsuite docs
After moved to autotools, the method to run the i3 testsuite is changed.
Update the testsuite document to reflect the change.
2017-05-21 23:08:27 +08:00
Ingo Bürk
305cb871df Merge pull request #2773 from lasers/next
docs/ipc: Fix typo
2017-05-18 09:51:45 +02:00
lasers
e4c2eb12ae docs/ipc: Fix typo 2017-05-17 18:48:56 -05:00
Ingo Bürk
aa8556abfc Merge pull request #2761 from mdirkse/next
[WIP] Change golang ipc lib reference to one that is maintained.
2017-05-17 10:39:42 +02:00
Ingo Bürk
7b6f592b71 Merge pull request #2771 from hwangcc23/fix-2764
Support to get the primary output
2017-05-16 18:39:37 +02:00
hwangcc23
f99727b518 Support to get the primary output
This makes `primary` output available for assign or move commands.
Fix the issue #2764(https://github.com/i3/i3/issues/2764).
2017-05-16 23:06:12 +08:00
Michael Stapelberg
6dd4252cd5 Merge pull request #2496 from Airblader/feature-917
Implement 'swap' command.
2017-05-15 21:35:10 +02:00
Ingo Bürk
5f9a5e8d7d Implement 'swap' command.
This patch introduces a new command 'swap' that swaps two containers so
that they assume each other's position and geometry.

fixes #917
2017-05-15 21:06:38 +02:00
loungecube
838616a165 prevent multiple menu items per .desktop entry
If a .desktop entry is being added to the list of Menu items by its "Name" field, it should not be added again by its command or filename.
If it is being added by its command, it should not be added again by its filename.
2017-05-15 05:02:09 +02:00
Ingo Bürk
9178c5b8ca Force container to be redrawn upon moving to another container. (#2769)
This is necessary as otherwise urgent containers can be broken
after moving them.
2017-05-12 19:26:35 +02:00
Ingo Bürk
38827fbb7e Merge pull request #2766 from MachFour/nagbar-shell-exec
i3-nagbar: add button flag to execute action with /bin/sh directly
2017-05-12 15:39:40 +02:00
Max Fisher
2fe9d7bbd2 i3-nagbar: add button flag to execute action with /bin/sh directly.
Fixes #2765.
2017-05-12 21:50:41 +10:00
Nathan Schulte
9bc504ebdb add error check and log for xcb_create_window 2017-05-12 09:01:37 +02:00
Ingo Bürk
b56cb84e16 Added a hint about the required config v4 version hint. (#2759)
fixes #2751
2017-05-04 23:08:51 +02:00
Ingo Bürk
333ebd7b71 Merge pull request #2762 from mdirkse/valid_json
Fix invalid JSON
2017-05-04 15:23:15 +02:00
Maarten Dirkse
e428bf02fb Fix invalid JSON 2017-05-04 00:36:44 +02:00
Maarten Dirkse
a3c6a89e6e Change golang ipc lib reference to one that is maintained. 2017-05-02 13:12:25 +02:00
Ingo Bürk
2dc13211a5 Merge pull request #2757 from Jereq/next
Fix i3-dmenu-desktop quoted command name
2017-05-02 10:06:00 +02:00
Ingo Bürk
c826fc0e44 Query workspaces again in i3bar when an output change occured. (#2760)
As of 2f0f8b1, i3bar will properly clean up on output change events.
However, this requires us to query the workspaces again to avoid a
display error in i3bar.

fixes #2740
fixes #2743
2017-05-02 09:11:35 +02:00
Ingo Bürk
d78fd8d91f Introduce --exclude-titlebar flag for mouse bindings. (#2703)
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes #2347
2017-05-02 09:08:42 +02:00
Sebastian Larsson
32175b0a1f Fix i3-dmenu-desktop quoted command name
According to the Desktop Entry Specification
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
the executable name or path of the executable may be quoted. This is not
properly respected when i3-dmenu-desktop extracts the command name from
the Exec entry.

Examples of values that fail and what they currently result in:

- "bar" -> "bar"
- "foo/bar" -> bar"
- "foo foobar/bar" -> "foo
- "foo\sbar" -> "foo\sbar"
- foo\sbar -> foo\sbar
- "foo\\\\bar" -> "foo\\\\bar"
2017-04-30 14:40:04 +02:00
Ingo Bürk
1d4e9f5de0 Merge pull request #2752 from mihaicmn/bug-2464
Fix changing of root workspace layout from stacked/tabbed
2017-04-28 17:34:21 +02:00
Mihai Coman
52ce8c803d Fix changing of root workspace layout from stacked/tabbed 2017-04-27 17:50:55 +03:00
Ingo Bürk
5376a972c4 Merge pull request #2731 from nmschulte/check-create-window
Check X11 create window call
2017-04-11 11:32:08 +02:00
Nathan Schulte
454578b331 add error check and log for xcb_create_window 2017-04-07 09:59:24 -05:00
Ingo Bürk
3e3528cc15 Merge pull request #2725 from nmschulte/feature/output-primary
Feature/output primary
2017-04-07 08:54:06 +02:00
Nathan Schulte
4fa87a0c43 format i3bar src/outputs.c w/ clang-format 2017-04-02 19:26:55 -05:00
Ingo Bürk
eb2c2c4b66 Merge pull request #2720 from Arlon1/next
Adding new terminals to i3-sensible-terminal
2017-03-30 15:19:50 +02:00
Franz König
f475b37a3c Adding new terminals to i3-sensible-terminal 2017-03-26 16:05:56 +02:00
lebenlechzer
2f0f8b16c2 i3bar: accept 'primary' for output config option 2017-03-12 21:17:12 +01:00
Ingo Bürk
8c3ddce5a2 Merge pull request #2698 from tmerr/next
docs/ipc: Document the 'primary' flag
2017-03-06 07:50:49 +01:00
Trevor Merrifield
1e1da5a659 docs/ipc: Document the 'primary' flag
Resolves #2697
2017-03-06 01:28:12 -05:00
Ingo Bürk
dda2ef9716 Fixes a small mixup in the assertion description. (#2692)
relates to PR #2649
2017-02-23 23:36:31 -08:00
Ingo Bürk
c474ddd782 Merge pull request #2649 from s3rb31/next
layout toggle: take any combination of layouts as arguments (continuation of #2476)
2017-02-24 00:58:19 +01:00
s3rb31
37658bd6d7 layout toggle: take any combination of layouts as arguments (#2649)
With this PR the 'layout toggle' command can be passed any
combination of valid layout keywords as arguments. They will
be activated one after another each time you issue the command,
advancing from left to right always selecting the layout after
the currently active layout or the leftmost layout if the active
layout is not in the argument list.

This PR also incorporates the feature request from #2476.
2017-02-24 00:34:18 +01:00
s3rb31
3410cb256d Implement mapping from string to layout as extra function 2017-02-23 21:49:48 +01:00
Michael Stapelberg
4a2d5da044 Merge pull request #2680 from Airblader/feature-2677
[#2677] Allow using left/right scrolling like up/down scrolling.
2017-02-20 09:06:57 -08:00
Ingo Bürk
8158e4c415 Copy the entire window content on Expose events. (#2685)
With commit d58dbc3 we started ignoring Expose events in a sequence
except for the last one. Since we only copied the affected part of
the window in the Expose event handler, this caused incorrectly
rendered window decorations.

Instead of reverting to the old behavior, we now copy the entire window
content on this single, last event with the following rationale:
- It's cheaper to copy a larger chunk once than multiple smaller
  chunks doing one server roundtrip each.
- That's how we do it when rendering out decoration on decoration
  changes as well.

fixes #2683
2017-02-17 00:06:40 -08:00
Ingo Bürk
432c4211ea Allow using left/right scrolling like up/down scrolling.
This commit makes left/right scrolling synonyms for up/down scrolling for
* scrolling on window decoration
* scrolling on i3bar workspaces

fixes #2677
2017-02-14 22:28:01 +01:00
Ingo Bürk
7732971ad8 Introduce named aliases for mouse buttons.
This increases readability and allows us to cover up the fact that
XCB doesn't define constants for left/right scrolling.
2017-02-12 20:44:45 +01:00
Ingo Bürk
ad9c879cbd Add troubleshooting for title attributes during layout restoring. (#2679) 2017-02-12 11:24:35 -08:00
Michael Stapelberg
297e6be5bd document our project governance model (#2675) 2017-02-06 10:10:41 -08:00
Stefan Hagen
55692c1667 Explaing the workspace number "1: www" behavior (#2674)
The documentation did not explain how workspace number `"1: www"` is working.
Related to #2663

Rephrase to cover the creation case
2017-02-05 09:57:44 -08:00
Manuel Mendez
492da1c062 docs: focus_follow_mouse only happens at window border crossings (#2669)
see #2666
2017-02-05 01:07:21 -08:00
Johannes Lange
98f202dd1b restart bar status command on config reload (#2668)
Closes #2651
2017-02-05 01:04:35 -08:00
mihaicmn
fa488d721d migrate i3-config-wizard to draw_util (#2654) 2017-01-24 23:18:13 -08:00
Tobias Hänel
348d0d4622 Added missing cases for workspace event (#2656)
The possible values "rename", "reload" and "restored" of the property
'change' from the workspace event were missing. Because no events of
those types contain an old workspace, this was trivial.
2017-01-24 08:40:32 -08:00
Tony Crisci
a55733f719 Testcases: Check for required binaries (#2655)
Fail fast in case test binaries are not built and provide instructions
on how to build them.
2017-01-22 23:40:08 -08:00
Tony Crisci
04dcf42397 Add the ipc shutdown event (#2652)
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes #2318
2017-01-22 14:08:32 -08:00
mihaicmn
564945bc14 migrate placeholder windows to draw_util (#2646) 2017-01-21 07:53:09 -08:00
mihaicmn
c78afab5f8 migrate i3-input to draw_util (#2645) 2017-01-21 07:30:31 -08:00
mihaicmn
8edb4a1f0c migrate i3-nagbar to draw_util (#2644) 2017-01-21 07:25:21 -08:00
fred777
f356439a8d Update userguide (#2647)
key identifier Esc is invalid, use Escape instead
2017-01-21 04:21:32 -08:00
Ingo Bürk
367811be2d Ensure that marks and the title are displayed even if the window title is empty. (#2639)
Previously rendering marks and the title were skipped if the title is empty. With marks
this is obviously wrong, with the title it is also wrong because title_format might be
set.
2017-01-16 14:00:01 -08:00
Ingo Bürk
7f84f49846 Don't exit() on redefined binding mode. (#2638)
Doing a hard exit() is a rather harsh action for something i3 can handle
perfectly fine and is only meant to be a check to make debugging easier
for users in certain situations.
2017-01-13 10:01:36 -08:00
Ingo Bürk
d58dbc3a77 Only react on the last Expose event in a series of events. (#2636)
Thanks to @psychon for pointing this out during the review of PR #2624.
This commit extends this change to all other occurences of Expose events
within i3.
2017-01-13 09:34:58 -08:00
Ingo Bürk
f80cbf7872 Fix blinking test. (#2637)
Thanks to @sandsmark for figuring this out.
2017-01-13 09:34:28 -08:00
Ingo Bürk
e0582aa5eb Remove unused function arguments. (#2635)
The connection is no longer necessary since the non-cairo paths have
been removed.
2017-01-13 09:34:09 -08:00
Ingo Bürk
33d6a4e829 Validate that a binding mode is not defined more than once. (#2633)
While defining the same mode usually wouldn't hurt and, in fact, the old behavior
allows to split the definition of a binding mode into several blocks, this
can lead to user errors where they accidentally define a mode twice and don't understand
why the mode behaves a certain way (this has been observed in real life :-)).

There's no good usecase for splitting a single binding mode into multiple blocks, thus
the new behavior is better.

fixes #2615
2017-01-13 09:33:29 -08:00
Ingo Bürk
14eea7fce5 Added support for _NET_MOVERESIZE_WINDOW. (#2634)
fixes #2603
2017-01-13 09:30:50 -08:00
Ingo Bürk
f7a0453543 Free trayclient when removing it. (#2632)
fixes #2619
2017-01-13 09:28:29 -08:00
Michael Stapelberg
4137849ea2 Merge pull request #2624 from Airblader/bug-2422
Rewrite the signal handler dialogs.
2017-01-11 11:47:18 -08:00
Michael Stapelberg
36b506878e Merge pull request #2629 from nmschulte/next
fix conditional in configure script
2017-01-11 11:47:08 -08:00
Nathan Schulte
0a6e2865e0 fix conditional in configure script 2017-01-10 20:48:59 -06:00
Ingo Bürk
abf8300792 Rewrite the signal handler dialogs.
This commit is a rewrite of the popup dialogs used when i3 crashes. We now
use our draw_util suite and both properly react to EXPOSE events and clean
up the windows when the handler exits.

As a side-effect, this fixes #2422
2017-01-10 20:13:25 +01:00
Michael Stapelberg
d4066a6c60 Merge pull request #2628 from nmschulte/fix_build_outside_repo
Fix build outside repo
2017-01-10 09:34:19 +01:00
Jens-Wolfhard Schicke-Uffmann
584263b1b3 Report error during error log creation (#2625) 2017-01-10 09:29:06 +01:00
Johannes Lange
6da187b27f linking vim_like_marks from show_marks documentation (first occurrence (#2626)
of marks in userguide)
2017-01-10 09:22:22 +01:00
Nathan Schulte
934b23fa52 fix auto exclude in-work-tree build dirs
updates: -- configure: add build directory to gitignore #2543 -- https://github.com/i3/i3/pull/2543
2017-01-09 19:42:52 -06:00
Nathan Schulte
9cb5df42d2 properly detect version when building out of tree 2017-01-09 18:47:16 -06:00
Michael Stapelberg
46fcb1188f .github/CONTRIBUTING.md: explain that compositors are unsupported (#2621) 2017-01-03 09:38:45 +01:00
Ingo Bürk
25d27c5b2e Free allocated X resource value. (#2620)
This fixes a little memory leak.
2017-01-02 15:56:28 +01:00
Jakub Wilk
8d739b7fe1 Fix name of mcedit (#2524)
It's "mcedit", not "mc-edit".
2016-12-09 08:37:49 +01:00
cresh
fbf58a67bb Some systems need to link to libiconv explicitly, thus add a check for it. (#2586) 2016-12-02 19:06:39 +01:00
Ingo Bürk
6b9b12c303 Do not set input focus in i3-input. (#2598)
This commit removes all traces of setting and reverting the input focus
in i3-input. We don't need to do this because grabbing the keyboard is
sufficient to have the attention we need.

Changing the input focus and reverting it can cause situations where i3
executes the IPC command before processing the FocusIn events. This leads
to i3's input focus change to be rejected due to the timing, leading to
an inconsistent focus state.

fixes #2597
2016-12-02 19:05:43 +01:00
Zbyněk Moravec
05a2270eb7 Fix read of uninitialized memory (#2596)
Previous code was reading whole array, it was slower and it
read uninitialized memory
2016-12-02 18:53:59 +01:00
Johannes Lange
d7dcef61d7 move syntax clarification: (#2591)
both x and y position need to be specified
2016-11-30 08:19:36 +01:00
Ingo Bürk
a301396997 Respect minimum size hints for floating windows. (#2508)
This commit introduces proper support for the minimum size on floating
windows by ensuring that it is respected during mapping, later changes as
well as resizes.

Furthermore, this commit fixes minor issues with how the hints are handled
during calculations.

fixes #2436
2016-11-28 22:09:39 +01:00
mihaicmn
f25c3d5e77 Use the DPI setting within the i3-config-wizard and i3-nagbar (#2585) 2016-11-28 22:07:45 +01:00
Michael Stapelberg
633a9f7b14 Implement RandR 1.5 support (#2580)
This comes with the intentionally undocumented --disable-randr15 command
line flag and disable-randr15 configuration directive. We will add
documentation before the release if and only if it turns out that users
actually need to use this flag in their setups. Ideally, nobody would
need to use the flag and everything would just keep working, but it’s
better to be safe than sorry.

fixes #1799
2016-11-28 18:20:46 +01:00
Ingo Bürk
f2ffd8d864 Added instructions to update Github milestones after release. (#2561) 2016-11-21 12:41:43 -08:00
Michael Stapelberg
0dd9d2202f release.sh: update for v4.13 release (#2582) 2016-11-21 03:16:06 -08:00
Michael Stapelberg
fd3403d96e remove debug.h from Makefile.am (#2581) 2016-11-21 03:02:43 -08:00
Michael Stapelberg
2f9bb7dd5a Fix memory leak: free marks when destroying containers (#2578) 2016-11-21 02:41:15 -08:00
Michael Stapelberg
90d68d7ea0 Remove some now-unused functions from xcb.[ch] (#2574)
xcb_draw_line is unused since commit
d7f9700ba4

xcb_draw_rect is unused since commit
a79d33fc7f

xcb_raise_window is unused since commit
7208d01048

xcb_warp_pointer is unused since commit
755c618cd4
2016-11-21 00:37:17 -08:00
Michael Stapelberg
70e7f0e39a Remove unused src/debug.c (#2575) 2016-11-21 00:37:10 -08:00
Michael Stapelberg
3e7a07e48d tests: add inject_randr15 (#2573)
This tool is similar to xtrace in usage in that it intercepts traffic to
the X server. The motivating feature for writing the tool is its ability
to inject prepared reply messages instead of the server’s reply. In
this particular case, we’ll inject a RRGetMonitors reply to test i3’s
RandR 1.5 code paths.

The added testcase is a noop for now, but with the code that’s lingering
in the randr15 branch, i3 does actually detect monitors as per the
injected reply:

    2016-11-20 21:10:05 - randr.c:__randr_query_outputs:618 -
      RandR 1.5 available, querying monitors
    2016-11-20 21:10:05 - randr.c:__randr_query_outputs:628 -
      1 RandR monitors found (timestamp 0)
    2016-11-20 21:10:05 - randr.c:__randr_query_outputs:646 -
      name DP3, x 0, y 0, width 3840 px, height 2160 px, width 520 mm,
      height 290 mm, primary 1, automatic 1

This is preparation work for issue #1799
2016-11-20 23:20:14 -08:00
Michael Stapelberg
aa20c416c3 configure.ac: verify macros in m4/ are being replaced (Thanks sur5r) (#2571)
See the comment for more details, and see the motivating blog post:
https://blogs.noname-ev.de/sur5r/index.php?/archives/7-Another-instance-of-AC_DEFINE-being-undefined.html
2016-11-19 14:45:22 -08:00
Michael Stapelberg
2ff3d9d651 Merge pull request #2551 from bapt/freebsd_fixes
Freebsd fixes
2016-11-16 13:48:05 -08:00
mihaicmn
da5fe3b934 fix incorrect reply to ipc command (#2567) 2016-11-15 09:26:53 -08:00
Chih-Chyuan Hwang
9108f3214c Fix memory leaks (#2560)
Fix memory leaks when executing 'i3 --moreversion'.

=================================================================
==14852==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 159 byte(s) in 1 object(s) allocated from:
    #0 0x7fea40855602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x4c4c4a in smalloc ../../i3/libi3/safewrappers.c:24
    #2 0x4c3aee in ipc_recv_message ../../i3/libi3/ipc_recv_message.c:61
    #3 0x44dc2e in display_running_version ../../i3/src/display_version.c:94
    #4 0x472947 in main ../../i3/src/main.c:269
    #5 0x7fea3d0c982f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 39 byte(s) in 2 object(s) allocated from:
    #0 0x7fea40855602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fea3d11f7d7 in vasprintf (/lib/x86_64-linux-gnu/libc.so.6+0x767d7)

SUMMARY: AddressSanitizer: 198 byte(s) leaked in 3 allocation(s).
2016-11-13 10:45:39 -08:00
mihaicmn
ad7dec31d5 Use the DPI setting within the i3bar (#2556) 2016-11-12 06:34:54 -08:00
Michael Stapelberg
6e519e18e1 release.sh: add reminder to announce on reddit (#2553) 2016-11-10 00:25:30 -08:00
Baptiste Daroussin
b494d27848 Accept calling absolute path when building outsource 2016-11-09 22:37:21 +01:00
Baptiste Daroussin
c602ec7cc2 Respect SYSCONFDIR when looking for defaut 'xdg' directory 2016-11-09 22:34:39 +01:00
Michael Stapelberg
86ad867277 travis: switch to container-based trusty (#2550)
fixes #2546
2016-11-08 14:04:46 -08:00
Michael Stapelberg
fff3f79da9 switch to clang-format-3.8 (#2547)
https://llvm.org/bugs/show_bug.cgi?id=30353 was filed for the unintended
line break between in e.g. “TAILQ_ENTRY(foo)\nbar;”.

Until that’s fixed or a workaround is known, we’ll live with line
breaks. To make it a bit easier for readers to see what’s going on, I
added extra line breaks around each such struct member/variable
definition, so that they at least visually are a single unit.

fixes #2174
2016-11-08 13:46:43 -08:00
Michael Stapelberg
4ccac59932 debian: update changelog 2016-11-08 21:31:34 +01:00
Michael Stapelberg
7785e7be7d Update debian/changelog 2016-11-08 19:54:15 +01:00
Michael Stapelberg
462c7b35cf Merge branch 'release-4.13' 2016-11-08 19:54:14 +01:00
Michael Stapelberg
1994eea5da Merge branch 'next' into master 2016-11-08 19:54:14 +01:00
Michael Stapelberg
f3fad84fc2 Set non-git version to 4.13-non-git. 2016-11-08 19:54:14 +01:00
Michael Stapelberg
9c8dc36895 release i3 4.13 2016-11-08 19:54:01 +01:00
Michael Stapelberg
667857f568 debian: prefix paths debian/tmp/ to avoid confusion
Without the prefix, the etc/ directory will be copied from the source
directory, as opposed to the debian/tmp directory into which files were
installed.
2016-11-08 19:53:08 +01:00
Michael Stapelberg
d953066734 debian: update standards-version to 3.9.8 (no changes necessary) 2016-11-08 19:41:37 +01:00
Michael Stapelberg
69ebc0ca1e debian: remove now-unnecessary lintian overrides 2016-11-08 19:41:37 +01:00
Michael Stapelberg
212a408d4b debian: install docs to usr/share/doc/i3-wm 2016-11-08 19:41:35 +01:00
Chih-Chyuan Hwang
faa9915abc Fix an use-after-free bug (#2522)
Fix the issue #2421 (https://github.com/i3/i3/issues/2421).

floating_enable() invokes tree_close_internal() to free con->parent.
After con->parent is freed in tree_close_internal() but before con->parent is reassigned by the caller, con->parent may be dereferenced and causes i3 crash.

The backtrace below is an example.
The already-freed pointer is dereferenced again through the pointer "focused" in x_push_changes().

Reassign con->parent before calling tree_close_internal() to fix this use-after-free bug.

0x0000000000416372 in con_get_workspace (con=0x7ab9c0) at ../i3/src/con.c:375
0x0000000000416103 in con_has_managed_window (con=0x7ab9c0) at ../i3/src/con.c:266
0x000000000042b413 in x_push_changes (con=0x78d190) at ../i3/src/x.c:1132
0x0000000l0004533e8 in tree_render () at ../i3/src/tree.c:504
0x0000000000452b4f in tree_close_internal (con=0x7b67c0, kill_window=DONT_KILL_WINDOW, dont_kill_parent=false, force_set_focus=false)
../i3/src/tree.c:314
0x00000000004196f0 in con_on_remove_child (con=0x7b67c0) at ../i3/src/con.c:1801
0x0000000000452eb7 in tree_close_internal (con=0x783840, kill_window=DONT_KILL_WINDOW, dont_kill_parent=false, force_set_focus=false)
../i3/src/tree.c:364
0x0000000000431516 in floating_enable (con=0x7ab9c0, automatic=false) at ../i3/src/floating.c:183
0x0000000000431eed in toggle_floating_mode (con=0x7ab9c0, automatic=false) at ../i3/src/floating.c:379
0x0000000000420d92 in cmd_floating (current_match=0x679a20 , cmd_output=0x679aa0 , floating_mode=0x7ab8c0 "toggle")
../i3/src/commands.c:1088
0x000000000043e5ae in GENERATED_call (call_identifier=60, result=0x679aa0 ) at include/GENERATED_command_call.h:486
0x000000000043ee19 in next_state (token=0x675d70 ) at ../i3/src/commands_parser.c:187
0x000000000043f2fb in parse_command (input=0x7b4fe0 "floating toggle", gen=0x0) at ../i3/src/commands_parser.c:308
0x00000000004125f8 in run_binding (bind=0x784260, con=0x0) at ../i3/src/bindings.c:792
0x000000000042bace in handle_key_press (event=0x7a01a0) at ../i3/src/key_press.c:33
0x000000000044e6aa in handle_event (type=2, event=0x7a01a0) at ../i3/src/handlers.c:1420
0x0000000000439533 in xcb_check_cb (loop=0x7ffff532f8e0, w=0x68c140, revents=32768) at ../i3/src/main.c:133
0x00007ffff5125d73 in ev_invoke_pending () from /usr/lib/x86_64-linux-gnu/libev.so.4
0x00007ffff51293de in ev_run () from /usr/lib/x86_64-linux-gnu/libev.so.4
0x0000000000439418 in ev_loop (loop=0x7ffff532f8e0, flags=0) at /usr/include/ev.h:835
0x000000000043d51d in main (argc=3, argv=0x7fffffffe0a8) at ../i3/src/main.c:913
2016-11-08 00:56:46 -08:00
Michael Stapelberg
841118e5f8 configure: add build directory to gitignore (#2543) 2016-11-07 11:49:26 -08:00
Ingo Bürk
9c6a21f2d4 Fix memory leak in i3-msg. (#2542)
relates to #2541
2016-11-06 08:14:37 -08:00
Jakub Wilk
e48119adfe Fix typo (#2536) 2016-11-05 03:32:40 -07:00
Josh Rosso
454d0c4f07 Update config.keycodes link to proper location in user guide (#2537)
Links to i3's config.keycodes in the User's guide navigates to a 404.
This commit updates the reference to the `/etc/config.keycodes`
file in GitHub.
2016-11-05 03:32:16 -07:00
Ingo Bürk
fea0bc1a45 Fix memory leaks. (#2530)
fixes #2529
2016-11-03 00:18:18 -07:00
Michael Stapelberg
7ad5736875 travis: use correct path to debian packages (#2521) 2016-10-28 23:41:13 +02:00
Michael Stapelberg
664d11c77c Merge pull request #2518 from stapelberg/travis
More travis fixes
2016-10-26 19:48:56 +02:00
Michael Stapelberg
b10eb0c3e6 travis/docs.sh: call asciidoc directly
…instead of the no longer existing docs-clean and docs targets.
2016-10-26 08:46:39 +02:00
Michael Stapelberg
758fc7d331 travis/clang-analyze: look for dist tarball in build/ 2016-10-26 08:46:26 +02:00
Michael Stapelberg
c3b5bb929e Bugfix: escape I3_VERSION when read from file (#2517)
I3_VERSION is used as string literal in config.h, i.e.:

    #define I3_VERSION …

Where “…” is replaced with the contents of I3_VERSION.

For our travis builds, we persist the version number to I3_VERSION,
i.e.:

    $ cat I3_VERSION
    4.12-150-g8ddc187 (2016-10-25, branch "next")

Previously, config.h would end up with:

    #define I3_VERSION "4.12-150-g8ddc187 (2016-10-25, branch "next")"

Note the unquoted double quotes around “next”, which are invalid in
C string literals.

Hence, this commit uses sed to escape double quotes, question marks and
backslashes (see also http://stackoverflow.com/a/12208808/712014).

The @<:@ and @:>@ quadrigraphs that m4 expands to [ and ], respectively,
see also http://stackoverflow.com/a/2309394/712014
2016-10-25 22:35:30 +02:00
Michael Stapelberg
8ddc18756c debian: add missing dh-autoreconf to Build-Depends (#2516) 2016-10-25 20:54:41 +02:00
Michael Stapelberg
f58dde2850 Merge pull request #2507 from stapelberg/autotools
Switch to autotools (GNU build system)
2016-10-25 08:56:12 +02:00
Michael Stapelberg
ca98c7e614 Update travis for autotools 2016-10-23 21:09:24 +02:00
Michael Stapelberg
05e5901bca generate asciidoc.conf via autoconf
…instead of updating it in release.sh.
2016-10-23 21:09:24 +02:00
Michael Stapelberg
cfe9824c1d Update PACKAGE-MAINTAINER’s compilation instructions 2016-10-23 21:09:24 +02:00
Michael Stapelberg
7b2d734463 Update release.sh for autotools 2016-10-23 21:09:24 +02:00
Michael Stapelberg
8ab1bf6063 Update debian/ for autotools 2016-10-23 21:09:24 +02:00
Michael Stapelberg
ca83fd566d pull autotools.gitignore into .gitignore 2016-10-23 21:09:24 +02:00
Michael Stapelberg
f354f53435 Ensure all *.[ch] files include config.h
Including config.h is necessary to get e.g. the _GNU_SOURCE define and
any other definitions that autoconf declares. Hence, config.h needs to
be included as the first header in each file.

This is done either via:
1. Including "common.h" (i3bar)
2. Including "libi3.h"
3. Including "all.h" (i3)
4. Including <config.h> directly

Also remove now-unused I3__FILE__, add copyright/license statement
where missing and switch include/all.h to #pragma once.
2016-10-23 21:09:24 +02:00
Michael Stapelberg
c2bd10c482 Move/rename config files/.desktop files into subdirs
This makes it easier to install them with the correct name when using
autotools.
2016-10-23 21:09:24 +02:00
Michael Stapelberg
567897bec6 Switch from I3__FILE__ to STRIPPED__FILE__
…as we now use the m4/ax_extend_srcdir.m4 macro, which defines
STRIPPED__FILE__ (the macro is not i3-specific).
2016-10-23 21:09:24 +02:00
Michael Stapelberg
84e70a19a8 testsuite: use relative paths, set PATH to absolute path
This approach works better with autotools, which supports the build
directory being complete outside the source tree.
2016-10-23 21:09:24 +02:00
Michael Stapelberg
4a52a7e9fb Switch to autotools (GNU build system)
This commit probably comes as a surprise to some, given that one of i3’s
explicitly stated goals used to be “Do not use programs such as
autoconf/automake for configuration and creating unreadable/broken makefiles”.

I phrased this goal over 7 years ago, based largely on a grudge that I
inherited, which — as I’ve realized in the meantime — was largely held against
FOSS in general, and not actually nuanced criticism of autotools.

In the meantime, I have come to realize that the knee-jerk reaction of “I could
do this better!” (i.e. writing our own build system in this particular case) is
usually misguided, and nowadays I strongly suggest trying hard to fix the
existing system for the benefit of all existing and future users.

Further, I recently got to experience the other side of the coin, as I packaged
a new version of FreeRADIUS for Debian, which at the time of writing used
autoconf in combination with boilermake, a custom make-based build system that
only FreeRADIUS uses. Understanding the build system enough to fix issues and
enable parallel compilation took me an entire day. That time is time which
potentially every downstream maintainer needs to invest, and the resulting
knowledge cannot be applied to any other project.

Hence, I believe it’s a good idea switch i3 to autotools. Yes, it might be that
particular features were easier to implement/understand in our custom
Makefiles, and there might be individuals who have an easier time reading
through our custom Makefiles than learning autotools. All of these
considerations are outweighed by the benefits we get from using the same build
system as literally thousands of other FOSS software packages.

Aside from these somewhat philosophical considerations, there’s also practical
improvements which this change brings us. See the “changes” section below.

┌──────────────────────────────────────────────────────────────────────────────┐
│ new workflow                                                                 │
└──────────────────────────────────────────────────────────────────────────────┘

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

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

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

┌──────────────────────────────────────────────────────────────────────────────┐
│ recommended reading                                                          │
└──────────────────────────────────────────────────────────────────────────────┘

I very much recommend reading “A Practitioner's Guide to GNU Autoconf,
Automake, and Libtool” by John Calcote (https://www.nostarch.com/autotools.htm).
That book is from 2010 and, AFAICT, is the most up to date comprehensive
description of autotools. Do not read older documentation. In particular, if a
document you’re reading mentions configure.in (deprecated filename) or
recursive make (now considered harmful), it’s likely outdated.

┌──────────────────────────────────────────────────────────────────────────────┐
│ changes                                                                      │
└──────────────────────────────────────────────────────────────────────────────┘

This commit implements the following new functionality/changes in behavior:

• 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 let me know.

• “make check” runs the i3 testsuite.
  You can still use ./testcases/complete-run.pl to get the interactive progress
  output.

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

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

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

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

• Support for pre-compiled headers (PCH) has been dropped for now in the
  interest of simplicitly. Maybe we can re-add it later.

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

┌──────────────────────────────────────────────────────────────────────────────┐
│ build system feature parity/testing                                          │
└──────────────────────────────────────────────────────────────────────────────┘

In addition to what’s described above, I tested the following features:

• “make install” installs the same files (plus documentation and manpages)
  cd i3-old && make install PREFIX=/tmp/inst/old
  cd i3-new && ./configure --prefix=/tmp/inst/new
  cd /tmp/inst
  (cd old && for f in $(find); do [ -e "../new/$f" ] || echo "$f missing"; done)

• make dist generates a tarball which includes the same files
  cd i3-old && make dist
  cd i3-new/x86_64-pc-linux-gnu && make dist
  colordiff -u <(tar tf i3-old/i3-4.12.tar.bz2 | sort) \
               <(tar tf i3-new/x86_64-pc-linux-gnu/i3-4.12.tar.gz | sort)
  There are some expected differences:
  • Some files have been renamed (e.g. the new etc/ and share/ subdirectories)
  • Some files will now be generated at build-time, so only their corresponding
    .in file is shipped (e.g. testcases/complete-run.pl)
  • The generated parser files are shipped in the dist tarball (they only
    depend on the parser-specs/* files, not on the target system)
  • autotools infrastructure is shipped (e.g. “configure”, “missing”, etc.)

• DLOG and ELOG statements still produce the same file name in logfiles

• Listing source code in gdb still works.

• gdb backtraces contain the i3-<version> path component

• release.sh still works

• version embedding
  1. git checkout shows “4.12-136-gf720023 (2016-10-10, branch "autotools")”
  2. tarball of a git version shows “4.12-non-git”
  3. release tarball shows 4.13

• debug mode is enabled by default for non-release builds

• enabling verbose builds via V=1

┌──────────────────────────────────────────────────────────────────────────────┐
│ speed                                                                        │
└──────────────────────────────────────────────────────────────────────────────┘

There is no noticeable difference in compilation speed itself (of binaries,
documentation and manpages):

i3-old $ time make all docs mans -j8
make all docs mans -j8  28.92s user 2.15s system 640% cpu 4.852 total

i3-new $ time make -j8
make -j8  27.08s user 1.92s system 620% cpu 4.669 total

In terms of one-time costs:
configuring the build system (../configure) takes about 2.7s on my machine,
generating the build system (autoreconf -fi) takes about 3.1s on my machine.

┌──────────────────────────────────────────────────────────────────────────────┐
│ m4 macros                                                                    │
└──────────────────────────────────────────────────────────────────────────────┘

All files in m4/ have been copied from the autoconf-archive package in version
b6aeb1988f4b6c78bf39d97b6c4f6e1d594d59b9 and should be updated whenever they
change.

This commit has been tested with autoconf 2.69 and automake 1.15.
2016-10-23 21:09:21 +02:00
Michael Stapelberg
4e9925de73 rename config.h to configuration.h
This is a preparation step for the next commit.
2016-10-23 17:41:46 +02:00
Michael Stapelberg
ea0b5dd335 Ensure error message is included when bailing out 2016-10-23 17:41:46 +02:00
Michael Stapelberg
4d66841811 check vasprintf return code 2016-10-23 17:41:42 +02:00
Peder Stray
6b89690a3f Add "output" to IPC events referencing a container (#2489)
Add the property "output" to all IPC events that has an output container
as a parent, making it easier to keep track of such things.

fixes #2478
2016-10-19 08:41:10 +02:00
Ingo Bürk
e51a89e842 Implement new window::mark IPC event. (#2503)
This introduces a new type of 'window' event sent wit change:mark whenever
a mark on a window changes.

fixes #2501
2016-10-18 07:32:41 +01:00
Ingo Bürk
83452a3472 Disable pango markup for plain-text input in i3bar. (#2505)
fixes #2498
2016-10-18 07:29:31 +01:00
Ingo Bürk
e82e26a24d Handle ResizeRequests for tray clients. (#2495)
Some tray clients such as VLC use override_redirect on their tray window. As per
specification this means i3bar won't receive a ConfigureRequest, but instead a
ResizeRequest will be triggered. If not selected, the X server will simply confirm
the request which leads to a broken tray window size.

This commit selects and handles the event just like a configure request is handled.

fixes #2494
2016-10-11 11:46:25 -07:00
Michael Stapelberg
3cba06f7b9 Fix _i3_version debugging symbol (#2492)
The idea was to ensure the symbol would always be present. For that, we need
__attribute__((used)), not __attribute__((unused)). Further, ensure the
variable has static storage, as the used attribute only applies to variables
with static storage. See also http://stackoverflow.com/a/29545417/712014
2016-10-05 09:46:33 -07:00
Michael Stapelberg
3a359a0243 Remove extraneous newline when printing core_pattern (#2490)
This was accidentally changed in commit 94a09b3cac
2016-10-03 23:53:49 -07:00
Ferdinand Bachmann
6b3d8b9e8b Bugfix: NULL dereference when stickying _NET_WM_DESKTOP_ALL windows (#2488)
In some cases, ws will be NULL here.

Originally tested with "lemonbar"
2016-10-03 05:53:56 -07:00
Ingo Bürk
c71f6f8f7c Implement special value 'current' for output. (#2483)
This commit introduces the special 'current' value for outputs in both of

* move con to output current
* move workspace to output current

fixes #2357
2016-09-30 08:28:02 -07:00
Ingo Bürk
6a8fb69eff Added new criteria 'tiling' / 'floating'. (#2481)
These criteria allow selecting only windows in a specific mode, i.e.,
tiling and floating, respectively.

fixes #2406
2016-09-27 19:04:00 -07:00
Michael Stapelberg
0e73a6e9e7 Remove conditional compilation for cairo/pangocairo (#2480)
We strive to avoid conditional compilation in i3 as much as possible.
cairo and pangocairo have been around long enough in the versions that
we need that it’s time to unconditionally depend on them.

Also update DEPENDS with the last-known-good-versions while at it.
2016-09-27 12:57:00 -07:00
Ingo Bürk
a15ce8cb8d Assign the sticky value for _NET_WM_DESKTOP on scratchpad windows. (#2457)
fixes #2456
2016-09-26 22:39:17 -07:00
Michael Stapelberg
c93056b2d8 Unconditionally depend on libpcre >= 8.10 (#2472)
Even Debian oldstable has 8.30, so let’s get rid of conditional
compilation where we don’t actually need it.
2016-09-26 19:04:13 -07:00
Ingo Bürk
f4f9b7102d Handle _NET_ACTIVE_WINDOW for scratchpad windows. (#2458)
We call scratchpad_show() on _NET_ACTIVE_WINDOW requests if the request
came from a pager. This is consistent with the i3 »focus« command because
we assume the user requested to see the window, so we do the only
sensible thing.

fixes #2455
2016-09-26 18:32:05 -07:00
Ingo Bürk
b638ce2e4c Check output crossing on ENTER_NOTIFY to dockarea. (#2477)
When receiving an ENTER_NOTIFY event on a dock client we returned as to not
focus the dock client (cf. #321 and #323). However, we still need to check
for crossing output boundaries and if that happened focus the new output.

Otherwise it can happen that the cursor is on a different output than the
focused output. When opening a window, this would open it on the old output
and then warp the mouse there. This effect will be even worse if the window
is immediately moved with 'move position mouse' as the window will end up
in its correct position on the new output and the cursor warped to the old
output.

relates to #2081
2016-09-26 18:31:16 -07:00
Michael Stapelberg
f0cea63fd5 Merge pull request #2469 from Airblader/feature-2465
Use Xft.dpi for DPI if available.
2016-09-26 18:30:18 -07:00
Michael Stapelberg
121528935e Merge pull request #2479 from stapelberg/fix-perl
Make tests work with Perl ≥ 5.24 (now in Debian sid)
2016-09-26 16:12:13 -07:00
Michael Stapelberg
8f9138fbad t/158-wm_take_focus.t: avoid shift on scalars
This feature is forbidden in Perl ≥ 5.24:

  Experimental shift on scalar is now forbidden at
  ./t/158-wm_take_focus.t line 94, near ");"
2016-09-26 20:42:51 +02:00
Michael Stapelberg
47b84ca5ed travis-base.Dockerfile: depend on perl, not perl-modules
As per the package description, perl-modules is an implementation detail
and packages should depend on perl instead.
2016-09-26 20:42:51 +02:00
Ingo Bürk
889d0abe8f Set $HOME for tests.
We add $HOME to the environment variables we define for a test case
in order to redirect it from the user's actual home directory. This
is necessary because xcb-util-xrm will fall back to $HOME/.Xresources
when determining the DPI. If a user has this set to, e.g., 192 on their
machine, this would break tests.

Since tests shouldn't rely on the system they run in, we redirect the
home directory altogether to simulate a clean slate.

relates to #2465
2016-09-26 20:29:53 +02:00
Ingo Bürk
cb1fcfed6a Use Xft.dpi for DPI if available.
fixes #2465
2016-09-26 20:29:53 +02:00
johannes karoff
1437271e65 do not match docks in config and command criteria (#2340) 2016-09-26 09:45:58 -07:00
koebi
655ed0ba27 fix i3bar crashing when I3SOCK present (#2471)
When I3SOCK is present, socket_path might be a pointer to an
environment variable, which cannot be free'd in line 157. This
commit duplicates the string if I3SOCK is present, thus making
socket_path a free-able pointer again.
2016-09-26 08:01:30 -07:00
Michael Stapelberg
23ee16077a travis: build ubuntu packages for xenial, not wily (#2474)
The extra rm command when configuring the repository is necessary
because of https://bugs.debian.org/838779.
2016-09-24 12:24:47 -07:00
Ingo Bürk
d4bf7b94d4 Fix link in the documentation. (#2462)
This replaces the dead pull request #2242. Thanks to @pniederlag for noticing the
issue and providing the original PR.
2016-09-24 10:53:02 -07:00
Michael Stapelberg
9bf346c7a0 Remove compatibility definitions for xcb-util < 0.3.8 (#2473)
Even Debian oldstable has xcb-util 0.3.8.
2016-09-24 09:48:32 -07:00
Michael Stapelberg
14f49aa6d3 travis/cleanup-bintray: use dpkg --compare-versions (#2453)
…instead of lexicographically sorting strings, which fails for the
following situation:

    4.12-96-g086276b
    4.12-97-g59c070b
    4.12-108-gb850cfb

This bug resulted in new packages being built and uploaded, then
immediately deleted.

Thanks to eeemsi for reporting the issue.
2016-09-24 08:16:02 -07:00
Michael Stapelberg
b850cfba4d Fix memleaks by avoiding _checked variants when discarding the result
Thanks psychon for pointing this out in
https://github.com/i3/i3/pull/2450#discussion_r78560433!
2016-09-14 09:22:45 +02:00
Michael Stapelberg
5594139676 Eliminate once-used check_error utility function 2016-09-14 09:19:25 +02:00
Ingo Bürk
d48c9b1e33 Fix colormap handling for containers. (#2450)
This commit correctly handles colormaps by

* Using the static default colormap we determine on startup if the
  con has the corresponding depth. This avoids creating pointless
  colormaps.
* Not freeing the default colormap to not have stray colormaps on
  containers. This fixes an issue with certain programs such as xwd.
* Creating a custom colormap when necessary and freeing it when the
  container is killed.

fixes #2435
2016-09-14 09:13:17 +02:00
Michael Stapelberg
555f458d7a Bugfix: don’t apply shift+numlock fallback for keypad keys
fixes #2418
2016-09-12 22:24:23 +02:00
Michael Stapelberg
4765a8fb84 Merge branch 'nmschulte-fix_numlock_shift' into next 2016-09-12 22:23:10 +02:00
Nathan Schulte
41ce596a94 fix bindsyms with Shift, given NumLock tweaks 2016-09-12 22:22:59 +02:00
Nathan Schulte
02f206d816 fix typo in logging message 2016-09-12 22:22:59 +02:00
Michael Stapelberg
2244c843a8 Bugfix: don’t trigger unrelated key bindings for --release bindings
fixes #2442
2016-09-12 12:57:13 +02:00
Michael Stapelberg
b00d36fca5 t/264-keypress-numlock: add a test covering shift
related to #2418
2016-09-12 12:10:59 +02:00
Michael Stapelberg
0469716fd6 Bugfix: compare all resolved modifier masks
Before this commit, i3 only compared the user-specified modifiers and
incorrectly ignored the resolved modifiers (such as the numlock
fallback).

While at it, also fix the testcase which treated numlock as a momentary
modifier, whereas it really is a latched modifier.

fixes #2418
2016-09-12 12:05:38 +02:00
Michael Stapelberg
5ca7d4b222 expose binding pointer in debug messages
This makes it a bit easier to match up the different messages to the
configured binding.
2016-09-12 12:03:30 +02:00
Michael Stapelberg
59c070bffc travis: pass through CC to run-tests
fixes #2437
2016-09-05 09:01:41 +02:00
Michael Stapelberg
086276b329 travis: only enable asan workaround for clang (breaks gcc)
fixes #2437
2016-09-05 08:55:40 +02:00
Michael Stapelberg
6584f70d28 travis: work around asan broken-ness with libc ≥ 2.24
fixes #2437
2016-09-05 08:42:34 +02:00
Michael Stapelberg
f62eb9f533 Bugfix: re-add single quotes around I3_VERSION
Without single quotes, the version is not passed correctly to the
compiler, and building Debian packages fails.

related to #2437
2016-09-05 08:19:02 +02:00
Michael Stapelberg
fac57699b4 Bugfix: avoid setting urgency hint on content container and above
fixes #2098 (I _think_)
2016-09-04 21:08:21 +02:00
Michael Stapelberg
18183b8407 Merge pull request #2393 from bebehei/fix-workspace-next_prev
fix #2383 for numbered workspaces
2016-08-28 18:28:25 +02:00
Benedikt Heine
7a94dfd11d add additional reversed testcase 2016-08-24 11:11:50 +02:00
Benedikt Heine
e35aff5cb9 fix transition from named to numbered workspace 2016-08-24 11:11:50 +02:00
Benedikt Heine
930733f352 enhance test 528
Enhancing test 528 to test workspace_next and workspace_prev
- Adding tests for worksace_prev
- Mixing workspace distribution over outputs
2016-08-24 11:11:50 +02:00
Benedikt Heine
5d6d974c66 remove goto statement
remove goto statement to similarize workspace_next and workspace_prev
2016-08-24 11:11:50 +02:00
Benedikt Heine
d979748853 traverse numbered workspaces in correct order 2016-08-24 11:11:50 +02:00
eplanet
b668d62cfc Deleting VERSION and extracting it from I3_VERSION instead (#2419) 2016-08-13 13:46:27 -07:00
Michael Stapelberg
012de8cd6f Merge pull request #2301 from EvilPudding/next
Minor optimization
2016-08-03 18:43:35 +02:00
EvilPudding
96704b2fc0 Leaving the last byte in Colorpixel.hex NULL
Added explicit assignment of last byte to the null character, for
appearence's sake.
2016-08-03 13:09:58 +00:00
EvilPudding
08c2380545 Hex in struct Colorpixel.hex to contiguous memory
No reason for hex not to be of a constant size, and
no reason to introduce a cache miss by allocating it
separated from the rest of the structure.
2016-08-03 13:09:58 +00:00
Michael Stapelberg
d77d40173a Only add NumLock fallback where necessary.
Previously, we always discarded the NumLock bit when looking up key
bindings for key press events, and we always grabbed every keycode with
and without the NumLock modifier.

With this commit, the NumLock bit is no longer discarded: since the
previous commit 3bd5e6e5c8 we can
correctly look up key bindings with/without the NumLock bit, as both
variants are stored in |keycodes_head|.

Further, before adding the NumLock fallback (resulting in grabbing the
keycode with the NumLock modifier), we now check whether the key has the
same meaning when NumLock is enabled. This correctly distinguishes the
KP_End vs. KP_1 case, i.e. one can now use the following key bindings:

    # No longer accidentally triggered when pressing KP_1.
    bindsym KP_End nop KP_End

    # Properly distinguished now:
    bindsym KP_End nop KP_End
    bindsym Mod2+KP_1 nop KP_1

fixes #2346
2016-08-02 20:34:20 +02:00
Michael Stapelberg
3bd5e6e5c8 refactoring: store modifiers alongside translated keycodes
This is a no-op refactoring in terms of functionality.

related to #2346
2016-08-02 20:10:49 +02:00
Michael Stapelberg
0239c4b6da move xkb_current_group check into own function
This is a no-op refactoring.
2016-08-02 19:33:26 +02:00
Michael Stapelberg
afb90a0f97 remove superfluous check for input_type
This condition is already enforced in grab_all_keys().
2016-08-02 19:31:23 +02:00
Denton Liu
85bb32409f Update manpages (#2404) 2016-07-30 19:30:25 +02:00
Denton Liu
bccd702e85 Add uxterm to terminal list (#2397) 2016-07-19 19:28:42 +01:00
yshui
3ffa88e54a Don't change border style if BS_NORMAL is requested in motif hints (#2386)
Fixes #2385
2016-06-25 21:35:36 +02:00
yshui
45012189bc Handle _MOTIF_WM_HINTS changes (#2384) 2016-06-22 08:39:25 +02:00
Ingo Bürk
b1d70f25b3 Introduced a new GET_BINDING_MODES message type and reply. (#2376)
This type dumps all currently configured binding modes.

fixes #2375
2016-06-15 22:25:22 +02:00
Michael Stapelberg
63d0823016 Merge pull request #2350 from madroach/OpenBSD
Fix building and testing on OpenBSD
2016-06-15 20:19:16 +02:00
Christopher Zimmermann
1322af1e4f Don't use pthread on OpenBSD
since OpenBSD pthread does not support pthread_condattr_setpshared().
This patch could also stay in the OpenBSD ports tree or depend on a
configure test macro rather than defined __OpenBSD__.
2016-06-11 14:47:26 +02:00
Christopher Zimmermann
87e90229bc Always use socket activation
it neither depends on systemd nor on any linuxism.
2016-06-11 14:47:23 +02:00
Christopher Zimmermann
fa12f67870 Fix testsuite on OpenBSD
OpenBSD perl forks for glob().
Therefore attach SIGCHLD handler as late as possible.
2016-06-11 14:47:17 +02:00
Christopher Zimmermann
7e2483edf7 Use 64 bit time_t 2016-06-11 12:58:16 +02:00
Ingo Bürk
18d6a1bc76 Explicitly terminate fallback in set_from_resource. (#2366) 2016-05-31 22:58:23 +02:00
Zamarin Arthur
82dd59cb31 Added qterminal to i3-sensible-terminal (#2367) 2016-05-31 22:57:58 +02:00
Trevor Merrifield
54cacd58ff Fix outdated documentation (#2362) 2016-05-28 16:44:20 +02:00
Michael Stapelberg
460e33a847 travis: ubuntu: install libxcb-xrm from our repository
see #2363
2016-05-26 14:53:30 +02:00
Michael Stapelberg
ef0a5b0534 travis: remove libxcb-xrm-dev from build-deps before dpkg-buildpackage 2016-05-25 08:23:45 +02:00
Michael Stapelberg
8e125e9845 travis: ubuntu: install libtool 2016-05-25 07:49:14 +02:00
Michael Stapelberg
57dc46b4ec travis: ubuntu: also install autotools-dev and automake 2016-05-24 22:39:18 +02:00
Michael Stapelberg
d08b0c428b travis: ubuntu: install autoconf (for autoreconf) 2016-05-24 22:04:26 +02:00
Michael Stapelberg
a24a048cc9 travis: ubuntu: install ca-certificates to make git clone work 2016-05-24 20:21:08 +02:00
Michael Stapelberg
8dbdcde9a6 travis: ubuntu: remove libxcb-xrm-dev from Build-Deps
It’s installed separately.

This should fix the failing travis build.
2016-05-24 20:07:01 +02:00
Ingo Bürk
9409c2b2e5 Don't trigger binding on window border click unless --border is given. (#2349)
Prior to this commit a binding specifying only --whole-window would
trigger even when clicking on the window border. However, this should
only happen if --border is specified.

fixes #2348
2016-05-11 20:11:35 +02:00
Ingo Bürk
f5945b7c6e Split list of command / config directives in tests. (#2345)
This makes adding new directives less prone to merge conflicts.
2016-05-11 20:11:04 +02:00
Julien Lequertier
4bec3b9d24 Smart option added to hide_edge_borders config param (#2191) (#2191)
Use case:

* When managing multiple terminals in a workspace, the borders makes it easier
to know where the focus is, but when there is only one it's obvious where the
focus is.

* When there's only a web browser for example, the borders are actually counter-
productive since it makes clicking a side scrollbar or a tab a bit harder (if I
smash my cursor to the side or the top of the workspace, I have to move it in
the other direction by just a few pixels to be able to grab it)

Behaviour:

* No borders when there's a single window in a workspace
* Borders when there are multiple windows in a workspace

fixes #2188
2016-05-10 20:27:20 +02:00
Ingo Bürk
47562b4143 Introduce support for specifying variables from X resources. (#2286)
This patch introduces a new 'set_from_resource' config directive which
allows defining a variable by retrieving its value from the X resource
database. This avoids having to configure a color scheme in multiple
files. The directive takes an additional fallback value which is used
in case the resource cannot be found or during config validation where
no X connection is available.

Furthermore, this patch includes the following changes:
- If the same variable is defined twice, we now properly overwrite the
  value of the assignment rather than inserting two variable definitions
  with the same key.
- We now depend on xcb-util-xrm to query the resource.
- Increase the buffer size for variable / resource assignments.

fixes #2130
2016-05-08 12:55:27 +02:00
Ingo Bürk
dbafb3cf23 Properly close disabled outputs restored during a restart. (#2337)
If an output is disabled during a restart, for example because a binding
such as

    bindsym $mod+Shift+r exec "xrandr --auto", restart

is used, it can happen that we first write the layout to disk and only
then receive the RandR change events. This leads to a situation where
the restored tree will contain these outputs, but the restarted i3
process will not receive the RandR events, thus the internal output in i3
is marked disabled.

This patch finds these cases after a restart and force-disables the
affected outputs.

fixes #2326
2016-05-08 12:49:24 +02:00
Johannes Lange
a8757625c3 Do not count '\' in comment as line continuation (#2181)
fixes #2176
2016-05-08 00:20:08 +02:00
Ingo Bürk
6746aa4b5f Use the last known timestamp when calling xcb_set_input_focus(). (#2332)
In most cases this won't make a difference, but consider the following
scenario:

* Some application acquires input focus on its own (which the window manager
  is not involved in, so it will "always" work).
* Before the FocusIn / FocusOut events are processed by i3, the
  workflow to push X changes is run, resulting in xcb_set_input_focus()
  being called.

Using XCB_CURRENT_TIME, this means i3 will "win" and override the focus,
even though it simply wasn't aware (yet) that focus had already been taken
over by someone else. When processing the FocusIn / FocusOut events, i3
assumes that the focus is already set which results in a broken focus
state as i3 assumes some container has the input focus when it doesn't.

With the new behavior, i3's attempt to set the input focus will fail if
the FocusIn / FocusOut events have not yet processed. Once they are processed,
the focus state will be automatically corrected.

fixes #2322
2016-05-05 20:46:33 +02:00
Ingo Bürk
b2397c9f01 Remove redundant depth argument from x_con_init(). (#2323) 2016-05-05 14:18:27 +02:00
Ingo Bürk
152318bccf Remove dead code guarded with "#if 0 … #endif" (#2338)
This code has been neutralized for many years now and served no purpose
other than cluttering up the code. We obviously don't need it and it's
out of date anyway.

If there's ever any reason to restore (parts of) it, we have git for
that. But we don't need to keep commented out code around.
2016-05-05 14:18:04 +02:00
Michael Stapelberg
d242ae1745 travis: snapshot git version before creating dist tarball
fixes #2334
2016-05-02 08:49:16 +02:00
Ingo Bürk
3b089d0771 Remove title indentation in nested containers. (#2330)
This commit removes the title indentation in certain nested container
situations. The behavior was considered broken as it didn't seem to
make sense and it was unclear why this was introduced.

Given that nobody on i3-discuss@ complained about removing this logic
within two weeks, we are now removing it to make the title rendering
code a little less complex.

fixes #2247
2016-05-01 18:59:50 +02:00
Ingo Bürk
4365f46d1b i3-input: Proper position in non-standard cases. (#2313)
This commit fixes two issues:
* We detect the EWMH support window from the root window. If this window
  currently has the input focus, we ignore this. We do this because this
  window is not a window the user is aware of and positioning relative to
  it makes no sense.
* We also detect whether the current input focus is in an i3-frame window.
  This can happen, e.g., when selecting a parent (split) container. Since
  frame windows are direct children of the root window, we must not
  translate its coordinates or we get weird results and i3-input ends up
  off-screen (see #2312). For all other windows, including those without
  any WM_CLASS, we proceed as before.

fixes #2312
2016-04-30 22:04:57 +01:00
Kyle Kneitinger
2123888d4d Ensure config variables match on longest-length (#2306)
fixes #2235
2016-04-26 08:20:42 +01:00
Ingo Bürk
23beac46b7 Focus a newly managed container only if it doesn't use the globally active input model. (#2317)
fixes #1784
2016-04-26 08:09:07 +01:00
Ingo Bürk
42a3371013 Update "mark" to "marks" in i3-save-tree. (#2308)
When allowing multiple marks on a container, we renamed the "mark"
field to "marks". This breaks i3-save-tree which will now filter out
the marks on a window because it doesn't match anymore. This commit
fixes that issue.

Thanks to /u/xenomachina for hinting to this issue.
2016-04-23 12:43:23 +01:00
Ingo Bürk
ba5240d621 Remove skipped tests. (#2305)
We simply remove these tests since they are sufficiently covered
by other testcases.

relates to #2289
2016-04-23 12:36:59 +01:00
Michael Stapelberg
e1b3187f90 Merge pull request #2295 from Airblader/bug-2247-2
Fix rendering of marks (and smaller fixed)
2016-04-16 06:51:44 -07:00
Ingo Bürk
e9798b7e3e Use logical_px() and fix indentation.
relates to #2247
2016-04-15 18:51:20 +02:00
Ingo Bürk
057517b809 Redraw right-hand side border correctly.
Since we don't actually stop drawing a title (or marks) with the
distance of the border width on the right side, but instead with
a hard-coded two pixel distance, we can only redraw that much of
the border without potentiall cutting off text.

relates to #2247
2016-04-15 18:51:20 +02:00
Ingo Bürk
c3db74a1f8 Only redraw right-hand side border if a non-pango font is used.
relates to #2247
2016-04-15 18:51:20 +02:00
Tony Crisci
e690e3d483 Cast con id as uintptr_t (#2298)
Use `uintptr_t` to cast the con id to int instead of `long int`. This
type is guaranteed to hold the pointer as an int regardless of platform.

fixes #2283
2016-04-15 00:27:43 -07:00
Ingo Bürk
80dddd9961 Correctly count the number of windows for no_focus. (#2296)
Previously we counted the number of (direct) children of the workspace to
decide whether no_focus should be applied or not. However, this doesn't
work correctly if there's a single container with multiple windows on the
workspace.

This patch correctly counts all windows on the workspace.

fixes #2292
2016-04-15 00:26:42 -07:00
Ingo Bürk
83c8740bf1 Only grab the mouse buttons that need to be grabbed. (#2290)
This is a followup to #2049. While we had fixed that bug by only grabbing
buttons 4 and 5 if there is a whole-window binding for that button, this
did not consider buttons higher than 5 as found on many mice.

Therefore, we now ditch the special handling for scrollwheel buttons and
instead do the same for all buttons higher than 3.

fixes #2271
2016-04-13 10:45:57 -07:00
Michael Stapelberg
0060586190 Merge pull request #2287 from layus/fix-punned-pointer
Fix punned-pointer warning from gcc
2016-04-13 10:34:53 -07:00
Guillaume Maudoux
b52482705e Avoid hazardous casting. 2016-04-11 15:00:47 +02:00
Guillaume Maudoux
8dc7691a6f Remove "dereferencing type-punned pointer" warning
Fix the remaining warning discussed in #1538.
This is obviously a false positive from gcc.
2016-04-11 14:50:01 +02:00
Ingo Bürk
b3fb3cbfea Update i3bar LICENSE to conform to other LICENSE files. (#2284)
This change of the LICENSE has been approved by Axel Wagner in #2281.
2016-04-10 04:15:49 -07:00
Michael Stapelberg
86f00fdda0 Merge pull request #2278 from jolange/version-extraction
Version extraction
2016-04-10 04:09:18 -07:00
Michael Stapelberg
c7e92ead94 travis: clean old docs before building with asciidoc git config 2016-04-09 12:46:15 +02:00
Michael Stapelberg
12c073e2ee cleanup-bintray: keep the most recent, not delete the most recent 2016-04-09 11:55:25 +02:00
Michael Stapelberg
bd29745eff travis: build debian packages and documentation
The resulting packages are pushed to Debian repositories hosted on
bintray.com.

This is the first step to move away from our custom buildbot setup (see
https://i3wm.org/docs/buildbot.html for details on that) towards
infrastructure which is more standard (travis) and in the open.
2016-04-08 09:31:07 +02:00
Johannes Lange
f74327e7c6 use git version information if possible, otherwise use information
from (I3_)VERSION files (for tarballs)
2016-04-07 19:12:21 +02:00
Johannes Lange
9f27716d16 dist tarball uses existing (I3_)VERSION file 2016-04-07 19:12:21 +02:00
Johannes Lange
808bad10ef auto-creating (I3_)VERSION for each release and post-release version files
with 'non-git' suffix

fixes #1993
2016-04-07 19:12:21 +02:00
Johannes Lange
64c81132d2 initial (manual) version files check-in 2016-04-07 19:12:21 +02:00
Ingo Bürk
ea55729cf2 Remove unmaintained CHANGELOG file from i3bar 2016-04-07 08:35:29 +02:00
wentasah
fec1a9511e Make fullscreen windows open on the output which is indicated by their geometry
With this change, multi-monitor presentations (e.g. as implemented by
LibreOffice Impress) work out of the box. Previously, one had to move
the presentation windows to the right outputs oneself.
2016-04-06 21:19:10 +02:00
Eric Engeström
66d9c983e4 Fix spelling mistakes 2016-04-04 09:33:59 +02:00
Hong Xu
a2632fd308 Point out the default ipc message type in i3-msg.man 2016-04-04 08:47:07 +02:00
Michael Stapelberg
ba550382a3 debian: remove menu file, add lintian-overrides 2016-04-01 16:34:56 +02:00
Michael Stapelberg
5dd4508c74 *.xsession.desktop: add Keywords=
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693918 and
https://wiki.gnome.org/Initiatives/GnomeGoals/DesktopFileKeywords
2016-04-01 15:57:41 +02:00
Michael Stapelberg
84c39a1103 Merge pull request #2243 from Xarthisius/pango_support
Add missing MAX macros, ensure that i3 can be compiled without pango
2016-03-30 08:47:56 +02:00
Michael Stapelberg
eb837cbd00 Merge pull request #2266 from cedricbu/dmenu-death-by-failed-open
i3-dmenu-desktop: do not die on failed open
2016-03-24 09:40:19 +01:00
Cedric
7b1729a85b i3-dmenu-desktop: do not die on failed open 2016-03-23 18:48:38 +01:00
Kacper Kowalik (Xarthisius)
eb0a0a166f Convert ifdef CAIRO_SUPPORT to if statements to keep consistency with common.mk 2016-03-23 10:58:10 -05:00
Kacper Kowalik (Xarthisius)
301320585e Add missing MAX macros, ensure that i3 can be compiled without pango 2016-03-23 10:58:10 -05:00
Michael Stapelberg
d68387bf5d Merge pull request #2264 from ixjlyons/i3bar-protocol-typos
Fix typos in documentation.
2016-03-21 12:11:35 -07:00
Kenneth Lyons
ac97dbdf90 Fix typos in documentation. 2016-03-21 10:00:25 -07:00
Michael Stapelberg
6fb271fc1e Merge pull request #2245 from Osse/next
Update information on where to find #i3 on IRC
2016-03-11 19:02:43 -08:00
Øystein Walle
868180565e Update information on where to find #i3 on IRC 2016-03-10 18:05:17 +01:00
Michael Stapelberg
960e6384cc Merge pull request #2244 from jubalh/desktopf
Make i3.applications.desktop file more complete
2016-03-09 11:45:15 +01:00
Michael Vetter
df4b4d0f40 Make i3.applications.desktop file more complete
Add GenericName to i3.applications.desktop file.
2016-03-09 10:27:04 +01:00
Michael Stapelberg
42f5a6ce47 travis: skip login+push for pull requests 2016-03-06 18:51:52 +01:00
Michael Stapelberg
ab2d46b65b release.sh: clone from canonical location
This ensures the repository is up-to-date (in all branches!), hopefully
preventing merge mistakes such as the one fixed with
0e29101ae5
2016-03-06 17:02:12 +01:00
Michael Stapelberg
0e29101ae5 fix i3 4.12 merge issue in src/commands.c (Thanks Airblader) 2016-03-06 16:59:46 +01:00
Michael Stapelberg
efff2361cb release.sh: update i3-announce mailing list address 2016-03-06 16:31:11 +01:00
Michael Stapelberg
cb4235706f update release.sh for the 4.12 release 2016-03-06 16:27:49 +01:00
Michael Stapelberg
018a47ceef debian: update changelog 2016-03-06 16:26:03 +01:00
Michael Stapelberg
7a057de969 Update debian/changelog 2016-03-06 16:17:28 +01:00
Michael Stapelberg
0a601a23d6 Merge branch 'release-4.12' 2016-03-06 16:17:27 +01:00
Michael Stapelberg
988cc3ccaf Merge branch 'next' into master 2016-03-06 16:17:27 +01:00
Michael Stapelberg
c9f0bc174d release i3 4.12 2016-03-06 16:17:15 +01:00
Michael Stapelberg
8d22669311 debian/watch: verify signature, use https 2016-03-06 16:16:55 +01:00
Michael Stapelberg
0d33f70ac7 debian/control: bump standards-version to 3.9.7 2016-03-06 16:16:55 +01:00
Michael Stapelberg
3ee7828460 debian/compat: bump debhelper compat level to 9 2016-03-06 16:16:53 +01:00
Michael Stapelberg
601108437b debian: update copyright to machine-readable copyright 2016-03-06 14:45:46 +01:00
Michael Stapelberg
e4702b9338 Merge pull request #2239 from wodny/xcb-32bit-properties
window_update_motif_hints(): uint32_t for fields, fixes #2238
2016-03-03 09:01:49 +01:00
Marcin Szewczyk
ad36e32764 window_update_motif_hints(): uint32_t for fields, fixes #2238
xcb_get_property_value() returns 32-bit property fields
2016-03-02 23:31:08 +01:00
Michael Stapelberg
6fe8d30d65 Merge pull request #2233 from Airblader/bug-2228
Revert to default binding mode before reloading the config.
2016-02-25 21:19:14 +01:00
Michael Stapelberg
70cc9af69b Merge pull request #2232 from Airblader/bug-2229
Determine focused workspace correctly when moving workspace to output.
2016-02-25 21:18:55 +01:00
Michael Stapelberg
a3d87c5b57 Merge pull request #2231 from Airblader/feature-2223
Introduce I3_FLOATING_WINDOW.
2016-02-25 21:18:29 +01:00
Ingo Bürk
ad702dff13 Revert to default binding mode before reloading the config.
If a user reloads the config while in some binding mode, the binding mode
will revert to the default, but no event will ever be fired, causing a
broken i3bar mode display.

This patch explicitly reverts to the default binding mode before reloading
the config. We reload rather than switch to the binding mode after having
reloaded the config because there's no guarantee that mode will even still
exist.

fixes #2228
2016-02-25 19:28:48 +01:00
Ingo Bürk
a9d8184c73 Determine focused workspace correctly when moving workspace to output.
This patch correctly determines the previously focused workspace on the
target output when moving a workspace to another output. Before, we used
nodes_head for this, which will not actually return the previously focused
workspace, but just the first workspace on that output. Hence, we now use
focus_head instead.

This bug was introduced all the way back in 1e143fea when the feature of
moving workspaces to another output was first implemented.

fixes #2229
2016-02-25 19:12:09 +01:00
Ingo Bürk
712c6d65ff Introduce I3_FLOATING_WINDOW
This patch introduces a proprietary atom I3_FLOATING_WINDOW which will be
set and maintained for floating windows and removed on tiling containers.

This allows users to select on this atom, e.g., in their compositor
configuration or in utility scripts (without using the IPC).

fixes #2223
2016-02-25 18:36:22 +01:00
Michael Stapelberg
fdbbae56b2 split atoms.xmacro into 2 files to obtain _NET_SUPPORTED count
Manually updating a magic number doesn’t work in the long run.
With this change, the number of atoms contained in
include/atoms_NET_SUPPORTED.xmacro is used.

fixes #2230
2016-02-23 21:48:18 +01:00
Michael Stapelberg
eb631ce3c3 Merge pull request #2221 from Airblader/bug-2220
Revert e2e7b7 and remove unreachable fallback code
2016-02-22 09:15:31 +01:00
Ingo Bürk
b8109c3a59 Document tray initialization better.
This commit removes an unnecessary fallback to the first output's name as
this name ("first") will only be used to see whether "tray_output none"
has been specified, anyway.

We also add documentation that clearly states when we want to initialize
the tray and when we don't want to do the same.

relates to #2220
2016-02-21 14:26:13 +01:00
Ingo Bürk
320591ac19 Remove unreachable fallback code for tray_output primary.
This commit removes the code for falling back to the first available
output for the system tray if 'tray_output primary' has been specified
but there is no primary output (managed by this bar).

This fallback behavior was broken/unreachable because the tray
will never be initialized in this situation in the first place. Having
this dead code lead to a wrong assumption in #1855 and hence to
commit e2e7b70d00, which makes the
system tray not show up for many users when first installing i3.

Thanks to @rtlanceroad for reporting this issue.

fixes #2220
2016-02-21 14:17:23 +01:00
Ingo Bürk
3e1b269409 Revert "Add 'tray_output primary' to the default config"
This reverts commit e2e7b70d00.

relates to #2220
2016-02-21 14:12:02 +01:00
Michael Stapelberg
d0ff8ac212 Add issue template
This is a mix of what our old new-ticket-form used to suggest:
http://code.stapelberg.de/git/i3-new-ticket/tree/templates/index.html
…and what CONTRIBUTING.md already entailed.

See https://github.com/blog/2111-issue-and-pull-request-templates
2016-02-19 18:48:49 +01:00
Michael Stapelberg
fe5e7b0c81 move CONTRIBUTING.md to .github/ directory
See https://github.com/blog/2111-issue-and-pull-request-templates
2016-02-19 18:41:30 +01:00
Michael Stapelberg
f63701ed09 Allow workspace renames which change case
fixes #2211
2016-02-15 08:34:03 +01:00
Michael Stapelberg
e91fa09569 Merge pull request #2210 from Airblader/bug-2166
Don't allow floating workspaces anymore.
2016-02-15 08:15:23 +01:00
Michael Stapelberg
d6aece03ee Merge pull request #2209 from Airblader/feature-2208
Allow "modifier none" in i3bar to disable the modifier.
2016-02-15 08:14:26 +01:00
Michael Stapelberg
d42db7fb9a Merge pull request #2212 from bendem/patch-1
Reflect changes to i3-sensible-terminal in its manpage
2016-02-14 13:50:36 +01:00
bendem
9c595a1a28 Reflect changes to i3-sensible-terminal in its manpage 2016-02-14 13:28:14 +01:00
Ingo Bürk
9431ef16f6 Don't allow floating workspaces anymore.
This is essentially a revert of daf00a9 which introduced a mechanism
to float workspace containers by wrapping all children into a new
container and floating it.

This caused a bug and there's no good reason (anymore) to allow doing
this in the first place as we don't support floating nested containers.

fixes #2166
2016-02-11 21:25:50 +01:00
Ingo Bürk
018922dcc4 Allow "modifier none" in i3bar to disable the modifier.
This allows "modifier none" (and "modifier off") for the bar config
in order to disable the modifier key altogether. This is useful
for users who use a different approach to hiding / showing the bar,
e.g., a custom keybind that involved multiple keys or scripts.

fixes #2208
2016-02-11 20:51:05 +01:00
Michael Stapelberg
e2d1f0f567 Merge pull request #2203 from Airblader/bug-2202
Ensure that the "border" command uses logical pixels.
2016-02-10 22:04:07 +01:00
Michael Stapelberg
5735e2de10 Merge pull request #2204 from romanblanco/st
Added st to i3-sensible-terminal
2016-02-10 22:02:51 +01:00
Roman Blanco
658e5597d2 Added st to i3-sensible-terminal 2016-02-09 22:33:37 +01:00
Ingo Bürk
6cbff6bfd4 Ensure that the "border" command uses logical pixels.
Until now, only the config directive for borders (new_window,
new_float) respected the DPI setting (using logical_px). This
patch makes sure we also do so for runtime "border" commands.

fixes #2202
2016-02-09 21:03:44 +01:00
Michael Stapelberg
1e23e55c5e Merge pull request #2197 from norrland/next
Update i3-sensible-terminal
2016-02-07 14:55:21 +01:00
Michael Stapelberg
0ff65ab79f Merge pull request #2196 from Airblader/feature-2165
Remove _NET_WM_STATE on withdrawn windows.
2016-02-07 14:54:34 +01:00
norrland
5601096c5e Update i3-sensible-terminal 2016-02-07 14:40:00 +01:00
Ingo Bürk
ad95038c5e Remove _NET_WM_STATE on withdrawn windows.
According to the spec, _NET_WM_STATE must be removed when the window is
withdrawn, much like _NET_WM_DESKTOP.

fixes #2165
2016-02-07 12:08:50 +01:00
Michael Stapelberg
fbfbdb8e12 travis: check spelling of binaries and manpages, use docker
We now build a docker base container based on debian sid (where the very
latest packages are available). That base container is updated once a
month, or whenever travis-build.Dockerfile or debian/control change, but
re-used for subsequent travis runs. While the initial build might take
up to 15 minutes, subsequent builds typically run in a minute or two.

All the different steps that we run on travis are now factored into
separate scripts in the travis/ directory.

Switching to docker should also help with issue #2174.
2016-02-06 10:36:43 +01:00
Michael Stapelberg
065ce6b8fc Merge pull request #2190 from jolange/userguide
Userguide: "hiding vertical borders" -> "hiding outer borders"
2016-02-05 09:30:21 +01:00
Johannes Lange
0c57abe8e5 "hiding vertical borders" -> "hiding outer borders"
This option can be used to hide horizontal or horizontal+vertical
borders since 57effd6
2016-02-04 20:01:24 +01:00
Michael Stapelberg
63cb5b2439 Merge pull request #2186 from brianmillar/next
Added Neovim to i3-sensible-editor
2016-02-01 08:24:36 +01:00
Brian Millar
bb4e1c8cd1 Added Neovim to i3-sensible-editor 2016-02-01 01:18:41 +00:00
Michael Stapelberg
026fadf72d Merge pull request #2185 from nicklan/next
Fix issue #2184.  don't send atom, but raw code
2016-01-31 22:22:04 +01:00
Nick Lanham
8f2d066dc6 Fix issue #2184. don't send atom, but raw code
XEMBED messages aren't atoms, but just codes, so i3bar should just send
XEMBED_EMBEDDED_NOTIFY rather than indexing the atom array.
2016-01-31 12:21:47 -08:00
Michael Stapelberg
b565676fb7 Merge pull request #2183 from jolange/hacking_update
changed old `cfgparse.y` reference to `config_parser.c`
2016-01-31 16:22:21 +01:00
Johannes Lange
1c7b25f25a changed old "cfgparse.y" reference to "config_parser.c" 2016-01-30 13:44:05 +01:00
Michael Stapelberg
de42f9aef3 Merge pull request #2177 from dcoppa/next
Remove commented-out code and fix i3-nagbar manpage
2016-01-26 01:06:27 -08:00
David Coppa
7a25d3f149 Fix i3-nagbar example. 2016-01-26 09:57:59 +01:00
David Coppa
1041572769 Remove commented-out code. 2016-01-26 09:55:24 +01:00
Michael Stapelberg
df3320796b Merge pull request #2172 from Airblader/bug-net-wm-desktop-1
Don't ignore focus on _NET_WM_DESKTOP client messages.
2016-01-25 00:30:12 -08:00
Ingo Bürk
3c0ba081df Don't ignore focus on _NET_WM_DESKTOP client messages.
Ignoring the focus leads to a broken focus if the pointer is, e.g.,
over i3bar at the point in time the window is moved by the client
message. It also causes i3bar's workspace display to break.

Thanks to GermainZ for reporting.
2016-01-22 20:32:51 +01:00
Michael Stapelberg
f9a47c2611 Merge pull request #2169 from Airblader/bug-2168
Don't grab the buttons on the root window.
2016-01-20 13:43:20 -08:00
Ingo Bürk
95b60b170e Don't grab the buttons on the root window.
We don't actually need to grab the buttons to fix #2097, but doing so
will cause a freeze due to unreleased events.

We partially revert 6f12f02 which avoids the freeze, but doesn't break
functionality.

relates to #2097
fixes #2168
2016-01-20 22:28:20 +01:00
Michael Stapelberg
cfd07ab0e6 Merge pull request #2162 from Airblader/feature-2153
Handle the EWMH atom _NET_WM_DESKTOP.
2016-01-18 13:31:03 -08:00
Ingo Bürk
328035fb7e Handle the EWMH atom _NET_WM_DESKTOP.
We already claim _NET_WM_DESKTOP support in _NET_SUPPORTED since around 2009,
but haven't actually done anything with it. However, especially pagers like
gnome-panel rely on this property to be updated and many tools, like GTK, want
to use the corresponding client messages to make a window sticky, move it
around etc.

This patch implements full support according to the EWMH spec. This means:

* We set the property on all windows when managing it.
* We keep the property updated on all windows at all times.
* We read and respect the property upon managing a window if it was set before
  mapping the window.
* We react to client messages for it.
* We remove the property on withdrawn windows.

Note that the special value 0xFFFFFFFF, according to the spec, means that the
window shall be shown on all workspaces. We do this by making it sticky and
float it. This shows it on all workspaces at least on the output it is on.

Furthermore, the spec gives us the freedom to ignore _NET_WM_DESKTOP when
managing a window if we have good reason to. In our case, we give window
swallowing a higher priority since the user would likely expect that and we
want to keep placeholder windows only around for as long as we have to.
However, we do prioritize this property over, for example, startup
notifications.

fixes #2153
fixes #1507
fixes #938
2016-01-18 12:13:36 +01:00
Michael Stapelberg
dfdf9bed94 Merge pull request #2164 from pra85/patch-1
Update license year range to 2016
2016-01-17 13:22:11 -08:00
Michael Stapelberg
a761e018d5 Merge pull request #2161 from botovq/next
Add pledge support for OpenBSD
2016-01-17 13:21:56 -08:00
Theo Buehler
a1d1f456a1 Add pledge(2) support for OpenBSD
pledges for i3:
"stdio rpath unix" for talking to the i3 socket usually in /tmp
"proc exec" for executing programs
"wpath cpath" are needed for the restart-in-place functionality

To make this work, @semarie pointed out that it is sufficient to ensure
that we get physical_mem_bytes only once, namely in init_logging().

pledges for i3-msg:
"stdio rpath unix" are needed for talking to the i3-socket

pledges for i3-nagbar
"rpath getpw" to find the home directory
"wpath cpath" to write the script
"proc exec" to execute the script
2016-01-17 18:49:00 +01:00
Prayag Verma
e41dee32da Remove copyright year range from License 2016-01-17 16:25:54 +05:30
Michael Stapelberg
9a4dbf366b travis: use trusty (simpler config, faster builds) 2016-01-11 21:18:11 +01:00
Michael Stapelberg
dd33cd36dd travis: build with AddressSanitizer enabled
This requires us to use a more recent compiler.
2016-01-11 20:59:26 +01:00
Michael Stapelberg
4c1ca3e29a Merge pull request #2156 from Airblader/feature-2154
Rename decoration_border to child_border.
2016-01-10 11:04:08 -08:00
Ingo Bürk
811ff07b8e Rename decoration_border to child_border.
fixes #2154
2016-01-09 16:47:33 -05:00
Michael Stapelberg
f14a94031c tests: switch to xft fonts
See issue #2155 for details.
2016-01-09 17:22:45 +01:00
Michael Stapelberg
196e63e1bf testcases: report tests with AddressSanitizer/LeakSanitizer reports 2016-01-09 17:19:12 +01:00
Michael Stapelberg
cb3cdb602a ASAN: trigger leak before exiting
This disables the default leak-check-on-exit behavior which reports a
bunch of leaks that are only leaks while exiting, at which point they
don’t matter, because the operating system will clean up the memory our
process used.
2016-01-09 17:18:05 +01:00
Michael Stapelberg
5a36d090c7 common.mk: add ASAN flag for AddressSanitizer
See https://github.com/google/sanitizers/wiki for details.
Compile with “make ASAN=1” to enable.
2016-01-09 17:15:33 +01:00
Michael Stapelberg
9b4efdc194 font: free errors 2016-01-09 17:07:23 +01:00
Michael Stapelberg
17c55792c6 fix memory leak: use xcb_disconnect() instead of free() 2016-01-09 17:06:58 +01:00
Michael Stapelberg
8bfc651dd1 i3bar: free font when exiting 2016-01-09 17:06:58 +01:00
Michael Stapelberg
5ca659853a i3bar: fix memory leak 2016-01-09 17:06:58 +01:00
Michael Stapelberg
f511cc61c1 fix memory leak when swallowing windows 2016-01-09 17:06:58 +01:00
Michael Stapelberg
8d917497c2 manage.c: fix memory leak 2016-01-09 17:06:58 +01:00
Michael Stapelberg
8d4bf6c577 free dynamically allocated matches 2016-01-09 17:06:58 +01:00
Michael Stapelberg
436e4c17b3 free container matches when destroying containers 2016-01-09 17:06:58 +01:00
Michael Stapelberg
414be6290d tree_append_json: fix memory leaks 2016-01-09 17:06:58 +01:00
Michael Stapelberg
f904511b7e con_get_tree_representation: fix memory leak 2016-01-09 17:06:58 +01:00
Michael Stapelberg
feef3ea78a window.c: fix memory leak 2016-01-09 17:06:58 +01:00
Michael Stapelberg
e7f1476180 reload: fix memory leak 2016-01-09 17:06:54 +01:00
Michael Stapelberg
79594398e2 commands.c: fix memory leak 2016-01-09 13:39:00 +01:00
Michael Stapelberg
ada71471c1 x.c: fix memory leak 2016-01-09 13:13:57 +01:00
Michael Stapelberg
71476b03e3 log.c: fix memory leak 2016-01-09 13:11:03 +01:00
Michael Stapelberg
6f53dc01ef tree_restore(): fix memory leak 2016-01-09 12:50:38 +01:00
Michael Stapelberg
338cb693dc t/525-i3bar-mouse-bindings: wait for i3bar to appear before testing
Otherwise, this test is flaky when i3bar takes a while to start.
2016-01-09 12:47:00 +01:00
Michael Stapelberg
f3a5796a8b i3test::XTEST: free errors and connections with errors 2016-01-09 12:41:02 +01:00
Michael Stapelberg
9dde0b9b18 i3bar: fix memory leak in socket path 2016-01-09 12:30:15 +01:00
Michael Stapelberg
9eba061ed3 fix memory leak: free(pointerreply); 2016-01-09 12:07:47 +01:00
Michael Stapelberg
de035cab6d ipc: fix memory leak when clients with subscriptions disconnect 2016-01-08 21:24:21 +01:00
Michael Stapelberg
287ebcc206 ipc: fix cosmetic memory leak when shutting down 2016-01-08 21:24:12 +01:00
Michael Stapelberg
08976f7a2a con_mark: fix heap-use-after-free 2016-01-08 20:41:09 +01:00
Michael Stapelberg
0d1aad0af4 rename workspace: fix heap-use-after-free 2016-01-08 20:21:54 +01:00
Michael Stapelberg
55bc2ae6a9 i3-dump-log: explicitly free shmname
Reduces memory usage and makes LeakSanitizer more quiet.
2016-01-08 20:17:34 +01:00
Michael Stapelberg
d155496915 root_atom_contents: properly clean up in all cases 2016-01-08 20:15:34 +01:00
Michael Stapelberg
54738f6ec8 bindings.h: mark DEFAULT_BINDING_MODE as external
This prevents the following linker warning (only when compiling with
-fsanitize=address):

/usr/bin/ld: Warning: size of symbol `DEFAULT_BINDING_MODE' changed
from 8 in src/resize.o to 64 in src/bindings.o
2016-01-08 19:56:32 +01:00
Michael Stapelberg
891bd6e3e5 Merge pull request #2150 from Airblader/bug-2149
Use correct fallback color for decoration_border.
2016-01-06 21:15:18 +01:00
Ingo Bürk
bcee585e17 Use correct fallback color for decoration_border.
The newly introduced decoration_border color incorrectly uses the default value
for "background" as a fallback when not specified. Instead, it should use the
user-specified "background" as a fallback.

fixes #2149
2016-01-06 09:19:42 -05:00
Michael Stapelberg
8fce04b1e5 Merge pull request #2145 from Airblader/bug-2144
Fix segfault when calling "i3 -C".
2016-01-06 09:15:07 +01:00
Ingo Bürk
b9b1a60b5d Fix segfault when calling "i3 -C".
Commit 287a0b4 introduced a segfault when validating the i3 config
as the root_screen will not be set in this case, causing a null
pointer dereference.

fixes #2144
2016-01-05 22:50:38 -05:00
Michael Stapelberg
3853d1866b Merge pull request #2143 from Airblader/feature-2120
Allow title_format for all containers
2016-01-05 22:32:15 +01:00
Michael Stapelberg
c8d84af415 Merge pull request #2136 from lotheac/next
draw client borders in border color, not background
2016-01-05 22:24:53 +01:00
Ingo Bürk
1f660a4cc4 Move title_format from window to container.
This patch moves the title_format information from windows to containers.
Furthermore, it allows correctly setting it on window-less containers and
displays the title accordingly for split containers.

We now also dump and read title_format in GET_TREE / during restarts.

fixes #2120
2016-01-05 12:22:27 -05:00
Lauri Tirkkonen
034a12acad add decoration_border color for the actual client borders
see https://github.com/i3/i3/pull/2136
2016-01-05 12:17:48 +02:00
Michael Stapelberg
cd172da6ae Merge pull request #2148 from Airblader/feature-2120-memleaks
Fix memory leaks in title_format.
2016-01-05 09:11:44 +01:00
Ingo Bürk
6fefe836d4 Fix memory leaks in title_format.
This fixes three memory leaks that were found during the implementation of #2120
so that they can be fixed in a bugfix release.

relates to #2143
2016-01-04 18:48:01 -05:00
Michael Stapelberg
e70b2f9dcd Merge pull request #2139 from jolange/feature_split-toggle
added "toggle" option to "split" command
2016-01-04 19:34:09 +01:00
Johannes Lange
8bfd06c3dd added "toggle" option to "split" command
as requested in #1814
2016-01-04 17:31:47 +01:00
Michael Stapelberg
a9f31b9dc9 i3-nagbar: explicitly set cursor using libxcursor if available
See commit b1f1da432 for context.

fixes #2114
2016-01-04 09:26:45 +01:00
Michael Stapelberg
ebda8dc372 Merge pull request #2133 from Airblader/feature-2115
Added test for #2097.
2016-01-04 09:04:51 +01:00
Ingo Bürk
6130e8aed9 Migrate "xdotool click" in tests to XTEST. 2016-01-03 21:48:39 -05:00
Ingo Bürk
c099381632 Added test for #2097.
fixes #2115
2016-01-03 21:43:33 -05:00
Michael Stapelberg
98875fda76 Merge pull request #2135 from Alexis211/colors
Correct color management for non-true color displays
2015-12-30 16:24:31 +01:00
Michael Stapelberg
981c64667c docs/ipc: add https://github.com/drmgc/i3ipcpp 2015-12-30 15:59:53 +01:00
Alex Auvolat
287a0b4c3c get_colorpixel support for non-true color displays
Re-introduce fully-fledged get_colorpixel function, which enables arbitrary
color depths for the display.  The previous code is kept as an optimization for
the case of a true color display, where a X11 roundtrip is unnecessary.
2015-12-29 14:26:21 +01:00
Alex Auvolat
c6a4e4519f Correct color management for pango fonts
Corrects the cases where the colorpixel is not 0xRRGGBB : we have to
use the full color_t struct to describe font colors, as Pango expects
RGB values and not an XCB colorpixel value.
2015-12-29 14:26:21 +01:00
Michael Stapelberg
0ee9e65a3b Merge pull request #2138 from Alexis211/factor
Refactor extern definition of conn and root_screen
2015-12-29 13:51:15 +01:00
Alex Auvolat
19fd6817af Refactor extern definition of conn and root_screen 2015-12-29 12:47:12 +01:00
Michael Stapelberg
f6021c957b Merge pull request #2137 from fmthoma/fix-assign-workspace
Comply with documentation: 'workspace' token in 'assign' command
2015-12-29 12:26:38 +01:00
Michael Stapelberg
29275598e5 Merge pull request #2131 from kneitinger/next
userguide: clarify quoting of exec commands
2015-12-29 12:18:57 +01:00
Michael Stapelberg
bc126aaeaf Merge pull request #2134 from Airblader/bug-1761
Properly validate containers when killing via criteria
2015-12-29 11:50:58 +01:00
Michael Stapelberg
fcb25f0232 Merge pull request #2132 from Airblader/bug-2128
Move urgent flag before killing the parent.
2015-12-29 11:44:19 +01:00
Franz Thoma
194da2d7cf 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
2015-12-28 20:11:25 +01:00
Ingo Bürk
19c273a2ad 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
2015-12-28 02:35:25 -05:00
Ingo Bürk
0dd71674de 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
2015-12-27 20:58:35 -05:00
Ingo Bürk
61a8bc81ec 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
2015-12-27 18:08:30 -05:00
Kyle Kneitinger
3919dd8daa userguide: clarify quoting of exec commands 2015-12-27 12:07:41 -08:00
Michael Stapelberg
dc463077d6 Merge pull request #2113 from Airblader/bug-2111
Match on all criteria even if con_id or con_mark are given.
2015-12-25 17:14:29 +01:00
Michael Stapelberg
b1f1da432d 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
2015-12-25 16:38:11 +01:00
Michael Stapelberg
0ebb4b2005 make: should be XCB_CURSOR, not XCURSOR
After all, we’re not using libXcursor, but libxcb-cursor :).
2015-12-25 16:37:44 +01:00
Michael Stapelberg
019ae6d06c 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
b5693d6fb3/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
b5693d6fb3/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
2015-12-22 22:33:37 +01:00
Michael Stapelberg
b5693d6fb3 userguide: faq has moved to reddit 2015-12-20 13:12:37 +01:00
Michael Stapelberg
d240d02e61 Merge pull request #2121 from Airblader/bug-base-10
Don't force base 10 for parsing id.
2015-12-17 22:10:06 +01:00
Ingo Bürk
68e3cb8ab7 Don't force base 10 for parsing id. 2015-12-17 09:43:34 -05:00
Ingo Bürk
bba18453af 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
2015-12-17 08:56:05 -05:00
Michael Stapelberg
af49a8cd0d Merge pull request #2102 from ccryx/next
Add support for _NET_WM_WINDOW_TYPE_NOTIFICATION
2015-12-16 08:58:59 +01:00
Michael Stapelberg
dad9ec615b Merge pull request #2112 from Airblader/feature-multiple-tree-render
Avoid rendering the tree twice in a row
2015-12-16 08:56:11 +01:00
Florian Merkel
33f017daa9 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.
2015-12-15 21:55:33 +01:00
Ingo Bürk
905bca3531 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.
2015-12-15 13:59:50 -05:00
Michael Stapelberg
954927ccc4 Merge pull request #2108 from Airblader/feature-2097
Allow mouse bindings to run on the root window.
2015-12-15 19:15:03 +01:00
Ingo Bürk
6f12f029f4 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
2015-12-14 16:26:36 -05:00
Michael Stapelberg
8e081d7fff Merge pull request #2105 from Airblader/bug-2099
Reject empty swallow definitions
2015-12-14 20:48:49 +01:00
Michael Stapelberg
5ad1890838 Merge pull request #2103 from Airblader/bug-2091
Reject invalid match criteria with an error.
2015-12-14 09:17:12 +01:00
Ingo Bürk
e3a5c004d3 Reject empty swallow definitions
Empty swallow definitions don't make sense and can lead to crashes,
for that reason we reject them.

fixes #2099
2015-12-11 20:28:13 +01:00
Michael Stapelberg
624b33fd79 travis: install git 1.9.1 from trusty for git fetch --unshallow 2015-12-09 23:11:18 +01:00
Ingo Bürk
8d36f78b8e 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
2015-12-09 14:00:53 +01:00
Michael Stapelberg
04be42f7cd Merge pull request #2095 from Airblader/bug-2090
Allow "move position center" to operate on matched windows
2015-12-04 09:02:51 +01:00
Michael Stapelberg
fcef1c8ea1 Merge pull request #2096 from Airblader/bug-2094
Fix draw_util crash
2015-12-04 09:01:26 +01:00
Ingo Bürk
35a4e22f4a 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
2015-12-03 18:59:35 +01:00
Ingo Bürk
256007442f 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
2015-12-03 18:57:02 +01:00
Ingo Bürk
caeb193a6c 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
2015-12-03 13:24:39 +01:00
Michael Stapelberg
c490a60d94 Merge pull request #2087 from tbu-/pr_sensible_quote_vars
Quote the variables in i3-sensible-* correctly
2015-11-30 22:55:53 +01:00
Tobias Bucher
a5b2c91c93 Quote the variables in i3-sensible-* correctly
Previously, the variables $EDITOR, $PAGER, $TERMINAL and $VISUAL got
shell-expanded twice before executing them.
2015-11-30 21:36:23 +00:00
Michael Stapelberg
a2b20c8d9a travis: call git fetch --unshallow, so that git describe works 2015-11-30 21:08:00 +01:00
Michael Stapelberg
984658e4be Merge pull request #2065 from Airblader/feature-1278
Migrate i3 rendering to cairo
2015-11-23 22:27:31 +01:00
Ingo Bürk
bf442ff5de 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
780cb8d15d 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
d2126027ce 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
a4afd1b642 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
fdeb4e0c36 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
b665049883 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
d9bbfb7b35 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
2015-11-23 22:18:02 +01:00
Ingo Bürk
90d94298fa 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
2015-11-23 22:18:02 +01:00
Michael Stapelberg
008e32fe3e Merge pull request #2078 from acrisci/bug/detect-base16-conid
Bug: parse con_id base 16
2015-11-23 22:07:08 +01:00
Michael Stapelberg
60af7d829b Merge pull request #2079 from tyll/contact
Fix contact information
2015-11-22 20:00:33 +01:00
Till Maas
3e11c66aeb Fix contact information
fixes #2077
2015-11-22 19:57:46 +01:00
Tony Crisci
8f90b8448b 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.
2015-11-22 13:32:21 -05:00
Michael Stapelberg
233a22cb10 Merge pull request #2074 from Airblader/feature-2064
Support _NET_WM_USER_TIME.
2015-11-21 23:04:49 +01:00
Ingo Bürk
00881bb156 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
2015-11-21 22:48:48 +01:00
Michael Stapelberg
46bb6cdfbb Merge pull request #2076 from Airblader/feature-document-rects
Document rect, window_rect and deco_rect.
2015-11-21 22:44:31 +01:00
Ingo Bürk
8016cce447 Document rect, window_rect and deco_rect. 2015-11-21 21:52:43 +01:00
Michael Stapelberg
2bf09dffe9 Merge pull request #2071 from tyll/https
Use https if possible
2015-11-19 14:10:42 +01:00
Till Maas
913fb60a6a Use https if possible
git:// and http:// do not protect the integrity of the accessed data.
Therefore use https instead.
2015-11-19 13:32:35 +01:00
Michael Stapelberg
b255d140be Merge pull request #2061 from Airblader/bug-2049
Only grab scrollwheel buttons if necessary
2015-11-16 00:49:27 -08:00
Michael Stapelberg
6a7f9370db Add i3test::XTEST, add 2 test cases for key bindings 2015-11-16 09:37:54 +01:00
Michael Stapelberg
e48c4cd257 Revert "Bugfix: set group mask 1 by default, correctly compare modifiers"
This reverts commit 9692c1498b.

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
2015-11-16 09:00:27 +01:00
Ingo Bürk
029d78c0bf 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
2015-11-15 22:08:47 +01:00
Ingo Bürk
66882bf445 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
2015-11-11 20:21:26 +01:00
Michael Stapelberg
ff63104a2d Merge pull request #2058 from Airblader/feature-rename-flag
Rename I3BAR_CAIRO to CAIRO_SUPPORT.
2015-11-09 21:17:07 +01:00
Ingo Bürk
38fcaf3fa8 Rename I3BAR_CAIRO to CAIRO_SUPPORT. 2015-11-07 14:28:45 -05:00
Michael Stapelberg
f836e4c771 Merge pull request #2053 from Airblader/feature-2048
Raise dependency to cairo 1.14.4.
2015-11-03 08:44:02 +01:00
Ingo Bürk
1d6827a0fd 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
2015-11-02 17:32:04 -05:00
Michael Stapelberg
31121f1334 Merge pull request #2054 from hwangcc23/fix-2051
Fix config validation fail when no new line from end of file
2015-11-02 20:13:20 +01:00
Michael Stapelberg
911ce37871 Merge pull request #2055 from Airblader/bug-2044
Remove autostart commands after they have been executed.
2015-11-02 20:10:53 +01:00
Ingo Bürk
f2209a873c 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
2015-11-02 09:21:43 -05:00
hwangcc23
18b3f09970 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)
2015-11-02 22:12:44 +08:00
Michael Stapelberg
bb7a36e0c7 Merge pull request #2001 from Airblader/feature-multiple-tray-output
Allow multiple tray_output directives.
2015-11-02 09:18:26 +01:00
Ingo Bürk
5b9fb51b37 Fix memory leaks in modes and bar bindings. 2015-11-01 16:35:17 -05:00
Ingo Bürk
bc250b26a0 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
2015-11-01 16:35:17 -05:00
Michael Stapelberg
beb89e64b4 Bugfix: ignore XKB group bits in floating_modifier
fixes #2046
2015-10-30 08:38:53 +01:00
Michael Stapelberg
9692c1498b Bugfix: set group mask 1 by default, correctly compare modifiers
fixes #2002
2015-10-29 08:47:36 +01:00
Michael Stapelberg
1f9f44b694 travis: install clang-format-3.5 from llvm repository
Ubuntu utopic disappeared from archive.ubuntu.com, it’s EOL.
2015-10-28 22:13:34 +01:00
Michael Stapelberg
82806f3857 Bugfix: correctly compare modifier mask when identifying keybindings
fixes #2002
2015-10-28 21:56:55 +01:00
Ingo Bürk
4779e59c50 Fix multiple memory leaks with regular expressions. 2015-10-28 21:56:53 +01:00
Ingo Bürk
a22dec02f8 Refactor parsing of matches to avoid code duplication. 2015-10-28 21:56:52 +01:00
Ingo Bürk
f02413b4cf 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
2015-10-28 21:56:50 +01:00
Ingo Bürk
1f953719c9 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.
2015-10-28 21:56:49 +01:00
Ingo Bürk
0aa8d05b54 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.
2015-10-28 21:56:47 +01:00
Ingo Bürk
7c75d61a39 Activate root output if RandR request fails.
fixes #2011
2015-10-28 21:56:46 +01:00
Adaephon-GH
76db8b73ae Make rendering of key bindings more consistent
- Render key names and key bindings verbatim if they could be used like
  that in the configuration (no special format for "colloquial" names:
  Alt, Windows, ...)
- Use only lower case letters for key bindings
2015-10-28 21:56:45 +01:00
Adaephon-GH
2e5cfdeea0 Improve placement of explicit IDs for headings
In some cases the IDs of section titles was placed after the section
title. With that in the rendered HTML the ID was placed on the paragraph
and not on the heading. This led to heading not being shown when the
corresponding link was clicked.
2015-10-28 21:56:43 +01:00
Adaephon-GH
2a22b5d561 Quote __focused__ to prevent parsing by asciidoc
Text between two "__" is rendered as italics by asciidoc. This affects
the display of the new __focused__ special value for criteria.
2015-10-28 21:56:41 +01:00
Michael Stapelberg
724cfebe5e fix a memory leak in handle_get_bar_config 2015-10-28 21:56:39 +01:00
Michael Stapelberg
5648221d06 Fix memleak in translate_keysyms 2015-10-28 21:56:34 +01:00
Ingo Bürk
27535398f5 Turn "char *" into "const char *" for all command parser functions. 2015-10-28 21:56:17 +01:00
Ingo Bürk
9978050d91 Migrate the move command to use typed numbers. 2015-10-28 21:56:16 +01:00
Ingo Bürk
a271666fa7 Migrate the resize command to use typed numbers. 2015-10-28 21:56:14 +01:00
Ingo Bürk
f5f5683fa7 Allow the commands parser to use "number" arguments by making the stack typed. 2015-10-28 21:56:11 +01:00
Adaephon-GH
5049990284 Fix erroneous headline for moving to mark
The headline indicated that it would be possible to move containers and *workspaces* to marks but the following text clearly shows that it should state containers and *windows*.
2015-10-28 21:55:07 +01:00
Ingo Bürk
0a16a4b5e5 Add proper documentation for binding modes.
fixes #1996
2015-10-28 21:55:05 +01:00
Ingo Bürk
ab9d74b434 Fix moving windows to a marked workspace by mark.
When a window is moved to a mark and the marked container is a workspace,
we can skip any other logic and just call con_move_to_workspace directly.

fixes #2003
2015-10-28 21:55:03 +01:00
Ingo Bürk
bfd9960df2 Suppress no_focus for first window on a workspace.
With this patch, the no_focus directive will be ignored if the
to-be-opened window is the first on its workspace as there's no
reason the user would not want to focus it in this case.
This improves usability when, for example, using a tabbed
workspace_layout.

fixes #1987
2015-10-28 21:55:00 +01:00
Michael Stapelberg
94bdf607bb Use sasprintf() 2015-10-28 21:54:58 +01:00
Michael Stapelberg
62bb7af5c3 Bugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)
fixes #1983
2015-10-28 21:54:55 +01:00
Michael Stapelberg
0e5180cae9 Bugfix: correctly compare modifier mask when identifying keybindings
fixes #2002
2015-10-28 21:42:37 +01:00
Michael Stapelberg
b330050df7 Merge pull request #2043 from Airblader/bug-regex-mem-leak
Fix multiple memory leaks with regular expressions.
2015-10-28 18:55:26 +01:00
Ingo Bürk
27db61f504 Fix multiple memory leaks with regular expressions. 2015-10-28 14:40:10 +01:00
Michael Stapelberg
3295e05089 Merge pull request #2030 from DavidMikeSimon/focus-bar-color
Optionally change i3bar color on focused output, implements #2020
2015-10-27 19:57:15 +01:00
David Simon
dc05d905c1 Optionally change i3bar color on focused output, implements #2020 2015-10-27 09:12:57 -04:00
Michael Stapelberg
2451551f63 Merge pull request #2040 from Airblader/bug-2034
Fix crash when trying to split and float a dock container.
2015-10-27 10:07:25 +01:00
Michael Stapelberg
c1807163c7 Merge pull request #2041 from Airblader/feature-2028-2
Add --no-auto-back-and-forth for moving windows.
2015-10-27 08:50:48 +01:00
Ingo Bürk
57a7ff301f 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
2015-10-26 22:40:06 +01:00
Ingo Bürk
3d6c76eb93 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
2015-10-26 22:14:14 +01:00
Michael Stapelberg
d187214562 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
2015-10-26 21:26:53 +01:00
David Simon
071f11f9b9 Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824 2015-10-26 16:15:01 -04:00
Michael Stapelberg
30c3729a24 Merge pull request #2036 from Airblader/bug-2015
Make resize grow|shrink width|height work for a nested split in the s…
2015-10-26 09:14:28 +01:00
Michael Stapelberg
d35ee4501b Merge pull request #2031 from Airblader/feature-2028
Added --no-auto-back-and-forth to workspace commands.
2015-10-25 16:51:32 +01:00
Michael Stapelberg
b328d2423e Merge pull request #2037 from Airblader/bug-run-assignments
Fix assignments bug and a small logging bug
2015-10-25 16:48:32 +01:00
Ingo Bürk
ad10a366d6 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.
2015-10-25 14:27:08 +01:00
Ingo Bürk
ac4ac94181 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.
2015-10-25 14:25:55 +01:00
Ingo Bürk
10b1b39478 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
2015-10-25 13:03:56 +01:00
Ingo Bürk
7270206e24 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
2015-10-24 00:12:03 +02:00
Michael Stapelberg
185a2f24ba Merge pull request #2027 from Airblader/feature-cleanup-1
Remove broken and unused debug borders.
2015-10-23 08:34:55 +02:00
Ingo Bürk
f676781576 Remove broken and unused debug borders. 2015-10-23 00:38:11 +02:00
Michael Stapelberg
35b05ccd2f Merge pull request #2025 from Airblader/feature-2022
Added background and border keys to the i3bar protocol.
2015-10-22 20:36:02 +02:00
Michael Stapelberg
5333d15180 Merge pull request #2018 from Airblader/feature-2014
Allow multiple marks on a window
2015-10-22 20:32:05 +02:00
Ingo Bürk
a0add1ba73 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
2015-10-22 16:11:08 +02:00
Ingo Bürk
60158d31a2 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
2015-10-22 15:46:55 +02:00
Ingo Bürk
9537ada5ad 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
2015-10-22 15:32:18 +02:00
Ingo Bürk
7a77c5f0bb Introduce "--add" for marking windows.
In order to keep compatibility to before allowing multiple marks on a window,
we introduce a flag "--add" that must be set to put more than one mark on a
window. The default, which is also available as "--replace", keeps the old
behavior of overwriting a mark when setting a new one.

fixes #2014
2015-10-22 15:32:15 +02:00
Ingo Bürk
9bb2f038ab Allow multiple marks on windows.
This patch allows multiple marks to be set on a single window. The restriction that a mark may
only be on one window at a time is still upheld as this is necessary for commands like
"move window to mark" to make sense.

relates to #2014
2015-10-22 15:29:42 +02:00
Michael Stapelberg
0425f48835 Merge pull request #2017 from Airblader/bug-2011
Activate root output if RandR request fails.
2015-10-22 09:19:07 +02:00
Michael Stapelberg
f25e9a7872 Merge pull request #2023 from Adaephon-GH/next
Fix documentation for __focused__  + some small fixes
2015-10-22 09:08:39 +02:00
Ingo Bürk
41db909522 Activate root output if RandR request fails.
fixes #2011
2015-10-21 19:09:47 +02:00
Adaephon-GH
68c10f7257 Make rendering of key bindings more consistent
- Render key names and key bindings verbatim if they could be used like
  that in the configuration (no special format for "colloquial" names:
  Alt, Windows, ...)
- Use only lower case letters for key bindings
2015-10-21 13:58:45 +02:00
Adaephon-GH
103cef7b2b Improve placement of explicit IDs for headings
In some cases the IDs of section titles was placed after the section
title. With that in the rendered HTML the ID was placed on the paragraph
and not on the heading. This led to heading not being shown when the
corresponding link was clicked.
2015-10-21 13:35:52 +02:00
Adaephon-GH
29490c2336 Quote __focused__ to prevent parsing by asciidoc
Text between two "__" is rendered as italics by asciidoc. This affects
the display of the new __focused__ special value for criteria.
2015-10-21 13:08:21 +02:00
Michael Stapelberg
8125b54e09 fix a memory leak in handle_get_bar_config 2015-10-19 19:13:15 +02:00
Michael Stapelberg
7b502cf44c Fix memleak in translate_keysyms 2015-10-19 18:53:59 +02:00
Michael Stapelberg
4098e23609 Merge pull request #2013 from Adaephon-GH/next
Fix erroneous headline for moving to mark
2015-10-19 08:13:14 +02:00
Adaephon-GH
3e3a2f0549 Fix erroneous headline for moving to mark
The headline indicated that it would be possible to move containers and *workspaces* to marks but the following text clearly shows that it should state containers and *windows*.
2015-10-19 07:39:59 +02:00
Michael Stapelberg
4f57ff1737 Merge pull request #2007 from Airblader/feature-1996
Add proper documentation for binding modes.
2015-10-18 18:25:07 +02:00
Ingo Bürk
52d306db24 Add proper documentation for binding modes.
fixes #1996
2015-10-18 17:53:27 +02:00
Michael Stapelberg
fccf83294a Merge pull request #2004 from Airblader/bug-2003
Fix moving windows to a marked workspace by mark.
2015-10-18 12:26:37 +02:00
Michael Stapelberg
d5eb1120a4 Merge pull request #2008 from Airblader/feature-1995
Use sasprintf() instead of alloc'ing and strncpy() in i3bar.
2015-10-18 12:11:54 +02:00
Ingo Bürk
0750b450b2 Use sasprintf() instead of alloc'ing and strncpy() in i3bar.
resolves #1995
2015-10-17 22:14:48 +02:00
Michael Stapelberg
22b05f0073 Merge pull request #2005 from Airblader/feature-1998
Log X11 errors in i3bar.
2015-10-16 15:21:46 -07:00
Ingo Bürk
19a16f3ce7 Log X11 errors in i3bar.
This commit introduces X11 error logging similar to the way we already do in i3.

fixes #1998
2015-10-16 21:18:23 +02:00
Ingo Bürk
a172168e61 Fix moving windows to a marked workspace by mark.
When a window is moved to a mark and the marked container is a workspace,
we can skip any other logic and just call con_move_to_workspace directly.

fixes #2003
2015-10-16 21:07:16 +02:00
Michael Stapelberg
10b8e6a211 Merge pull request #1999 from hwangcc23/fix-workspace-next
Revise workspace next/prev
2015-10-16 11:10:18 -07:00
Michael Stapelberg
d56264e001 man: add “floating window” to terminology (Thanks frederik) 2015-10-16 19:42:20 +02:00
hwangcc23
dd400ff74b Revise workspace next/prev
See the issue #1798 (http://github.com/i3/i3/issues/1798).

+workspace_next+ as-is cycles through either numbered or named workspaces,
but when it reaches the last numbered/named workspace, it only looks for
named workspaces. This commit changes it: look for named workspaces after
exhausting numbered ones, but also for numbered ones after exhausting
named ones.

Also add a test case 528-workspace-next-prev.t (numbered workspaces and named
workspaces on 2 outputs) for testing this.
2015-10-16 23:25:12 +08:00
Michael Stapelberg
d622df70ad Merge pull request #1990 from Airblader/bug-1989
Flush cairo surface after drawing text.
2015-10-14 13:32:31 -07:00
Ingo Bürk
02468296c4 Introduce switch for the drawing backend
This commit restores the old XCB drawing code paths while keeping the
cairo drawing available via a compile-time switch (I3BAR_CAIRO). This
is necessary as cairo currently has a bug that breaks i3bar for users
without the RENDER extension, which might be the case, e.g., for VNC
users.

For more context, see #1989 and the discussions about its fix. Once the
cairo fix is available in a stable release, i3 can depend on that version
and remove the XCB drawing code paths.

fixes #1989
2015-10-14 21:12:33 +02:00
Ingo Bürk
46bcc55f6f Extract cairo_clear_surface.
This commit refactors the i3bar drawing code to also define an abstraction
function for clearing a surface. This is needed to fully abstract i3bar/xcb.c's
drawing code so that we can introduce a switch to easily exchange the
underlying drawing mechanism.
2015-10-14 19:03:05 +02:00
Ingo Bürk
8178910f16 Introduce a macro to flush a cairo surface twice.
Flushing the surface twice is necessary due to a cairo bug. For context,
refer to #1989 and https://bugs.freedesktop.org/show_bug.cgi?id=92455.
2015-10-14 18:57:16 +02:00
Michael Stapelberg
7275174510 Merge pull request #1994 from Airblader/bug-1992
Make pango markup in mode names optional with a flag.
2015-10-13 12:08:42 -07:00
Ingo Bürk
54dbbe2f06 Flush cairo surface after drawing text.
This is necessary to avoid a bug where a cairo assertion fails because no snapshot is available.

fixes #1989
2015-10-13 11:08:10 +02:00
Ingo Bürk
fec61791e1 Rename is_markup to pango_markup. 2015-10-13 09:59:26 +02:00
Ingo Bürk
82dc747396 Make pango markup in mode names optional with a flag.
This introduces the flag "--pango" on the mode config directive to
explicitly enable pango markup for mode names. Not setting this will
cause the mode name to be rendered as is.
This fixes a regression in 4.11 where mode names containing characters
such as '<' would break user's configs as they didn't escape these
characters.

fixes #1992
2015-10-13 09:23:30 +02:00
Michael Stapelberg
fb8caaa521 Merge pull request #1991 from Airblader/bug-1987
Suppress no_focus for first window on a workspace.
2015-10-12 11:30:23 -07:00
Ingo Bürk
f7907c11d7 Suppress no_focus for first window on a workspace.
With this patch, the no_focus directive will be ignored if the
to-be-opened window is the first on its workspace as there's no
reason the user would not want to focus it in this case.
This improves usability when, for example, using a tabbed
workspace_layout.

fixes #1987
2015-10-12 12:59:01 +02:00
Michael Stapelberg
d24964ff6a Use sasprintf() 2015-10-11 20:42:52 +02:00
Michael Stapelberg
321bba224a Bugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)
fixes #1983
2015-10-11 20:24:16 +02:00
Michael Stapelberg
b81435ecbb Merge pull request #1988 from Airblader/bug-1986
Fix documentation for no_focus.
2015-10-11 10:03:03 -07:00
Ingo Bürk
54486ca498 Fix documentation for no_focus.
fixes #1986
2015-10-11 17:05:30 +02:00
Michael Stapelberg
188a59b5e9 Merge pull request #1985 from Airblader/bug-1984
Remove support for 32-bit visuals and RGBA colors.
2015-10-11 01:54:13 -07:00
Ingo Bürk
21c0c20843 Remove support for 32-bit visuals and RGBA colors.
fixes #1984
2015-10-11 00:33:14 +02:00
Michael Stapelberg
73289a7394 travis: install clang-format-3.5 from llvm repository
Ubuntu utopic disappeared from archive.ubuntu.com, it’s EOL.
2015-10-11 00:12:38 +02:00
Michael Stapelberg
47723715ce Merge pull request #1981 from Airblader/feature-i3bar-rgba
Allow 32-bit depth visuals and RGBA in i3bar
2015-10-09 09:32:52 -07:00
Ingo Bürk
d300a07660 Refactor cairo drawing of rectangles into utility functions. 2015-10-08 12:31:56 +02:00
Ingo Bürk
ff0aeddede When drawing text, mark the surface as dirty.
Since libi3 currently creates its own cairo surface for drawing text, we
need to mark our own surface as dirty to force cairo to invalidate its
cache. Otherwise, this will result in graphical glitches such as the text
not showing up at all.

This wrapper can be removed in the future when libi3 is adapted to reuse
the same cairo surface as we do for all other drawing operations.
2015-10-08 12:16:25 +02:00
Ingo Bürk
a5d4c7c9ab Allow text drawing to use the alpha channel.
We pass alpha channel information to the current text drawing code
and use it if it is available. The previous behavior of using full
opacity for RGB format colors is preserved.
2015-10-07 22:10:47 +02:00
Ingo Bürk
1c4100ce5d Use 32-bit visuals for i3bar when possible and allow RGBA colors.
This patch creates all necessary windows for i3bar with 32-bit visuals if available.
It also introduces the possibility to define RGBA colors (next to RGB colors), which
allows the user to set the opacity of any color. This requires running a compositor.

With this patch we also start supporting _NET_SYSTEM_TRAY_VISUAL, which is necessary
for the tray icons so they create the tray window with the correct depth and visual.
2015-10-06 23:01:57 +02:00
Michael Stapelberg
ddd5e9a824 Merge pull request #1933 from Airblader/feature-1878-2
Draw i3bar with cairo
2015-10-05 09:38:43 +02:00
Ingo Bürk
410c5da7cf Use cairo for all drawing operations in i3bar.
fixes #1878
2015-10-05 09:29:17 +02:00
Michael Stapelberg
77431a2b96 Merge pull request #1963 from Airblader/bug-refactor-match-parsing
Refactor parsing of matches to avoid code duplication.
2015-10-04 18:09:28 +02:00
Ingo Bürk
b744c5e6c6 Refactor parsing of matches to avoid code duplication. 2015-10-04 17:40:25 +02:00
Michael Stapelberg
2248085c5c Merge pull request #1909 from Airblader/feature-refactor-1
Refactor rendering noodles a bit
2015-10-04 17:15:42 +02:00
Michael Stapelberg
77a7d625e1 Merge pull request #1965 from Airblader/feature-typed-commands-parser
Make the command parser stack typed
2015-10-04 17:05:27 +02:00
Jakob Haufe
7a66d55df5 Fix formatting of description list 2015-10-02 19:52:45 +02:00
Michael Stapelberg
6d385e65aa Merge pull request #1974 from sur5r/master
Fix formatting of description list
2015-10-02 19:52:10 +02:00
Michael Stapelberg
039494165a Merge pull request #1959 from hwangcc23/fix-1926
Check duplicated bindings after translating keysym
2015-10-02 19:51:42 +02:00
hwangcc23
fc48a297ed Check duplicated bindings after translating keysym
1). See the issue #1926. For example, the second keybinding is not detected as a duplicate:
        bindcode Mod4+24 sticky toggle
        bindsym Mod4+q focus parent
2). To fix it, check duplicated bindings when translating the keysym to keycodes.
2015-10-02 22:09:53 +08:00
Jakob Haufe
d584d0f2db Fix formatting of description list 2015-10-01 21:34:16 +02:00
Michael Stapelberg
2c4fd56069 update release.sh for 4.11 release 2015-09-30 09:06:34 +02:00
Michael Stapelberg
2453feb4e7 debian: update changelog 2015-09-30 09:03:34 +02:00
Michael Stapelberg
d76b7fab45 Update debian/changelog 2015-09-30 08:55:24 +02:00
Michael Stapelberg
91e7756e43 Merge branch 'release-4.11' 2015-09-30 08:55:24 +02:00
Michael Stapelberg
96e1b80371 Merge branch 'next' into master 2015-09-30 08:55:24 +02:00
Michael Stapelberg
041e549efd release i3 4.11 2015-09-30 08:55:07 +02:00
Ingo Bürk
6cd6f43d09 Turn "char *" into "const char *" for all command parser functions. 2015-09-28 14:24:08 +02:00
Ingo Bürk
c7ca6e1b41 Migrate the move command to use typed numbers. 2015-09-28 14:21:44 +02:00
Ingo Bürk
0ae9cddc98 Migrate the resize command to use typed numbers. 2015-09-28 14:21:44 +02:00
Ingo Bürk
23d5d704ed Allow the commands parser to use "number" arguments by making the stack typed. 2015-09-28 14:21:44 +02:00
Michael Stapelberg
34b8a02a36 Merge pull request #1967 from Airblader/feature-easier-command-diff
Break list of commands in parser test
2015-09-28 08:25:58 +02:00
Michael Stapelberg
71afed725a Merge pull request #1962 from Airblader/bug-move-to-output-criteria
Correctly handle command criteria for "move window to output".
2015-09-28 08:22:09 +02:00
Michael Stapelberg
2f9ed9c4c3 Merge pull request #1961 from Airblader/bug-1957
Avoid freeze when moving container
2015-09-28 08:19:23 +02:00
Michael Stapelberg
3830aa891e Merge pull request #1960 from Airblader/bug-restore-mark
Fix duplicated marks on append_layout
2015-09-28 08:19:04 +02:00
Ingo Bürk
90a85c3f52 Break list of all commands into one line per command. This reduces the chances of merge conflicts when
introducing or removing commands and therefore increases maintainability (albeit by only a little).
2015-09-27 19:25:17 +02:00
Ingo Bürk
852a2853e3 Correctly handle command criteria for "move window to output". 2015-09-26 21:31:28 +02:00
Ingo Bürk
594cd473b7 When moving a container to a mark, also check whether the container is being moved to its own descendant and
reject the request if this is the case.

fixes #1957
2015-09-25 19:43:43 +02:00
Ingo Bürk
dd7a532160 When appending a layout containing a marked container, make sure that any other containers with the same mark
are unmarked during insertion of the new container.

fixes #1956
2015-09-25 19:26:41 +02:00
Michael Stapelberg
c82e6a87dc Merge pull request #1931 from Airblader/bug-1924
Improvements for sticky windows
2015-09-24 22:34:29 +02:00
Ingo Bürk
922afe1919 Keep a sticky window focused if it was the focused window on the source workspace.
fixes #1924
2015-09-24 22:10:17 +02:00
Michael Stapelberg
a91466d14d Merge pull request #1952 from hwangcc23/fix-1875
Not toggle floating on a CT_FLOATING_CON
2015-09-24 13:23:07 +02:00
hwangcc23
94e7d13e17 Not toggle floating on a CT_FLOATING_CON
See the issue #1875.
Forbid the command to toggle floating on a CT_FLOATING_CON to avoid the crash.
2015-09-23 00:16:25 +08:00
Michael Stapelberg
a2aec4ee92 Merge pull request #1945 from Airblader/feature-frame-class
Set a proper WM_CLASS on frame windows.
2015-09-22 09:10:38 +02:00
Ingo Bürk
2d4f8ce90b Set a proper WM_CLASS on frame windows. 2015-09-22 08:57:05 +02:00
Michael Stapelberg
ee5db875c2 Merge pull request #1944 from tcatm/fix-vlog
log: avoid buffer overflow in vlog
2015-09-21 14:48:30 +02:00
Nils Schneider
717422c12c log: avoid buffer overflow in vlog
`vlog()` can not handle log messages longer than 4096 bytes. However, the
message generated in `store_restart_layout()` is likely to exceed this
as it contains a long JSON string.

This has caused a few SEGFAULTS during restarts for me when running with
`-d all`.

Fix this by truncating the message to 4096 bytes and punching in a newline at
the end.
2015-09-21 14:27:22 +02:00
Michael Stapelberg
5775147d37 Merge pull request #1943 from tcatm/fix-no-randr-output
Don't create empty workspaces on restart
2015-09-21 13:56:43 +02:00
Nils Schneider
f14efe85d1 Don't create empty workspaces on restart
This fixes a bug I introduced in #1921. When restarting i3 in place a
stray workspace was created on the root_output during restart. On first
start, this workspace would have been moved to the first real and empty
output.

However, this does not produce the desired result during restarts when
workspaces are alread present on all real outputs. The stray workspace would
still be added to the first real output which already contains some
workspaces. Thus, adding a new empty workspace to it.

Fix this by delaying creation of the root output's workspace until it is
known whether the output is active or not.

Fixes #1940
2015-09-21 13:26:58 +02:00
Michael Stapelberg
f3d898be4b Merge pull request #1937 from Airblader/bug-1910
Correctly restore floating windows
2015-09-21 10:18:25 +02:00
Michael Stapelberg
72b9909942 Merge pull request #1921 from tcatm/fix-no-randr-output
randr: use root window in case of no randr outputs
2015-09-21 10:17:21 +02:00
Michael Stapelberg
b0c72abcdb Merge branch 'hwangcc23-debuglog-on-persist' into next
fixes #1929
2015-09-21 10:10:45 +02:00
Michael Stapelberg
77d962f520 Merge branch 'debuglog-on-persist' of git://github.com/hwangcc23/i3 into hwangcc23-debuglog-on-persist 2015-09-21 10:05:14 +02:00
Ingo Bürk
55edbfe734 If no output is available, use the root screen geometry to determine the maximum size when checking the size of floating windows.
This is necessary during a restart of i3 when restoring floating windows. In this situation, we restore the layout before setting up the RandR outputs which would set the window's size to 0, making it invisible.

Thanks to hwangcc23 and spudowiar for reporting.

fixes #1910
fixes #1934
2015-09-20 12:31:29 +02:00
hwangcc23
b2bbd2c064 Make “debuglog on” command persist via restarts
1. Reference: issue #1929
2. When restarting, add the argument "-d all" if debuglog is on.
3. Add add_argument() for adding/replacing the given argument.
2015-09-20 07:48:02 +08:00
Nils Schneider
78decb565a randr: use root window in case of no randr outputs
This patch introduces a root output covering the root window. It is used
in two cases:

1. RandR is not available. In this case, the previous behaviour of
   creating a single output covering the root window is preserved.

2. RandR is available, but there is no active output. In this case,
   the root output is enabled and will be the only active output.
   If any RandR output becomes available, the root output will be
   disabled again. Existing mechanisms for migrating workspaces will
   just work without modification.

I've carefully slipped in a global variable `Output root_output` representing
that output.

Fixes #926 and #1489
2015-09-18 23:18:03 +02:00
Michael Stapelberg
eb4a174788 Bugfix: load new keymap _before_ translating keysyms (Thanks Airblader)
fixes #1919
2015-09-17 22:34:59 +02:00
Michael Stapelberg
d4fb17546c Merge pull request #1920 from Airblader/feature-1873
Set and unset individual atoms in _NET_WM_STATE
2015-09-17 10:08:27 +02:00
Ingo Bürk
034815b8fd Set and unset individual atoms in _NET_WM_STATE instead of overwriting the entire list everytime. This allows independent management of multiple states.
fixes #1873
2015-09-17 09:13:12 +02:00
Michael Stapelberg
4ae21e3a12 Merge pull request #1928 from Airblader/bug-1927
Fix mode_toggle for sticky windows
2015-09-16 19:58:21 +02:00
Ingo Bürk
b490f67925 Use the focused container to determine the target window_mode when using floating mode_toggle.
This fixes mode_toggle in case the workspace is focused and only a floating sticky window is open.

fixes #1927
2015-09-16 19:52:08 +02:00
Nils Schneider
c87b256200 Revert "Add a timeout: delay_exit_on_zero_displays"
This reverts commit 2c77d7ceed.
2015-09-14 22:34:05 +02:00
Michael Stapelberg
7de15b3815 clang-format
(When will I learn? I need to integrate clang-format into my editor.)
2015-09-14 10:22:43 +02:00
Michael Stapelberg
840ce51bfd Extract workspace names from bindings before reordering.
fixes #1889
2015-09-14 09:28:42 +02:00
Michael Stapelberg
e10b88fb81 Merge pull request #1856 from Airblader/feature-1455
EWMH Sticky windows
2015-09-13 13:47:14 -07:00
Ingo Bürk
1c4c3f06fa Make sure sticky windows pop to the front if they get sticky while not being on a visible workspace.
This commit also reworks the way focusing sticky windows is prevented by not focusing them temporarily at all, but preventing the focus in the first place.
2015-09-13 20:40:20 +02:00
Ingo Bürk
23a1dadaae Added tests for sticky windows. 2015-09-13 20:40:20 +02:00
Ingo Bürk
9866b00802 Implement new 'sticky' command to manually set, remove or toggle the sticky state on a window. 2015-09-13 20:40:20 +02:00
Ingo Bürk
2c338b6ae2 Handle _NET_WM_STATE_STICKY, but only for floating containers. If this atom is set, the floating window will always be automatically moved to the currently active workspace of the output that it is on. This is the equivalent of a sticky note stuck to the monitor.
We will respect this atom upon managing a window as well as when we receive a request that changes the sticky state.

fixes #1455
2015-09-13 20:40:20 +02:00
Michael Stapelberg
4d6f8b1329 Merge pull request #1917 from Airblader/feature-1378
Use EWMH window as focus fallback
2015-09-13 11:33:33 -07:00
Ingo Bürk
5dbfb05c85 Use the EWMH support window rather than the root window as an input focus fallback.
If no other window is available on the active workspace, we now select the EWMH support window (used to indicate that an EWMH-compliant window manager is preent) as the focus window rather than the root window. The NET_WM_ACTIVE window will still be set to XCB_WINDOW_NONE to pretend that no window is actually focused.
This fixes the issue that when using the root window, a fallback mechanism in X11 takes effect which routes keyboard input to the window under the cursor, independent of whether that window has the input focus. Using the EWMH window instead, we can avoid this behavior. We cannot simply set it to XCB_WINDOW_NONE as this would discard all keyboard events, breaking keybindings.

fixes #1378
2015-09-13 20:29:02 +02:00
Michael Stapelberg
ef6f2f4365 Merge pull request #1893 from rr-/resize
Added cmd_size
2015-09-11 14:31:33 -07:00
rr-
23d16e1332 Support "resize set W H" 2015-09-11 23:12:07 +02:00
Michael Stapelberg
69b3523b3f docs/debugging: warn more clearly about sensitive info (Thanks lambithal)
closes #1906, see #1907 for discussion
2015-09-11 20:18:24 +02:00
Michael Stapelberg
520602e8d7 Merge pull request #1913 from Airblader/feature-1809
Let "focus" report success depending on whether a window was matched.
2015-09-11 00:47:28 -07:00
Michael Stapelberg
619661552f Merge pull request #1912 from lasers/patch-1
Fix typo in userguide
2015-09-11 00:30:35 -07:00
Ingo Bürk
f31e476b28 Let "focus" report success depending on whether a window was matched.
fixes #1809
2015-09-11 08:26:33 +02:00
lasers
bb5ebd38da Fix typo in userguide 2015-09-10 22:42:00 -05:00
Ingo Bürk
bb5be480e7 Move rendering the root node into a separate function. 2015-09-10 20:57:04 +02:00
Ingo Bürk
a194cab523 Move precalculating the container sizes into a separate function 2015-09-10 20:43:33 +02:00
Ingo Bürk
dd989fa87b Refactor out some individual functions in render_con() to make the code more readable. 2015-09-09 18:37:07 +02:00
Michael Stapelberg
c9b6ec71aa update release.sh for 4.10.4 release 2015-09-08 09:27:59 +02:00
Michael Stapelberg
86aad2e076 debian: update changelog 2015-09-08 09:25:53 +02:00
Michael Stapelberg
2dfc39b166 Update debian/changelog 2015-09-08 09:19:33 +02:00
Michael Stapelberg
14a4e0c6f8 Merge branch 'master' into next 2015-09-08 09:19:33 +02:00
Michael Stapelberg
dbb34ade82 Merge branch 'release-4.10.4' 2015-09-08 09:19:33 +02:00
Michael Stapelberg
69eb4619a7 release i3 4.10.4 2015-09-08 09:19:17 +02:00
Michael Stapelberg
ce7d256d05 Revert "Check if output is disabled in handle_output()"
This reverts commit e71c304444.

It turns out that several users have workflows in which they turn off
their monitors without using e.g. `xrandr --output DP-1 --off`. The
result is that the monitors are disconnected, but not disabled.

With commit e71c304444, i3 started to see
these two states as one and the same state, but that causes more harm
than it does good. For example, for some users with only one monitor, i3
would just exit when these users turned off their monitor.

related to #1858, #1839

fixes #1845
2015-09-08 09:13:31 +02:00
shdown
f8d8acd93c i3-msg: strdup getenv() result before freeing
Fixes #1852.
2015-09-08 09:13:26 +02:00
Michael Stapelberg
cc98f465f2 Merge pull request #1895 from Airblader/bug-1883
Support moving dock clients to another output.
2015-09-06 13:26:53 +02:00
Ingo Bürk
053020f2db Support moving dock clients to another output.
This fixes #1883 where a race condition between i3 and i3bar caused two i3bar clients to be put onto the same output.
2015-09-05 21:30:55 +02:00
Michael Stapelberg
5370678d81 Merge pull request #1899 from Airblader/bug-swallowed-percent
Fix incorrect swallow of percent sign
2015-09-05 20:14:05 +02:00
Michael Stapelberg
75026352a3 Merge pull request #1898 from Airblader/bug-1896
Free the string returned by g_markup_escape_text.
2015-09-05 20:13:13 +02:00
Ingo Bürk
1f79c44cde If a title contains a percent sign, make sure it is not swallowed by parsing the title_format (if one is set on the window). 2015-09-05 16:29:47 +02:00
Ingo Bürk
d3c6e36731 Free the string returned by g_markup_escape_text.
fixes #1896
2015-09-05 16:21:16 +02:00
Michael Stapelberg
bbefa2a16c Fix “precisely 1 group” error message
fixes #1897
2015-09-05 14:32:58 +02:00
Michael Stapelberg
eacf20278b Merge pull request #1891 from Airblader/bug-1890
Handle absent window title
2015-09-05 12:54:47 +02:00
Michael Stapelberg
9aa41894da Merge pull request #1892 from Airblader/bug-1215
Fix rendering bug for floating windows
2015-09-05 12:46:47 +02:00
Ingo Bürk
d657c9c7a5 Make sure borders are never counted as adjacent to the edge for floating containers.
fixes #1215
relates to #998
2015-09-05 01:44:37 +02:00
Ingo Bürk
f61b5c6cb7 Correctly handle an absent window title to avoid a crash for applications that only set it after opening the window.
fixes #1890
2015-09-05 01:18:35 +02:00
Michael Stapelberg
ee2983c791 Merge pull request #1880 from Airblader/feature-665
Move data from Con to Window
2015-09-03 20:35:43 +02:00
Ingo Bürk
344514bca5 Move aspect_ratio from Con to Window.
relates to #665
2015-08-31 21:27:13 +02:00
Ingo Bürk
f43a15acde Move width_increment and height_increment from Con to Window.
relates to #665
2015-08-31 21:27:10 +02:00
Michael Stapelberg
394161c479 Merge pull request #1877 from Airblader/feature-1872
Support _NET_WM_VISIBLE_NAME
2015-08-31 09:00:57 +02:00
Ingo Bürk
80ce13e44e Move base_width and base_height from Con to Window
relates to #665
2015-08-30 22:48:37 +02:00
Ingo Bürk
f44c87685b Support _NET_WM_VISIBLE_NAME. As per specification this is necessary since we can display custom titles with title_format.
fixes #1872
2015-08-30 22:42:14 +02:00
Michael Stapelberg
768fe4ca69 Merge pull request #1871 from Airblader/feature-1770
Introduce command criterion value __focused__
2015-08-30 21:55:37 +02:00
Ingo Bürk
2daded90ea Fix typo in userguide. 2015-08-29 14:04:15 +02:00
Ingo Bürk
bbd83ef790 Added tests for special value __focused__.
relates to #1770
2015-08-29 00:43:55 +02:00
Ingo Bürk
54d270e359 Support a special value "__focused__" as a command criterion pattern for class, instance, title, window_role and workspace.
This special value will match if the window's property equals that of the currently focused window.

relates to #1770
2015-08-28 10:07:12 +02:00
Michael Stapelberg
b68a400abf Bugfix: sort bindings, re-ordering once is not enough.
Reordering once (as we did it before this commit) would only sort the
bindings by the _first_ bit of their event_state_mask, but we need to
sort them by _all_ bits of their event_state_mask.

fixes #1870
2015-08-28 09:30:28 +02:00
Michael Stapelberg
cbdf1ac8b6 bindings: invert shift bit, don’t just remove it
Before this commit, we only made the transformation of C → c, with this
commit we’re considering both c → C and C → c.

fixes #1870
2015-08-28 09:09:31 +02:00
Michael Stapelberg
ea514eb3d4 fix missing clang-format of amended commit 2015-08-26 10:01:14 +02:00
Michael Stapelberg
bf3cd41b5d Use libxkbcommon for translating keysyms, support all XKB groups.
fixes #1835

This commit improves the translation of keysyms to keycodes by loading
keymaps using libxkbcommon-x11 and using libxkbcommon for figuring out
the keymap, depending on each keybinding’s modifiers. This way, the
upper layers of complex layouts are now usable with i3’s bindsym
directive, such as de_neo’s layer 3 and higher.

Furthermore, the commit generalizes the handling of different XKB
groups. We formerly had support only for two separate groups, the
default group 1, and group 2. While Mode_switch is only one way to
switch to group 2, we called the binding option Mode_switch. With this
commit, the new names Group1, Group2 (an alias for Mode_switch), Group3
and Group4 are introduced for configuring bindings. This is only useful
for advanced keyboard layouts, such as people loading two keyboard
layouts and switching between them (us, ru seems to be a popular
combination).

When grabbing keys, one can only specify the modifier mask, but not an
XKB state mask (or value), so we still dynamically unbind and re-bind
keys whenever the XKB group changes.

The commit was manually tested using the following i3 config:

    bindsym Group4+n nop heya from group 4
    bindsym Group3+n nop heya from group 3
    bindsym Group2+n nop heya from group 2
    bindsym n nop heya
    bindsym shift+N nop explicit shift binding
    bindsym shift+r nop implicit shift binding
    bindcode Group2+38 nop fallback overwritten in group 2 only
    bindcode 38 nop fallback

…with the following layout:

    setxkbmap -layout "us,ua,ru,de" -variant ",winkeys,,neo" \
      -option "grp:shift_caps_toggle,grp_led:scroll" \
      -model pc104 -rules evdev

By default (xkb group 1, us layout), pressing “n” will result in the
“heya” message appearing. Pressing “a” will result in the “fallback”
message appearing. “j” is not triggered.

By pressing Shift+CapsLock you switch to the next group (xkb group 2, ua
layout). Pressing “a” will result in the “fallback overwritten in group
2 only” message, pressing “n” will still result in “heya”. “j” is not
triggered.

In the next group (xkb group 3, ru layout), pressing “a” will result in
the “fallback” message again, pressing “n” will result in “heya”,
“j” is not triggered.

In the last group (xkb group 4, de_neo layout), pressing “a” will still
result in “fallback”, pressing “n” will result in “heya”, pressing “j”
will result in “heya from group 4”.

Pressing shift+n results in “explicit shift binding”, pressing shift+r
results in “implicit shift binding”. This ensures that keysym
translation falls back to looking at non-shift keys (“r” can be used
instead of ”R”) and that the order of keybindings doesn’t play a role
(“bindsym n” does not override “bindsym shift+n”, even though it’s
specified earlier in the config).

The fallback behavior ensures use-cases such as ticket #1775 are still
covered.

Only binding keys when the X server is in the corresponding XKB group
ensures use-cases such as ticket #585 are still covered.
2015-08-26 09:56:42 +02:00
Michael Stapelberg
1a9a9cc68d Revert "Check if output is disabled in handle_output()"
This reverts commit e71c304444.

It turns out that several users have workflows in which they turn off
their monitors without using e.g. `xrandr --output DP-1 --off`. The
result is that the monitors are disconnected, but not disabled.

With commit e71c304444, i3 started to see
these two states as one and the same state, but that causes more harm
than it does good. For example, for some users with only one monitor, i3
would just exit when these users turned off their monitor.

related to #1858, #1839

fixes #1845
2015-08-25 20:09:56 +02:00
Michael Stapelberg
f1bb9524ca Merge pull request #1864 from Airblader/feature-1861-class-instance
Added '%class' and '%instance' as placeholders for the title_format
2015-08-25 19:29:17 +02:00
Ingo Bürk
2938fc0ab1 Added '%class' and '%instance' as placeholders for the title_format directive.
relates to #1861
2015-08-25 19:22:05 +02:00
Michael Stapelberg
3d8b7e32e5 Merge pull request #1863 from Airblader/feature-tray-output-config
Add 'tray_output primary' to the default config
2015-08-25 19:09:37 +02:00
Ingo Bürk
e2e7b70d00 Add 'tray_output primary' to the default config 2015-08-25 18:56:05 +02:00
Michael Stapelberg
1784906d6d docs/userguide: document behavior of tray_output with multiple bars
fixes #1855
2015-08-25 09:23:41 +02:00
Michael Stapelberg
3f259d0e83 docs/debugging: make it clearer that you need to reload i3 2015-08-24 20:50:18 +02:00
Michael Stapelberg
c95d6e328e Merge pull request #1853 from shdown/issue-1852
i3-msg: strdup getenv() result before freeing
2015-08-20 22:29:24 +02:00
shdown
f8b0ac2bff i3-msg: strdup getenv() result before freeing
Fixes #1852.
2015-08-20 23:07:41 +03:00
Michael Stapelberg
180a8c8cea Merge pull request #1850 from Airblader/feature-docs-8
[docs] Move client.background to the list of colorclasses
2015-08-18 09:51:34 +02:00
Ingo Bürk
39fbb2c5dd Add client.background to the list of all available colorclasses rather than mentioning it as something special afterwards. 2015-08-18 00:05:06 +02:00
Michael Stapelberg
3755f6e76e Merge pull request #1838 from obfusk/rm-useless-get_first_output-call
remove useless get_first_output() call
2015-08-10 19:19:24 +02:00
Michael Stapelberg
45e2375ccc Merge pull request #1837 from obfusk/fix-branch-info
hacking-howto: re-word branches info
2015-08-10 19:18:43 +02:00
Felix C. Stegerman
12d35cc2bc remove useless get_first_output() call 2015-08-10 17:51:09 +02:00
Felix C. Stegerman
c827b5cb47 hacking-howto: re-word branches info
fixes #1836
2015-08-10 17:31:28 +02:00
Michael Stapelberg
d3608bb6eb userguide: explain i3-config-wizard’s behavior
fixes #1782
2015-08-07 08:41:39 +02:00
Michael Stapelberg
f76a2fdf68 layout restore: remove remaining criteria when swallowing window
fixes #1817
2015-08-06 21:35:34 +02:00
Michael Stapelberg
0fb784f5cb Translate bindsym bindings upon ISO_Next_Group
With commit c738b2e454 we changed i3 so
that the default keybindings can be used when ISO_Next_Group is enabled,
but bindings which explicitly use Mode_switch have precedence. This
behavior required the use of bindcode instead of bindsym.

With this commit, when switching from group 1 to group 2 using
ISO_Next_Group, i3 will re-translate all keybindings (looking at column
2/3, regardless of whether the keybinding itself specifies Mode_switch)
and re-grab them.

That way, the keybinding “bindsym $mod+x nop foo” will work when
pressing $mod+x without Mode_switch and when pressing the corresponding
$mod+x (different key) with Mode_switch. A binding such as “bindsym
Mode_switch+$mod+x nop bar” will still have precedence.

The intention here is to make bindsym keybindings work well with dual
keyboard layouts (such as {dvorak, us} or {us, ru}), so that users can
switch between groups and still have their (logical) keybindings behave
the same way.

fixes #1775
2015-08-06 09:32:22 +02:00
Michael Stapelberg
fed05ef876 clang-format src/load_layout.c 2015-08-05 22:55:07 +02:00
Michael Stapelberg
9c38aeff0a Merge pull request #1833 from FauxFaux/next
generate parser enums stably: additionally sort on name
2015-08-05 22:45:37 +02:00
Michael Stapelberg
6d022e6dc9 i3-save-tree: retain “rect” for floating_cons 2015-08-05 22:43:18 +02:00
Michael Stapelberg
57438d270d append_layout: load floating containers correctly
fixes #1739
fixes #1271
2015-08-05 22:40:58 +02:00
Chris West (Faux)
e31896be0e generate parser enums stably: additionally sort on name 2015-08-05 21:23:51 +01:00
Michael Stapelberg
419b73be9e Merge pull request #1816 from tcreech/tcreech-for-illumos
Changes for compiling i3 on Illumos
2015-08-04 00:10:06 -07:00
Michael Stapelberg
fdfe408159 Merge pull request #1789 from shdown/next
Use safe wrappers wherever possible
2015-08-03 10:49:15 -07:00
shdown
ad9ecd52fa Use safe wrappers inside "#if 0" too 2015-08-03 12:51:55 +03:00
shdown
7ef3fdec00 .travis.yml: add a wrapped functions grepper script 2015-08-03 12:51:39 +03:00
shdown
fa4f1c5b0f config_parser: don't use sizeof(char) 2015-08-03 12:51:20 +03:00
shdown
c85d16faa4 Use safe wrappers wherever possible 2015-08-03 12:50:50 +03:00
shdown
bc52fae15c libi3: change scalloc() signature to match calloc() 2015-08-03 12:50:13 +03:00
Michael Stapelberg
05fb909636 Merge pull request #1712 from Airblader/feature-next-wm-size-hints-adopted
[Adopted] Use WM_SIZE_HINTS when available to set the geometry of floating windows
2015-08-02 23:52:10 -07:00
Michael Stapelberg
21d4b2319f Properly clear the urgency hint when set by i3.
fixes #1825
2015-08-02 20:50:14 +02:00
Michael Stapelberg
03799dd851 Merge pull request #1822 from acrisci/feature/docs-contributing-formatting
docs: improve formatting for CONTRIBUTING
2015-08-02 09:14:00 -07:00
Tony Crisci
69f7ad91aa docs: improve formatting for CONTRIBUTING 2015-08-01 14:50:55 -04:00
Michael Stapelberg
cf199143d9 Merge pull request #1821 from acrisci/feature/dont-log-motion-notify
Don't log motion notify
2015-07-31 00:41:35 -07:00
Tony Crisci
0107d35508 Don't log motion notify
Do not log an XCB_MOTION_NOTIFY event in handlers.c because this
clutters the log.

Only log in the motion notify handler if something important happens.
2015-07-30 22:40:38 -04:00
Michael Stapelberg
ad826f06da release.sh: pull website repository before 2015-07-30 22:45:23 +02:00
Michael Stapelberg
5ee679c514 release.sh: the mailing list part is done automatically 2015-07-30 22:43:34 +02:00
Michael Stapelberg
abb24a7391 Update debian/changelog 2015-07-30 22:31:06 +02:00
Michael Stapelberg
a4ffb23d20 Merge branch 'release-4.10.3' 2015-07-30 22:27:15 +02:00
Michael Stapelberg
2bde6f080e Merge branch 'master' into next 2015-07-30 22:27:15 +02:00
Michael Stapelberg
3cc377166f release i3 4.10.3 2015-07-30 22:26:58 +02:00
Michael Stapelberg
8c116e228b release.sh: replace version in _docs/debugging at the right time 2015-07-30 22:26:45 +02:00
Michael Stapelberg
c493cde96e release.sh: bugfix: take docs from tmpdir, not startdir 2015-07-30 22:21:48 +02:00
Michael Stapelberg
5a20394092 release.sh: commit modified debian/changelog
Otherwise, we cannot switch branches.
2015-07-30 22:16:01 +02:00
Michael Stapelberg
e362c3cf30 release.sh: 4.10.3 release 2015-07-30 22:07:51 +02:00
Michael Stapelberg
f87a78e1a9 release.sh: tell git to prefer “next” when merging 2015-07-30 22:07:13 +02:00
shdown
4446c4d890 i3bar: fix freeing static strings
name and color fields of blocks are freed in clear_statusline, so they
need to be strdup'ed.
2015-07-30 21:42:44 +02:00
Theo Buehler
c0f685e7bc mkdirp: do not throw an error if directory exists
If I restart i3 4.10.2 twice, e.g. with

$ i3-msg restart; sleep 3; i3-msg restart

the second time I get the following two errors:

05/22/15 10:46:03 - ERROR: mkdir(/tmp/i3-theo.toAK7N) failed: File exists
05/22/15 10:46:03 - ERROR: Could not create "/tmp/i3-theo.toAK7N" for storing the restart layout, layout will be lost.

The first one is from mkdirp() in src/ipc.c and the second one is from
store_restart_layout() in src/util.c.

Notice that I do _not_ get the ``open()'' or ``Could not write restart layout to
...'' error messages, so the layout writing code after line 260 in
store_restart_layout() succeeded and the layout isn't actually lost.  Thus,
these error messages are a bit misleading, especially the second one (which is
triggered by the failure of mkdirp()).

POSIX says about `mkdir -p':

``Each dir operand that names an existing directory shall be ignored without
error.''

Therefore, I suggest the following simple patch that makes mkdirp() succeed if
the named file exists and actually is a directory.  This silences the second
error as well.
2015-07-30 21:41:24 +02:00
Deiz
fbcb227537 Move mkdirp into libi3 2015-07-30 21:41:20 +02:00
Tony Crisci
7c2842eae4 Detect base 16 in cmd criteria
Try to detect base 16 numbers given to `con_id` and `id` for command criteria
by setting the base of strtol to 0. This should also detect octal.

This is necessary because mouse bindings now may be serialized as hex as of
5c32de4.
2015-07-30 21:38:24 +02:00
Michael Stapelberg
ee66a8bcde userguide: quoted strings need to be used, escaping isn’t possible
fixes #1678
2015-07-30 21:37:04 +02:00
Deiz
d03b96b369 Initialize workspace rect to the output's upon creation
The comment immediately following implied that this was the intended
behaviour. Not doing so means that compound commands that both move a
window to a new workspace as well as do something that depends on the
workspace's geometry (e.g. 'move position center' or 'floating enable'
on a tiled window) would use the workspace's calloc'd 0x0+0x0 geometry.
2015-07-30 21:36:04 +02:00
Tony Crisci
e71c304444 Check if output is disabled in handle_output()
Check if the `connection` of the randr output is
XCB_RANDR_CONNECTION_DISONNECTED and disable the output if it is.

This fixes an issue where the output would not be disabled if the output was
physically unplugged from the machine.
2015-07-30 21:35:42 +02:00
Tony Crisci
a0268a38d3 Ignore InputHint when not in WM_HINTS
When InputHint is not in WM_HINTS (i.e., the flag is not set), treat the window
as if the InputHint was set (the default behavior). This means that i3 will
focus the window when it becomes managed.

fixes #1676
2015-07-30 21:35:12 +02:00
Tony Crisci
c1b6c94621 Bugfix: serialize con_id with %p in run_binding()
%p is equivalent to either %x or %lx, depending on the pointer size of the
platform. Before this commit, we always used %d, which has the same behavior
on Linux, but is not automatically expanded to %ld on e.g. FreeBSD.

fixes #1661
2015-07-30 21:34:43 +02:00
Tim Creech
f41018b33e Changes for compiling on Illumos
* common.mk: use -lsocket -liconv -lgen on Illumos/Solaris
* mkdirp: return int and accept a mode argument
* use i3's mkdirp on everything except Illumos
2015-07-30 07:44:10 -04:00
Michael Stapelberg
3d16e48a4f Merge pull request #1818 from simonnagl/terminology
Added terminology to i3-sensible-terminal
2015-07-30 00:05:08 -07:00
Simon Nagl
49bd061d9d Added terminology to i3-sensible-terminal 2015-07-28 23:00:18 +02:00
Michael Stapelberg
c8b4303eff Make line continuation userguide entry more verbose. 2015-07-27 22:33:03 +02:00
Michael Stapelberg
86cc7d9a21 Improve error message for clarity. 2015-07-27 22:32:55 +02:00
Michael Stapelberg
691d6714fc Merge pull request #1797 from hwangcc23/config-file-line-continuation
Support config file line continuation
2015-07-27 13:27:03 -07:00
hwangcc23
fc1477dfb5 Support config file line continuation
1. Allow to use the line continuation, which is indicated by \ before the new line character, in config files.
2. Add a new testcase "247-config-line-continuation.t" for
    a). testing line continuation
    b). making sure string escaping still works
    c). testing line continuations within a string
    b). testing line continuations with too many lines
2015-07-26 07:54:06 +08:00
Michael Stapelberg
e89f391589 Merge pull request #1805 from lasers/next
Added missing bar section for tray_output primary
2015-07-19 22:48:04 +02:00
Chris
b9e1973948 Added missing bar section for tray_output primary 2015-07-18 18:50:02 -05:00
Michael Stapelberg
9f107c8b4d add link to a rust i3 library 2015-07-19 00:23:39 +02:00
Michael Stapelberg
9d353fa46b Merge pull request #1795 from PopeLevi/patch-1
Added 'pg' to i3-sensible-pager
2015-07-14 09:00:30 -04:00
PopeLevi
2b3aa559c0 Added 'pg' to i3-sensible-pager
Added 'pg' to the list of pagers in i3-sensible-pager
2015-07-14 20:03:55 +12:00
Michael Stapelberg
ccfd783bf2 Merge pull request #1792 from PopeLevi/patch-1
Added mate-terminal to i3-sensible-terminal
2015-07-12 07:24:33 -07:00
PopeLevi
eea580b7e8 Added mate-terminal to i3-sensible-terminal
Added the 'mate-terminal' terminal emulator to the list of terminals emulators in i3-sensible-terminal
2015-07-13 00:13:55 +12:00
Michael Stapelberg
8739ed9890 Merge pull request #1786 from hwangcc23/pr-for-issue-#1785
Display which config is used in --more_version
2015-07-10 08:29:48 -07:00
hwangcc23
44367572c9 Display which config is used in --more_version
In the output of i3 --moreversion,
display the path of the used config and its last modified time.
2015-07-10 22:54:25 +08:00
Michael Stapelberg
e7942153c5 Merge pull request #1788 from acrisci/feature/docs-contributing-finding-issues
docs: add section on finding issues to CONTRIBUTING
2015-07-09 22:03:27 -07:00
Tony Crisci
7287642696 docs: add section on finding issues to CONTRIBUTING 2015-07-10 00:04:20 -04:00
Michael Stapelberg
b30d87ea81 Merge pull request #1778 from Airblader/bug-1777
Send custom command if workspace buttons are disabled
2015-07-01 06:05:56 -07:00
Ingo Bürk
b9bacdf464 Send custom-defined command upon click on the non-statusline part of i3bar even if workspace_buttons is set to 'no'.
fixes #1777
2015-07-01 14:48:06 +02:00
Michael Stapelberg
7e7f00428f Merge pull request #1776 from Airblader/bug-1774
Return non-match instead of asserting
2015-07-01 03:00:37 -07:00
Ingo Bürk
c073de8d26 Remove asserts and return non-match instead if the container or its workspace cannot be found.
This can cause an issue if used in combination with for_window and i3bar during startup of i3 otherwise.

fixes #1774
2015-07-01 11:47:55 +02:00
Michael Stapelberg
6be1b28813 Merge pull request #1771 from Airblader/feature-1769
Implement new criterion 'workspace'.
2015-06-30 13:52:54 -07:00
Michael Stapelberg
7c1abc9ab0 Merge pull request #1772 from Airblader/feature-fix-newline
Added missing newlines in log statements.
2015-06-30 13:52:48 -07:00
Ingo Bürk
be406d036d Implement new criterion 'workspace'.
If the match expression is a plain number (e.g., '99'), the number of a workspace will be compared strictly. Otherwise, the match expression is taken as a regular expression and compared against the workspace's name.
This allows all of the following:

for_window [workspace=5] ...
for_window [workspace="5:foo"] ...
for_window [workspace="foo"] ...

fixes #1769
2015-06-30 20:53:52 +02:00
Michael Stapelberg
f76838794d Merge pull request #1768 from hwangcc23/atoi2strtol
Fix TODO in src/bindings.c
2015-06-30 11:50:28 -07:00
Ingo Bürk
94a09b3cac Added missing newlines in log statements. 2015-06-30 20:48:35 +02:00
hwangcc23
478dc5dc38 Fix TODO by replacing atoi by strtol
Fix TODO in bindings.c.
There is no problem to use atoi here since either keycode 0 or button0 is invalid.
But strtol is more flexible and is recommanded for conversion.
2015-06-30 22:22:56 +08:00
Michael Stapelberg
8df7e4ecb9 Merge pull request #1747 from Airblader/feature-1723
Implement "title_format"
2015-06-29 00:24:59 -07:00
Ingo Bürk
cf11fb5574 Added documentation for "title_format". 2015-06-29 09:19:50 +02:00
Michael Stapelberg
a853a8ef75 Merge pull request #1745 from mh21/configurable-tray-padding
Configurable tray padding.
2015-06-29 00:19:44 -07:00
Ingo Bürk
5a8d66a1d5 Parse the title_format and display the customized window title if a format was set.
The format string set with "title_format" can contain the placeholder "%title" which will be replaced with the actual window title.

By not overwriting window->name itself, we make sure that assignment matching still works as expected.

fixes #1723
2015-06-29 09:13:31 +02:00
Ingo Bürk
55e8d06ee4 Added command directive 'title_format'.
This directive will be used to customize the window title.
2015-06-29 09:13:31 +02:00
Michael Stapelberg
9ad9af6dee add util-{wm,keysyms} explicitly, remove obsolete xlib, update lkgv
fixes #1764
2015-06-28 21:27:52 +02:00
Michael Hofmann
bad4203755 Configurable tray padding. 2015-06-28 00:14:37 +02:00
Michael Stapelberg
dfe2c9c310 debian: stacklimit.png got deleted, so remove it from i3-wm.docs 2015-06-21 13:24:35 +02:00
Michael Stapelberg
696d844ffa Merge pull request #1697 from Airblader/feature-1695
Extend mouse commands on i3bar
2015-06-18 20:50:56 +02:00
Ingo Bürk
618b6744d5 Added testcase for #1695. 2015-06-18 19:28:24 +02:00
Ingo Bürk
9eb255d5fa Ensure format of dumped bindings for i3bar is compatible with i3 bindings.
fixes #1695
2015-06-18 19:28:24 +02:00
Ingo Bürk
f0ac9629b9 Adapted userguide for new i3bar 'bindsym' command. 2015-06-18 19:28:24 +02:00
Ingo Bürk
715fbf2d80 Read 'bindsym' rather than the old 'wheel_up_cmd' and 'wheel_down_cmd' directives in i3bar and call the command if specified.
The old directives are still read for transitional support which can be removed in a future version.
2015-06-18 19:28:20 +02:00
Michael Stapelberg
4d25d6a5a6 Merge pull request #1752 from Airblader/feature-test-cleanups-1
Silence "masks earlier declaration in same scope" warnings
2015-06-13 14:39:19 +02:00
Michael Stapelberg
34183b97fd Merge pull request #1744 from Airblader/feature-docs-7
Documentation Improvements
2015-06-13 12:39:59 +02:00
Ingo Bürk
73a84886d1 Silence "masks earlier declaration in same scope" warnings when executing tests. 2015-06-12 18:19:43 +02:00
Ingo Bürk
9940571069 Fix documentation for border styles. 2015-06-12 17:54:54 +02:00
Michael Stapelberg
801b795b45 userguide: document signal handling caveat affecting at least dash(1)
fixes #1741
2015-06-12 09:52:02 +02:00
Ingo Bürk
9571200baa Remove dead documentation for non-existing feature "stack-limit". 2015-06-09 23:13:15 +02:00
Michael Stapelberg
25da435c3b Merge pull request #1743 from Airblader/bug-1742
Remove redundant and broken check for '\0'.
2015-06-09 23:12:17 +02:00
Ingo Bürk
52c72e9007 Remove redundant and broken check for '\0'.
fixes #1742
2015-06-09 22:14:56 +02:00
Michael Stapelberg
560d9a25d8 Merge pull request #1731 from Airblader/feature-indicator-pango
Allow pango markup for the binding indicator.
2015-06-07 20:46:16 +02:00
Ingo Bürk
2b6f76852c Implement i3's logic for maintaining a list of 'bindsym' directives and passing it to i3bar through the IPC. 2015-06-05 12:30:53 +02:00
Ingo Bürk
ab12d3fc74 Add new command skeleton 'bindsym <button> <command>' for 'bar' block. 2015-06-05 12:30:53 +02:00
Michael Stapelberg
1d4b5863a5 Merge pull request #1737 from Airblader/feature-xdotool-on-travis
Install xdotool to run tests requiring it on Travis.
2015-06-05 12:16:47 +02:00
Ingo Bürk
f262445de3 Install xdotool to run tests requiring it on Travis. 2015-06-04 17:05:53 +02:00
Michael Stapelberg
7b8745f56c Merge pull request #1735 from shdown/strdup
i3bar: fix freeing static strings
2015-06-02 22:25:27 +02:00
shdown
fe006f0f6a i3bar: fix freeing static strings
name and color fields of blocks are freed in clear_statusline, so they
need to be strdup'ed.
2015-06-02 23:29:24 +03:00
Michael Stapelberg
6b505d8aca Merge pull request #1733 from Airblader/feature-1732
Added a separate color directive for the binding mode indicator
2015-06-02 08:35:14 +02:00
Michael Stapelberg
27ec594c71 Merge pull request #1734 from Airblader/bug-1538-1
Fix warning about potentially uninitialized variable.
2015-06-02 08:33:41 +02:00
Ingo Bürk
dd2e10868c Fix warning about potentially uninitialized variable. 2015-06-01 17:10:10 +02:00
Ingo Bürk
0a0f59038a Use the introduced binding_mode_* colors to draw the binding mode.
fixes #1732
2015-06-01 16:57:17 +02:00
Ingo Bürk
b118b588ee Added the 'binding_mode' color directive to the documentation. 2015-06-01 16:57:13 +02:00
Ingo Bürk
9b691bcca2 Introduce a config directive 'binding_mode' in the 'bar' config, pass it through the IPC and parse it in i3bar. 2015-05-31 16:49:09 +02:00
Michael Stapelberg
9a117767e8 Merge pull request #1725 from Airblader/bug-1056
Allow window decoration to change focus
2015-05-31 16:13:51 +02:00
Ingo Bürk
36f5a37777 Allow pango markup for the binding indicator. 2015-05-31 12:35:47 +02:00
Ingo Bürk
27e50b827c Use XCB_NONE instead of hard-coded 0. 2015-05-29 23:49:42 +02:00
Ingo Bürk
3c11f27201 Allow hovering over the window decoration to change the focus if the parent container is split horizontally or vertically.
fixes #1056
2015-05-29 23:49:37 +02:00
Ingo Bürk
1454975981 Added a testcases for #1056 to test whether hovering over a window decoration causes the corresponding window to be
focused.
2015-05-29 23:49:22 +02:00
Michael Stapelberg
8029ff09d7 Merge pull request #1722 from Airblader/bug-1701
Grab all buttons when managing a window
2015-05-27 19:27:56 +02:00
Ingo Bürk
b22a9ce617 Improve logging of button events. 2015-05-26 16:57:25 +02:00
Ingo Bürk
00c2fe4b69 Grab all buttons when managing a window to also allow 'bindsym --whole-window button4 …' to work correctly.
fixes #1701
2015-05-26 16:56:00 +02:00
Michael Stapelberg
a4fab76772 docs/ipc: add veelenga/i3ipc-ruby 2015-05-25 01:05:08 +02:00
Michael Stapelberg
651f3150d4 Merge pull request #1714 from Airblader/feature-docs-6
Fixed syntax for tray_output in userguide
2015-05-25 00:51:41 +02:00
Michael Stapelberg
0d0bde6b1e Merge pull request #1716 from botovq/next
mkdirp: do not throw an error if directory exists
2015-05-23 13:33:33 +02:00
Theo Buehler
ea6af13127 mkdirp: do not throw an error if directory exists
If I restart i3 4.10.2 twice, e.g. with

$ i3-msg restart; sleep 3; i3-msg restart

the second time I get the following two errors:

05/22/15 10:46:03 - ERROR: mkdir(/tmp/i3-theo.toAK7N) failed: File exists
05/22/15 10:46:03 - ERROR: Could not create "/tmp/i3-theo.toAK7N" for storing the restart layout, layout will be lost.

The first one is from mkdirp() in src/ipc.c and the second one is from
store_restart_layout() in src/util.c.

Notice that I do _not_ get the ``open()'' or ``Could not write restart layout to
...'' error messages, so the layout writing code after line 260 in
store_restart_layout() succeeded and the layout isn't actually lost.  Thus,
these error messages are a bit misleading, especially the second one (which is
triggered by the failure of mkdirp()).

POSIX says about `mkdir -p':

``Each dir operand that names an existing directory shall be ignored without
error.''

Therefore, I suggest the following simple patch that makes mkdirp() succeed if
the named file exists and actually is a directory.  This silences the second
error as well.
2015-05-23 13:12:18 +02:00
Ingo Bürk
e2d5ebce1a Fixed syntax for tray_output in userguide. 2015-05-22 22:07:43 -04:00
Andrzej Pronobis
d1262f2b6a Use WM_SIZE_HINTS whenever it's provided to set the geometry of floating windows. 2015-05-19 13:44:48 -04:00
Michael Stapelberg
43386c51d4 Merge pull request #1706 from Airblader/feature-docs-5
Made syntax of syntax descriptions consistent:
2015-05-18 21:46:47 +02:00
Ingo Bürk
94a46a1e35 Made syntax of syntax descriptions consistent:
* <xyz> denotes that some string must be used which is not a fixed value (e.g., a command), but a variable string (text, a number, ...)
* [xyz] denotes that the parameter is optional
* abc|xyz denotes that either abc or xyz must be given
2015-05-18 11:18:00 -04:00
Michael Stapelberg
da064cc08f Merge pull request #1698 from Airblader/feature-1696
Added 'move position mouse'
2015-05-17 15:02:50 +02:00
Ingo Bürk
8801de2399 Protect "move position mouse" against a NULL access.
This could happen if two outputs are set up to have a gap in between them and the mouse cursor
being in said gap when the command is triggered.
2015-05-14 13:07:56 -04:00
Ingo Bürk
fbbe9cf2e8 Added testcases for 'move position mouse' 2015-05-14 13:04:58 -04:00
Michael Stapelberg
38ab59f17b Merge pull request #1704 from acrisci/bug/cmd-detect-base-16
Detect base 16 in cmd criteria
2015-05-13 08:35:06 +02:00
Ingo Bürk
d2cfe38c04 Added 'move position mouse' command to the userguide. 2015-05-12 17:47:18 -04:00
Ingo Bürk
4a585748a4 Implemented new command 'move [window|container] [to] position mouse|cursor|pointer
fixes #1696
2015-05-12 17:46:06 -04:00
Tony Crisci
a74662052a Detect base 16 in cmd criteria
Try to detect base 16 numbers given to `con_id` and `id` for command criteria
by setting the base of strtol to 0. This should also detect octal.

This is necessary because mouse bindings now may be serialized as hex as of
5c32de4.
2015-05-12 17:04:01 -04:00
Michael Stapelberg
79e7e69939 Merge pull request #1700 from mh21/tray-icon-size-cleanup
Tray icon size cleanup.
2015-05-12 22:44:08 +02:00
Michael Stapelberg
be2634c91f Merge pull request #1693 from mh21/wm-class-garbage-no-copy
Don't duplicate property value on class change.
2015-05-06 23:55:47 -07:00
Michael Hofmann
f2542fc413 No memcpy on class change. 2015-05-06 16:33:15 +02:00
Michael Hofmann
0319bda1d4 Introduce sstrndup wrapper. 2015-05-06 16:33:15 +02:00
Michael Stapelberg
66a1fa7d46 Merge pull request #1638 from hwangcc23/fix-1489
Add a timeout: delay_exit_on_zero_displays
2015-05-05 00:43:43 -07:00
Michael Stapelberg
95f3f7f8c9 userguide: quoted strings need to be used, escaping isn’t possible
fixes #1678
2015-05-03 18:57:05 +02:00
Michael Stapelberg
c70d71c113 Merge pull request #1689 from Airblader/feature-docs-4
Debugging docs – minimal setup, small log file, closed source software
2015-05-03 02:28:45 -07:00
Ingo Bürk
99e22cdf19 Added a section to the debugging docs:
* Motivate users to come up with clear and minimal instructions on how to reproduce a problem before submitting an issue.
* Encourage users to restart i3 before reproducing the problem so that the log file can stay small and noise-free.
* Mention the non-support of closed source software.
2015-05-03 11:24:14 +02:00
Michael Stapelberg
1aa42794ed Merge pull request #1685 from Deiz/fix-new-workspace-float
Initialize workspace rect to the output's upon creation
2015-05-02 08:24:54 -07:00
Michael Hofmann
27c060b279 Tray icon size cleanup.
- icon_size instead of font.height
- consistent spacing with tray_spacing_px
2015-04-30 11:45:38 +02:00
Deiz
f0f906a52e Initialize workspace rect to the output's upon creation
The comment immediately following implied that this was the intended
behaviour. Not doing so means that compound commands that both move a
window to a new workspace as well as do something that depends on the
workspace's geometry (e.g. 'move position center' or 'floating enable'
on a tiled window) would use the workspace's calloc'd 0x0+0x0 geometry.
2015-04-28 15:09:58 -04:00
Michael Stapelberg
37bee99538 Merge pull request #1680 from acrisci/bug/randr-disabled-outputs
Check if output is disabled in handle_output()
2015-04-26 23:44:03 +02:00
Michael Stapelberg
5dda3bc2ae Merge pull request #1657 from Georgiy-Tugai/fix-flickering-shortened
i3bar: fix flickering shortened status bar on other output(s)
2015-04-26 23:38:27 +02:00
Michael Stapelberg
b3e8facb59 Merge pull request #1683 from Airblader/bug-click-detection
Only detect clicks within the statusline width.
2015-04-26 23:36:28 +02:00
Michael Stapelberg
f894e2aed6 Merge pull request #1688 from Airblader/feature-1687
Added a note to the debugging docs about sensitive data.
2015-04-26 23:31:12 +02:00
Ingo Bürk
19b2f8f0d5 Added a note to the debugging docs about sensitive data.
resolves #1687
2015-04-26 22:57:38 +02:00
Michael Stapelberg
a4f0ed62e5 Merge pull request #1684 from acrisci/bug/focus-without-input-hint
Ignore InputHint when not in WM_HINTS
2015-04-26 12:15:38 +02:00
Michael Stapelberg
00cf467114 Merge pull request #1672 from acrisci/bug/fix-freebsd-bindmouse
bugfix: serialize con_id with %p in run_binding()
2015-04-26 12:13:43 +02:00
Tony Crisci
6cbe349774 Ignore InputHint when not in WM_HINTS
When InputHint is not in WM_HINTS (i.e., the flag is not set), treat the window
as if the InputHint was set (the default behavior). This means that i3 will
focus the window when it becomes managed.

fixes #1676
2015-04-25 22:43:46 -04:00
Tony Crisci
5c32de43c0 Bugfix: serialize con_id with %p in run_binding()
%p is equivalent to either %x or %lx, depending on the pointer size of the
platform. Before this commit, we always used %d, which has the same behavior
on Linux, but is not automatically expanded to %ld on e.g. FreeBSD.

fixes #1661
2015-04-25 20:05:55 -04:00
Ingo Bürk
bbc66e45f7 Only detect clicks within the statusline width.
If the user clicks on the very top of i3bar above a tray icon, i3bar might
mistakenly trigger the click event for the last status block. This is due to
the fact that the click detection considers the separator width of the block
even though on the last block this is ignored, incorrectly spanning the block's
width partially (or entirely) across the tray area.
2015-04-26 00:32:18 +02:00
Michael Stapelberg
57ddd00814 userguide: add a note to both “exec”s about semicolon and comma
fixes #1678
2015-04-24 18:46:42 +02:00
Tony Crisci
14e95e765e Check if output is disabled in handle_output()
Check if the `connection` of the randr output is
XCB_RANDR_CONNECTION_DISONNECTED and disable the output if it is.

This fixes an issue where the output would not be disabled if the output was
physically unplugged from the machine.
2015-04-23 18:21:15 -04:00
Michael Stapelberg
79d54fc3ae Merge pull request #1664 from Airblader/feature-wm-state-hidden-2
Set _NET_WM_STATE_HIDDEN in tabbed/stacked containers
2015-04-21 10:09:51 +02:00
Ingo Bürk
cd0cf9d651 Added testcases for setting _NET_WM_STATE_HIDDEN on unfocused containers in tabbed/stacked containers. 2015-04-21 09:14:22 +02:00
Ingo Bürk
ffe25d9e43 Set the _NET_WM_STATE_HIDDEN atom on windows that are currently not visible due to being in the non-focused tab of a stacked or tabbed container.
fixes #1648
2015-04-21 09:14:22 +02:00
Ingo Bürk
d12482e5fd Added 'con_is_hidden' to check whether a given container is visible to the user assuming its workspace is visible.
This is useful for determining whether we want to set the _NET_WM_STATE_HIDDEN atom on the window.
2015-04-21 09:13:48 +02:00
Michael Stapelberg
67ec2333ee Merge pull request #1665 from Airblader/feature-1658
Added criterion 'window_type'
2015-04-21 08:42:16 +02:00
Michael Stapelberg
d9ca3e4274 Merge pull request #1669 from Airblader/feature-docs-2
Documentation Improvement – Debug i3bar
2015-04-21 08:32:13 +02:00
Michael Stapelberg
b1974a469f Merge pull request #1636 from Deiz/update-notices
Update copyright notices and get rid of ranges
2015-04-21 08:31:40 +02:00
Michael Stapelberg
14cf2e5a27 Merge pull request #1666 from Xarthisius/undef_FALSE
Fix ‘FALSE’ undeclared (first use in this function) when i3 is built w/o PANGO
2015-04-21 08:29:55 +02:00
Georgiy Tugai
de866c2fea i3bar: fix flickering shortened status bar on other output(s) 2015-04-21 12:28:43 +09:30
Kacper Kowalik (Xarthisius)
30b6584de1 Fix ‘FALSE’ undeclared (first use in this function) when i3 is built without PANGO support 2015-04-20 16:51:58 -05:00
Deiz
884214f14f Update copyright notices and get rid of ranges
The script used to make these changes can be found at:

   https://gist.github.com/Deiz/32322020f76d23e2bf8f
2015-04-20 17:50:21 -04:00
Michael Stapelberg
ab46e9d23b Merge pull request #1674 from Airblader/feature-docs-3
Adapt release.sh to update the latest version in the debugging docs.
2015-04-20 23:29:24 +02:00
Ingo Bürk
e4a86d4aef Cleanup: delete comments that were accidentally copy-pasted and are incorrect for these test cases 2015-04-20 19:27:43 +02:00
Ingo Bürk
09d1deda7f Small cleanups:
* Implement criterion specs just like it is done in the spec for the config
* Declare variables in test case early so the 'my' keyword can be dropped in the actual test cases
2015-04-20 19:27:43 +02:00
Ingo Bürk
761a8713df Added testcase for 'window_type' criterion when used as a command. 2015-04-20 19:27:43 +02:00
Ingo Bürk
18c45a7f09 Added testcase for changing _NET_WM_WINDOW_TYPE after the window is already managed. 2015-04-20 19:27:43 +02:00
Ingo Bürk
1f472b454c Handle changes to _NET_WM_WINDOW_TYPE after the window has been managed. 2015-04-20 19:27:43 +02:00
Ingo Bürk
550c0ec318 Implement new criterion 'window_type = normal|dialog|utility|toolbar|splash|menu|dropdown_menu|popup_menu|tooltip'
fixes #1658
2015-04-20 19:27:39 +02:00
Ingo Bürk
f8a52f0862 Provide instructions on how to debug i3bar 2015-04-20 19:19:31 +02:00
Ingo Bürk
798e654af7 Adapt release.sh to update the latest version in the debugging docs. 2015-04-20 19:17:42 +02:00
Michael Stapelberg
191671c9b8 contributing: mention that we cannot support closed-source software 2015-04-19 21:11:22 +02:00
Michael Stapelberg
116294cc41 Merge pull request #1662 from Airblader/feature-move-to-mark
Allow moving windows to marks
2015-04-19 21:04:26 +02:00
Ingo Bürk
a59fe0d3d2 Added test case for transfer of urgency flag when moving a window to a mark. 2015-04-19 20:57:49 +02:00
Ingo Bürk
dc19ff9ec5 fix commands parser test 2015-04-19 20:57:49 +02:00
Ingo Bürk
fbebd3479b Added testcase for moving a window to a workspace holding the mark 2015-04-19 20:57:49 +02:00
Ingo Bürk
283b231290 Disallow moving a container to itself since this would crash i3. 2015-04-19 20:57:49 +02:00
Ingo Bürk
05e8caab17 Added testcases for 'move window|container to mark <str>'
fixes #1643
2015-04-19 20:57:49 +02:00
Ingo Bürk
94bbdc9159 Implement the command 'move container to mark <mark>' using 'con_move_to_mark'. 2015-04-19 20:57:49 +02:00
Ingo Bürk
475671ae2a Added 'con_move_to_mark' to move a container to the container holding a certain mark. 2015-04-19 20:57:49 +02:00
Ingo Bürk
9ab4216787 Extract a function from con_move_to_workpsace that deals with moving a container to some other container rather than being restricted to moving to a specific workspace. 2015-04-19 20:57:49 +02:00
Ingo Bürk
c4a84385d6 added function 'con_by_mark' to look up a con holding the given mark 2015-04-19 20:57:49 +02:00
Ingo Bürk
9613a0744d Added configuration directive for 'move [container|window] [to] mark <str>' 2015-04-19 20:57:44 +02:00
Michael Stapelberg
8a608ee63a Merge pull request #1632 from Deiz/binding-border
Add a --border flag to enable mouse binds to trigger on border click
2015-04-19 09:28:08 -07:00
Ingo Bürk
7e424b2d71 Added testcase for criterion 'window_type'. 2015-04-19 14:08:39 +02:00
Michael Stapelberg
7b68577901 Merge pull request #1651 from tanderson92/pkgconfig
Respect EXEC_PREFIX and a users' choice of PKG_CONFIG.
2015-04-16 00:34:01 -07:00
Michael Stapelberg
923a61ae37 release.sh: add missing -t parameter for sendmail 2015-04-16 09:22:01 +02:00
Michael Stapelberg
d05e9df0a1 release.sh: add missing commit step for debian changelog 2015-04-16 09:22:01 +02:00
Michael Stapelberg
e382a8bbbb release.sh: fix encoding and concatenating changelog 2015-04-16 09:22:00 +02:00
Michael Stapelberg
25afa30f87 release.sh: set up master branch for pushing the website 2015-04-16 09:22:00 +02:00
Michael Stapelberg
57c56b2999 release.sh: checkout correct branch before copying docs 2015-04-16 09:22:00 +02:00
Michael Stapelberg
d9f483e946 release.sh: 4.10.2 release 2015-04-16 09:22:00 +02:00
Michael Stapelberg
0492c50fbb debian: update changelog 2015-04-16 09:08:46 +02:00
Michael Stapelberg
c0dbc5dd77 Merge branch 'release-4.10.2' 2015-04-16 09:03:28 +02:00
Michael Stapelberg
9d65f59571 Merge branch 'master' into next 2015-04-16 09:03:28 +02:00
Michael Stapelberg
9557a0a5b2 release i3 4.10.2 2015-04-16 09:02:58 +02:00
Thomas Anderson
196e1d0971 Respect EXEC_PREFIX and a users' choice of PKG_CONFIG.
The Makefiles should put binaries in $(EXEC_PREFIX) and
architecture-independent files in $(PREFIX). Also a user may have a
prefixed- pkg-config, as in the case of cross compiling on Exherbo
Linux, so respect the well-accepted $(PKG_CONFIG) variable for this
purpose.
2015-04-12 17:59:30 -07:00
Michael Stapelberg
4958ca00ab Merge pull request #1654 from Deiz/complete-run-chdir
Allow complete-run.pl to be run from any directory
2015-04-12 10:46:54 -07:00
Deiz
e2e949f331 Allow complete-run.pl to be run from any directory 2015-04-12 13:21:20 -04:00
Michael Stapelberg
5e7339d8f0 Merge pull request #1641 from Deiz/fix-1640
Store Git commit identifier in its own object
2015-04-12 10:08:43 -07:00
Deiz
5a987cfd6b Rebuild version.o when version.c or LAST_VERSION change
$(TOPDIR)/LAST_VERSION is a cached copy of common.mk's I3_VERSION var,
updated only if the two differ.
2015-04-12 12:31:58 -04:00
Michael Stapelberg
b01dd1121e Merge pull request #1652 from Airblader/fix-1649
Removed comment on removal of legacy "default" layout.
2015-04-12 09:27:02 -07:00
Michael Stapelberg
b682843218 Merge pull request #1653 from nmikhailov/next
Bump testsuite dependencies versions
2015-04-12 09:26:32 -07:00
Nikita Mikhailov
2a4524a1e1 Bump testsuite dependencies versions 2015-04-11 21:24:01 +06:00
hwangcc
2c77d7ceed Add a timeout: delay_exit_on_zero_displays
Outputs may disappear momentarily and come back later.
To prevent i3 from exit when no output is available momentarily, add a timeout delay_exit_on_zero_displays.
2015-04-11 22:13:10 +08:00
Ingo Bürk
edda9306ed Removed comment on removal of legacy "default" layout.
closes #1649
2015-04-11 10:27:42 +02:00
Deiz
cd4bc2adf5 Store Git commit identifier in its own object
Fixes #1640
2015-04-06 18:28:40 -04:00
Michael Stapelberg
eb04a64067 Bugfix: Remove windows from the save set when unmapping.
fixes #1617
2015-04-06 15:43:52 +02:00
Ingo Bürk
40b9048102 Use a reasonable default sep_block_width if a separator_symbol is given 2015-04-06 15:43:47 +02:00
Michael Hofmann
483a51a2f2 Get workspace name when renaming current workspace.
- fixes #1607
2015-04-06 15:43:36 +02:00
Michael Hofmann
29e8167cda Cope with non-null-terminated x class properties.
- fixes #1605
2015-04-06 15:43:20 +02:00
Michael Stapelberg
1546891e6a Bugfix: Remove windows from the save set when unmapping.
fixes #1617
2015-04-06 15:40:12 +02:00
Michael Stapelberg
ee816aa53c Merge pull request #1634 from Airblader/feature-sep-symbol-default
Use a reasonable default sep_block_width if a separator_symbol is given
2015-04-04 09:08:28 -07:00
Ingo Bürk
a952ae74f4 Use a reasonable default sep_block_width if a separator_symbol is given 2015-04-03 22:54:59 +02:00
Deiz
547157d19b Add test cases for --border 2015-04-02 16:46:42 -04:00
Deiz
601043cbf3 Update userguide for --border 2015-04-02 16:43:54 -04:00
Deiz
ce48d5c5d7 Add a --border flag to enable mouse binds to trigger on border click 2015-04-02 16:24:05 -04:00
Michael Stapelberg
9eba4eecb7 Merge pull request #1631 from Airblader/bug-1629
Allow --whole-window right after 'bindsym' within binding modes
2015-04-02 13:15:28 -07:00
Ingo Bürk
42a666be3c Added testcases for --whole-window in a binding inside a mode (#1629) 2015-04-02 11:17:29 +02:00
Ingo Bürk
e3e13ade60 Allow --whole-window right after 'bindsym' within binding modes
fixes #1629
2015-04-02 11:11:55 +02:00
Michael Stapelberg
15d516f58c Merge pull request #1628 from acrisci/feature/complete-run-coverage
complete-run: add coverage report generation
2015-04-02 00:33:05 -07:00
Michael Stapelberg
92ffc78e19 Merge pull request #1630 from Deiz/consistent-mouse-actions
Make floating window mouse handling consistent with tiled windows
2015-04-02 00:09:13 -07:00
Michael Stapelberg
a36016b7e2 Merge pull request #1625 from Airblader/feature-docs
Documentation Improvements
2015-04-02 00:08:19 -07:00
Michael Stapelberg
9b671fca8d Merge pull request #1624 from Airblader/feature-1058
Position i3-input at window with input focus
2015-04-01 23:56:06 -07:00
Ingo Bürk
df0e24cd2d Clarify that more than one atom is handled by i3 and describe briefly in which way. 2015-04-02 08:53:40 +02:00
Ingo Bürk
5d8dfe0ec5 Update docs to clarify that split containers get a representation of their children in the decoration 2015-04-02 08:53:40 +02:00
Ingo Bürk
fec96c57bc Reworded the documentation slightly and fixed the link to correctly point to Github. 2015-04-02 08:53:40 +02:00
Ingo Bürk
37811b67b0 Update the definition of the workspace spec and describe it. 2015-04-02 08:53:40 +02:00
Ingo Bürk
f35b666631 Update documentation to state that the configuration file is read by the custom parser as well. 2015-04-02 08:53:40 +02:00
Deiz
bb95571516 Make floating window mouse handling consistent with tiled windows
It seems that this was the intended behaviour all along, according to
the comments.
2015-04-02 02:44:37 -04:00
Ingo Bürk
947c67a627 Position i3-input at window with input focus
This positions the i3-input window at the window holding the input focus' position, plus a small offset.

fixes #1058
2015-04-02 08:37:09 +02:00
Michael Stapelberg
d6f1e0c568 Merge pull request #1621 from Airblader/feature-1416
Added no_focus directive
2015-04-01 23:35:03 -07:00
Tony Crisci
c50ec2e4dc Document test coverage reporting for testcases 2015-04-01 18:19:18 -04:00
Tony Crisci
74abd8cd50 makefile: allow COVERAGE to be configurable
If COVERAGE=1 during build, i3 will be compiled for coverage testing.
2015-04-01 17:36:32 -04:00
Tony Crisci
d2d72acac4 complete-run: add coverage report generation
When `complete-run.pl` is given `--coverage-testing`, try to generate an
html coverage testing report for the run. This requires i3 to be
compiled with coverage testing support.
2015-04-01 15:10:27 -04:00
Ingo Bürk
0788f43db7 Updates userguide for 'no_focus <criteria>' (#1416) 2015-04-01 20:46:56 +02:00
Ingo Bürk
18d6b24f8d Added testcase for the no_focus directive (#1416) 2015-04-01 20:46:56 +02:00
Ingo Bürk
b5f7c132fc Added config directive 'no_focus <criteria>' (#1416) 2015-04-01 20:46:56 +02:00
Ingo Bürk
e155447932 Added assignment type 'A_NO_FOCUS' (#1416)
Any assignment with type 'A_NO_FOCUS' will cause the matched window to not be focused by i3 when it is managed.
2015-04-01 20:46:55 +02:00
Michael Stapelberg
d689827613 Merge pull request #1620 from Airblader/bug-1614
Only allow unique marks (#1614)
2015-04-01 11:29:38 -07:00
Michael Stapelberg
ceb0d5c963 Merge pull request #1626 from acrisci/feature/remove-tests-dir
Remove unused `tests` dir
2015-04-01 11:27:35 -07:00
Tony Crisci
f13b7ebaea Remove unused tests dir 2015-04-01 12:31:32 -04:00
Ingo Bürk
2e4fac61d2 Only mark a window if only one window is matched
We only support unique marks, so looping over all matched windows must be prevented.
If more than one window is matched, we reject it with an error message.

fixes #1614
2015-04-01 13:51:48 +02:00
Ingo Bürk
43204b43fd Added a testcase for #1614 2015-04-01 13:51:48 +02:00
Michael Stapelberg
3b81e40096 Merge pull request #1618 from Deiz/fix-1603
Allow single-child non-default layout cons to be moved between outputs
2015-04-01 09:08:22 +02:00
Deiz
4e88c10564 Allow single-child non-default layout cons to be moved between outputs
Includes a test case to verify the behaviour of 'move <direction>'.
Fixes #1603.
2015-03-31 13:58:29 -04:00
Michael Stapelberg
ebac737314 Merge pull request #1601 from Airblader/feature-titlebar-marks
Show marks in the titlebar
2015-03-30 23:53:42 +02:00
Ingo Bürk
6036d4e506 Changed the default for show_marks from "no" to "yes" 2015-03-30 23:11:50 +02:00
Ingo Bürk
245a29e233 Make show_marks configurable
Introduce a config directive "show_marks [yes|no]" to en- or disable drawing marks on window decorations.
To not change the look & feel of existing configurations, the default is "no".
2015-03-30 23:11:50 +02:00
Ingo Bürk
2af1a80028 Introduce a cached boolean for changes to the mark of a window.
This is necessary to correctly redraw window decorations when the mark of
a window is added or removed.
2015-03-30 23:08:25 +02:00
Ingo Bürk
1e89a301d5 Draw marks in window decoration
If a window has a mark set, e.g., "example", it will be printed on the right side of the window decorations.
The format is "[example]" and the name of the window is truncated if necessary.

Marks starting with an underscore ("_") will be ignored.
2015-03-30 23:08:25 +02:00
Michael Stapelberg
0ad097ee67 Merge pull request #1613 from Airblader/feature-1426
Added focus_on_window_activation directive
2015-03-30 22:58:16 +02:00
Michael Stapelberg
1431ea6cab Merge pull request #1609 from Deiz/consistent-center
Handle floating centering in one function and test for consistency
2015-03-30 22:54:56 +02:00
Ingo Bürk
195acb4911 Updated userguide for the directive focus_on_window_activation introduced in #1426. 2015-03-30 22:10:06 +02:00
Ingo Bürk
e288938769 Added testcases for #1426 2015-03-30 22:09:36 +02:00
Ingo Bürk
9bf161710b Added 'focus_on_window_activation' directive
When a window receives a _NET_ACTIVE_WINDOW message, it can steal the focus. This may not be preferable to all users.
With this directive, the user can choose from one of the following:
1) 'smart' - focus the container if its workspace is visible, otherwise set the urgency flag (default)
2) 'urgent' - always set the urgency flag, do not steal focus
3) 'focus' - always switch focus, never set the urgency hint
4) 'none' - ignore the request entirely (do not switch focus, nor set the urgency hint)

fixes #1426
2015-03-30 22:09:36 +02:00
Deiz
c6581a5fd6 Handle floating centering in one function and test for consistency 2015-03-30 16:03:35 -04:00
Michael Stapelberg
2759a308a2 Merge pull request #1608 from mh21/renaming-empty-ws-startup
Update old_name when renaming current workspace
2015-03-30 22:01:18 +02:00
Michael Stapelberg
cf5a98b8d7 Merge pull request #1611 from acrisci/bug/complete-run-pod-errors
complete-run: fix pod errors
2015-03-30 21:24:48 +02:00
Tony Crisci
e3ad16e65f complete-run: fix pod errors
Close `=over` with `=back` and use ascii apostrophe for "don't" to avoid
pod errors on `complete-run` docs.
2015-03-30 11:04:45 -04:00
Michael Stapelberg
eb48b974df Merge pull request #1604 from mh21/wm-class-garbage
Cope with non-null-terminated x class properties.
2015-03-30 09:12:25 +02:00
Michael Hofmann
eb84281f8c Cope with non-null-terminated x class properties.
- fixes #1605
2015-03-30 08:56:46 +02:00
Michael Hofmann
e6267a684c Testcase for non-null-terminated WM_CLASS.
- fails most of the time
2015-03-30 08:56:46 +02:00
Michael Stapelberg
9718640622 Merge pull request #1589 from Deiz/fix-center
Make center coordinates relative to current workspace
2015-03-30 08:47:04 +02:00
Michael Stapelberg
aa8349a550 Merge pull request #1588 from Deiz/xdg-wizard
Respect XDG config directories in i3-config-wizard
2015-03-30 08:38:58 +02:00
Michael Hofmann
f76e6c2bb1 Get workspace name when renaming current workspace.
- fixes #1607
2015-03-30 08:28:36 +02:00
Michael Hofmann
54dc87fb83 Testcase for #1607.
- crash in startup_sequence_rename_workspace because of NULL old_name
2015-03-30 08:28:36 +02:00
Deiz
9b8c2b1d1a Respect XDG config directories in i3-config-wizard
$XDG_CONFIG_HOME is used for the config's write path, and the wizard
terminates if a config is found in ~/.i3 or $XDG_CONFIG_HOME/i3
2015-03-29 23:32:42 -04:00
Michael Stapelberg
d6657cea36 Merge pull request #1606 from Deiz/libi3-mkdirp
Move mkdirp into libi3
2015-03-29 23:36:28 +02:00
Deiz
e622c42ef0 Move mkdirp into libi3 2015-03-29 17:18:00 -04:00
Michael Stapelberg
b338e25317 Merge pull request #1595 from Deiz/fix-1484
Fix percents when attaching a window to a ws creates a new split con
2015-03-29 23:14:37 +02:00
Michael Stapelberg
a99d5463ad Merge pull request #1599 from Airblader/feature-toggle-mark
Added a --toggle switch to the mark command
2015-03-29 23:02:27 +02:00
Ingo Bürk
7a75cb7e0b Added test cases for 'mark --toggle' (#1463) 2015-03-29 21:21:50 +02:00
Ingo Bürk
47222ab261 Updated docs for #1463 2015-03-29 21:21:50 +02:00
Ingo Bürk
d51d6d730e Added a --toggle switch to "mark [--toggle] <mark>"
This option allows toggling marks on a window without knowing whether the mark is already set or not.
It behaves as follows:
1) If the matched window has no mark, the new mark is set.
2) If the matched window has another mark, the old mark is removed and the new mark is set.
3) If the matched window already has the mark, the mark is removed.

The behavior that all non-matched windows have this mark removed is kept.

fixes #1463
2015-03-29 21:21:50 +02:00
Michael Stapelberg
dfefb10d36 initialize variables to NULL to avoid invalid free() on error 2015-03-29 20:57:20 +02:00
Michael Stapelberg
3191be366d Merge pull request #1600 from Deiz/libi3
Move resolve_tilde and get_config_path into libi3
2015-03-29 20:56:07 +02:00
Deiz
4daed31c3e Move resolve_tilde and get_config_path into libi3 2015-03-29 14:45:42 -04:00
Michael Stapelberg
6cba530946 Merge pull request #1593 from Airblader/feature-nagbar-primary-output
Display i3-nagbar on primary output
2015-03-29 19:54:32 +02:00
Michael Stapelberg
700dc4bfde Merge pull request #1597 from Airblader/bug-1187
Move urgency hint when moving container to another workspace
2015-03-29 19:50:03 +02:00
Michael Stapelberg
3163ca3385 release.sh: add release announcement email to avoid mistakes 2015-03-29 19:34:33 +02:00
Michael Stapelberg
fe8003ef4f release.sh: set up git remotes appropriately 2015-03-29 19:22:29 +02:00
Michael Stapelberg
3360ba7212 update debian/changelog 2015-03-29 19:10:41 +02:00
Michael Stapelberg
8629c2e208 Merge branch 'next' into master 2015-03-29 19:07:24 +02:00
Michael Stapelberg
9cf0150fa1 Merge branch 'release-4.10.1' 2015-03-29 19:07:24 +02:00
Michael Stapelberg
2dea50d469 release i3 4.10.1 2015-03-29 19:07:03 +02:00
Michael Stapelberg
aef495faba prepare release.sh for 4.10.1 2015-03-29 18:53:55 +02:00
Michael Stapelberg
9515cb0713 release from “next” 2015-03-29 18:53:55 +02:00
Michael Stapelberg
d5f329694d Merge pull request #1592 from Deiz/xdg-wizard-font
Make wizard window size and click coordinates dependent on font
2015-03-29 18:53:31 +02:00
Michael Stapelberg
8f69ddcb4d Update debian/changelog 2015-03-29 18:08:59 +02:00
Michael Stapelberg
6d94231f74 Merge branch 'master' into next 2015-03-29 17:46:37 +02:00
Michael Stapelberg
33069ff1d5 Merge branch 'release-4.10' 2015-03-29 17:46:37 +02:00
Michael Stapelberg
71310adaea release i3 4.10 2015-03-29 17:46:16 +02:00
Michael Stapelberg
b8057392c4 update release.sh for the next version 2015-03-29 17:45:46 +02:00
Michael Stapelberg
909eefb868 travis: remove FORTIFY_SOURCE, causes trouble with clang 2015-03-29 17:20:11 +02:00
Michael Stapelberg
6b04f28b48 fix remaining warnings 2015-03-29 17:12:20 +02:00
Michael Stapelberg
ba89fe0a93 travis: enable more warnings, add -Werror
This will ensure that our code stays free of warnings, at least for the
warnings that we have enabled. (Using _FORTIFY_SOURCE > 0 leads to more
warnings, some of them are harder to address.)
2015-03-29 17:11:21 +02:00
Michael Stapelberg
93adcf8bdc Merge pull request #1575 from hwangcc23/next
Fix warnings
2015-03-29 16:53:14 +02:00
hwangcc
42515308e7 Add a safe wrapper for write and fix some warnings
1. Add a function writeall and make swrite wrap that function. Use either writeall or swrite, depending on whether we want to exit on errors or not.
2. Fix warnings when compiling with a higher optimisation level.
(CFLAGS ?= -pipe -O3 -march=native -mtune=native -freorder-blocks-and-partition)

Signed-off-by: hwangcc <hwangcc@csie.nctu.edu.tw>
2015-03-29 10:22:34 +08:00
Deiz
0aa18a602d Make wizard window size and click coordinates dependent on font
This guarantees the whole visible area of the pixmap is reinitialized,
and ensures that the click bounding boxes are properly aligned with
the displayed text.
2015-03-28 15:35:19 -04:00
Ingo Bürk
0ad9268253 Open i3-nagbar on the primary screen
If a primary screen is set and the CRTC information can be retrieved,
i3-nagbar will now open on the primary screen. Otherwise, the old (fixed)
position will be used as a fallback.

fixes #1405
2015-03-28 19:35:59 +01:00
Ingo Bürk
c5fad4f579 Added a regression test for #1187 2015-03-28 19:23:59 +01:00
Ingo Bürk
6a5d561235 Move urgency hint when moving container
When an urgent container is moved to another workspace, the urgency hint
1) is unset on the source workspace and
2) set on the target workspace

fixes #1187
2015-03-28 18:29:34 +01:00
Michael Stapelberg
0391ac2e69 Merge pull request #1596 from Deiz/wizard-add-up-down
Switch the wizard's modifier choice when up or down are pressed
2015-03-28 18:16:27 +01:00
Deiz
95fa121c56 Switch the wizard's modifier choice when up or down are pressed 2015-03-28 13:00:19 -04:00
Michael Stapelberg
af71d3a2f1 Merge pull request #1590 from acrisci/bug/i3bar-no-markup-default
i3bar: don't parse markup on statusline by default
2015-03-28 10:08:41 +01:00
Deiz
48d2acd8f6 Fix percents when attaching a window to a ws creates a new split con
Fixes #1484 and includes a test case.
2015-03-27 22:20:28 -04:00
Tony Crisci
beaf904943 i3bar: don't parse markup on statusline by default
fixes #1565
2015-03-27 19:00:32 -04:00
Deiz
bae66a9dae Add a test case for #1211 2015-03-27 14:29:53 -04:00
Michael Stapelberg
856e1f9772 Merge pull request #1591 from Airblader/feature-child-cleanup
Return in child parsing as soon as the match was made.
2015-03-27 09:51:00 +01:00
Michael Stapelberg
fb0573e183 Merge pull request #1582 from shdown/allow-escaping-backslashes
Allow escaping backslashes
2015-03-27 09:40:09 +01:00
Michael Stapelberg
00e86c4de4 Merge pull request #1580 from Airblader/feature-nop
Allow nop command without argument
2015-03-27 09:39:28 +01:00
Ingo Bürk
e0332b6f07 Allow nop command without argument
fixes #1318
2015-03-27 09:29:16 +01:00
Ingo Bürk
6adc7e8bfb Return in child parsing as soon as the match was made.
As soon as we found the current key for which the value should be handled we can return
from the function to save some string comparisons.
2015-03-27 09:26:29 +01:00
Michael Stapelberg
773f9f52e9 Merge pull request #1454 from acrisci/feature/i3bar-update-strut-partial-reload
reconfigure dock clients on strut partial change
2015-03-27 09:02:05 +01:00
Ingo Bürk
43f65e1d2b Compile xcb-randr support into i3-nagbar 2015-03-27 08:44:00 +01:00
shdown
4e871c75f9 Add tests for backslash unescaping 2015-03-26 17:18:17 +03:00
Michael Stapelberg
ad31b13cb6 update default fonts for i3-{input,config-wizard,nagbar}
We’ve done this a while ago in i3.config itself, but the tools in
question aren’t hooked up to that setting, so we need to do it here as
well.
2015-03-26 10:03:30 +01:00
Michael Stapelberg
7d49f55c55 make i3-input work properly on hi-dpi displays 2015-03-26 10:03:14 +01:00
Michael Stapelberg
414290df56 make i3-config-wizard work properly on hi-dpi displays 2015-03-26 10:00:13 +01:00
Michael Stapelberg
d91bf5d491 make i3-nagbar work properly on hi-dpi displays 2015-03-26 09:44:46 +01:00
Michael Stapelberg
d97aeffcd4 i3-sensible-terminal: launch i3-nagbar when no terminal is found
fixes #1587
2015-03-26 09:21:40 +01:00
Michael Stapelberg
ebf5941456 debian: promote suggests to recommends to install a terminal emulator
fixes #1587
2015-03-26 09:19:50 +01:00
Deiz
24f0ea2f24 Make center coordinates relative to current workspace
Fixes #1211
2015-03-25 22:40:59 -04:00
Tony Crisci
49510427b9 Handle strut partial changes for dock clients
Handle changes to the property _NET_WM_STRUT_PARTIAL by reallocating
screen space in the dock area when the dock client requests a new
position.

This will allow changes to the bar config directive `position` to be
effective on the `reload` command.

fixes #1294
2015-03-25 19:45:42 -04:00
Tony Crisci
3f3b2d9a3f i3bar: reconfigure strut partial on reload
Strut partial tells i3 where to reserve space for i3bar. It is affected
by the `position` bar config directive.
2015-03-25 19:17:06 -04:00
Michael Stapelberg
037cb317cb Merge pull request #1578 from Airblader/feature-custom-separator
Add support for a custom separator symbol
2015-03-25 22:49:09 +01:00
Michael Stapelberg
fa93f275bb Don’t focus placeholder windows. 2015-03-25 22:47:23 +01:00
Ingo Bürk
80da100ac8 Add support for a custom separator symbol
This introduces a "separator_symbol" property for the i3bar configuration.
If set, the specified string will be used as a separator instead of a vertical line. Since it is an optional configuration, complete backwards compatibility is given.

fixes #1472
2015-03-25 21:38:55 +01:00
Michael Stapelberg
26237508ea Bugfix: skip restart_mode swallow specifications
Otherwise, placeholder windows would accumulate these over restarts. The
worst part is that they don’t get dumped properly, meaning an empty
swallows specification ends up in the state, which matches any window,
so other random windows would be matched into the placeholder (e.g.
i3bar).

fixes #1502
2015-03-25 20:50:25 +01:00
Michael Stapelberg
f790fedce3 Restore placeholder windows after restarting (Thanks Airblader).
fixes #1502
2015-03-25 20:50:25 +01:00
Michael Stapelberg
bbb035d975 Merge pull request #1583 from shdown/next
i3bar: spelling fixes (2)
2015-03-25 20:16:00 +01:00
shdown
6d8891894e Allow escaping backslashes
Fixes #1577.
2015-03-25 21:32:46 +03:00
shdown
6922a820a6 i3bar: spelling fixes (2) 2015-03-24 15:41:16 +03:00
Michael Stapelberg
c0a0b99d86 Merge pull request #1574 from acrisci/bug/bar-text-null-check
i3bar: check block text for NULL
2015-03-24 11:08:57 +01:00
Tony Crisci
177c03debd i3bar: check short_text for NULL on dump
Check `short_text` for NULL on statusline dump, since this value can be
NULL when not given. Fixes a segfault in that case.
2015-03-24 06:00:26 -04:00
Tony Crisci
0962c7f011 i3bar: check block text for NULL
Add a null check to `full_text` and `short_text` for a block before
setting the markup property to avoid a segfault.
2015-03-24 05:45:20 -04:00
Michael Stapelberg
822cd3bf1b Revert "Workspace command number selection"
This reverts commit cbd51ce664.

If you’ve started using this feature, I’m very sorry, but I think it’s
better to revert it entirely, as it will only cause more problems in the
future as more and more people upgrade and get bitten by this if we
didn’t revert it…

fixes #1536
2015-03-24 09:28:30 +01:00
Michael Stapelberg
f2b728ac5e Merge pull request #1564 from acrisci/feature/i3bar-markup-per-block
i3bar: set markup per block
2015-03-24 08:57:36 +01:00
Tony Crisci
e681f34ec1 i3bar: set markup per block
Add `markup` to the i3bar protocol as a block member.

This is a string that determines how the block should be parsed as
markup. "pango" indicates the block should be parsed as Pango markup.
"none" indicates the block should not be parsed as markup.
2015-03-24 02:27:38 -04:00
Michael Stapelberg
ff62a68c1e Merge pull request #1570 from shdown/next
i3bar: spelling fixes
2015-03-23 22:10:17 +01:00
shdown
e8704bb33b i3bar: spelling fixes 2015-03-23 22:56:49 +03:00
Michael Stapelberg
d3b8b3cac0 Merge pull request #1562 from Airblader/feature-short-text
Add support for the short_text property
2015-03-23 20:29:40 +01:00
Michael Stapelberg
3702b5895e Merge pull request #1568 from acrisci/feature/valgrind-no-verbose
testcases: dont run valgrind verbose
2015-03-23 20:27:35 +01:00
Tony Crisci
e5317fc4e9 testcases: dont run valgrind verbose 2015-03-23 13:03:57 -04:00
Ingo Bürk
c9019ada4e Add support for short_text
When the statusline is too long, try to use the short_text property of each status block before falling back to truncating it.
fixes #1092
2015-03-23 11:24:30 +01:00
Ingo Bürk
8272924117 Introduce a function to copy i3strings 2015-03-23 11:03:45 +01:00
Ingo Bürk
dd488818a9 Introduce the short_text property on blocks and parse it according to the documentation. 2015-03-23 11:03:45 +01:00
Michael Stapelberg
8d0fb482d9 clang-format and rearrange comments in i3bar/src/xcb.c 2015-03-23 09:23:01 +01:00
Michael Stapelberg
658d106fce fix travis config with regards to clang-format 2015-03-23 09:21:06 +01:00
Michael Stapelberg
33fa3284db Merge pull request #1560 from shdown/refactoring
i3bar: refactoring
2015-03-22 21:29:03 +01:00
Michael Stapelberg
0b65ea5b62 Merge pull request #1557 from acrisci/bug/fix-validation-segfault
Bugfix: validation segfault
2015-03-22 14:32:36 +01:00
shdown
f19fa0e3c9 i3bar: introduce get_tray_width() function to reduce duplication 2015-03-22 13:28:00 +03:00
shdown
62e4caa06c i3bar: refactor magic numbers to *_px constants 2015-03-22 13:28:00 +03:00
Tony Crisci
6fb7fc9bc6 Bugfix: validation segfault
When `new_window` is given in the config, config validation with `i3 -C`
would segfault.

Add a NULL check in logical_px() to check for the case when the config
is being validated without an X server to prevent this.
2015-03-22 05:46:52 -04:00
Michael Stapelberg
2190bb9386 Don’t overwrite border width when already set (placeholders).
fixes #1501
2015-03-21 23:02:35 +01:00
Michael Stapelberg
9493b61bb4 i3bar: set correct initial position when reconfiguring
fixes #1542
2015-03-21 22:50:48 +01:00
Michael Stapelberg
27ad651e35 Merge pull request #1556 from Airblader/feature-i3-save-tree-by-number
Allow referencing the workspace by number.
2015-03-21 22:37:42 +01:00
Michael Stapelberg
2772c377ec increase timeouts for travis
See https://travis-ci.org/i3/i3/jobs/55319961 (line 4064) for a job
where the window could not be mapped within 2 seconds.
2015-03-21 22:23:51 +01:00
Michael Stapelberg
73cd5dbb48 Merge pull request #1561 from Airblader/feature-append-layout-docs
Added a troubleshooting section to the restoring layout docs
2015-03-21 22:08:58 +01:00
Ingo Bürk
32f3248b57 Added a troubleshooting section to the restoring layout docs and described solution for vertically split containers 2015-03-21 20:41:40 +01:00
Michael Stapelberg
12e840b24d Merge pull request #1559 from shdown/next
various i3bar bugfixes
2015-03-21 18:44:02 +01:00
shdown
b2309b8681 i3bar: fix click events for workspace buttons with long statusline
This combines detecting of current and clicked workspaces into one cycle
and then checks if the x coordinate of the clicked point is greater than
the workspace buttons width.
2015-03-21 19:41:38 +03:00
shdown
b1c7c7eea4 i3bar: fix spelling is messages 2015-03-21 19:22:31 +03:00
shdown
4d3867f178 i3bar: rename a variable
Give it a more meaningful name.
2015-03-21 19:17:05 +03:00
shdown
b28bb20caa i3bar: add binding indicator width to workspace buttons width
Just to prevent the indicator from being overlapped by the statusline.
2015-03-21 19:12:29 +03:00
Ingo Bürk
0e0581c6cb Allow referencing the workspace by number.
This allows "--workspace 3" for numbered workspaces, e.g., if the name is actually
"3:foo". This introduces the same functionality the IPC already offers in many places.
2015-03-21 17:10:20 +01:00
shdown
ccd6ae8eaf i3bar: cut long statuslines from the left
This draws the statusline after drawing (and calculating width of) the
workspace buttons and fixes calculation of its maximum visible width.
This (hopefully) guarantees that these two will never overlap.
2015-03-21 19:08:40 +03:00
shdown
5efcfda2ed i3bar: fix clearing of the statusline pixmap
This fixes the bug when statusline pixmap wasn't entirely cleared that
caused random artifacts to appear when the statusline width is greater
than the screen width.
2015-03-21 19:00:11 +03:00
Michael Stapelberg
e7753c839f Merge pull request #1555 from Airblader/feature-i3-save-tree-current-ws
Make the --workspace optional by defaulting to the focused workspace.
2015-03-21 16:38:46 +01:00
Michael Stapelberg
5b80713233 Merge pull request #1549 from shdown/y-offset-fix
Fix incorrect y-offset for text in i3bar (2)
2015-03-21 16:32:19 +01:00
Ingo Bürk
80f119f0e2 adapted usage text 2015-03-19 18:59:25 +01:00
Ingo Bürk
d217cddb42 Make the --workspace optional by defaulting to the focused workspace.
If no option is given, i3-save-tree should default to the currently focused workspace.
Specifying both --workspace and --output will still yield an error.
2015-03-18 21:37:37 +01:00
Michael Stapelberg
09e4fb716c Merge pull request #1551 from acrisci/bug/rename-workspace-mismatch
bugfix: workspace rename focus mismatch
2015-03-16 22:49:38 +01:00
Michael Stapelberg
d9c2ce0023 Merge pull request #1553 from Airblader/feature-remove-output-assignment
Remove the A_TO_OUTPUT option
2015-03-16 22:40:25 +01:00
Michael Stapelberg
d1f99abf75 fix warnings when CONTINUOUS_INTEGRATION env var is unset 2015-03-16 22:38:39 +01:00
Michael Stapelberg
c35b3160f6 relax timings of t/200-urgency-timer.t to reduce flakiness 2015-03-16 22:37:45 +01:00
Ingo Bürk
52f918309b Remove the A_TO_OUTPUT option as it is not needed anymore and will not be implemented in favor of normal assignments. 2015-03-16 20:18:03 +01:00
Tony Crisci
6b150b1ac2 bugfix: workspace rename focus mismatch
When renaming a workspace on another output that moves the workspace to
the current output, the renamed workspace would be shown even though it
does not contain the focused container.

Explicitly show the focused workspace after the move. This is necessary
because `workspace_move_to_output` will show the workspace that is
moved.
2015-03-15 23:30:00 -04:00
shdown
123de9a25f Fix incorrect y-offset for text in i3bar (2)
014aa7ff74 fixed incorrect align of small
symbols, but also introduced a problem with texts with mixed large and
normal symbols. Fix it by centering the text vertically only if its
height is smaller that the saved font height.
Fixes #1543.
2015-03-15 10:32:17 +03:00
Michael Stapelberg
cd48bcf2a5 travis: verify code was formatted using clang-format 2015-03-14 22:32:23 +01:00
Michael Stapelberg
513510de69 clang-format src/commands.c 2015-03-14 22:32:23 +01:00
Michael Stapelberg
56f420c3dd Merge pull request #1539 from mh21/wsrename-1527
Rename workspaces in startup sequences
2015-03-14 04:56:19 -07:00
Michael Stapelberg
8eb5656c69 travis: cat complete-run.log on failures 2015-03-14 12:35:01 +01:00
Michael Stapelberg
f0ef712ed0 tests: exit with status 1 when tests fail 2015-03-14 12:34:34 +01:00
Michael Stapelberg
aa4aec41f5 tests: don’t print interactive status when running on travis
(or without a tty)
2015-03-14 12:33:54 +01:00
Michael Stapelberg
69be6e4a8e travis: run tests serialized, install latest AnyEvent::I3 2015-03-13 23:38:56 +01:00
Michael Stapelberg
26d17c6b88 travis: install as many perl pkgs as possible via apt instead of cpanm 2015-03-13 23:38:33 +01:00
Michael Stapelberg
2cf40f4867 travis: fix pinning setup (newlines and YAML are complicated) 2015-03-13 23:38:13 +01:00
Michael Stapelberg
f8ac5fcfe2 travis: escape strings for YAML 2015-03-13 21:04:03 +01:00
Michael Stapelberg
8dd6591c59 travis: install more perl dependencies, pull in trusty packages 2015-03-13 20:52:53 +01:00
Michael Stapelberg
0b3601c2ef travis: also cat cpanm build logs after failure 2015-03-13 13:24:02 +01:00
Michael Stapelberg
9088fa03bc travis: cpanm: set -v so that we get error messages in the travis output 2015-03-13 11:39:59 +01:00
Michael Hofmann
44f748a663 Rename workspaces in startup sequences.
When renaming workspaces, any workspace names in pending startup
sequences also need to be renamed.
2015-03-13 10:35:20 +01:00
Michael Hofmann
5776edcc84 Test: startup workspaces updating on rename. 2015-03-13 10:35:20 +01:00
Michael Stapelberg
439cadf441 travis: directly use cpanm -n to skip tests
X11::XCB currently fails its tests
2015-03-13 10:21:02 +01:00
Michael Stapelberg
b370c5ac71 travis runs on ubuntu 12.04, so use libinline-perl 2015-03-13 10:12:00 +01:00
Michael Stapelberg
f549089c30 travis: mk-build-deps needs equivs 2015-03-13 10:09:21 +01:00
Michael Stapelberg
92d8b4d469 add configuration for travis-ci.com 2015-03-13 10:06:57 +01:00
Michael Stapelberg
c263bb3d2a Merge pull request #1521 from Airblader/feature-use-refactored-function
Use the already existing function to get rid of some code duplication
2015-03-13 00:54:52 -07:00
Michael Stapelberg
a5939f3edc Merge pull request #1513 from Airblader/defect-1473
Move workspace to assigned output when renaming it
2015-03-13 00:52:52 -07:00
Michael Stapelberg
fea21f8945 Merge pull request #1512 from mdtipton/unclutter_scroll
Fix scrolling in window decoration with hidden cursor.
2015-03-13 00:46:16 -07:00
Michael Stapelberg
5a4109dfb6 Merge pull request #1546 from rosetree/next
Fix comment box
2015-03-13 00:36:29 -07:00
Micha Rosenbaum
9a355dcb92 Fix comment box 2015-03-12 11:18:12 +01:00
Michael Stapelberg
db2c5a80f8 Merge pull request #1545 from garbados/gendered-terms-in-docs
degendered terms
2015-03-12 00:38:35 -07:00
Diana Thayer
94b1e76af4 degendered terms 2015-03-11 21:41:43 -07:00
Michael Stapelberg
10a58725cd add release.sh, a script to prepare a new i3 release 2015-03-07 20:37:34 +01:00
Michael Stapelberg
dadf833607 update debian/changelog for the new release 2015-03-07 20:31:38 +01:00
Michael Stapelberg
309e5b2cbd Merge branch 'release-4.9.1' 2015-03-07 20:26:29 +01:00
Michael Stapelberg
7270f6e96f Merge branch 'master' into next 2015-03-07 20:26:29 +01:00
Michael Stapelberg
0b145d214b release i3 4.9.1 2015-03-07 20:26:09 +01:00
Michael Stapelberg
0148dc6fd3 Merge branch 'master' into next
Conflicts:
	src/commands.c
2015-03-07 15:57:41 +01:00
Michael Stapelberg
5fb99ad9f7 Merge branch 'fix-restore-errormsg' 2015-03-07 15:57:13 +01:00
Ingo Bürk
9ebf17c39d Properly error out when the layout file cannot be read.
This will result in an actual error message for the user.
fixes #1499
2015-03-07 15:57:05 +01:00
Ingo Bürk
6c675cc3f6 Glob filepath when calling append_layout
fixes #1500
2015-03-07 15:56:59 +01:00
Ingo Bürk
58df5aa6c4 Improve error messages on failing commands 2015-03-07 15:53:35 +01:00
Michael Stapelberg
6226400dfd Merge branch 'master' into next 2015-03-07 15:40:59 +01:00
Michael Stapelberg
53b621f1aa Merge branch 'dont-match-placeholders' 2015-03-07 15:40:59 +01:00
Michael Stapelberg
df1fcdafe8 Bugfix: insert id-based match at HEAD, not TAIL.
Before this commit, placeholder windows had any matches that were
defined in the JSON file, _followed_ by an i3-internal match that
ensures the placeholder X11 window gets swallowed into the placeholder
i3 container.

The problem was that the first successful match was deleted, and if
users specified a criterion (title=IPython) that matched the placeholder
window itself (name=IPython), then that match is deleted and the
i3-internal match is kept. This results in the actual window the user
wants to match not being swallowed, and the placeholder window not
displaying any criteria.

fixes #1526
2015-03-07 15:38:10 +01:00
Michael Stapelberg
a2a32ab1ee Merge branch 'master' into next 2015-03-07 14:52:39 +01:00
Michael Stapelberg
fa3396b6ea Merge branch 'fix-mode-switch' 2015-03-07 14:52:39 +01:00
Michael Stapelberg
7340a3e642 Fix bindings using Mode_switch
fixes #1518
2015-03-07 14:52:32 +01:00
Michael Stapelberg
61418f4dfb Merge branch 'master' into next 2015-03-07 11:47:59 +01:00
Michael Stapelberg
a88cdf4ba7 Merge branch 'revert-iconic' 2015-03-07 11:47:59 +01:00
Michael Stapelberg
d551618cf0 Revert "Handle WM_CHANGE_STATE requests for iconic state"
This reverts commit 136b3e345b.

fixes #1516
2015-03-07 11:47:01 +01:00
Ingo Bürk
c572176429 Use the already existing function to get rid of some code duplication 2015-03-05 14:00:24 +01:00
Michael Stapelberg
1b69ddacbe Merge pull request #1515 from Airblader/feature-commands-error-messages
Improve error messages on failing commands
2015-03-04 10:20:21 -08:00
Ingo Bürk
acb79bd02f Improve error messages on failing commands 2015-03-04 14:01:42 +01:00
Ingo Bürk
25ec389ecb Added tests for #1473 2015-03-04 10:54:58 +01:00
Ingo Bürk
eb73059c61 Refactor functions for easy reuse 2015-03-04 09:22:25 +01:00
Ingo Bürk
bcc1314a2d When renaming a workspace, look for assignments and move the renamed workspace to the appropriate output. 2015-03-04 09:06:44 +01:00
Michael Stapelberg
dcba0b46dd Fix keyboard layout change detection
…by listening to XKB_NEW_KEYBOARD events and re-allocating the keysym
map on both XKB_NEW_KEYBOARD and XKB_MAP_NOTIFY.

fixes #1302
2015-03-03 09:47:15 +01:00
Michael Stapelberg
ac19772efb Merge branch 'fix-keyboard-layout' 2015-03-03 09:46:39 +01:00
Michael Stapelberg
c7fd4b39c6 Fix keyboard layout change detection
…by listening to XKB_NEW_KEYBOARD events and re-allocating the keysym
map on both XKB_NEW_KEYBOARD and XKB_MAP_NOTIFY.

fixes #1302
2015-03-03 09:46:16 +01:00
Michael Tipton
73ecc56bd7 Fix scrolling in window decoration with hidden cursor.
If the mouse cursor is hidden (by unclutter, for example), then scrolling
in the window decoration creates an event with a child
(i.e. event->child != XCB_NONE). This causes route_click() to be called
with dest=CLICK_INSIDE, which prevents scrolling through a stacked layout.

To fix this, check if a click is in the window decoration _before_
checking if the event has a child.
2015-03-03 00:24:54 -08:00
Michael Stapelberg
487ccb536a Merge pull request #1503 from Airblader/defect-layout-globbing
Glob filepath when calling append_layout
2015-03-01 08:25:09 -08:00
Michael Stapelberg
eb969fee67 Merge branch 'Airblader-defect-1480' into next 2015-03-01 17:21:27 +01:00
Michael Stapelberg
1124041648 clang-format 2015-03-01 17:19:42 +01:00
Michael Stapelberg
91476e2c11 Merge branch 'defect-1480' of https://github.com/Airblader/i3-original into Airblader-defect-1480 2015-03-01 17:19:22 +01:00
Michael Stapelberg
091f1db39a run clang-format (3.5.0)
Not quite sure why there are so many differences. Perhaps we’ve gotten
out of the habit of running clang-format after every change.

I guess it’d be best to have a travis hook that runs clang-format for us
and reports any problems on pull requests.
2015-03-01 17:16:03 +01:00
Ingo Bürk
9e739de5d3 Glob filepath when calling append_layout
fixes #1500
2015-03-01 16:51:58 +01:00
Michael Stapelberg
0876bd621f Merge branch 'master' into next 2015-03-01 16:50:49 +01:00
Michael Stapelberg
21bb44b6da Merge branch 'ton-master' 2015-03-01 16:50:45 +01:00
Michael Stapelberg
3c5df50c54 Merge branch 'master' of https://github.com/ton/i3 into ton-master 2015-03-01 16:50:37 +01:00
Michael Stapelberg
24a5a952b9 Merge pull request #1478 from acrisci/feature/use-default-monospace
Config: use default system monospace
2015-03-01 07:33:19 -08:00
Michael Stapelberg
a6a1d55346 Merge branch 'stevenjm-big-endian' 2015-03-01 16:30:28 +01:00
Michael Stapelberg
4bcb702360 Merge branch 'big-endian' of https://github.com/stevenjm/i3 into stevenjm-big-endian 2015-03-01 16:28:42 +01:00
Steven McDonald
1ab76fb05a Fix key bindings on big-endian platforms
input_code is a uint16_t, but xcb_keycode_t is uint8_t, meaning that
only the first byte of input_code is inspected by memmem. On
little-endian platforms, this code would have worked by accident, since
the first byte of input_code represents the 8 least significant bits.
However, on big-endian platforms the first byte is the 8 most
significant bits, which means memmem is scanning bind->translated_to
for the wrong keycode (probably 0).

In order to work correctly on big-endian and little-endian platforms,
simply typecast input_code to an xcb_keycode_t and pass that to memmem.

The observed behaviour associated with this bug is that key bindings
don't work at all. This patch has been tested on an iBook G4 running
OpenBSD -current, and key bindings work properly with this fix applied.
2015-03-01 21:07:03 +11:00
Michael Stapelberg
cc55ee472d debian: update changelog 2015-02-28 15:04:28 +01:00
Michael Stapelberg
fe482cf193 Merge branch 'next' 2015-02-28 15:02:31 +01:00
Michael Stapelberg
31ea3ecc38 Merge branch 'release-4.9' into next 2015-02-28 15:02:21 +01:00
Michael Stapelberg
55ba1c5e56 release i3 v4.9 2015-02-28 14:51:33 +01:00
Ton van den Heuvel
014aa7ff74 Fix incorrect y-offset for text in i3bar
When using Pango to draw text in i3bar, the y-offset of the text is
incorrectly calculated in case all characters in the string to draw are
smaller than the cached font height. Fixes #1494.
2015-02-26 21:58:42 +01:00
Michael Stapelberg
d5ec59e5c1 Merge pull request #1486 from acrisci/feature/docs-xvfb-tests
Docs: add hint to use xvfb-run
2015-02-22 03:02:20 -08:00
Tony Crisci
bf16c91231 Config: use default system monospace
Use the default monospace font for the system in the default config.
This should be a bit more portable for systems that do not have the
recommended font installed.
2015-02-21 17:34:26 -05:00
Tony Crisci
05de5201c0 Docs: add hint to use xvfb-run
Document that Xvfb can be used to run tests without an X server, and be
used to significantly speed up tests on machines with slow video cards.
2015-02-21 16:36:24 -05:00
Michael Stapelberg
b9cc54f15b Merge pull request #1471 from acrisci/feature/i3bar-use-pango-markup
i3bar: use Pango markup
2015-02-21 12:19:26 -08:00
Ingo Bürk
801dd06c6d free block->instance when cleaning up statusline 2015-02-18 20:29:11 +01:00
Ingo Bürk
1fde82d584 removed forgotten declaration of unused variable 2015-02-18 20:23:26 +01:00
Ingo Bürk
296fbdde12 Introduce a statusline buffer.
A buffer is introduced for the statusline which will only be copied to the actual statusline
once an entire statusline is parsed. This avoids a race condition where incompletely parsed
statuslines were rendered, causing only some status blocks to be rendered which is visible to
the user as a flickering.

fixes #1480
2015-02-18 20:11:42 +01:00
Ingo Bürk
9ff230c375 remove unused statusline_buffer 2015-02-18 20:01:52 +01:00
Michael Stapelberg
bb6823f5c7 debian: add changelog entry for 4.8-2 2015-02-15 13:42:29 +01:00
Tony Crisci
e18e2b9f98 i3bar: use Pango markup
Parse text within workspace buttons and the i3bar statusline as Pango
markup. This lets people specify things like font weight, text color,
background color, font size, and font family in the text of i3bar.

fixes #1468
2015-02-12 14:45:34 -05:00
Michael Stapelberg
726bb97ce3 CONTRIBUTING: document people should use the next branch 2015-02-12 08:59:33 +01:00
Michael Stapelberg
fbe25297b7 Properly invalidate rendering cache when updating orientation (Thanks hercek)
fixes #1445
2015-02-11 21:13:55 +01:00
Michael Stapelberg
db62b5a4df Merge branch 'master' into next 2015-02-11 21:08:00 +01:00
Michael Stapelberg
797855d98e Merge pull request #1465 from Airblader/bugfix-1430
Make click events on status blocks work if 'workspace_buttons no' is set...
2015-02-11 20:45:12 +01:00
Ingo Bürk
594b29f83d Make click events on status blocks work if 'workspace_buttons no' is set.
1. Always subscribe to click events for i3bar.
2. Exit the click event handler if no current workspace was found only after clicks on status blocks have been handled.

fixes #1430
2015-02-11 20:34:43 +01:00
Ingo Bürk
bf0e8c2862 Remove one level of indentation #1465 2015-02-11 20:34:19 +01:00
Michael Stapelberg
5cf1a0c43b Merge pull request #1462 from carrotIndustries/netwm_moveresize
Support _NET_WM_MOVERESIZE
2015-02-11 20:30:05 +01:00
Michael Stapelberg
83f369a91e Merge pull request #1460 from Airblader/bugfix-1458
Correctly calculate clicks on i3bar status blocks
2015-02-11 20:18:53 +01:00
Michael Stapelberg
d2d08f7313 Merge pull request #1451 from acrisci/feature/handle-button-release
Handle button release events
2015-02-11 20:13:00 +01:00
Michael Stapelberg
74d4e84fa3 add a CONTRIBUTING file
See https://github.com/blog/1184-contributing-guidelines
2015-02-11 09:15:01 +01:00
Michael Stapelberg
b7d3fe7b70 Merge pull request #1453 from acrisci/feature/bar-update-font-reload
Update bar font config on reload
2015-02-11 07:55:06 +00:00
Lukas K
1c5ab5fa36 Support _NET_WM_MOVERESIZE
Add support for the _NET_WM_MOVERESIZE client message. This message
enables clients to initiate window moving or resizing. Toolkits like
Gtk3 use this message when the user drags a client-side decorated window
by its title bar. When Gtk detects that the window manager does not
support this client message, it uses a slow fallback implementation.

fixes #1432
2015-02-11 00:07:28 +01:00
Tony Crisci
c815fc798d Handle button release events
This enables the --release switch on mouse button bindings.
2015-02-10 17:46:02 -05:00
Tony Crisci
e91a9174e2 libi3: free previous font on font load
When loading a new font with `load_font`, free the previously loaded
font with `free_font`.

If no font is loaded, `free_font` will simply return (instead of
crashing because of a double free).
2015-02-10 15:11:40 -05:00
Tony Crisci
d38d2dc3e3 Update bar font config on reload
Dynamically update the font when the `reload` command is called by
reloading the font with `xcb_init_late` and adjusting the size of the
bar by updating the output dimensions with a call to the ipc.
2015-02-10 14:26:22 -05:00
Ingo Bürk
d75f80402a Correctly calculate clicks on i3bar status blocks
fixes #1458
2015-02-10 14:52:53 +01:00
Michael Stapelberg
663235c714 docs/debugging: use logs.i3wm.org 2015-02-04 19:54:36 +01:00
Michael Stapelberg
72b3c9f4c9 cking-howto: update links 2015-02-04 19:52:40 +01:00
Michael Stapelberg
20dc3271a7 Merge branch 'placeholder' 2015-01-31 22:56:08 +01:00
Michael Stapelberg
3f126c61c4 Merge branch 'master' into next 2015-01-31 22:56:08 +01:00
Michael Stapelberg
13220e75d8 Bugfix: actually parse client.placeholder (Thanks Ingo)
fixes #1400
2015-01-31 22:55:45 +01:00
Michael Stapelberg
a1aa878626 Merge branch 'fix-ws-con' 2015-01-31 22:42:54 +01:00
Michael Stapelberg
dd5be77d1d Merge branch 'master' into next 2015-01-31 22:42:54 +01:00
Michael Stapelberg
55b5f491a4 Bugfix: correctly restore workspaces regardless of where “type” is (Thanks dsargrad)
fixes #1395
2015-01-31 22:42:47 +01:00
Tony Crisci
74b69d6d02 Add mouse binding pointer position configuration
Add the `--whole-window` switch for mouse bindings. This switch controls
what part of the container the pointer must be over to trigger a mouse
binding. The default is to only trigger mouse bindings over the
titlebars. With this switch, a mouse binding will be triggered over the
main part of the window as well.

This is a breaking change to the previous behavior, which would trigger
a mouse binding with a modifier over any part of the window.

fixes #1429
2015-01-31 21:29:48 +01:00
Alexander Monakov
f28ce227e3 i3bar: suspend the child when bars are fully obscured 2015-01-25 20:31:38 +01:00
Marein Konings
29a832a160 Add 'mark' as allowed key to i3-save-tree output 2015-01-25 19:37:25 +01:00
Tony Crisci
407e9cf745 Add lxterminal to i3-sensible-terminal
fixes #1436
2015-01-25 19:37:16 +01:00
Michael Stapelberg
073ecdd711 Revert "don’t fix coordinates/change focus/warp when source_output was scratchpad"
This reverts commit 9480801927.

This causes focus issues.
2015-01-23 17:11:05 +01:00
Michael Stapelberg
9480801927 don’t fix coordinates/change focus/warp when source_output was scratchpad 2015-01-23 17:07:31 +01:00
Ingo Bürk
13850a55b0 Inset the urgent background of a status block for consistency with workspace buttons.
fixes #1423
2015-01-17 18:28:14 +01:00
Michael Stapelberg
3b4ae812e3 Merge branch 'master' into next
Conflicts:
	src/render.c
2015-01-17 18:20:43 +01:00
Michael Stapelberg
f13fa1e37a Merge branch 'fix-popup-during-fullscreen' 2015-01-17 18:20:04 +01:00
Michael Stapelberg
8b96bb0298 Bugfix: render floating windows during global fullscreen (Thanks dmurph, Mats)
fixes #1393
2015-01-17 18:19:15 +01:00
Tony Crisci
69dd8ce398 Fix start_application() doc about which shell is used
Since this commit:

f691a55923

the shell that is used is the system's bourne shell (/bin/sh) and the
env variable SHELL is not considered.

No logic changes.
2014-12-22 09:48:03 +01:00
Tony Crisci
823b46a544 Include workspace con in workspace event
Send the affected workspace in the "current" property for each workspace
event for any type of workspace event that affects a particular
workspace.

fixes #1411
2014-12-22 09:47:31 +01:00
Michael Stapelberg
04fa40d3e5 docs/ipc: use an actual event type (thanks Adaephon) 2014-12-13 22:33:42 +01:00
Mats
e59a76e456 Extend the fullscreen command
Rather than just toggling the fullscreen modes, allow to set them
directly with:

    fullscreen enable|toggle [global]
    fullscreen disable

For compatibility, retain the previous command and its toggling behavior:

    fullscreen [global]

fixes #1120
2014-12-10 20:42:52 +01:00
Mats
dc351fb291 Prevent workspace change during global fullscreen
While in global fullscreen, the workspace could be changed leaving the
fullscreen container still visible on top but losing its focus.
2014-12-10 20:24:32 +01:00
Ingo Bürk
8ea67d0488 i3bar: Respect the urgency flag on status blocks
…by drawing urgent blocks with the same settings as an urgent workspace.

(Also use logical_px() and bar_height.)

fixes #682
2014-12-09 11:23:46 +01:00
Ingo Bürk
bfd60ec619 Improve error message when a full_text property is missing 2014-12-07 19:56:51 +01:00
Ingo Bürk
bf1d0c9335 ensure align = left is the default and update documentation accordingly
fixes #1403
2014-12-03 08:12:04 +01:00
cornerman
58c65a64fe add deco_rect property to con in ipc response 2014-11-29 18:19:39 +01:00
smlb
9cbae6bb4f Added termite to default terminals 2014-11-29 17:09:18 +01:00
Michael Stapelberg
105db325dc Revert "Bugfix: Set input focus with last timestamp"
This reverts commit 9cee8dac5e.

fixes #1383
2014-11-23 00:36:09 +01:00
Michael Stapelberg
ef9b081a3e Bugfix: check if values are non-NULL before copying (Thanks xeen)
fixes #1397
2014-11-18 08:27:53 +01:00
Tony Crisci
8d031bfbf8 Handle _NET_CLOSE_WINDOW client message requests
> Pagers wanting to close a window MUST send a _NET_CLOSE_WINDOW client
> message request to the root window.

We interpret this message as a request to close the con for the given
window.

See: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472668896

fixes #1396
2014-11-17 09:08:42 +01:00
Tony Crisci
bb1f857b00 bugfix: copy binding before run
Copy the binding struct before running it and use this copy to emit the
binding event.

This fixes a crash when the command `reload` is used in a binding when
the binding event is emitted.
2014-11-16 23:36:27 +01:00
Michael Stapelberg
0125530409 merge the formerly debian-specific x-terminal-emulator patch
I think instead of maintaining distribution-specific patches forever,
it’s a bit easier to have them applied upstream, especially since they
don’t break anything.

fixes #876
2014-11-06 19:56:32 +01:00
Michael Stapelberg
7b00114f7e set DesktopNames (which gdm uses) (Thanks Yves-Alexis) 2014-10-23 23:18:15 +02:00
Michael Stapelberg
90bed2a183 Use command -v (built-in) instead of which(1) (Thanks val)
fixes #1380
2014-10-23 23:05:01 +02:00
Mats
a66c6b8b6d t/234-layout-restore-output: Remove unused import
List::MoreUtils is imported but not used.
2014-10-23 22:54:51 +02:00
Mats
1d60e48c73 Makefile.PL: Add Inline::C dependency
Inline::C is no longer shipped with Inline.
2014-10-23 22:54:46 +02:00
Tony Crisci
ecca0baff3 Testcases: rename StartXDummy to StartXServer
Rename the package StartXDummy to StartXServer in the testcases library
because XDummy is no longer used.

No logic changes.
2014-10-05 21:06:37 +02:00
Tony Crisci
6ba7728136 Bugfix: check symbol for NULL in binding json dump
When dumping a binding, as is done during the binding event, check
symbol for NULL. If it is, dump json null. This prevents a crash when
running a binding that was configured with bindcode.

fixes #1379
2014-10-05 21:06:11 +02:00
Michael Stapelberg
3e841ac5b6 check for AnyEvent::I3 ≥ 0.16 in the binding event test 2014-10-03 09:40:22 +02:00
Tony Crisci
fbaf084426 Implement the ipc 'binding' event
The binding event will be triggered when a binding is run as a result of
some a user action. The binding event has the following properties:

change: (str) Currently this will only be "run" but may be expanded in
the future. Included for consistency with other events.

binding: (map) the serialized binding

The "binding" member will have these properties:

input_type: (str) either "keyboard" or "mouse"

input_code: (int) the xcb keycode of the keyboard binding if it was
provided or the mouse button if it is a mouse binding.

symbol: (str) the string representation of the input code

command: (str) the bound command

mods: (list of str) a list of the modifiers that were pressed as string
symbols

fixes #1210
2014-10-03 09:35:37 +02:00
Michael Stapelberg
3cf413492f t/114-client-leader: fix race by waiting until the window is mapped 2014-10-02 23:07:50 +02:00
Tony Crisci
2ddbc71e2b Testcases: Use Xephyr instead of XDummy
Replace the XDummy script with Xephyr. This is done because of some
changes in the Xorg server that make XDummy difficult to use.

Rename library internal variables and function names to replace "xdummy"
with "xserver" to show this change (except for renaming the package and
lib file for better git history).

Rename the switch `--keep-xdummy-output` to `--keep-xserver-output`.
This switch should now be rarely used because Xephyr requires less set
up.

Replace "xdummy" with "xephyr" in comments and utility help
information. Update docs to show the new dependency.

fixes #1367
2014-10-02 23:05:00 +02:00
Michael Stapelberg
ea2552e852 Bugfix: use the command parser to properly extract workspace names
fixes #1377
2014-10-01 22:50:48 +02:00
Mats
7fe55090ec Don't draw borders wider than actual width
Rectangles passed to function xcb_poly_fill_rectangle are of type
xcb_rectangle_t and defined as:

    struct xcb_rectangle_t {
        int16_t  x;
        int16_t  y;
        uint16_t width;
        uint16_t height;
    }

The rectangles for the right and lower border had a width and height,
respectively, greater than the actual border width.

Furthermore, offset the bottom border to not overlap with the right one
and, for the top border, use r->width instead of con->rect.width as with
the other borders.
2014-10-01 22:29:43 +02:00
Tony Crisci
fd8a2b0e51 IPC: set ws reply "num" member to -1 when named
When a named workspace (i.e., a workspace that has a name that does not
begin with text that can be parsed as an integer greater than or equal
to zero) is represented by the ipc as a workspace json object such as
can be queried with `i3-msg -t get_workspaces`, set the num property to
-1 instead of json null.

This is for convenience of ipc consumers using type-constrained
languages such as C which have difficulty cleanly expressing nullable
integers.

fixes #1368
2014-09-29 09:33:02 +02:00
Tony Crisci
8870edc2ca Do not resend focus on click
Do not set focused_id to XCB_NONE in route click to force resend focus,
in some cases to an already focused window.

Sending focus again on click is not necessary and may cause problems
with certain wine or mono apps. Resending focus makes combo boxes not
work in Office 2010.

This effectively reverts commit 250577da, so in case this commit causes
any problems with Eclipse to resurface, we’ll revert this commit in
favor of 250577da (the Eclipse-related bug fix).
2014-09-21 02:55:11 +02:00
Michael Stapelberg
2fecf57699 Properly handle windows unsetting WM_TRANSIENT_FOR (Thanks Janus)
fixes #1351
2014-08-26 10:00:14 +02:00
aszlig
9058fc44e6 Allow to validate the config file without X.
We're going to call parse_configuration() very early if -C is given on
the command line. Instead of the previous "only_check_config", which has
been a global variable, we now simply pass use_nagbar as false if we're
just validating.

This causes the whole parsing to run without X and of course without
starting nagbar and displaying the errors to standard out/error instead.

The return code of parse_configuration() is now a boolean which
represents whether an error occured during parsing and the programs exit
code is returned accordingly.

Although the config parser still has a lot of side-effects, we now can
parse without the need to have an XCB connection. A nicer implementation
would be to just set the new font and load it just after we're done
parsing, but to ensure we don't break functionality we just load a dummy
FONT_TYPE_NONE if XCB isn't available. The main reason for going this
route is that it's a bit difficult to test fonts in a distribution
agnostic way without bundling fonts with i3 (or Xdummy to be more
exact).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-25 19:34:26 +02:00
Michael Stapelberg
beba1633ac Parse tray_output as a word, not string (Thanks Peter)
This makes it robust against trailing whitespace.

fixes #1352
2014-08-25 17:55:59 +02:00
Michael Stapelberg
33d1d5d3c6 Treat everything up to 120 dpi as 96 dpi (Thanks jefvel)
See the comment in the source for rationale.
2014-08-23 16:02:30 +02:00
Mats
5762456d89 Align lower line of bar decoration to border width
In normal border style, two horizontal lines are drawn to outline the
bar decoration. The lower line leaves a gap to the left and right to
align with the border. This gap was hardcoded to 2 pixels. Now it
matches the current border width, if any.

In stacked layout, only the bottommost bar is aligned. In tabbed layout,
no gaps are left in order to close the outline and make the notion of a
tab more clear.
2014-08-11 09:49:49 +02:00
Michael Stapelberg
80db544e26 retina support: convert logical to physical pixels for default_border_width 2014-08-11 09:46:02 +02:00
Michael Stapelberg
fa41ad7e21 Merge branch 'fix-layout-focus' 2014-08-08 20:16:40 +02:00
Michael Stapelberg
89d3f93bec Merge branch 'master' into next 2014-08-08 20:16:40 +02:00
Michael Stapelberg
fc88631534 Bugfix: don’t set focus in con_set_layout() on invisible workspaces
fixes #1338
2014-08-08 20:15:59 +02:00
Michael Stapelberg
294d52e018 t/*ewmh*: fix flakiness by syncing 2014-08-08 12:23:47 +02:00
Tony Crisci
034c82c0ac Raise floating windows on focus [direction]
Raise a window when cycling focus between floating windows with `focus
[direction]` command so that newly focused windows are rendered on top
of other windows.

This is done by placing the window last in the floating nodes of the
parent and reordering the stack so the relative order is preserved.

fixes #1322
2014-08-08 12:19:35 +02:00
Michael Stapelberg
1ee6bf1077 make AnyEvent::I3 dependency versioned (Thanks sur5r) 2014-08-05 11:49:16 +02:00
Michael Stapelberg
1842ddac51 Merge branch 'fix-tray-restart' 2014-07-24 10:11:34 +02:00
Michael Stapelberg
cc09348414 Merge branch 'master' into next 2014-07-24 10:11:34 +02:00
Michael Stapelberg
4699c714b3 Bugfix: add a sync call to i3bar to confirm reparents before exiting
Without this call, sometimes the tray icon windows are reparented into
i3’s container around the i3bar window, i.e. into the next remaining
window in the window hierarchy. Since i3 then closes that container
(since the i3bar window itself was closed), the tray window will also
get closed. In general, this weird interaction (getting reparented and
then closed) is not well received by tray icon providers :).

closes: #1296
2014-07-24 10:09:53 +02:00
Michael Stapelberg
a62bb17511 Merge branch 'fix-decoration' 2014-07-23 09:48:26 +02:00
Michael Stapelberg
67e00b3ab8 Merge branch 'master' into next 2014-07-23 09:48:26 +02:00
Tony Crisci
56c284af8e Bugfix: missed case for decoration rerender
Rerender the decoration when the container requires a pixmap and does
not have one.

fixes #1292
2014-07-23 09:48:20 +02:00
Michael Stapelberg
8e8afb2609 Remove TODO for cycling through the floating z-index.
I think this is not a good feature to have. It shouldn’t be necessary
for a tiling window manager that explicitly discourages the use of
floating windows.

fixes #1324
2014-07-20 23:49:08 +02:00
Michael Stapelberg
0d656dd05d don’t set names corresponding to debug colors, remove “sleep 1”.
The names were (mostly) internal to i3 anyway.

Hopefully this doesn’t break anything, but I really think this old
behavior needs to go now :).
2014-07-15 10:36:31 +02:00
Michael Stapelberg
9463be42b8 Merge branch 'fix-layout-output' 2014-07-15 10:28:51 +02:00
Michael Stapelberg
ee75821699 Merge branch 'master' into next 2014-07-15 10:28:51 +02:00
Michael Stapelberg
679a5de8cf Bugfix: properly restore workspace containers (Thanks vals)
fixes #1306
2014-07-15 10:27:42 +02:00
Tony Crisci
344f6be84a Handle WM_CLASS changes
http://tronche.com/gui/x/icccm/sec-4.html

> The WM_CLASS property (of type STRING without control characters)
> contains two consecutive null-terminated strings. These specify the
> Instance and Class names to be used by both the client and the window
> manager for looking up resources for the application or as identifying
> information.

i3 processes changes to WM_CLASS by updating the cached property and
running assignments. This allows the property to be used in criteria
selection.

fixes #1052
2014-07-15 09:18:40 +02:00
Michael Stapelberg
c937f768f9 Merge branch 'master' into next 2014-07-11 09:51:28 +02:00
Michael Stapelberg
f96ec19df0 Merge branch 'fix-path' 2014-07-11 09:51:27 +02:00
Michael Stapelberg
9b0ec8b2ae Bugfix: i3-dmenu-desktop: quote path (Thanks nikolaus)
fixes #1316
2014-07-11 09:51:05 +02:00
Tony Crisci
6bf7f8ef78 Always explicitly set border widths on manage
When a window becomes managed, explicitly set the current border width
to the default instead of relying on the default value of -1 to apply
the correct value.

Now that there are two different kinds of default borders, a border
width value of -1 is ambiguous. This can lead to different border widths
effectively being applied when the container changes from tiling to
floating, which is surprising behavior.

This commit extends behavior introduced in this commit to normal
borders:

7afe9cc78b

Explicitly set current border width when BS_PIXEL

fixes #1304
2014-07-11 00:33:20 +02:00
Michael Stapelberg
931dda2d0b Merge branch 'fix-first-line' 2014-07-11 00:33:13 +02:00
Michael Stapelberg
c2ccfc7e60 Merge branch 'master' into next 2014-07-11 00:33:13 +02:00
Michael Stapelberg
686a40e384 Bugfix: render bars after the first chunk of JSON (Thanks javier)
fixes #1315
2014-07-11 00:32:42 +02:00
Tony Crisci
8e23dc881b i3bar: implement custom mouse wheel commands
Users can specify a command to run when a button was pressed on i3bar to
override the default behavior. Currently only the mouse wheel buttons
are supported. This is useful for disabling the scroll wheel action or
running scripts that implement custom behavior for these buttons.

Example:

bar {
    wheel_up_cmd nop
    wheel_down_cmd exec ~/.i3/scripts/custom_wheel_down
}

fixes #1104
2014-07-10 22:40:12 +02:00
Tony Crisci
0514be8d4b Handle EWMH requests to change current desktop
This request is used by pagers and bars to change the current
desktop likely as a result of some user action. We interpret this as
a request to focus the given workspace.

for more information see:

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368135008
2014-07-10 22:39:42 +02:00
Tony Crisci
196e748e94 bugfix: default floating border regression
Fixes a bug where a normal floating default border is not applied when
the default tiling border is set to a pixel value.

This bug was introduced in this commit:

43b447855d

Consider motif border for floating geometry

Fixes a comment that claimed default floating border could override
motif hints, which was never the case.

fixes #1305
2014-07-10 22:32:27 +02:00
Tony Crisci
b7f4ac769b Add testcase for EWMH desktop viewport
Test that the EWMH specified property _NET_DESKTOP_VIEWPORT is updated
properly on the root window. We interpret this as a list of x/y
coordinate pairs for the upper left corner of the respective outputs of
the workspaces.

This test is for this commit:

feature: implement ewmh desktop viewport property

4205973135
2014-07-10 22:31:46 +02:00
Michael Stapelberg
704ccb1d25 tests: include error message when unable to create a FIFO
I have seen this message once or twice, but since the actual error
message was not included, I cannot definitely say what’s going on.

I think it might be a race condition where the file with the specified
tmpname() already exists, but let’s be sure before we attempt to fix it.
2014-07-10 22:30:45 +02:00
Tony Crisci
d13730de70 Add link to git repository in hacking docs 2014-07-10 22:29:16 +02:00
Tony Crisci
1c81216a72 Add testcase for EWMH desktop names
Test that the EWMH specified property _NET_DESKTOP_NAMES is updated
properly on the root window. We interpret this as a list of the open
workspace names.

This test is for this commit:

Implement EWMH desktop names

a9c094b731
2014-07-10 22:29:03 +02:00
Tony Crisci
7381b50587 Make absolute floating move work with criteria
Make commands of type `move [window|container] [to] [absolute] position
<px> [px] <px> [px]` work with command selection criteria.

fixes #1301
2014-07-02 19:07:08 +02:00
Michael Stapelberg
5cbe2d63c0 Merge branch 'master' into next 2014-07-02 19:06:23 +02:00
Michael Stapelberg
04d292375d Merge branch 'fix-i3bar-colors' 2014-07-02 19:02:31 +02:00
Tony Crisci
0095ca8770 Use FREE macro for freeing colors
This macro will set the colors to NULL which avoids a double free on
reload when colors that were unconfigured become configured.

fixes #1299
2014-07-02 19:01:59 +02:00
Tony Crisci
bb24db1986 Bugfix: _NET_SUPPORTED property fixes
Fix a typing mistake that may cause _NET_SUPPORTED root property to
become corrupted.

This bug was introduced in:

Implement EWMH number of desktops property

http://code.stapelberg.de/git/i3/commit/?h=next&id=b47f480728a6d053c117e4b99ee4c78d99ba6a71

Additionally adds one missing atom to _NET_SUPPORTED.

fixes #1298
2014-07-01 23:43:14 +02:00
Michael Stapelberg
b5f3679a66 Merge branch 'revert-warp' 2014-06-28 13:05:40 +02:00
Michael Stapelberg
0279401528 Merge branch 'master' into next 2014-06-28 13:05:40 +02:00
Michael Stapelberg
1f9057bc4b Revert "Disable render-time pointer warps if asked"
This reverts commit b109b1b20d.

Turns out the change in behavior was unexpected by a number of users, so
let’s revert it and make those users that want this behavior configure
it explicitly.

Sorry for the back-and-forth here.
2014-06-28 13:04:52 +02:00
Michael Stapelberg
2d28273cac Merge branch 'master' into next 2014-06-28 13:01:48 +02:00
Michael Stapelberg
a1f6bfbf7e Merge branch 'fix-width' 2014-06-28 13:01:28 +02:00
Tony Crisci
7afe9cc78b Explicitly set current border width when BS_PIXEL
When a window becomes managed, if the config specifies a pixel border
style, explicitly set the current border width so it does not change
when the container changes from tiling to floating.

fixes #1266
2014-06-28 13:00:59 +02:00
Michael Stapelberg
01a2c5a3f1 Merge branch 'master' into next 2014-06-27 09:05:32 +02:00
Michael Stapelberg
3b546d00f7 Merge branch 'fix-restart' 2014-06-27 09:05:32 +02:00
Michael Stapelberg
c159fc4197 Bugfix: create the directory for storing the restart state (Thanks hjem)
fixes #1303
2014-06-27 09:04:51 +02:00
Michael Stapelberg
80007828c3 cleanup: src/i3.mk: add XKB_COMMON_CFLAGS when compiling i3 2014-06-25 17:58:16 +02:00
Michael Stapelberg
01d8d10c57 libxkbcommon 0.4.0 is required, 0.2.0 is too old (Thanks Mii)
fixes #1295
2014-06-25 17:57:48 +02:00
Michael Stapelberg
653b945376 Merge branch 'fix-i3-save-tree-unicode-args' 2014-06-25 10:00:59 +02:00
Michael Stapelberg
e594086757 Merge branch 'master' into next 2014-06-25 10:00:59 +02:00
Michael Stapelberg
ad7bf58822 Bugfix: interpret commandline parameters as utf-8
fixes #1293
2014-06-25 10:00:23 +02:00
Michael Stapelberg
0179f124d5 Merge branch 'log-dpi' 2014-06-24 09:57:05 +02:00
Michael Stapelberg
b91cd347e4 Merge branch 'master' into next 2014-06-24 09:57:05 +02:00
Michael Stapelberg
5c30c6ca80 add log messages for the detected DPI
Currently, the DPI is only logged when pango fonts are used, which is
often not the case when people report problems with the DPI detection.
2014-06-24 09:56:31 +02:00
Tony Crisci
136b3e345b Handle WM_CHANGE_STATE requests for iconic state
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4

 > IconicState - The client's top-level window is iconic (whatever that
 > means for this window manager). The client can assume that its
 > top-level window is not viewable, its icon_window (if any) will be
 > viewable and, failing that, its icon_pixmap (if any) or its
 > WM_ICON_NAME will be displayed.

For these requests, we just close the window.

fixes #1279
2014-06-24 09:39:12 +02:00
Tony Crisci
ca5137eeba remove unneeded render on map request
manage_window() will call tree_render() when appropriate, so pushing
changes to X here is not needed.
2014-06-24 09:32:14 +02:00
Tony Crisci
e77103012f remove unneeded render on unmap
tree_render() will call x_push_changes(), so calling it afterward is not
needed.
2014-06-24 09:32:04 +02:00
Tony Crisci
43b447855d Consider motif border for floating geometry
When calculating the geometry of a floating window with motif hints that
specify a border style, take into account that this window will have a
different border style when calculating its position with
floating_enable() when the window becomes managed.

A nice side effect of this is that users can override motif hints with
`new_float` config directives when they are specified other than
`normal`.

fixes #1270
2014-06-24 09:19:17 +02:00
Tony Crisci
14ec68526b Cross-output focus focus floating exception
Focusing across outputs with `focus [direction]` should focus an
existing floating con when no tiling con exists on the output in
[direction].
2014-06-24 09:05:39 +02:00
Tony Crisci
682fb0a291 Implement the window::urgent event
The window::urgent event is emitted when a container becomes urgent or
loses its urgent status.
2014-06-24 09:04:45 +02:00
Tony Crisci
a9c094b731 Implement EWMH desktop names
Maintain the _NET_DESKTOP_NAMES property on the root window.

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368131760

> _NET_DESKTOP_NAMES
>
> _NET_DESKTOP_NAMES, UTF8_STRING[]
>
> The names of all virtual desktops. This is a list of NULL-terminated
> strings in UTF-8 encoding [UTF8]. This property MAY be changed by a
> Pager or the Window Manager at any time.
2014-06-24 09:04:05 +02:00
Michael Stapelberg
a6c6e3e3a0 Merge branch 'master' into next 2014-06-24 09:01:59 +02:00
Michael Stapelberg
e83b0ad64d Merge branch 'fix-focus-unmapped' 2014-06-24 09:01:39 +02:00
Tony Crisci
1d100d6e16 Bugfix: don't focus unmapped container on manage
A window may become unmapped on manage when an assignment command unmaps
the window, such as moving it to the scratchpad or killing it.

This can cause i3 focus to be an unmapped window and different than X
focus which can lead to complications

fixes #1283
2014-06-24 09:01:04 +02:00
Tony Crisci
cbd51ce664 Workspace command number selection
If a `workspace {N}` or `move to workspace {N}` command is given with N
as a plain number, the workspace of this number is selected for the
context of the command if one exists and there is no workspace with a
name that exactly matches N.
2014-06-23 21:30:07 +02:00
Tony Crisci
4205973135 feature: implement ewmh desktop viewport property
Set and update the _NET_DESKTOP_VIEWPORT property

http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140146176862048

> _NET_DESKTOP_VIEWPORT x, y, CARDINAL[][2]/32
> Array of pairs of cardinals that define the top left corner of each
> desktop's viewport.
2014-06-23 21:29:57 +02:00
Michael Stapelberg
d1e59a204e fix src/commands.c with clang-format 2014-06-23 21:29:42 +02:00
Tony Crisci
babfb779d7 Implement the window::floating event
The window::floating event should be emitted when a window transitions
to or from the floating state.
2014-06-23 21:18:12 +02:00
Tony Crisci
c2b6b06da7 Make command move [direction] work with criteria
A container selected with criteria should be moved with the `move
[direction]` command, instead of this command always acting on the
focused container.
2014-06-23 21:17:27 +02:00
Tony Crisci
c936232545 Consistently parse workspace numbers
Use ws_name_to_number() to parse workspace numbers where this
transformation takes place.
2014-06-23 21:16:18 +02:00
Michael Stapelberg
cd06da711c DEPENDS: add libxkbcommon{,-x11}, update lkgv (Thanks okraits) 2014-06-22 14:42:28 +02:00
Michael Stapelberg
3f5a0f0024 Switch to xcb-xkb and libxkbcommon
This removes our last dependency on Xlib! :)

(Okay, an Xlib dependency still comes in through other libraries that we
 link against, but it’s not us. Our code is simpler by this change and
 uses one less connection to X11.)
2014-06-21 19:10:37 +02:00
Tony Crisci
cf6cc134b8 Implement the window::move event
The window::move event should be emitted when the window moves position
in the tree.
2014-06-19 13:00:17 +02:00
Tony Crisci
25ca78bbba Implement the window::close event
The window::close event should be emitted when a window closes.
2014-06-19 12:59:25 +02:00
Tony Crisci
0df172fd05 Feature: implement mouse bindings
A configured mouse binding (for example `bindsym button3 kill`) runs
its command when the mouse button is pressed over parts of a container.

If the binding has no modifer, it will only run when the button is
clicked on the window titlebar.

Otherwise if the binding has a modifier, it will run over the titlebar
or any part of the contained window.

fixes #558
2014-06-19 12:28:54 +02:00
Michael Stapelberg
0bc73f526d tests: explicitly set input hint
Since i3 honors the “Globally Active Input” focus model, we need to
explicitly state that we are not using that in our testcases :).

This requires X11::XCB from git to work (commit
71b25dcaafc509e710b8fd7de20c97ac3549fc39).
2014-06-19 12:17:39 +02:00
Tony Crisci
8a618e4b00 bugfix: don't set input focus if not accepted
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

> Clients using the Globally Active model can only use a SetInputFocus request
> to acquire the input focus when they do not already have it on receipt of one
> of the following events:
> * ButtonPress
> * ButtonRelease
> * Passive-grabbed KeyPress
> * Passive-grabbed KeyRelease

Since managing a window happens on a MapNotify (which is absent from this
list), the window cannot accept input focus, so we should not try to focus
the window at all.

Fixes an issue with xfce4-notifyd which (correctly) declines focus when
we send WM_TAKE_FOCUS, which puts i3 in a state where i3 focus and X
focus are different when a notification appears.
2014-06-19 11:55:28 +02:00
Tony Crisci
b47f480728 Implement EWMH number of desktops property
_NET_NUMBER_OF_DESKTOPS:

> This property SHOULD be set and updated by the Window Manager to
> indicate the number of virtual desktops.

We interpret this property as the number of noninternal workspaces.
2014-06-19 11:21:03 +02:00
Michael Stapelberg
4c06e7a573 clang-format-3.5 **/*.h **/*.c
This should be the last commit that formats a big bunch of files. From
here on, whenever I merge patches, I’ll run clang-format like described
in the title.
2014-06-19 11:20:32 +02:00
Michael Stapelberg
4211274fcd clang-format: don’t define ForeachMacros
Otherwise clang-formatting **/*.h breaks include/queue.h
2014-06-19 11:17:46 +02:00
Tony Crisci
f4a8253593 userguide: document exit confirmation dialog
In the section "Exiting i3", document the confirmation dialog (nagbar)
that will show when the user presses the default keys to exit in such a
way to hint that it is configurable.
2014-06-16 09:50:31 +02:00
Tony Crisci
fef46de283 docs: fix ipc library list formatting 2014-06-16 09:41:26 +02:00
Michael Stapelberg
d8328c7896 debian: add placeholder changelog entry 2014-06-15 19:37:38 +02:00
Michael Stapelberg
2924044505 debian: bump standards-version to 3.9.5 (no changes necessary) 2014-06-15 19:37:03 +02:00
Michael Stapelberg
d75c5a18d7 debian: install i3-save-tree(1) manpage 2014-06-15 19:36:54 +02:00
Michael Stapelberg
e77b7e6167 debian: update changelog 2014-06-15 19:15:44 +02:00
Michael Stapelberg
34f6f185bf Merge branch 'next' 2014-06-15 19:14:36 +02:00
Michael Stapelberg
f30c0a4fc7 Merge branch 'release-4.8' into next 2014-06-15 19:14:25 +02:00
Michael Stapelberg
30992e48d8 man: bump version to 4.8 2014-06-15 19:12:16 +02:00
Michael Stapelberg
9200094203 format **/*.c with clang-format-3.5
This has multiple effects:

1) The i3 codebase is now consistently formatted. clang-format uncovered
   plenty of places where inconsistent code made it into our code base.

2) When writing code, you don’t need to think or worry about our coding
   style. Write it in yours, then run clang-format-3.5

3) When submitting patches, we don’t need to argue about coding style.

The basic idea is that we don’t want to care about _how_ we write the
code, but _what_ it does :). The coding style that we use is defined in
the .clang-format config file and is based on the google style, but
adapted in such a way that the number of modifications to the i3 code
base is minimal.
2014-06-15 19:07:02 +02:00
Michael Stapelberg
4d937b7dbb add .clang-format, to be used with clang-format-3.5 2014-06-15 19:05:01 +02:00
Michael Stapelberg
df3f588cb5 delete old release notes 2014-06-15 18:27:03 +02:00
Michael Stapelberg
e07c49f4fb add release notes for v4.8 2014-06-15 18:26:40 +02:00
Michael Stapelberg
b83c3909b4 man/i3.man: update to contain new default font 2014-06-15 18:18:44 +02:00
Michael Stapelberg
893dbae4b1 Bugfix: don’t overwrite the window’s geometry after restarting
fixes #1263
2014-06-13 22:29:47 +02:00
Michael Stapelberg
e69fcbb17b Bugfix: ensure floating windows don’t drop out of fullscreen when restarting
fixes #1263
2014-06-13 22:26:06 +02:00
Michael Stapelberg
35f15f855d Bugfix: don’t errnously render floating fullscreen windows during restart
fixes #1263
2014-06-13 22:21:00 +02:00
Michael Stapelberg
2e4a2d4f30 Bugfix: don’t overwrite the original size of floating windows when changing border style
fixes #1263
2014-06-13 22:19:23 +02:00
Michael Stapelberg
570b5729cc also change the default font in i3.config.keycodes 2014-06-13 20:02:34 +02:00
Tony Crisci
6d0071db19 default config: use set for directions
Using `set` for direction letter keys makes them easier to configure for
users who prefer traditional vim-style directions.
2014-06-13 20:01:18 +02:00
Michael Stapelberg
807ff6b10d fix warning: use size_t when comparing against strlen() 2014-06-12 21:24:29 +02:00
Michael Stapelberg
5beaea3034 handle windows whose WM_TRANSIENT_FOR points to themselve
I consider this behavior broken and not respecting the standard, but it
happens in real life, and it’s better for i3 to not busy-loop in such a
situation :).

fixes #1259
2014-06-12 21:16:45 +02:00
Michael Stapelberg
1527f2b8a6 Revert "Rerender on button press only when focus changes"
This reverts commit b714878f52.

That commit introduced a regression: clicking on floating windows would
no longer raise them reliably.

fixes #1260
2014-06-12 21:03:13 +02:00
Tony Crisci
9cee8dac5e Bugfix: Set input focus with last timestamp
Setting input focus with the last event timestamp prevents race
conditions when setting focus.

fixes #1127
2014-06-12 09:33:35 +02:00
Michael Stapelberg
0552fd5666 Bugfix: fix crash when using multiple for_window statements that move windows (Thanks Antonio)
fixes #1257
2014-06-12 09:32:55 +02:00
Marcus Crestani
a76a81f80b Include sys/sysctl.h after i3.h to prevent redefinition warnings caused by queue.h on OS X. 2014-06-11 23:27:02 +02:00
Holger Langenau
e562aeb338 Bugfix: Typo in i3.xsession.desktop TryExec rule.
Typo in executable for TryExec prevents LightDM from starting i3.
2014-06-11 23:26:43 +02:00
Tony Crisci
8ece995001 Bugfix: prevent unneeded render on pointer enter
When `focus_follows_mouse` option is on, prevent an uneeded render on
pointer enter when the con is already focused.

This pointer enter might be caused by entering a window decoration of an
already-focused container.

This extra render can cause concurrency issues when focus is set
asynchronously with WM_TAKE_FOCUS.
2014-06-11 09:38:49 +02:00
Michael Stapelberg
94574db6f6 cleanup temporary directory when restarting and not using XDG_RUNTIME_DIR
fixes #1253
2014-06-11 09:17:43 +02:00
Michael Stapelberg
6fe44d8584 debian: recommend fonts-dejavu-core after we switched the default 2014-06-08 22:28:13 +02:00
Michael Stapelberg
34cd06be7a default config: switch to “DejaVu Sans Mono 8” as default font
As mentioned in the comment, this change is motivated by better support
for unicode, right-to-left rendering and scalability on retina/hidpi
setups.
2014-06-08 22:25:59 +02:00
Michael Stapelberg
26460c091a delete ipc socket when exiting, cleanup tmpdir
fixes #1253
2014-06-08 22:13:43 +02:00
Michael Stapelberg
617afc67a2 replace remaining printf()s with D?LOG
fixes #1252
2014-06-08 21:56:14 +02:00
Campbell Barton
030595a4eb Use XCB_BUTTON_INDEX defines for mouse buttons 2014-06-08 13:55:27 +02:00
Tony Crisci
7e564713f9 Don't ELOG ipc EOF
Receiving EOF from a client is not an error, but rather a standard way a
client may disconnect from the IPC. This should rather be logged from
a consumer of the libi3 ipc_recv_message() function as a normal client
disconnect event.

fixes #1252
2014-06-08 13:54:55 +02:00
Matthias Thubauville
42804b4555 Mod i3.xsession.desktop for autostart Ubuntu 14.04
i3 started from lightdm properly, but autostart did not work. The line
"X-LightDM-DesktopName=i3" seems to be responsible to allow autostart.

Tested on a clean install of Ubuntu 14.04.
2014-06-08 13:54:43 +02:00
Tony Crisci
7482a0f642 Add abstraction for running a binding
Add run_binding function to bindings.h.

> Runs the given binding and handles parse errors. Returns a
> CommandResult for running the binding's command. Caller should render
> tree if needs_tree_render is true. Free with command_result_free().
2014-06-01 11:55:01 +02:00
Michael Stapelberg
7b06e20105 tests: fix a few racy testcases by adding sync_with_i3 calls 2014-06-01 11:48:10 +02:00
Tony Crisci
b4507da713 Set EWMH active window to None when none has focus
_NET_ACTIVE_WINDOW:

> The window ID of the currently active window or None if no window has
> the focus.

This fixes a bug that would not update _NET_ACTIVE_WINDOW when focus
changed to an i3 container without a window such as a branch or
workspace content container.
2014-06-01 11:45:59 +02:00
Tony Crisci
c7aae56030 Refactor parse_command
parse_command returns a struct that contains useful information about
the result of a command as a whole (instead of the intermediate
representation used during parsing).

parse_command now requires the caller to allocate the yajl_gen used for
generating a json reply. This is passed as the second parameter to
parse_command. If NULL is passed, no json reply will be generated.
2014-05-31 14:59:35 +02:00
Atte Peltomaki
62ea60ba42 Add configuration option for disabling mouse warping
This patch adds a new configuration option "mouse_warping [output|none]".

When mouse warping is disabled, mouse cursor does not jump to middle of current
screen when changing workspaces between multiple outputs. This introduces a
"special" cursor state, where focus is in one window and cursor on another.
Useful for eg. scrolling a web page with mouse wheel while typing into another
window on keyboard.
2014-05-31 14:55:29 +02:00
Tony Crisci
f41e81bd96 Feature: Workspace assignment by number
Workspace assignments with bare numbers assign all workspaces with that
number to the specified output.

Workspace assignment by number is overridden by workspace assignment by
name.
2014-05-20 20:15:55 +02:00
Tony Crisci
cfd06718fc Bugfix: double X render on manage
When a con is being managed, tree_render should only be called once to
push the changes to the rendering server to prevent wasting resources.
2014-05-20 20:10:22 +02:00
Tony Crisci
c79309eba8 Fix test 517
Test 517 was sometimes failing because the command to reset the test
generates a focus event which was not being properly ignored.

Now the correct event should always be tested.
2014-05-20 19:59:49 +02:00
Tony Crisci
45fa4b7d23 Change the names of parser result structs
Change the name of structs CommandResult and ConfigResult to
CommandResultIR and ConfigResultIR to show they are an intermediate
representation used during parsing.
2014-05-20 19:59:01 +02:00
Michael Stapelberg
dda9a7f6e0 debian: require libyajl >= 2.0.4 (Thanks Koston) 2014-05-16 18:15:53 +02:00
Michael Stapelberg
e41b11fa0a use size_t for strspn() return value 2014-05-16 18:03:31 +02:00
Jean-Philippe Ouellet
88114bc055 "somewhen" -> "some time" in i3-config-wizard(1) 2014-05-16 18:00:00 +02:00
Aleksi Blinnikka
89dd868e82 Separate border width for floating windows
Floating windows already had their own border style, but the width was
the same for all windows.

The configuration directives 'new_window' and 'new_float' can now be
used simultaneously to have different border widths for floating and
tiled windows.

fixes #1244
2014-05-16 17:59:21 +02:00
Tony Crisci
e707e0a5fa i3bar: implement custom workspace numbers config
Implement the configuration option within the bar config directive for
custom workspace numbers with the directive `strip_workspace_numbers
yes`.

This directive strips the workspace name of the number prefix and
delimiter. When the workspace name consists only of the number, it will
default to show the number.

For example:

* "2:5" -> "5"
* "4:$" -> "$"
* "8" -> "8"

This allows customization of i3bar for alternate ordering of workspaces
which has a legitimate use for alternate keyboard layouts such as
Dvorak.

fixes #1131
2014-05-16 17:55:30 +02:00
Michael Stapelberg
e2f47ef466 i3-input: fix (irrelevant) memory leak
Given that the code was exit(0)ing directly after using that memory,
it’s not like this has any effect. However, less false positives on the
clang-analyze report pages is a good thing.
2014-05-15 23:50:09 +02:00
Michael Stapelberg
0d50658fa7 i3-dmenu-desktop: don’t use smartmatch (it’s experimental)
This commit should not change functionality at all (famous last words).
2014-05-15 22:52:35 +02:00
Michael Stapelberg
b69b3fc572 docs/userguide: fix default key binding (Thanks Maxime) 2014-05-08 08:45:30 +02:00
Michael Stapelberg
79d92cb567 fix “make dist” target
This was broken in 13db562551
2014-05-04 23:07:53 +02:00
Tony Crisci
b714878f52 Rerender on button press only when focus changes
On button press events, the only change in state that would presently
require rerendering the tree is when the focused window changes.
2014-05-04 22:55:50 +02:00
Tony Crisci
13db562551 Remove yajl major version conditionals
Yajl version ≥ 2 is required.

fixes #1156
2014-05-04 22:52:37 +02:00
Tony Crisci
22b4215d92 Feature: improve active window request handling
Allow client requests of type _NET_ACTIVE_WINDOW to switch workspaces if
they indicate they are a pager. Otherwise, set the urgency hint on that
con to indicate that something happened.

This allows task switchers like skippy-xd to work properly.

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368127856
2014-05-03 15:57:43 +02:00
Marco Hunsicker
7170afc2c7 Test workspace empty event semantics
This patchs provides testcases for the workspace "empty" event.
2014-05-03 15:37:25 +02:00
Tony Crisci
5fc1b5d02d Refactor binding accessor
Change the primary binding accessor to `get_binding_from_xcb_event`.

This function gets a binding from a generic xcb event of type KeyPress,
KeyRelease, ButtonPress, or ButtonRelease by determining the input type
(keyboard or mouse), the modifiers pressed from the filtered event
`state`, managing the proper fall back in case mode switch is enabled,
and finally querying the bindings for a binding that matches the event.

The logic of querying keyboard bindings is not intended to be altered by
this change.

The general accessor has been slightly modified to work with mouse
bindings and made private because it is only used in bindings.c
2014-05-03 15:34:33 +02:00
Tony Crisci
c3d46c9145 i3bar: reinit colors on barconfig update
Allows bar colors to be updated on barconfig update events, such as with
the ipc command `reload`.
2014-05-03 15:09:02 +02:00
Tony Crisci
4126c87daf Dont include dock clients in ewmh lists
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368149456

The _NET_CLIENT_LIST property of the root window:

> These arrays contain all X Windows managed by the Window Manager.

Dock clients are not managed windows, so they should not be included in
_NET_CLIENT_LIST or _NET_CLIENT_LIST_STACKING.
2014-05-03 15:08:31 +02:00
Michael Stapelberg
ff94d28b85 improve error messages for i3-internal workspace names 2014-05-03 15:02:51 +02:00
Michael Stapelberg
dba8c91eff add a testcase for the previous commit (internal workspaces) 2014-05-03 15:00:49 +02:00
Alexander Berntsen
bc79884a9e Make all workspaces starting with "__" internal
Workspaces won't work properly if they start with "__", so reserve that
namespace altogether. Disallow renaming workspaces to reserved namespace
and using reserved namespace in configuration.

Fixes #1209.
2014-05-03 15:00:15 +02:00
Michael Stapelberg
144e3fba2a render resize windows retina-correctly 2014-05-02 17:11:48 +02:00
Michael Stapelberg
812f1d268d s/he/she/, s/his/her/ (Thanks lasers) 2014-04-30 09:43:32 +02:00
Tony Crisci
8146638320 Implement the window::fullscreen_mode event
The fullscreen_mode event is a window with the "change" property set to
"fullscreen_mode". This event should be emitted whenever a window enters
or exits fullscreen mode.

This event can be used to turn off dpms off when a window is fullscreen
or display the fullscreen container name in the status line for
instance.
2014-04-30 09:35:31 +02:00
Tony Crisci
2f42fe61d9 Feature: send complete config on barconfig_update
Send all the options in the bar block on the barconfig_update event.

This will eventually allow for dynamically updating bar colors with the
`reload` command.
2014-04-30 09:33:29 +02:00
Tony Crisci
ab0fae400b Delegate click handling to dock clients
Do not handle click events on dock clients because they are not managed
windows. Dock clients are responsible for sending the message to i3 to
focus a workspace if that is appropriate. i3bar now sends the message to
focus the correct workspace when that is appropriate.

Otherwise, it could interfere with the dock clients own click handling,
which could be an action to focus a different workspace than i3 had
assumed, such as would be the case with a workspace widget.
2014-04-30 09:31:42 +02:00
Tony Crisci
7a5cf4aa44 Bugfix: ipc window event crash with no window
The log message at the top of ipc_send_window_event would segfault when
no xcb window is present, such as for a split container.

The log now shows the con id which is more relevant anyway.
2014-04-30 09:22:46 +02:00
Tony Crisci
3171d7ebe5 Implement bindsym mouse configuration
If a `bindsym` config directive specifies a symbol beginning with
"button", the binding will be given the type B_MOUSE for the indicated
button number.

Example:

bindsym $mod+button2 exec echo 'button two'

This will be interpreted as having input code (now `keycode`) 2 and type
B_MOUSE.

The mechanism to find and run mouse bindings on mouse events is not
implemented.
2014-04-30 09:18:53 +02:00
Michael Stapelberg
3760a48abe truncate DPI to an integer before multiplying (Thanks eeemsi)
This fixes i3bar workspace button rendering on non-DPI screens
(oldschool!)
2014-04-26 22:50:31 +02:00
Michael Stapelberg
350e2c5f55 do click handling and tray padding retina-correctly 2014-04-26 17:30:27 +02:00
Michael Stapelberg
9686dd4943 draw workspace buttons and padded text blocks retina-correctly 2014-04-26 17:27:57 +02:00
Michael Stapelberg
87110a87a8 i3bar: render separators retina-correctly 2014-04-26 17:20:21 +02:00
Michael Stapelberg
bff72d653d Initialize default window border width retina-correctly 2014-04-26 17:18:21 +02:00
Michael Stapelberg
c79c49f69d libi3: add logical_px() for Retina display support 2014-04-26 17:17:37 +02:00
Michael Stapelberg
a0e979d097 i3-dmenu-desktop: also quote the %c field code (Thanks bo)
The spec says:

“Implementations must take care not to expand field codes into multiple
 arguments unless explicitly instructed by this specification. This means
 that name fields, filenames and other replacements that can contain
 spaces must be passed as a single argument to the executable program
 after expansion.”

fixes #1240
2014-04-26 14:25:12 +02:00
Michael Stapelberg
87c855f851 add missing docs/layout-saving-1.png 2014-04-26 12:46:25 +02:00
Michael Stapelberg
cb37d1a140 debian: add docs/layout-saving 2014-04-26 12:40:30 +02:00
Tony Crisci
02ff10aadb Move check_for_duplicate_bindings to bindings.[ch]
Additionally add a check for the same input_type (mouse or keyboard).
Bindings with different input types cannot be duplicates.
2014-04-26 12:10:33 +02:00
Tony Crisci
ea551e4d99 Bugfix: resize window check should check for null
When checking the window type for a resize command, first check to see
if the window property is null before checking whether or not it is a
dock window. The window may be null in the case it is a branch
container.

fixes #1220
2014-04-26 12:10:05 +02:00
Petr Písař
2cc51841a5 Reset SIGIPE handler before executing a command
This commit:

commit fb6d117c42
Author: Axel Wagner <mail@merovius.de>
Date:   Thu Dec 30 21:09:32 2010 +0100

    Port sighandler to tree-branch

blocks SIGPIPE. Unfortunatelly blocked signal set is preserved accross
execve()s, so any program executed by i3 inherited blocked SIGPIPE signal.
This leads to courious effects when pipe writer does not terminate after
exiting pipe reader.

Simple reproducer is to spawn a new xterm by a key shortcut and then run this
command there:

$ perl -e 'print $SIG{PIPE}, qq{\n}'
IGNORE

fixes #1237
2014-04-26 12:09:45 +02:00
Michael Stapelberg
7deb23c727 add docs/layout-saving
Feedback on this new document is very much appreciated, please don’t
hesitate to state anything that is hard to understand/could be improved.
2014-04-23 19:49:50 +02:00
Michael Stapelberg
254e4d6f05 Fix i3.mk to not rebuild test.* all the time
This problem was introduced in 5181055a
2014-04-23 19:34:45 +02:00
Michael Stapelberg
b966f3796f build i3-save-tree(1) manpage (Thanks xeen) 2014-04-23 19:33:22 +02:00
Julian Ospald
5181055aad fix parallel make
fixes #1232
2014-04-23 17:55:15 +02:00
Julian Ospald
a2cbca7ae1 respect CFLAGS in linking command
fixes #1233
2014-04-23 17:55:15 +02:00
Michael Stapelberg
110b8d9557 Don’t overwrite existing windows with placeholder windows
This could happen when you appended a layout on a workspace where there
are already other windows.
2014-04-18 20:36:56 +02:00
Michael Stapelberg
524f20b8a0 layout restoring: append at the nearest split container (or workspace) (Thanks chris)
Before this commit, leaf containers (such as terminal emulators) would
get children appended, which is not intended.

fixes #1223
2014-04-18 20:30:27 +02:00
Tony Crisci
702906d0cf Move switch_mode to bindings.[ch] 2014-04-15 17:46:59 +02:00
Tony Crisci
05f0585817 Dont set input focus and send WM_TAKE_FOCUS
If input focus is set by the window manager, it is not necessary to send
WM_TAKE_FOCUS because it has already taken focus.

http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

> The goal is to support window managers that want to assign the input
> focus to a top-level window in such a way that the top-level window
> either can assign it to one of its subwindows or can decline the offer
> of the focus. For example, a clock or a text editor with no currently
> open frames might not want to take focus even though the window
> manager generally believes that clients should take the input focus
> after being deiconified or raised.

Both setting input focus and sending WM_TAKE_FOCUS is effectively
setting focus on the window twice which is certainly against the spirit
of the spec, if not the letter.

fixes #1167
2014-04-15 17:46:08 +02:00
Tony Crisci
819bc09375 Maintain the _NET_CLIENT_LIST property
Add and update the _NET_CLIENT_LIST property on the root window to
better comply with ewmh standards.

Information on this property can be found here:
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html

> These arrays contain all X Windows managed by the Window Manager.
> _NET_CLIENT_LIST has initial mapping order, starting with the oldest window.

fixes #1099
2014-04-15 17:44:25 +02:00
Michael Stapelberg
77abb2ef19 Bugfix: clear wm_size_hints if they are not set
Otherwise, we read random garbage. Found by the testsuite due to
t/185-scratchpad.t failing because a window was incorrectly recognized
as a floating window.
2014-04-09 22:14:50 +02:00
Michael Stapelberg
e84fa22bb8 Fix t/158-wm_take_focus, it was not properly verifying events (Thanks TonyC)
See also http://cr.i3wm.org/patch/500 for TonyC’s patch. This version
reduces code duplication.
2014-04-09 21:47:32 +02:00
Michael Stapelberg
2dfabc38f8 Bugfix: Use DOM loaded event for TOC (Thanks TonyC)
See http://code.i3wm.org/i3-website/commit/?id=d8e239e6 for the original
commit for the i3 website. This one is for documentation built from git.
2014-04-09 20:37:24 +02:00
Tony Crisci
4ded44d18a Send last event timestamp with WM_TAKE_FOCUS msg
According to 4.1.7 of the iccm spec

http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

> Windows with the atom WM_TAKE_FOCUS in their WM_PROTOCOLS property may
> receive a ClientMessage event from the window manager (as described in
> section 4.2.8) with WM_TAKE_FOCUS in its data[0] field and a valid
> timestamp (i.e. not CurrentTime ) in its data[1] field.

Adds the timestamp parameter to send_take_focus to avoid the dangerous
use of a global variable.
2014-03-31 23:28:33 +02:00
David Coppa
2ba0d1ea49 OpenBSD does not have librt 2014-03-31 22:53:39 +02:00
Arun Persaud
910875aea6 i3-nagbar: add missing newline when printing version information 2014-03-23 18:56:53 +01:00
Arun Persaud
ae84637888 i3-nagbar.man: updated man page to include all options
several options were not documented in the man page.
2014-03-23 18:56:49 +01:00
Quentin Glidic
eb7537e53d i3bar: Send mouse wheel events to child too
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2014-03-21 19:30:17 +01:00
Tony Crisci
0c3735fc23 Free owindow when no con_id match or window
This memory leak is related to matching on con_id or matching when the
container has a null window. In that case, windows that do not match
would leak the owindow struct.
2014-03-21 19:26:13 +01:00
Tony Crisci
587273505c Free match after criteria initialization
This memory leak is associated with matching by a criteria that uses a
regular expression. Without freeing a regex before calling match_init,
it will definitely be lost.
2014-03-21 19:23:05 +01:00
jeroentbt
85df107b0d docs: fix typo 2014-03-21 19:21:51 +01:00
jeroentbt
c0589ad5be fix typo 2014-03-21 19:21:47 +01:00
Tony Crisci
fe5103e8e1 Test 222: call exit_gracefully
Not calling exit_gracefully causes some other test to fail during a
complete_run sometimes.
2014-03-21 19:21:19 +01:00
Tony Crisci
1263d2c0e8 Test 175: use BAIL_OUT instead of die
BAIL_OUT produces a friendlier message explaining why the tests cannot
continue on the command line. `die` produces a cryptic message that some
test failed for some reason.
2014-03-21 19:21:14 +01:00
Michael Stapelberg
ed158d1259 Merge branch 'fix-resize' 2014-03-15 18:05:45 +01:00
Michael Stapelberg
c23db20cb5 Merge branch 'master' into next 2014-03-15 18:05:45 +01:00
Tony Crisci
a6a6c9b6d9 Bugfix: don't try to resize docks by command
cmd_resize does not implement a method to resize dock clients.

A command like `[instance=".*"] resize grow width 160 px or 16 ppt`
when a dock client matched would crash i3.

fixes #1201
2014-03-15 18:05:42 +01:00
Tony Crisci
c5df093f5d Move translate_keysyms to bindings.[ch]
Additionally add a check so the function only handles bindings of type
B_KEYBOARD to prepare for the new bindmouse feature.
2014-03-15 17:59:57 +01:00
Tony Crisci
9b03be644f Add valgrind suppression file to testcases
The suppression file makes valgrind output more readable by hiding
reports of memory leaks for GObject-related initialization functions in
Pango and Cairo.
2014-03-10 17:37:41 +01:00
Tony Crisci
192b67df18 Free window ran_assignments on tree_close 2014-03-10 17:37:35 +01:00
Tony Crisci
35eac121fc Update ipc library list documentation
Add a link to the new JavaScript, Python, and Lua ipc libraries.

Add notice that the older Python libraries are not maintained.

Sort the list alphabetically.
2014-03-10 08:40:00 +01:00
Tony Crisci
81271887e2 Set con window to NULL on tree_close
Prevents invalid reads on the freed window struct.
2014-03-10 08:39:56 +01:00
Tony Crisci
0711f5ab4e Add test for floating types
Add a test that verifies that windows with properties that indicate they
should be floating are indeed opened floating.
2014-03-08 21:00:50 +01:00
Kernc
8ed95ae58c Improved detection of windows that want floating
Windows that match the following criteria are floated by default:
- dialog, utility, toolbar, or splash windows,
- modal windows, or
- windows that have specified equal minimum and maximum size.

closes #1182
2014-03-08 21:00:44 +01:00
Michael Stapelberg
89be6cb509 Merge branch 'fix-recv-memleak' 2014-03-08 20:59:18 +01:00
Michael Stapelberg
b28ddca96d Merge branch 'master' into next 2014-03-08 20:59:18 +01:00
Tony Crisci
a16dfdb15e Bugfix: ipc_receive_message reply leak
The function ipc_recv_message in libi3 allocates memory to the location
of the `message` reply in src/ipc_receive_message.c with malloc and must
be freed.

This memory leak was found using valgrind.
2014-03-08 20:58:56 +01:00
Tony Crisci
d5cf494ba2 Update ipc COMMAND reply documentation
The COMMAND reply consists of a list of results for each command that
was parsed.
2014-03-01 09:20:16 +01:00
Tony Crisci
3d6d0c134c Move keyboard binding accessor to bindings.[ch]
Rename `get_binding` to `get_keyboard_binding` and ensure that this
function only accesses bindings of type B_KEYBOARD. Other types of
bindings (e.g. mouse bindings) will be accessed by a different function.
2014-02-26 22:26:05 +01:00
Tony Crisci
0f6c411f06 Fix current_workspace outputs reply member docs
The current_workspace member of an ipc OUTPUTS reply is the name of the
workspace as a string.
2014-02-26 22:25:12 +01:00
Marco Hunsicker
00ee86de79 Send IPC window events for focus and title changes
This patch fixes ticket #1168 to extend the window IPC event mechanism
to send IPC events for window focus and title changes. The newly added
window events use the same format as the already established "new"
event.

Specifically this patch:

* Moves the ipc_send_window_event() function from src/manage.c into
  src/ipc.c and adds an argument for the change property of the event
* Updates src/manage.c to use the new function signature. To ensure
  that the "new" event does not send the same event data as the
  "focus" event, setting focus now happens after the "new" event
  has been sent
* Adds IPC focus event notification to src/x.c. To workaround a problem
  during window close when accessing the window name, a function has been
  added to query whether a window is actually attached to its parent. To
  avoid obsolete focus notification, a new field has been added to keep
  track of the focus without any interference by the click handling
* Adds IPC title event notification to src/handlers.c. To avoid
  obsolete title notification, a function has been added to determine
  whether a window title has actually changed
* Updates the IPC documentation to include the new events
* Updates testcases/t/205-ipc-windows.t to include the "focus" event
  in order to ensure the correct event sequence
* Adds two new unit tests, b/testcases/t/219-ipc-window-focus.t and
  b/testcases/t/220-ipc-window-title.t to ensure proper "focus" and
 "title" events
2014-02-26 22:24:19 +01:00
Michael Stapelberg
07d583d780 tests: sync_with_i3 before warping pointer
To be honest, I’m not entirely sure where the race condition originates
from, but when making sure that there are no pending events
(which is what sync_with_i3 accomplishes) before warping the pointer, we
have less flaky testsuite runs.

closes #1189
2014-02-25 20:44:17 +01:00
Alexander Berntsen
cdbf62d055 man/i3.man: Update font doc to reflect i3.config 2014-02-15 13:23:08 +01:00
Tony Crisci
48ec79ca02 Move grab_all_keys to bindings.[ch]
Also add checks for binding input_type to filter bindings that are not
keyboard bindings.
2014-02-15 12:55:38 +01:00
Tony Crisci
00909aa3b1 i3bar: Do not kill watcher on EOF
Wait for the child process to exit on its own before freeing
watcher-related resources.

i3bar shows the last received status line until the process exits.

Fixes a race condition where the termination signal was sometimes not
received to display a meaningful error message.
2014-02-15 12:55:30 +01:00
Tony Crisci
759c26fc02 Improve drag_pointer error handling
Log errors generated by failed pointer grabs and ungrab the pointer
after failed keyboard grabs.
2014-02-13 21:06:32 +01:00
Michael Stapelberg
62a4237ed0 t/130-close-empty-split: clean up old workspace
This hopefully increases the reliability of the test. Empty containers
created by “open” sometimes get spurious UnmapNotify events, and in at
least one run, this test failed because of such an event.
2014-02-13 21:05:42 +01:00
Michael Stapelberg
491274d8b3 handle ButtonPress events with child != XCB_NONE (Thanks xeen)
The X11 protocol description states:

  The window the event is reported with respect to is called the event
  window. The event window is found by starting with the source window
  and looking up the hierarchy for the first window on which any client
  has selected interest in the event.

For the case of urxvt with URxvt.internalBorder > 0, urxvt sets up a
subwindow for its actual contents that is placed “in the middle” of the
urxvt window. In terms of the X11 protocol, the source window is urxvt’s
window, but urxvt does not select ButtonPress events for that.
Therefore, X11 will go up in the hierarchy and deliver the event to i3
for i3’s window decoration, even though this was not actually a click on
the decoration, but into the managed window.

Therefore, we check whether child != XCB_NONE for clicks on window
decorations and then handle them as a click inside the window.

fixes #1176
2014-02-09 14:00:43 +01:00
Michael Stapelberg
22be7bc986 fix warnings: unsigned check for >= 0 is always true 2014-02-08 21:03:26 +01:00
Tony Crisci
6ae4ecb1de Bugfix: tree_split should not split floating cons
Use the more robust test of `con_is_floating` for testing a container
for being floating.

fixes #1177
2014-02-08 20:59:23 +01:00
Jonas Maaskola
1bd13ce555 Doc update: title right click resizes floating windows
This documentation update describes the change implemented in
905440d6d1
It avoids repetitive usage of the word 'also'.
2014-02-08 20:41:16 +01:00
Steve Jones
0e27ff3cd0 Set EWMH desktop properties on startup.
Calls ewmh_update_current_desktop on startup to set the
_NET_CURRENT_DESKTOP property. Without this change the property only
gets set after the workspaces have been manipulated. Also exclude
hidden workspaces (i.e. those starting with "__" from the workspace
index.

Adds tests for startup and workspace switching.
2014-02-08 20:38:16 +01:00
Jonas Maaskola
905440d6d1 Resize floating windows by right-clicking decoration 2014-02-05 22:41:26 +01:00
Tony Crisci
ba80f96009 Document the existence of a C ipc project
Add a link to https://github.com/acrisci/i3-ipc which is a new ipc
library in the design phase of development. When it is stable, it will
provide bindings to many high-level scripting languages with
GObject-introspection.

This project aims to replace the unmaintained Python library and offer
an ipc library in new languages such as Lua and JavaScript.
2014-02-05 22:22:38 +01:00
Tony Crisci
d6b32971df Really do not create con pixmap when not needed
The pixmap of a borderless leaf container will not be used except
for the titlebar in a stack or tabs.

Make sure these containers do not (really) have a pixmap because it can
only get in the way.

fixes #1013
2014-02-05 22:21:47 +01:00
Michael Stapelberg
f891a8a9af i3bar: fix resource leak: statusline_ctx needs to be freed first
In practice this is rarely noticeable, unless you very often switch
screen resolutions, I think.

fixes #1172
2014-02-02 11:24:17 +01:00
Michael Stapelberg
bc0bf2285c Merge branch 'fix-i3bar-leak' 2014-02-02 11:23:54 +01:00
Michael Stapelberg
a4d5044851 i3bar: fix resource leak: statusline_ctx needs to be freed first
In practice this is rarely noticeable, unless you very often switch
screen resolutions, I think.

fixes #1172
2014-02-02 11:23:44 +01:00
Michael Stapelberg
d51d2acc95 Revert "Do not create container pixmap when not needed"
This reverts commit 6578976b61.

fixes #1170
2014-01-30 22:55:26 +01:00
Tony Crisci
d24d8baeb5 Abstract binding configuration to bindings.[ch]
Create files bindings.[ch] to contain functions for configuring,
finding, and running bindings.

Use the new function `configure_binding` for binding configuration. This
function adds a binding from config parameters.

Export the function `modifiers_from_str` from config_directives.h.

This change is made in preparation for the new bindmouse functionality.
2014-01-28 08:21:21 +01:00
Michael Stapelberg
da0acb2080 contrib: add per-workspace-layout.pl 2014-01-26 16:51:32 +01:00
Michael Stapelberg
da3fc2ad6b contrib: add sticker that was actually printed
While sticker_stickma_black.svg is the file that we originally provided,
the file that we got back from stickma and actually ordered is the new
one.
2014-01-26 16:43:02 +01:00
Michael Stapelberg
5d468f3317 docs/NoName-2009-03-12: add missing screenshot 2014-01-26 16:39:09 +01:00
Michael Stapelberg
51f077b409 debian/rules: get rid of hardcoded release notes file name 2014-01-26 16:22:06 +01:00
Marco Hunsicker
92868cf6d3 update year in copyright notices to 2014
This patch updates the copyright year information the i3 and
i3bar binaries show to the user.
2014-01-26 16:10:57 +01:00
Michael Stapelberg
23763ca2a5 update debian/changelog 2014-01-23 23:11:49 +01:00
Michael Stapelberg
00cf2b21da Merge branch 'master' into next 2014-01-23 23:05:15 +01:00
Michael Stapelberg
da12c9f591 Merge branch 'release-4.7.2' 2014-01-23 22:53:21 +01:00
Michael Stapelberg
31c33df279 add release notes for 4.7.2 2014-01-23 22:51:55 +01:00
Michael Stapelberg
a708da684f asciidoc git config: fix impress link, update copyright (Thanks Jens) 2014-01-23 22:24:03 +01:00
Michael Stapelberg
25faefa498 Merge branch 'userguide-reset' 2014-01-23 22:20:39 +01:00
Michael Stapelberg
7cf0c632c3 Merge branch 'master' into next 2014-01-23 22:20:39 +01:00
Wieland Hoffmann
658abe2e11 docs/userguide: change 'reseted' to 'reset'
It's an irregular verb.
2014-01-23 22:20:36 +01:00
Michael Stapelberg
7aa5be9d41 Merge branch 'openbsd-fallocate' 2014-01-23 22:20:16 +01:00
Michael Stapelberg
cacc199a68 Merge branch 'master' into next 2014-01-23 22:20:16 +01:00
David Coppa
88300f0f30 OpenBSD lacks posix_fallocate() 2014-01-23 22:20:14 +01:00
Michael Stapelberg
d090bd5ac1 Merge branch 'fix-i3-with-shmlog' 2014-01-23 22:19:49 +01:00
Michael Stapelberg
61b53603e2 Merge branch 'master' into next 2014-01-23 22:19:49 +01:00
David Coppa
39bf343618 Fix install target of i3-with-shmlog.desktop 2014-01-23 22:19:45 +01:00
Michael Stapelberg
ca807ce1c5 update debian/ 2014-01-21 19:38:46 +01:00
Michael Stapelberg
3d5e6db0bc Merge branch 'release-4.7.1' 2014-01-21 19:23:25 +01:00
Michael Stapelberg
b0990c183a Merge branch 'release-4.7.1' into next 2014-01-21 19:22:43 +01:00
Michael Stapelberg
92694c7983 add release notes for 4.7.1, update manpage version 2014-01-21 19:20:36 +01:00
Tony Crisci
6578976b61 Do not create container pixmap when not needed
The pixmap of a borderless container will not be used (except for the
titlebar in a stack or tabs). Make sure these containers do not have a
pixmap because it can only get in the way.

fixes #1013
2014-01-19 23:11:25 +01:00
Vivien Didelot
ae555386b7 docs/i3bar-protocol: add missing newline 2014-01-18 16:26:12 +01:00
Tony Crisci
dee6264d57 Respect Motif hint for window decorations
When the _MOTIF_WM_HINTS property of a window specifies it should have
no title bar, or no decorations at all, respond by setting the border
style of that container to BS_PIXEL or BS_NONE respectively.

This comes from the old Motif window manager. It was originally intended
to specify exactly what sort of decorations a window should have, and
exactly what sort of user input it should respond to. The EWMH spec
intended to replace Motif hints with _NET_WM_WINDOW_TYPE, but it is
still in use by popular widget toolkits such as GTK+ and Java AWT.

i3's implementation simply mirrors Gnome's Metacity. Official
documentation of this hint is nowhere to be found.

For more information see:
https://people.gnome.org/~tthurman/docs/metacity/xprops_8h-source.html
http://stackoverflow.com/questions/13787553/detect-if-a-x11-window-has-decorations

fixes #832
2014-01-18 16:25:37 +01:00
Michael Stapelberg
10d7c1a993 Merge branch 'master' into next 2014-01-13 23:36:47 +01:00
Michael Stapelberg
b8ba545733 Merge branch 'fix-move-focus' 2014-01-13 23:36:34 +01:00
Tony Crisci
7639337716 Bugfix: move <direction> sends workspace focus
Make sure the command `move <direction>` properly sends the workspace
focus ipc event required for i3bar to be properly updated and redrawn.

Make `ipc_send_workspace_focus_event publicly available from ipc.h for
more flexible event sending.
2014-01-13 23:36:31 +01:00
Michael Stapelberg
cd0cd0c3d2 Merge branch 'master' into next 2014-01-13 23:35:22 +01:00
Michael Stapelberg
4893f04e0c Merge branch 'fix-eof-msg' 2014-01-13 23:35:22 +01:00
Tony Crisci
612d25c12c i3bar Bugfix: don't show "EOF" status line error
When the `status_command` sends EOF, it is terminated. Terminating this
process prints an error message to the status line (hence, a race
condition). This error message is always more useful than the former
"EOF" status line error because it shows the exit code.
2014-01-13 23:35:20 +01:00
Tony Crisci
5401271984 Add input_type enum to Binding typedef
An input type of B_KEYBOARD will indicated this binding was created with
"bindsym", "bindcode", or "bind" and should only run on key press
events.

An input type of B_MOUSE will indicate this binding was created with
"bindmouse" and should only run on button press events (not yet
implemented).

For more information see #558.
2014-01-12 22:37:11 +01:00
Tony Crisci
7bddf9add5 i3bar: Amend status line error 127 message
Exit 127 can be returned by the shell when the command is not found or
when the `status_command` process returns 127 because of a missing C
library dependency.
2014-01-12 22:11:11 +01:00
Tony Crisci
aa11c03d4c Movement into a branch considers movement direction
Change the behavior of movement into a branch with respect to the
position the moving con will be placed within the branch when the
movement is complete.

The correct position is determined by the direction of movement or the
position of the focused-inactive container within the branch.

If the direction of movement is the same as the orientation of the
branch container, append or prepend the container to the branch in the
obvious way.  If the movement is to the right or downward, insert the
moving container in the first position (i.e., the leftmost or top
position resp.) If the movement is to the left or upward, insert the
moving container in the last position (i.e., the rightmost or bottom
position resp.)

If the direction of movement is different from the orientation of the
branch container, insert the container into the branch after the
focused-inactive container.

fixes #1060
2014-01-06 22:26:23 +01:00
Alexander Kedrik
de3901bb29 use designated initializers for yajl_callbacks struct 2014-01-06 22:12:14 +01:00
Michael Stapelberg
81fd4ec71c add testcase for #1149 2014-01-05 20:37:42 +01:00
Michael Stapelberg
0fd9a96118 ipc: dump new "swallows" properties 2014-01-05 20:30:03 +01:00
Michael Stapelberg
93cfdcd488 sanity check: drop swallows for split containers (Thanks xeen)
fixes #1149
2014-01-05 20:25:47 +01:00
Michael Stapelberg
bb482e2869 i3-save-tree: only create "swallows" key for leaf nodes (Thanks xeen)
fixes #1149
2014-01-05 20:10:24 +01:00
Michael Stapelberg
2fea5ef82b Revert "use designated initializers for yajl_callbacks struct"
This reverts commit 705b43294a.

This commit broke i3bar for some users.
2014-01-05 13:05:31 +01:00
Michael Stapelberg
f6ee035c61 fix killing placeholder windows
The only consequence of the previous situation was that there was a
misleading log message.
2014-01-04 22:24:47 +01:00
Michael Stapelberg
18e6184f1c run con_fix_percent unconditionally, not only on parsing errors 2014-01-04 21:59:41 +01:00
Michael Stapelberg
9daf0d8b2b t/215-layout-restore-crash: fix test description 2014-01-04 21:57:35 +01:00
Michael Stapelberg
90e7c5c18a tests: add t/215-layout-restore-crash.t for the last couple of commits 2014-01-04 21:39:33 +01:00
Michael Stapelberg
58b3c730e2 return parse errors via IPC for append_layout 2014-01-04 21:39:13 +01:00
Michael Stapelberg
1d969e6340 fix percentages when loading layouts
This is more forgiving for users who delete containers from their layout
file and don’t update the “percent” values.
2014-01-04 21:30:51 +01:00
Michael Stapelberg
dfd9410ab7 Bugfix: set all parsing_* variables to false when starting parsing 2014-01-04 21:23:12 +01:00
Michael Stapelberg
4a9e283f05 Bugfix: fix crash when layout JSON file is partially invalid (Thanks xeen)
Fixes #1145
2014-01-04 21:22:12 +01:00
Tony Crisci
b109b1b20d Disable render-time pointer warps if asked
When `focus_follows_mouse` configuration option is disabled, do not warp
the pointer when focus changes outputs after rendering.

Rationale: this option is meant to be disabled by users who have a setup
where the mouse is usually in the way. These users tend to move the
mouse to a corner or use a utility to hide the pointer when it is not
active. When this user switches focus between outputs, the mouse is
placed in the center of the screen.

This is clearly against the spirit of disabling `focus_follows_mouse`.
Disabling this option now implies disabling "mouse follows focus".
2014-01-04 20:52:12 +01:00
Alexander Kedrik
705b43294a use designated initializers for yajl_callbacks struct 2014-01-04 20:46:46 +01:00
Alexander Kedrik
f1560e5eb6 remove unnecessary forward declaration of set_statusline_error
Attributes can be added to function definitions.
Tested with gcc 4.8.2 and clang 3.3
2014-01-04 20:44:54 +01:00
Peter Boström
f78c1ba053 Fix 'gcc -Wextra -Wno-unused-parameter'. 2014-01-04 20:43:30 +01:00
Michael Stapelberg
b8bf3d39eb Merge branch 'docs-debugging' 2014-01-04 12:23:06 +01:00
Michael Stapelberg
2314f10778 Merge branch 'master' into next 2014-01-04 12:23:06 +01:00
Michael Stapelberg
5e07885d95 install i3-with-shmlog.xsession.desktop, overwrite symlink if it exists 2014-01-04 12:22:53 +01:00
Michael Stapelberg
a32b6da712 Merge branch 'master' into next 2014-01-04 12:20:12 +01:00
Michael Stapelberg
31c3505cbf Merge branch 'docs-debugging' 2014-01-04 12:19:52 +01:00
Michael Stapelberg
2326ebfd63 enable shmlog when invoked as i3-with-shmlog, install symlink + .desktop file 2014-01-04 12:18:45 +01:00
Michael Stapelberg
a37f784945 docs/debugging: use a version command that will work with i3 < 4.3 2014-01-04 12:06:21 +01:00
Michael Stapelberg
92a50db29e docs/debugging: merge the debug symbols/backtrace section
We rarely have crashes, almost always we just need logs.
2014-01-04 12:04:43 +01:00
Michael Stapelberg
2c06dc0a1f docs/debugging: include supported version, recommend --moreversion 2014-01-04 11:54:23 +01:00
Michael Stapelberg
d91e632959 docs/debugging: explain how to enable logging on the fly 2014-01-04 11:47:09 +01:00
Michael Stapelberg
0fdbc1ab97 docs/debugging: update version numbers 2014-01-04 11:46:12 +01:00
Michael Stapelberg
95613f50fd docs/debugging: use bzip2 for consistency with the new ticket form (Thanks x33a) 2014-01-04 11:35:06 +01:00
Peter Boström
9c15b9504e Fix clang -Wextra except -Wunused-parameter.
Cleared all warnings that occur when passing
CFLAGS="-Wall -Wextra -Wno-unused-parameter" to make using clang 3.3 on
Linux x86-64.
2014-01-02 22:15:33 +01:00
Tony Crisci
ac74a63662 i3bar: Don't start child unless status_command
If a command is passed to `start_child` which is NULL, such as in the
case when there is no `status_command` specified in the bar config, do
not start a child process to listen on stdin.

fixes #1140
2014-01-01 15:23:50 +01:00
Peter Boström
38b6936c25 Size resizebar according to container size. 2014-01-01 15:21:33 +01:00
Tony Crisci
69ce33d06d Snap pointer to resize bar on drag resize
When the user initiates a drag resize, draw the resize bar on the border
of the two involved containers and snap the pointer.

This solution produces cleaner code than the former approach where the
caller obfuscated the click coordinates of the event. This may confuse
someone expecting a true button press event.

Fixes an issue where the resize cursor is not shown when the resize bar
is clicked until the user begins to drag the mouse.

Fixes an issue where focus is not properly updated after the drag is
complete when `focus_follows_mouse' option is set, leaving the pointer
in an unfocused window in some cases.

Fixes an issue where the resize bar may jump a few pixels when the mouse
is first moved.

(Thanks to pbos for suggesting this fix and providing an example
implementation)
2014-01-01 15:18:54 +01:00
Alexander Kedrik
e2ebe3e2ae Use #pragma once
#pragma once is safer and simpler. According to Wikipedia it's supported by all major compilers.
2014-01-01 15:06:57 +01:00
Michael Stapelberg
3ebc6654cd Merge branch 'fix-tray-mapped' 2014-01-01 11:10:26 +01:00
Michael Stapelberg
67b213665b Merge branch 'master' into next 2014-01-01 11:10:26 +01:00
Tony Crisci
23b1da598e i3bar: Set mapped flag on trayclient creation
When a trayclient is first created as a structure in memory, explicitly
set the `mapped` flag to false. Otherwise it may initialize to `true` in
some circumstances without actually being mapped, causing a request to
be mapped from the client to be ignored.

Create the trayclient in memory before handling a request to be mapped
immediately.

fixes #1138
2014-01-01 11:10:21 +01:00
Michael Stapelberg
1e1e4ef9df include i3-save-tree in dist tarballs 2013-12-24 18:07:07 +01:00
Michael Stapelberg
c3ff365072 install i3-save-tree(1) (Thanks Marcin) 2013-12-24 16:15:43 +01:00
Michael Stapelberg
cd6fb69977 Merge branch 'dpi-log' 2013-12-24 10:37:14 +01:00
Michael Stapelberg
5cd7979e62 Merge branch 'master' into next 2013-12-24 10:37:14 +01:00
Michael Stapelberg
0883dfbe14 only LOG() the DPI when it changes, DLOG() it otherwise (Thanks lkraav)
This avoids flooding stdout every time some text (e.g. a window
decoration) is drawn, yet leaves the message in place when it’s actually
relevant (upon DPI changes).

fixes #1115
2013-12-24 10:35:56 +01:00
Michael Stapelberg
0b8a7b2d16 debian/: add perl recommends to i3-wm for i3-save-tree(1) 2013-12-22 21:54:13 +01:00
Michael Stapelberg
0d356e748d update DEPENDS 2013-12-22 21:52:49 +01:00
Michael Stapelberg
12885cb0ab add i3-save-tree(1) which dumps the layout of a workspace or an output 2013-12-22 21:52:49 +01:00
Michael Stapelberg
c964c010f0 ipc: dump window properties when not restarting inplace 2013-12-22 21:52:49 +01:00
Michael Stapelberg
e567cf436c dragging: instead of using a custom event loop, use libev
This is done by installing a new check watcher that replaces the main
X11 event handler and calling ev_run with EVRUN_ONCE until the dragging
loop left state DRAGGING.

With this commit, other handlers, most notably the redraw handler for
placeholder windows, get a chance to run when dragging (placeholder!)
windows around.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
f57f94c850 reconnect when the restore X11 connection dies
This could happen if a user uses xkill(1) on a placeholder window.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
42e359ec60 kill placeholder windows when the actual window appears 2013-12-22 21:52:49 +01:00
Michael Stapelberg
28a993e656 replace never-true condition with a working one
state->initial is set to false before calling x_push_node() since we
began pushing the window stack before pushing changes. Therefore, the
condition could never be true.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
318b089e6d fix test after renaming role to window_role 2013-12-22 21:52:49 +01:00
Michael Stapelberg
35b70ca423 introduce client.placeholder color 2013-12-22 21:52:49 +01:00
Michael Stapelberg
639a1b182c set original window title on placeholder windows 2013-12-22 21:52:49 +01:00
Michael Stapelberg
16ea766765 use root window color depth instead of hard-coded 24 2013-12-22 21:52:49 +01:00
Michael Stapelberg
076636a835 display swallows criteria in placeholder windows 2013-12-22 21:52:49 +01:00
Michael Stapelberg
3a4ad9b330 layout restore: create and render placeholder windows
This is not entirely done yet, but TODO entries are placed in the code
where appropriate.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
2ce43783f8 add debug message to trace match deletions 2013-12-22 21:52:49 +01:00
Michael Stapelberg
fcf869439c load_layout.c: use *LOG instead of (f)printf 2013-12-22 21:52:49 +01:00
Michael Stapelberg
ef7b3e5464 allow parsing multiple nodes from a json layout 2013-12-22 21:52:49 +01:00
Michael Stapelberg
6800524f2e GET_TREE: serialize container type into a string
So far, this was blessed for internal use only (by virtue of not being
in the documentation), but we want to expose it for the stored layouts.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
58297f4ab5 layout restore: support more criteria, match only once (+test) 2013-12-22 21:52:49 +01:00
Michael Stapelberg
598498330a layout loading: allow comments in JSON files 2013-12-22 21:52:49 +01:00
Michael Stapelberg
4add185025 tests: add simple layout restore test 2013-12-22 21:52:49 +01:00
Michael Stapelberg
0302912b64 swallows: value needs to be loaded as regular expression 2013-12-22 21:52:49 +01:00
Michael Stapelberg
ce480dcc74 use splith as default when restoring a layout
This frees users from specifying layouts even when they don’t make any
difference, e.g. leaf nodes.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
c7036191c8 debian/: add placeholder commit 2013-12-22 21:39:15 +01:00
Michael Stapelberg
28939365cb Merge branch 'next' 2013-12-22 21:14:21 +01:00
Michael Stapelberg
ae0e83f08d Merge branch 'release-4.7' into next 2013-12-22 21:14:15 +01:00
Michael Stapelberg
26e30ef00c add release notes for v4.7 2013-12-22 21:12:10 +01:00
Michael Stapelberg
95af0fdcac Merge branch 'fix-active' 2013-12-21 21:32:55 +01:00
Michael Stapelberg
b2c91f54ab Merge branch 'master' into next 2013-12-21 21:32:55 +01:00
Michael Stapelberg
85321bdf1d Bugfix: ignore _NET_ACTIVE_WINDOW for scratchpad windows (Thanks mistnim)
fixes: #1136
2013-12-21 21:32:23 +01:00
Tony Crisci
bfe32ad797 i3bar: Print error message when status_command fails
Add a function to i3bar to print an error message in the status line
when the child process invoked by status_command fails to provide
input that can be displayed as a statusline.

When the child provides JSON that cannot be parsed, alert the user and
convey a short message provided by yajl communicating the specific
problem.

When the child (or the shell executing the status command) exits
unexpectedly, alert the user and display the exit code. The cases where
the status command is not executable or not found in the user's PATH are
treated specially.

fixes #1130
2013-12-21 08:57:21 +01:00
Michael Stapelberg
665ac5b7c3 userguide: explain the difference between comma and semicolon for command chaining 2013-12-11 19:47:36 +01:00
Tony Crisci
5a69bffbd6 Remove pointer warp from test boilerplate
Remove the line to warp the pointer to (0, 0) in `new-test` helper
script, which is used to create new tests.

Since 4.6-g0634766, testcases may assume at the start of the test that
the pointer begins at position (0, 0).
2013-12-10 21:52:50 +01:00
Tony Crisci
1b640ae3be Testcases: init pointer in a predictable position
Tests may disturb the pointer in their normal operation that may lead to
unexpected results in later tests using that display. Reset the pointer
before a test begins to (0, 0) to save test developers from related
"gotchas" and reduce multi-monitor test boilerplate.
2013-12-04 19:51:05 +01:00
Tony Crisci
18ad1fd4de Refactor and improve test 514
Split test 514's assertion into three assertions to make it more
explicit what is being tested, and why a run might fail.

Move critical test code out of the event handler to clarify flow and
allow a query of the actual current workspace to use in assertions.

Works around an issue which caused this test to fail spurriously because
of pointer-related quirks in the i3 test suite which would sometimes
cause i3 to open on workspace 2 (However, the test is now agnostic to
the initial workspace or output).
2013-12-04 19:50:35 +01:00
Tony Crisci
39f15da82f i3bar: Group child processes for signalling
Set the process group id of the child process by calling `setpgid` after
forking and before calling `exec`.

The process group ID will be set to the process ID of the forked
process. Processes spawned by this child process will also have this
group ID.

Send signals to the process group with `killpg`. This will send the
signal to all of the process group.

fixes #1128
2013-12-04 19:45:19 +01:00
Jean-Philippe Ouellet
454f11755e Remove flex/bison from common.mk since they aren't used anymore 2013-11-30 14:02:34 +01:00
Tony Crisci
80df764e55 i3bar: Realign tray clients on map/unmap notify
UnmapNotify events are interpreted by i3bar as an action taken by an
application to hide its tray window. Likewise, MapNotify events are
interpreted as an action taken by by an application to show its tray
window.

The actual cause of these events may be the application itself, or the
result of some action taken by i3bar itself at the request of the
application in the course of the XEmbed protocol.

We respond by adjusting the size of the tray window and realigning any
tray clients that remain. This will make room for the mapping window or
close the gap left by the unmapping window when the bar is redrawn.

fixes #1110
2013-11-30 14:01:25 +01:00
Lancelot SIX
eca5e4598a libi3/root_atom_contents: handle data of arbitrary length
Handle data fetched from xcb_get_property_unchecked with arbitrary
length. This avoids having to rely on PATH_MAX macro where it is not
necessary.
2013-11-26 19:58:35 +01:00
Jean-Philippe Ouellet
2eea82eb02 ignore symbol files on OS X (only for debugging, breaks git-add -A) 2013-11-26 19:56:59 +01:00
Jean-Philippe Ouellet
755188220f fix the build on OS X
OS X doesn't have posix_fallocate() yet, so put
bf760d0241 in
    #if defined(__APPLE__)

the cd fails with:
    /bin/sh: line 0: cd: include: No such file or directory
so give it a path relative to the top directory
2013-11-26 19:56:45 +01:00
Lancelot SIX
18cfc36408 libi3/root_atom_contents: Free xcb reply structures
Free memory allocated during xcb calls.
2013-11-24 13:52:31 +01:00
Lancelot SIX
f22995393a Remove references to PATH_MAX macro
Since the macro PATH_MAX is not defined on every system (GNU/Hurd being
one of those who do not define it), we remove all references to this
macro. Instead, we use a buffer of arbitraty size and grow it when
needed to contain paths.
2013-11-24 13:50:29 +01:00
Michael Stapelberg
4f5e0e794f persist root window’s background contents to a pixmap
The commit title is fairly technical, so I’ll try to explain.

Recently, users of GDM3 (I’m sure) and LightDM (I think) have reported
that when switching to a new workspace, the contents of the previous
workspace are still visible. i3bar updates, though, so it is the X11
root window which is not being updated here.

When using GDM3, X11 will be started with -background none, and no
background pixmap or pixel is set. Then, apparently,
gnome-settings-daemon will display a fade animation from whatever is
currently on the window to the destination contents. I think this is to
avoid flickering when logging in, which would occur when just setting a
specific background pixmap or pixel.

So, this commit will, when i3 starts first (not on restarts), copy the
contents of the X11 root window (typicall a grey background, at least on
my machine with GDM3) into a pixmap and set that pixmap as background
pixmap. That way, the content will be preserved and one has a
background, instead of what is perceived as a bug :).

This commit has some chance of breakage, so I’m prepared to revert it
unless we can figure out the issues and roll forward.
2013-11-24 13:44:30 +01:00
Tony Crisci
a1e7ce20f0 i3bar: Handle DestroyNotify events
Handle DestroyNotify events by removing the tray client from the tray
client list held in memory.

This change is intended to be part of the i3bar's implementation of the
XEmbed protocol. For more information, see:

<http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html>

According to the XEmbed protocol specification, this is one way for a
tray client to finish the protocol. After this event is received, i3bar
should have no more interaction with the tray client.
2013-11-24 12:40:03 +01:00
Michael Stapelberg
fd07f989fd Merge branch 'fix-urgent-crash' 2013-11-22 17:09:28 +01:00
Michael Stapelberg
1dbdd4fece Merge branch 'master' into next 2013-11-22 17:09:28 +01:00
Tony Crisci
57822e3ed4 Remove-child callback skips output content cons
Every container 'above' (in the hierarchy) the workspace content should
not be closed when the last child was removed.

Add a check for output content containers and do not handle them. These
cons are at the root of the output container with dockarea siblings.
They may be run through this callback when an output is killed with
RandR.

Fixes an issue that caused content cons to become urgent when the output
is killed with RandR.

fixes: #1121
2013-11-22 17:09:23 +01:00
Michael Stapelberg
d3beff2339 make i3bar use libi3’s root_atom_contents()
This removes code duplication, which will be useful for a subsequent
commit.

Furthermore, we now don’t open X11 connections unnecessarily in some
corner cases.
2013-11-22 15:48:45 +01:00
Michael Stapelberg
ca39289e3e t/516-move: use window id, fix typo 2013-11-19 20:28:32 +01:00
Tony Crisci
9f955a1e01 Command 'move <direction>' moves across outputs
When 'move <direction>' is issued in the context of a container that
borders a workspace, and there is no suitable place within this
workspace for which this container can move, move the container to the
closest output in this direction instead.
2013-11-19 20:26:52 +01:00
Michael Stapelberg
5a4efd04c1 refactor previous commit’s new code into a function, add log message 2013-11-18 23:17:44 +01:00
Bas Pape
1d6450f0e8 libi3/font: Set DPI for the pango context
The pango font specification accepts a font size in points, but pango
defaults to a DPI of 96. Create a default PangoContext (which
internally creates a default PangoCairoFontMap as usual) and set the
DPI to the value of the root Screen manually.

Fixes #1115
2013-11-18 23:12:08 +01:00
Trung Ngo
3dba51500e Update userguide on multiple criteria
Change wording, add an example for multiple criteria and move
the sentence explaining the Firefox example into the code listing
block.
2013-11-10 19:55:45 +01:00
Tony Crisci
f3bf314662 Add sensible discretion to UnmapNotify drag abort
Only abort a drag action on UnmapNotify when the unmapping window is
managed on the current workspace.

fixes #1108
2013-11-10 19:54:49 +01:00
Tony Crisci
e08215896e i3bar: Simplify hide mode logic
When determining whether to hide or unhide the bar on redraw in hide
mode, use simpler rules. When the config specifies the 'show' state or a
workspace is urgent, or if the caller requests it, or the modifier is
pressed, show the bar. Otherwise, hide the bar.
2013-11-09 14:34:00 +01:00
Tony Crisci
9ee26a608e Return DRAG_ABORT on UnmapNotify from drag_pointer
Add DRAG_ABORT to enum drag_result_t. DRAG_ABORT will indicate the drag
operation cannot be completed.

Return DRAG_ABORT on UnmapNotify, or when the keyboard or pointer cannot
be grabbed.

Add DRAGGING to return value for drag_result_t. DRAGGING is used
internally by drag_pointer to indicate the drag is in progress.

Change DRAG_CANCEL to DRAG_REVERT to clarify the distinction between
"abort" and "revert/cancel" actions.

Fixes an issue that caused i3 to crash when a user is dragging or
resizing a floating window that becomes destroyed.
2013-11-09 13:27:42 +01:00
Baptiste Daroussin
f691a55923 Use _PATH_BSHELL to ensure using a bourne shell
[Michael]
This commit should fix problems with people using a non-bourne shell as
login shell, e.g. fish or rc. AFAICT, $SHELL should only be used for
interactive shells, but we just want a bourne shell, not an interactive
shell.
2013-11-09 10:11:32 +01:00
jj
857fc0bf17 Update comment for the con_toggle_fullscreen method 2013-10-23 23:26:44 +02:00
jj
b6100dd727 Fix output retrieval for floating cons
When focusing/moving to outputs, the method of getting the correct
output for a given container fails if the container in question is
floating and only partially mapped on an output screen. This patch
introduces a fail-safe retrieval of the output for any container.
2013-10-23 23:26:06 +02:00
Tony Crisci
1110a1bed6 Add .clang_complete and Xdummy.so to gitignore
Adds two files to gitignore.

`.clang_complete` is created by the clang_complete vim plugin
[https://github.com/Rip-Rip/clang_complete]

`Xdummy.so` is created by compiling the Xdummy module.
2013-10-23 23:24:04 +02:00
Tony Crisci
cce3c8066a i3bar: Only configure tray on own outputs
If the config specifies a `tray_output` not in the list of outputs over
which this bar will span, do not initialize a tray for the bar.

Fixes former behavior, which was to initialize the tray without showing
the icons, causing disapearing tray icons in multi-monitor environments
when `tray_output` isnt `output`.
2013-10-23 23:23:45 +02:00
Tony Crisci
e99158e419 Assigned windows open urgent when not visible
When i3 begins to manage a window, if the window opens on a workspace
that is not visible, the urgency hint on the newly managed window will
be set.

fixes #1088
2013-10-19 10:07:24 +02:00
Tony Crisci
14b86acf40 Testcases: Use AnyEvent::I3 version 0.15
Use the latest version of AnyEvent::I3, version 0.15, which includes
support for the `window` event tag.
2013-10-19 10:06:08 +02:00
Tony Crisci
9adff26dcf Testcases: new-test prints usage without input
Prevent the accidental creation of new tests with empty names by
printing usage information for new-test when the test name would be
empty.
2013-10-19 10:06:02 +02:00
Tony Crisci
cf3da1c433 Testcases: remove "latest" if it is a symbolic link
Test for the existence of the symlink to "latest" with the -l flag,
which tests if the target is a symbolic link. Testing with the -e flag
will fail in case the link points to a file that does not exist, which
will occur if the test result directories are deleted by hand.
2013-10-19 10:05:33 +02:00
Alexander Neumann
4622fd8703 Correct typos in user guide 2013-10-19 10:05:10 +02:00
jj
bf1699e967 Fix command parser: resizing tiling windows
i3 would accept an invalid resize command like 'resize shrink width 10
px or' without specifying the ppt value, and then crash. This patch
fixes the parser specification.
2013-10-13 18:02:40 +02:00
Tony Crisci
8fe17407ff i3-nagbar: Set button inner-width to the width of the label
Use predict_text_width to find the width of the label and then account
for right padding when calculating the width of the button.
2013-10-13 18:02:39 +02:00
Michael Stapelberg
1c0554564a previous commit: extend test and code to also work with floating windows 2013-10-13 17:59:29 +02:00
jj
eef9042713 Fix endless loop when trying to kill a visible workspace
This regression was introduced with commit
97b086efd9

fixes #1103
2013-10-13 17:58:38 +02:00
Tony Crisci
f9d8a1b4d6 Testcases: ignore Xorg config dir when starting Xdummy
Start Xdummy with '-configdir /dev/null' to avoid conflicting settings
in xorg.conf.d.
2013-10-13 17:17:54 +02:00
Peter Maatman
c142a4fa6c Update docs/hacking-howto to reflect parser changes 2013-10-13 17:17:38 +02:00
Alexander Neumann
7f9d2ac948 Add quoting for sample command
The user's guide talks about renaming workspaces, for example to
"2: mail", and a sample key binding for use with i3-input is supplied.
However, this example lacks proper quoting for the format string, so
that when workspace name with a space in it, like "2: mail", is given,
the current workspace is renamed to "2:". This patch adds proper
quoting.
2013-10-13 17:17:24 +02:00
Michael Stapelberg
cf7ea276ba Merge branch 'fix-extents' 2013-10-09 19:49:48 +02:00
Michael Stapelberg
a09a5c391e Merge branch 'master' into next 2013-10-09 19:49:48 +02:00
Tony Crisci
05e46848f0 Reply to _NET_REQUEST_FRAME_EXTENTS correctly
Reply to _NET_REQUEST_FRAME_EXTENTS by settings _NET_FRAME_EXTENTS
property of the window to widths of the respective borders added by i3.

fixes #1093
fixes #1069
2013-10-09 19:49:37 +02:00
Michael Stapelberg
d661c1493c Only abort resizing on KeyPress, not KeyRelease (Thanks vandannen)
Otherwise, releasing a key that was used to trigger the resizing (e.g.
the modifier key) needs to be pressed all the time.
2013-10-01 07:21:40 +02:00
jj
98c4cc46e4 Do not resize/reposition floating containers when moving them to scratchpad 2013-09-30 22:54:35 +02:00
Tony Crisci
459490b67b Add ability to escape out of a mouse-resize operation
Implement #1074. drag_cancel grabs the keyboard and returns DRAG_CANCEL
when the user presses any key during the grab.
2013-09-30 22:54:11 +02:00
Quentin Glidic
a49dfaf26c libi3/font: Draw the text at the expected place
When drawing a text with Pango, shift it to the top according to the top
if the glyph if taller than expected
We always shift of (height - savedHeight) which is a no-op for normal glyphs

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-09-30 22:51:52 +02:00
jj
dbec5eb905 Fix keyboard and mouse resize in nested containers
fixes #1084
fixes #1085
2013-09-26 19:30:07 +02:00
Vivien Didelot
5baada6532 reduce some yajl boilerplate
This patch introduces a yerror() macro in src/commands.c and also
removes some unused yajl helper macros from src/config_directives.c.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
2013-09-26 19:09:39 +02:00
Michael Stapelberg
0bfcf1a762 Improve error message when $XDG_RUNTIME_DIR is not writable 2013-09-25 19:33:28 +02:00
Michael Stapelberg
8d38529bcd tests: move set_wm_class to X11::XCB::Window
This code was duplicated way too often for a long time :)
2013-09-24 21:56:52 +02:00
Michael Stapelberg
04847eeb1f Merge branch 'fix-urgency-assign' 2013-09-24 07:48:09 +02:00
Michael Stapelberg
031de8f720 Merge branch 'master' into next 2013-09-24 07:48:09 +02:00
Michael Stapelberg
1a1d421534 Bugfix: correctly recognize assigned windows as urgent (Thanks jookia)
fixes #1086
2013-09-24 07:47:36 +02:00
syl20bnr
7098ef602b Add new bar.binding_mode_indicator configuration.
i3 current behavior hides the binding mode indicator when
workspace buttons are disabled.
This patch adds a new configuration for i3bar called
'binding_mode_indicator' which acts like the workspace_buttons.
It is now possible to configure i3bar to hide the
workspace buttons and keep showing the binding mode indicator.
This should make the hide workspace buttons configuration
more convenient for those who are heavily using binding
modes.
Default value for binding_mode_indicator is true.
2013-09-24 06:59:26 +02:00
jj
97b086efd9 Close all children when closing a workspace
fixes #591
2013-09-24 06:45:52 +02:00
Michael Stapelberg
153259cb10 tests: also get rid of smartmatch in complete-run.pl 2013-09-24 06:37:40 +02:00
jj
ee04f8bfda Fix handling of new windows with WM_STATE_FULLSCREEN
If the currently focused window is in fullscreen mode, and a new window
is opened with WM_STATE_FULLSCREEN set, the new window now becomes the
new fullscreen window and gains focus.
2013-09-24 06:36:56 +02:00
Michael Stapelberg
3ba8642efd tests: fix setting the urgency hint
X11::XCB < 0.08 had a bug which caused this code to work even though it
shouldn’t.
2013-09-24 06:36:08 +02:00
Michael Stapelberg
d6b1f1a1b2 i3test: get rid of the smartmatch operator, it’s experimental since perl 5.18 2013-09-24 06:35:51 +02:00
Michael Stapelberg
5d005f403c man/i3-dump-log: document -f (Thanks TonyC) 2013-09-22 00:08:27 +02:00
Deiz
e9b8307829 Add scratchpad bindings to the default config. 2013-09-16 03:01:57 +02:00
James Baumgarten
4ff01e59ca Clarify userguide description of urgent_workspace configuration 2013-09-09 05:09:45 +02:00
Deiz
a7c005848a Create pixmaps using the real bar height, rather than screen height. 2013-09-09 04:36:10 +02:00
Michael Stapelberg
0fbc40ff5f Merge branch 'fix-flattening' 2013-09-01 13:35:19 +02:00
Michael Stapelberg
a52b5212ea Merge branch 'master' into next 2013-09-01 13:35:19 +02:00
Michael Stapelberg
2481b9dcd7 Bugfix: don’t flatten tabbed/stacked containers
fixes #1053
2013-09-01 13:35:04 +02:00
Michael Stapelberg
a68a911a30 Merge branch 'fix-fullscreen-global' 2013-08-30 20:01:04 +02:00
Michael Stapelberg
599a4d48e6 Merge branch 'master' into next 2013-08-30 20:01:04 +02:00
Michael Stapelberg
93463bc393 Bugfix: update root geometry on output changes for “fullscreen global” (Thanks kaersten)
fixes #1064
2013-08-30 19:59:57 +02:00
Michael Stapelberg
bbc30cf142 Merge branch 'revert-fullscreen' 2013-08-27 20:23:00 +02:00
Michael Stapelberg
1a7fe4ee79 Merge branch 'master' into next 2013-08-27 20:23:00 +02:00
Michael Stapelberg
103ab83131 Revert "raise fullscreen windows on top of all other X11 windows"
This reverts commit 0659a0d98c.

It was a fix for dzen2 setups, but broke several other use cases.
Because dzen2 is not really important since most people use i3bar
nowadays, let’s revert this.

fixes #1062
fixes #1068
fixes #1070
2013-08-27 20:21:11 +02:00
Michael Stapelberg
28fafcb1c2 Remove forgotten libxcursor from DEPENDS (Thanks badboy) 2013-08-22 18:44:21 +02:00
Leo Gaspard
c9611b320b Remove debug message when debugging is disabled
More precisely, switch from printf to DLOG a "matching: * / *" message, like all
the other "matching: * / *" messages.
2013-08-20 19:06:03 +02:00
Bas Pape
a5ee699d36 Initialize variables to prevent (false) warnings. 2013-08-20 19:05:48 +02:00
Sebastian Ullrich
431e98dc35 Respect workspace numbers when looking for a free workspace name
This prevents a ws '1' appearing on a new output when there's
already a ws '1: www' on an existing output
2013-08-18 17:47:53 +02:00
Michael Stapelberg
da20cd397c switch from libXcursor to xcb-util-cursor 2013-08-17 09:44:20 +02:00
Michael Stapelberg
2fe2e005a0 Merge branch 'fix-userguide' 2013-08-12 09:13:55 +02:00
Michael Stapelberg
3216cc79de Merge branch 'master' into next 2013-08-12 09:13:55 +02:00
Michael Stapelberg
ee533a6ddc Fix userguide formatting (Thanks Slava) 2013-08-12 09:12:53 +02:00
Michael Stapelberg
4fbc832f66 Merge branch 'fix-move-window-center' 2013-08-08 22:44:30 +02:00
Michael Stapelberg
cc36c94b60 Merge branch 'master' into next 2013-08-08 22:44:30 +02:00
Franck Michea
69d7adcf49 Add missing return after error reporting. 2013-08-08 22:44:23 +02:00
syl20bnr
3be0b519c9 Update documentation paragraph on variables
see http://infra.in.zekjur.net/archives/i3-discuss/2013-August/001377.html
2013-08-08 22:42:15 +02:00
Michael Stapelberg
c296a57db9 Merge branch 'fix-float-h' 2013-08-08 22:37:47 +02:00
Michael Stapelberg
20cc9cfe70 Merge branch 'master' into next 2013-08-08 22:37:47 +02:00
Kacper Kowalik (Xarthisius)
0b168ee499 Include float.h for DBL_EPSILON
https://bugs.gentoo.org/show_bug.cgi?id=480272

Patch was written by Jeroen Roovers <jer@gentoo.org>
2013-08-08 22:37:27 +02:00
Michael Stapelberg
6562f440c5 update debian/ packaging 2013-08-07 21:21:47 +02:00
Michael Stapelberg
f682841ae1 Merge branch 'next' 2013-08-07 21:13:46 +02:00
Michael Stapelberg
4d2785da68 Merge branch 'release-4.6' into next 2013-08-07 21:13:41 +02:00
Michael Stapelberg
e6ee8b3256 add release notes for v4.6 2013-08-07 21:04:18 +02:00
Michael Stapelberg
bf760d0241 log.c: use posix_fallocate() instead of ftruncate() (Thanks don)
The effect is that the error handling is much better. posix_fallocate()
will allocate all the requested space, whereas ftruncate() does not.

Before this commit, in case the /dev/shm filesystem is too small to hold
the _contents_ of the log file, i3 will SIGBUS when writing to the shm
logfile. With this commit, it will print an error message on startup,
but continue to run without logging.
2013-08-01 00:42:24 +02:00
Michael Stapelberg
3eea370db2 i3bar: draw workspace buttons at x=0 instead of x=1
This makes the workspace buttons align with the window borders, which is
particularly visible with color configurations like the one in this
screenshot: http://i.imgur.com/CH8srF5.png

fixes #687
2013-07-29 21:50:59 +02:00
Michael Stapelberg
0c7a76c2f1 Handle the _NET_REQUEST_FRAME_EXTENTS ClientMessage (java compat)
This ClientMessage can be used to estimate how big the window will be
before opening it. Java always sends the ClientMessage and checks the
atom that should be set by the window manager, but it seems that the
fallback code path has a race condition.

Let’s see if the situation gets better with this change. I have been
running this patch for about two weeks and have not seen any issues with
it.

fixes #934
fixes #709
2013-07-27 15:06:08 +02:00
koebi
88671986f4 implement unmark command 2013-07-17 23:02:31 +02:00
Michael Stapelberg
35aec2f038 i3-dmenu-desktop: honor Path= key (Thanks Alexander)
fixes #1041
2013-07-13 17:47:10 +02:00
Michael Stapelberg
eec80838ab actively delete _NET_WORKAREA on startup
fixes #1038
2013-07-13 12:24:15 +02:00
Franck Michea
1f8a860744 bugfix: Resize and center a scratchpad even when a criteria is used. 2013-07-11 21:18:21 +02:00
Alexander Berntsen
023594909e Implement debuglog command
Add debuglog command that takes toggle|on|off. Add get_debug_logging()
to be able to toggle. Make t/187-commands-parser.t expect 'debuglog'.
Document the debuglog command in userguide.
2013-07-07 15:33:42 +02:00
Michael Stapelberg
8a7a80e22e Merge branch 'fix-nagbar-without-font' 2013-06-29 23:47:29 +02:00
Michael Stapelberg
6241419c86 Merge branch 'master' into next 2013-06-29 23:47:29 +02:00
Michael Stapelberg
e8759691b8 Bugfix: call i3-nagbar correctly for configfiles without the font directive (Thanks xeen)
fixes #1030
2013-06-29 23:46:53 +02:00
Michael Stapelberg
f55b7977e8 Store aspect_ratio instead of weird proportional_{width,height} (Thanks phillip)
This commit only goes to “next” because I am not sure whether it
actually makes things better in all cases and want to give it some
testing first.

There was no documented reason behind using the
proportional_{width,height} variables, so I suppose that code was just
stupidity on my part (it was written merely a month after I started this
project in 2009).

fixes #1032
2013-06-29 23:11:54 +02:00
Michael Stapelberg
73508dec0c Merge branch 'fix-whitespace' 2013-06-29 20:58:51 +02:00
Michael Stapelberg
c4d4418745 Merge branch 'master' into next 2013-06-29 20:58:51 +02:00
Michael Stapelberg
d055e70a89 tests: update t/172-start-on-named-ws.t to check the previous commit 2013-06-29 20:58:33 +02:00
Eika Enge
625d5bdba6 Bugfix: Ignore spaces in front of default workspace name 2013-06-29 20:58:15 +02:00
Michael Stapelberg
e53b410894 Merge branch 'fix-floating-criteria' 2013-06-29 20:28:07 +02:00
Michael Stapelberg
78e99440f6 Merge branch 'master' into next 2013-06-29 20:28:07 +02:00
Michael Stapelberg
b4f7142509 Bugfix: fix focus handling in 'floating disable' on non-visible windows (Thanks necoro)
fixes #1027
2013-06-29 20:27:33 +02:00
Michael Stapelberg
d7222c0073 Merge branch 'fix-unaligned-memory' 2013-06-29 19:28:41 +02:00
Michael Stapelberg
6582da9939 Merge branch 'master' into next 2013-06-29 19:28:41 +02:00
Michael Stapelberg
cecadbfdfe Bugfix: fix bus error on OpenBSD/sparc64 (Thanks tobiasu)
fixes #1034
2013-06-29 19:28:13 +02:00
Michael Stapelberg
32e2180b56 Merge branch 'fix-nagbar' 2013-06-28 00:14:30 +02:00
Michael Stapelberg
8677936f6c Merge branch 'master' into next 2013-06-28 00:14:30 +02:00
Michael Stapelberg
4765427f21 i3-nagbar: Bugfix: -m requires an argument (crashes if none specified) (Thanks Mayhem) 2013-06-28 00:14:09 +02:00
Alexander Berntsen
d83b1f7851 Add a few things to .gitignore 2013-06-23 22:34:13 +02:00
Alexander Berntsen
49bc20c934 Fix incorrect comment 2013-06-23 22:34:04 +02:00
oblique
78fad71894 Update parent urgency hint if a child is removed. 2013-06-23 22:27:30 +02:00
Michael Stapelberg
3cf46ef4cc add a testcase for the shmlog command 2013-06-23 22:14:59 +02:00
Michael Stapelberg
85cb313153 reset shmlogname when disabling the log
This makes the i3-dump-log error message more helpful.
2013-06-23 22:14:39 +02:00
Michael Stapelberg
71dfcbc674 userguide: improve the shmlog docs
• the section heading needs === instead of ==
• better title
• explain what shared memory logging does and where to find more
  information
• add syntax section
• improve examples
• clarify that shmlog <size> discards the current log
2013-06-23 22:10:42 +02:00
Alexander Berntsen
f9d93d75b3 Implement shmlog command
Add shmlog command that takes <size>|toggle|on|off. Separate logbuffer
management into open_logbuffer() and close_logbuffer(). Make
t/187-commands-parser.t expect 'shmlog'. Add update_shmlog_atom() to
update the SHMLOG_PATH. Document the shmlog command in userguide.
2013-06-23 21:48:02 +02:00
Alexander Berntsen
684a77442e Make default shmlog_size a const int 2013-06-12 23:24:07 +02:00
Simon Wesp
58f3daac1d Add 'NoDisplay=true' to i3.application.desktop 2013-06-12 19:47:57 +02:00
Michael Stapelberg
75206db3a1 Bugfix: s/i3bar/i3-nagbar/ (Thanks badboy) 2013-06-10 23:23:22 +02:00
Michael Stapelberg
cbdc8c33dd remove unused pathlen (Thanks gcc) 2013-06-10 23:10:46 +02:00
Michael Stapelberg
57b43d84f9 retab! get_exe_path.c
We seriously need auto-formatting.
2013-06-10 23:08:42 +02:00
Michael Stapelberg
3930615104 Bugfix: sizeof(destpath)-1 to have space for the trailing NUL (Thanks Merovius) 2013-06-10 23:08:17 +02:00
Michael Stapelberg
d51173b2ba i3-nagbar: take our terminal execution kludge to the next level
Please read commit 2bf80528bd first.
Then read the comment within the code of this commit.
Then run in circles and cry loudly.

fixes #1002
fixes #1026
2013-06-10 22:55:39 +02:00
Michael Stapelberg
a99fc537fc re-shuffle struct members to save a bit of memory
Analysis done with pahole(1).
2013-06-08 15:37:41 +02:00
Michael Stapelberg
80e7d2d346 lib/i3test: clarify how to identify open_window() windows in i3 commands (Thanks vandannen) 2013-06-08 12:49:02 +02:00
haptix@web.de
4937788e8d Fix wrong placement of i3bar when connecting/disconnecting outputs
When connecting or disconnecting an output, i3bar reconfigures its
windows. This also included an unmapping of the bars, and a remapping of
all docked bars. Thus, the bars were misplaced when a monitor was
disconnected.

This commit assures that the remapping of the bars only takes place,
when the mode has actually changed. This patch also takes care of an
inconsistency when pressing the bar_modifier while switching the mode.
Also, the xkbDisplay is now closed correctly, when deregestering the xkb
keyevents.
2013-05-30 12:18:27 +02:00
Michael Stapelberg
aa8d9214a6 Merge branch 'fix-unmap' 2013-05-28 19:56:57 +02:00
Michael Stapelberg
8353a387c9 Merge branch 'master' into next 2013-05-28 19:56:57 +02:00
Michael Stapelberg
62ef7834b0 Bugfix: Unmap windows before reparenting them to the root window (fixes Mathematica) (Thanks psychon)
Some apps such as Mathematica send a synthetic UnmapNotify event without
properly unmapping their window first. This change makes sure that
happens and fixes an annoying bug with Mathematica where some unmanaged
windows would stay around, but you couldn’t do anything with them.

Thanks to psychon (current awesome maintainer) for helping with the
diagnosis!

fixes #787
2013-05-28 19:52:01 +02:00
Michael Stapelberg
e979f16ddb manage.c: use xcb_discard_reply() instead of free()ing the reply (Thanks psychon) 2013-05-28 18:57:26 +02:00
haptix@web.de
e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
haptix@web.de
f0eba6d15c Fix problem when moving fullscreen window to scratchpad
When moving a fullscreen window to scratchpad with 'move scratchpad', the
focused window would stay fullscreen.

Also, when having a container in fullscreen mode and then focusing a child of
this container and moving it to scratchpad, it would enable fullscreen for
the child window.

This patch fixes both problems, so the scratchpad window is always floating.
2013-05-25 22:59:27 +02:00
Diego Ongaro
609496d13f Draw indicator border only for split layouts
In order to distinguish split layouts from tabbed/stacking layouts when
only one window is shown, do not draw the indicator border for tabbed or
stacking layouts.
2013-05-22 19:35:33 +02:00
Diego Ongaro
96575e14a0 Give layout enum a name: layout_t 2013-05-22 19:35:07 +02:00
Arun Persaud
55a338c919 i3-msg.man: updated man page to include all options
-s, -v, -q and -h options were not documented.
2013-05-21 19:46:09 +02:00
Thomas Adam
ed1d13b0a1 i3bar: Fix pixel offset calculation in dual-head
When running i3bar on a dual-head display with workspaces enabled in i3bar's
config, the second monitor wouldn't use a correct x position offset and
would draw its label too close to the screen's edge.  In comparison to the
first monitor, this is inconsistent because that starts with a pixel offset
of 1.
2013-05-20 15:09:15 +02:00
Diego Ongaro
dc522b630c contrib/gtk-tree-watch.pl: Remove bogus default socket path
The default i3 socket path was set to "/tmp/nestedcons". This isn't
going to work for most people.
2013-05-05 12:58:04 +02:00
Diego Ongaro
1b8e8822b9 contrib/dump-asy.pl: Display nicer double-quotes
The right way to do this in LaTeX is ``foo'', not "foo".
2013-05-05 12:56:22 +02:00
Diego Ongaro
22ca203b80 contrib/dump-asy.pl: Fix $ and & in window titles
These would produce asy/LaTeX parse errors before.
2013-05-05 12:55:54 +02:00
Michael Stapelberg
bdccf26f39 Merge branch 'fix-aspect' 2013-04-23 07:18:39 +02:00
Michael Stapelberg
0f6b5fe8da Merge branch 'master' into next 2013-04-23 07:18:39 +02:00
Clément Bœsch
b7da2dbcd8 render_con: fix height rounding in aspect ratio computation
With a 484x292 window and proportion of 488x294, new_height is
291.590164 after the loop, causing a rounding issue leading to a window
of 484x291.
2013-04-23 07:18:35 +02:00
Michael Stapelberg
423f2e264f Merge branch 'fix-resize' 2013-04-15 21:01:27 +02:00
Michael Stapelberg
06730f44e6 Merge branch 'master' into next 2013-04-15 21:01:27 +02:00
oblique
a93e1e5c59 Ensure that resize will take place even if pixel is smaller than size increments.
fixes #1011
2013-04-15 20:59:51 +02:00
Michael Stapelberg
412b15b6b8 Merge branch 'fix-tray-output' 2013-04-14 22:54:36 +02:00
Michael Stapelberg
8247f44e95 Merge branch 'master' into next 2013-04-14 22:54:36 +02:00
Michael Stapelberg
72c279bc39 Bugfix: fix crash when not having tray_output configured (Thanks Layus) 2013-04-14 22:54:15 +02:00
Michael Stapelberg
9a91eb83c2 Merge branch 'fix-ipc-fd' 2013-04-14 10:14:51 +02:00
Michael Stapelberg
70d28bc7af Merge branch 'master' into next 2013-04-14 10:14:51 +02:00
Michael Stapelberg
fa1b436fca Bugfix: mark IPC fd CLOEXEC (Thanks Layus)
Without this fix, children of i3bar would inherit the file descriptor of
the IPC connection to i3. Therefore, even if i3bar exits with SIGSEGV,
the connection to i3 stays open. Because nobody actually reads any
messages by i3, the buffer will fill up and i3 can’t deliver any more
messages, and thus busy-loops at that point.

fixes #995
2013-04-14 10:12:21 +02:00
haptix@web.de
90bfbac107 fix font display height in i3bar
Increase the drawing area height, in order to prevent the font from being cut off.

fixes #992
2013-04-13 19:49:06 +02:00
haptix@web.de
a9aad872ee unhide hidden i3bar when mode is active
This patch also handles unhiding of i3bar in case the i3bar modifier key is
pressed for activating a new binding mode.
2013-04-13 10:16:34 +02:00
Eric S. Raymond
adc16f0e90 Document fixes and workarounds for test failures. 2013-04-11 22:37:58 +02:00
Eric S. Raymond
d0fbc10aca Typo and usage fixes in documentation and comments. 2013-04-11 22:37:39 +02:00
haptix@web.de
921967c729 unhide hidden i3bar when mode is active
fixes #961
2013-04-11 22:35:54 +02:00
haptix@web.de
402c3db7ac restore i3bar compatibility with libyajl version 1
fixes #1004
2013-04-07 15:54:20 +02:00
Michael Stapelberg
0659a0d98c raise fullscreen windows on top of all other X11 windows
Note that this is ineffective for dunst’s notifications because dunst
re-raises them as soon as they get obscured. It does work for dzen2
however, which was the original use-case.

fixes #569
2013-04-07 15:38:00 +02:00
Michael Stapelberg
3f525eba41 docs/wsbar: update (we have i3bar now, i3-wsbar is just an example)
fixes #735
2013-04-07 10:24:38 +02:00
Michael Stapelberg
cd001a49f6 Merge branch 'fix-tab-width' 2013-04-07 10:00:42 +02:00
Michael Stapelberg
bb22e232ad Merge branch 'master' into next 2013-04-07 10:00:42 +02:00
Michael Stapelberg
9f353996fe tabbed: floor(), put extra pixels into the last tab (Thanks xeen)
This is the only sane way I can think of to deal with the problem that
the screen size may not be dividable by the amount of tabbed children
(e.g. 1280 / 41 = 31.219512…).

fixes #645
fixes #791
2013-04-07 10:00:28 +02:00
Michael Stapelberg
114d7bf262 docs/multi-monitor: nVidia ≥ 302.17 works just fine (Thanks HedgeMage) 2013-04-06 22:49:14 +02:00
Michael Stapelberg
4f72c5c5fc Merge branch 'fix-floating-size' 2013-04-02 23:59:48 +02:00
Michael Stapelberg
0b000b1464 Merge branch 'master' into next 2013-04-02 23:59:48 +02:00
Michael Stapelberg
0901720a24 Bugfix: fix floating window size with hide_edge_borders (+test)
fixes #998
2013-04-02 23:59:26 +02:00
haptix@web.de
2926ddb69f ipc: use correct workspace in workspace change event
fixes #990
2013-04-02 22:27:04 +02:00
haptix@web.de
43bf72fc5d add testcase for the workspace-focus ipc event 2013-04-02 22:27:04 +02:00
Michael Stapelberg
bfc2cbc69a t/201-config-parser: add test for quotes in comments 2013-04-02 22:27:04 +02:00
Eelis van der Weegen
7f5a18e093 Add 'line' as a configuration parsing primitive
…and use it for ignoring comment lines, so that quotes in them
doesn't cause problems anymore.
2013-04-02 22:26:29 +02:00
Michael Stapelberg
82b59788ac userguide: mention forgotten layout splitv/splith (Thanks Eelis) 2013-03-30 13:03:35 +01:00
Simon Elsbrock
6b0efac483 i3bar: fix usage description, make -b happen 2013-03-29 09:55:03 +01:00
Philippe Virouleau
0a3d42c21e Fix scratchpad_show
Test if window is in scratchpad
    Test if function is called without criteria
    Updated testcase
2013-03-27 21:51:13 +01:00
Yuxuan Shui
18148205b6 Don't dup2() the parent's stdout to child's stdin.
There're DLOG()s, seriously.
2013-03-24 09:55:46 +01:00
enkore
58e68940f6 Add click events to i3bar
If the statusline generator (i.e. i3status) specifies click_events:true
in the protocol header, i3bar will write a JSON array on it's stdin
notifying it if the user clicks on a block.

The exact protocol is documented in docs/i3bar-protocol.
2013-03-21 23:55:30 +01:00
Yuxuan Shui
5adb09c5fc Use a saner sanity check for floating_reposition.
The function contained_by_output checks whether any output contains any
parts of a give rect. Rather than relying on the central point of the rect.
2013-03-21 23:41:07 +01:00
Yuxuan Shui
5b4ff1804d Fix restarting with 32bit depth windows (v5)
What I do in this patch is:

1. Split the con_new() function, so I can create a Con without actually
create a window.
2. Store the depth of Cons in the layout file when i3 is restarting.

Fix typos and mis-staged files in previous patch.
2013-03-21 23:38:09 +01:00
Michael Stapelberg
7552a02d5c i3-dmenu-desktop: run commands when they don’t match a .desktop file
This allows you to enter e.g. "i3 layout stacking" (provided you don’t
have an i3 .desktop file)
2013-03-21 23:32:46 +01:00
Baptiste Daroussin
505d87ef3e FreeBSD expect a real path on the filesystem for shm_open 2013-03-20 17:29:06 +01:00
Baptiste Daroussin
346cba0e0f shm_unlink the created/open shm 2013-03-20 17:26:14 +01:00
Baptiste Daroussin
f530e5452d Do not use ELOG while logwalk is not initialized 2013-03-20 17:24:10 +01:00
Baptiste Daroussin
eb601a2615 All supported FreeBSD version has getline now 2013-03-20 11:17:26 +01:00
Michael Stapelberg
056168494c update debian/ 2013-03-18 23:01:36 +01:00
Michael Stapelberg
11a3d4077e Merge branch 'master' into next 2013-03-18 22:45:55 +01:00
Michael Stapelberg
72f42bdc85 Merge branch 'release-4.5.1' 2013-03-18 22:45:50 +01:00
Michael Stapelberg
13f4a9f3ee add release notes for v4.5.1 2013-03-18 22:42:33 +01:00
Michael Stapelberg
41ac26456b Merge branch 'master' into next 2013-03-17 01:01:11 +01:00
Michael Stapelberg
1e388796ab Merge branch 'bump-copyrights' 2013-03-17 01:01:11 +01:00
Michael Stapelberg
271189444d bump copyright years to 2013 2013-03-17 01:01:04 +01:00
Michael Stapelberg
1510579c86 Merge branch 'master' into next 2013-03-17 00:59:52 +01:00
Michael Stapelberg
fcabc0ab6c Merge branch 'i3dd-error' 2013-03-17 00:59:52 +01:00
Michael Stapelberg
a7ba8931d5 i3-dmenu-desktop: improve error message when dmenu cannot be found
fixes #984
2013-03-17 00:59:18 +01:00
Michael Stapelberg
f5a43738d1 Merge branch 'master' into next 2013-03-15 19:27:23 +01:00
Michael Stapelberg
203f5dafd0 Merge branch 'fix-floating-move' 2013-03-15 19:27:23 +01:00
Michael Stapelberg
083611e434 Bugfix: Don’t warp the pointer when dragging floating windows
fixes #951
2013-03-15 19:27:08 +01:00
Michael Stapelberg
c488bf7a76 Merge branch 'master' into next 2013-03-14 15:20:34 +01:00
Michael Stapelberg
aea25407df Merge branch 'fix-make' 2013-03-14 15:20:34 +01:00
Marcus Crestani
89c41f50af Add YAJL_CFLAGS to i3-msg.mk. 2013-03-14 15:20:33 +01:00
Michael Stapelberg
0f6d483558 docs/hacking-howto: explain our different branches 2013-03-14 14:44:01 +01:00
Michael Stapelberg
fee6d15a3a docs/hacking-howto: fix the link to the git introduction 2013-03-14 14:43:51 +01:00
Michael Stapelberg
b8230183ef add dummy entry to debian/changelog 2013-03-12 15:12:13 +01:00
Michael Stapelberg
fe34820c0a update debian/ 2013-03-12 15:11:35 +01:00
Michael Stapelberg
a1691a08ba Merge branch 'next' 2013-03-12 14:05:47 +01:00
Michael Stapelberg
de9c31611d Merge branch 'release-4.5' into next 2013-03-12 14:05:41 +01:00
Michael Stapelberg
2640fb2b5f makefile: delete test.{config_parser,commands_parser} in distclean 2013-03-12 14:03:22 +01:00
Michael Stapelberg
ec0dca9c75 add release notes for i3 v4.5 2013-03-12 13:40:52 +01:00
Michael Stapelberg
c534b6f7e3 i3-dmenu-desktop: bump version to 1.4 2013-03-12 13:38:14 +01:00
oblique
8a4a719093 Add support for _NET_WM_STATE_DEMANDS_ATTENTION.
_NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with
the window happened. It's a weaker hint than urgency flag of WM_HINTS,
but some applications and almost all Qt applications use it instead of
WM_HINTS' urgency flag (one example is Skype).
2013-03-09 10:55:13 +01:00
Michael Stapelberg
8327f837a0 i3-dmenu-desktop: remove %i from commandline
We don’t currently support the icon argument, but entirely not handling
%i leads to e.g. “digikam” not starting.
2013-03-03 21:27:56 +01:00
András Mohari
ae0842532e Bugfix: Set separator color properly when drawing
Set the colors in the GC directly since set_font_colors() does not do it
when using a Pango font, resulting in i3bar drawing separators in the
wrong color.
2013-02-25 23:49:15 +01:00
András Mohari
a0d5b744ab Allow min_width of a block in i3bar to be a string
With this change, min_width can either be an integer (as usual), or a
string. In the latter case, the width of the text given by min_width
determines the minimum width of the block. This way one does not have to
figure out a minimum width by trial and error, only to do it again every
time the font is changed.
2013-02-25 23:48:35 +01:00
Michael Stapelberg
7ecdcb61f8 config: accept “smart” as popup_during_fullscreen parameter (Thanks supplantr)
This was the default, so explicitly setting it is not really necessary,
but of course it should be possible.

fixes #967
2013-02-24 17:23:37 +01:00
Mats
a38749e7e4 Bugfix: Handle nested transient popups properly
During smart popup fullscreen handling, display all transient popups
that belong to the respective fullscreen application. A popup window
belongs to another window if the latter is reachable via the path
induced by the WM_TRANSIENT_FOR hints.

fixes #881
2013-02-24 15:59:38 +01:00
Michael Stapelberg
4fdf62eb2a Merge branch 'fix-move-ws' 2013-02-19 00:28:05 +01:00
Michael Stapelberg
d5358a749e Merge branch 'master' into next 2013-02-19 00:28:05 +01:00
Michael Stapelberg
9bfe6a6236 Bugfix: Properly parse commands like “move workspace torrent” (Thanks rasi)
fixes #955
2013-02-19 00:27:55 +01:00
Michael Stapelberg
2922603cc4 tests: correctly close stdout with IPC::Run
while IPC::Run supports <&-, it does not support >&- apparently.
2013-02-19 00:26:00 +01:00
Michael Stapelberg
9cd2d1fb8a make t/205-ipc-windows require AnyEvent::I3 >= 0.15
Necessary due to the new event type
2013-02-18 10:59:32 +01:00
Piotr S. Staszewski
3facbbca5c Add a new IPC event for changes on windows.
Added new event id (I3_IPC_EVENT_WINDOW) so that a an IPC client can
subscribe to events on windows. Added a basic window event that gets
triggered when a window gets successfully reparented. This new event
also dumps the container data, so that IPC clients can get the initial
window name. IPC clients wishing to see window events should subscribe
to 'window'.
2013-02-18 10:55:11 +01:00
Michael Stapelberg
e215fd43c0 i3bar-protocol: update example, reword separator{,_block_width} 2013-02-18 10:51:52 +01:00
Artem Shinkarov
5f05ca6b5d Separator color via config; separator width and on/off via ipc
This patch adds the following features:
1) Configure a color of the separator via config.  It is done like
   bar {
      colors {
         separator #000000
      }
   }
2) A block can have an integer entry "separator_block_width" which
   sets the width of the gap which would follow after the current block.

3) A block can have a boolean entry "separator" and if it is set
   to false, then the drawing of the separating line would be disabled.
2013-02-18 10:44:44 +01:00
Michael Stapelberg
a52b1b4bb0 inline comments for enum values 2013-02-18 10:41:34 +01:00
Sebastian Ullrich
49979c9d15 Always auto center on 'scratchpad show' if window hasn't been repositioned by the user
This change ensures a scratchpad window is still centered on the screen
if it has first been shown on another screen of a different
resolution. Moving or resizing the scratchpad manually disables this
behavior.
2013-02-18 10:38:28 +01:00
Michael Stapelberg
7f0065e1b1 tests: unset $ENV{SHELL} to avoid breakage with fish (Thanks dRbiG) 2013-02-15 16:41:28 +01:00
Mats
fa4301e06d Split workspace instead of changing orientation
Move all children of the workspace into a new container if there is more
than one otherwise simply change the orientation.

fixes #922
2013-02-15 03:16:02 +01:00
Michael Stapelberg
1e3075e69b userguide: remove obsolete sentence about client.background (Thanks Tucos) 2013-02-14 20:47:41 +01:00
oblique
e92dd1acc6 Obey WM_SIZE_HINTS's resize increments in floating 2013-02-14 19:38:26 +01:00
oblique
b0e2be9a6b Add render_deco_height() 2013-02-14 19:37:52 +01:00
Sebastian Rachuj
b565bfca13 Bugfix: Do not move focus if a container is moved across outputs
fixes #809

This makes the moving behavior more consistent. If you want to focus the
workspace you are moving to, just chain the keybinding in your config
file:

    bindsym $mod+Shift+1 move workspace 1; workspace 1
2013-02-10 17:38:17 +01:00
Michael Stapelberg
d36e2a70bf hacking-howto: refer people to cr.i3wm.org 2013-02-10 15:10:13 +01:00
Michael Stapelberg
a1774e78fc i3test: fix get_focused() docs (Thanks knopwob) 2013-02-07 15:57:15 +01:00
Michael Stapelberg
be287876d6 userguide: be explicit about assignment processing order (Thanks Donald) 2013-02-07 15:49:35 +01:00
Michael Stapelberg
2bf80528bd i3-nagbar: kludge to run the command shell script when inside a noexec mount
See the comment inside the commit for more information on how this
works.

fixes #947
2013-02-07 15:30:40 +01:00
Sascha Kruse
0a0d66dc8a put common part of error messages into variable
This makes future changes easier when new tokens are added to the
parser.
2013-02-01 11:50:52 +01:00
Mats
23078f6ded i3-dmenu-desktop: List filenames of .desktop files
In addition to 'name' and 'command', add a third entry type 'filename'
to list the filenames of the .desktop files (e.g., 'firefox.desktop'
would be display as 'firefox').

Command line option '--entry-type' can be specified multiple times.

fixes #930
2013-01-30 13:39:49 +01:00
Sascha Kruse
bbede97966 scratchpad_show focus unfocused scratchpad window
When there's an unfocused scratchpad window on the current workspace
scratchpad_show will focus that scratchpad window.
2013-01-30 13:33:55 +01:00
Michael Stapelberg
03693bf0cc add testcase for "move workspace <output>" 2013-01-30 13:31:20 +01:00
Michael Stapelberg
29c027db3b Merge branch 'fix-move-ws' 2013-01-30 13:30:59 +01:00
Michael Stapelberg
fcdfab4d28 Merge branch 'master' into next 2013-01-30 13:30:59 +01:00
Steven Allen
cf830f69a2 Bugfix: Correctly parse move ... workspace *_on_output
The parse spec for `move ... workspace ...`  ordered next/prev before
next_on_output/prev_on_output causing the parser to match next/prev
before next_on_output/prev_on_output.

Ticket: http://bugs.i3wm.org/report/ticket/941
2013-01-30 13:30:54 +01:00
Michael Stapelberg
aede5600aa Merge branch 'userguide-resize' 2013-01-27 20:20:53 +01:00
Michael Stapelberg
3e59a8c949 Merge branch 'master' into next 2013-01-27 20:20:53 +01:00
Michael Stapelberg
8b97a5e159 userguide: be more clear about the resize command arguments (Thanks Tucos) 2013-01-27 20:20:37 +01:00
Marius Muja
b1cc4d5166 Fix decoration rect size for windows without border 2013-01-26 19:31:15 +01:00
Vivien Didelot
1d22fe42f2 split main .gitignore and ignore more files
This patch splits the main .gitignore with a specific
testcases/.gitignore and also add 4 patterns to the ignore list:

  i3-command-parser.stamp
  i3-config-parser.stamp
  testcases/-
  testcases/i3-cfg-for-*
2013-01-26 19:30:10 +01:00
Michael Stapelberg
4796a61c31 add testcase for "move to output" wrapping 2013-01-26 19:28:11 +01:00
Francesco Mazzoli
f13d8ed06f wrap when moving things to outputs with direction 2013-01-26 19:27:58 +01:00
Francesco Mazzoli
3cd4b8c111 update tests to test the output wrapping 2013-01-26 19:08:41 +01:00
Michael Stapelberg
c300d216ec i3-msg: parse command replies and display errors nicely if there were errors
fixes #737
2013-01-26 17:56:43 +01:00
Michael Stapelberg
62b0df0640 Make i3-nagbar use the same font as configured for i3 2013-01-26 09:55:38 +01:00
Adrien Schildknecht
76ef3a4ab8 remove the urgency indicator when a window is closed 2013-01-25 18:53:59 +01:00
Michael Stapelberg
74558bb33d Call scratchpad_show() when focusing scratchpad windows via criteria
fixes #931
2013-01-25 16:11:20 +01:00
Michael Stapelberg
d426f1570b Merge branch 'fix-scratchpad-reconf' 2013-01-25 15:48:38 +01:00
Michael Stapelberg
2ea94420d3 Merge branch 'master' into next 2013-01-25 15:48:38 +01:00
Michael Stapelberg
7be5ece663 Bugfix: fix coordinates of scratchpad windows on output changes (Thanks badboy)
Previously, after reconfiguring monitors, scratchpad windows could still
be focused but might be out of bounds for you to see.

fixes #929
2013-01-25 15:47:43 +01:00
Michael Stapelberg
a32d2d5d61 scratchpad: fix crash when moving last window of an invisible workspace (+test) (Thanks bafain)
It looks like the code which was removed with this commit was not
necessary anyways since con_move_to_workspace() by now checks on its own
whether it moves to the scratchpad.

fixes #913
2013-01-25 15:28:58 +01:00
Michael Stapelberg
f767ac30b3 fix two more crashes when disabling an empty output 2013-01-25 14:53:15 +01:00
Michael Stapelberg
e0cfe1f8c0 Bugfix: fix crash when disabling output without any windows (Thanks xeen, knopwob)
fixes #919
2013-01-25 14:14:06 +01:00
Michael Stapelberg
8f4456a14a Merge branch 'fix-workspace-ws' 2013-01-25 13:56:26 +01:00
Michael Stapelberg
c2061042e1 Merge branch 'master' into next 2013-01-25 13:56:26 +01:00
Michael Stapelberg
8bc771ac16 Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks leifarne)
fixes #921
2013-01-25 13:55:26 +01:00
Michael Stapelberg
fc3b0db7a5 i3bar: fix rendering positions 2013-01-24 17:21:34 +01:00
Michael Stapelberg
990a1ca4c2 i3bar: don’t use X11 borders to avoid overlapping in hide mode
fixes #923
2013-01-24 16:09:51 +01:00
Michael Stapelberg
70067c72d5 Merge branch 'fix-key-release' 2013-01-24 14:45:14 +01:00
Michael Stapelberg
a5c9b0dedb Merge branch 'master' into next 2013-01-24 14:45:14 +01:00
Michael Stapelberg
2eb4ed95bc Bugfix: fix “overlapping” --release key bindings (Thanks phlux)
We eagerly marked all KeyRelease bindings as eligible to match without
checking modifiers, while this should only be allowed for the key
binding which actually was pressed.

fixes #915
2013-01-24 14:44:01 +01:00
Michael Stapelberg
28933f8de3 i3-input: set focus before sending the command (Thanks emias)
This avoids problems with sending 'focus left' or other commands which
manipulate focus.
2013-01-24 13:57:08 +01:00
Marius Muja
bfd150872d Fixing continuous resize bug in floating mode
fixes #910
2013-01-24 12:42:13 +01:00
David Edmondson
3365b52384 Allow servers which do not support the XKB extension.
If we can open the X display but the XKB extension is not available,
continue without it.
2013-01-23 20:27:27 +01:00
Michael Stapelberg
2478d0a2e0 ipc: use ipc_recv_message instead of duplicate code
This should fix the situation where i3 would read only the header and
not the payload of the message.
2013-01-23 18:59:36 +01:00
Michael Stapelberg
dcb8ac84f8 ipc_recv_message: store message_type, don’t compare. add distinct EOF retval
Also use ELOG, which requires i3-msg to provide logging functions.
2013-01-23 18:51:39 +01:00
Michael Stapelberg
e8fa3eeebd i3-msg: include socket path in error message 2013-01-23 08:11:27 +01:00
Michael Stapelberg
7d9c20734c include stdint.h in i3/ipc.h (Thanks Kai) 2013-01-11 22:28:43 +01:00
Michael Stapelberg
7b0d75ee0a ipc_send_message: use stack frame with fixed size 2013-01-11 19:09:41 +01:00
Michael Stapelberg
1b6ea35eb6 Merge branch 'fix-ipc-write' 2013-01-09 18:11:17 +01:00
Michael Stapelberg
fc0e80ee7f Merge branch 'master' into next 2013-01-09 18:11:17 +01:00
Michael Stapelberg
f5b7bfb12e Bugfix: fix IPC messages writes with low buffer sizes (Thanks jasper, dcoppa)
Use the following command to reproduce this bug:

    echo 4096 | sudo tee /proc/sys/net/core/wmem_default

Then just switch workspaces with some windows on it and i3bar would
exit due to malformed IPC messages.

This bug hits OpenBSD users (and possibly other BSDs) due to their lower
default buffer size.

fixes #896
2013-01-09 18:11:03 +01:00
slowpoke
527ec2a69c Adds Go IPC lib to the docs. 2013-01-02 23:15:14 +01:00
Michael Stapelberg
f2ca568202 i3bar: set _NET_SYSTEM_TRAY_COLORS for symbolic icons (gtk3+) 2013-01-02 23:14:30 +01:00
Michael Stapelberg
e9503a1fa3 i3bar: fake DestroyNotify and send MANAGER ClientMessages to fix tray restarts
fixes #745
2013-01-02 23:14:27 +01:00
Michael Stapelberg
2043076518 i3bar: add missing \n to debug messages 2013-01-02 11:38:03 +01:00
Michael Stapelberg
c394efbfd0 Merge branch 'fix-assign-and-move' 2013-01-01 16:31:27 +01:00
Michael Stapelberg
2c249b6949 Merge branch 'master' into next 2013-01-01 16:31:27 +01:00
Michael Stapelberg
138e04fd4d Bugfix: Fix for_window moving of assigned windows (Thanks bafain)
fixes #909
2013-01-01 16:31:08 +01:00
Michael Stapelberg
6856b232d6 t/175-startup-notification: use the testcases X11 connection
This needs X11::XCB >= 0.07 and will be skipped if that is not
installed.

This fixes a race condition in the testsuite.
2012-12-27 18:02:23 +01:00
Michael Stapelberg
d8e27dd5aa ignore MotionNotify events generated while warping the pointer 2012-12-27 17:04:13 +01:00
Michael Stapelberg
9edbcc4790 debug message for window focus: include window ID 2012-12-27 16:58:46 +01:00
Michael Stapelberg
1b62feccac t/132-move-workspace: add missing sync_with_i3 2012-12-27 16:55:22 +01:00
Michael Stapelberg
54fd3d3480 unregister as window manager before restarting (fixes a race condition) 2012-12-27 16:54:54 +01:00
Michael Stapelberg
cde82eafa6 use xcb_aux_sync to make sure our changes reach the X server, flushing is not enough 2012-12-27 16:54:36 +01:00
Michael Stapelberg
baae706b87 t/166-assign: sync after mapping the window 2012-12-26 22:04:35 +01:00
Michael Stapelberg
c06d62887e t/173-regress-focus-assign: sync after mapping the window 2012-12-26 22:04:15 +01:00
Michael Stapelberg
4d65cfc67d t/189-floating-constraints: sync before getting window rects 2012-12-26 22:03:37 +01:00
Michael Stapelberg
27adbbff61 t/510-focus-across-outputs: fix sync order
syncing _after_ fresh_workspace makes no change, but we need to wait for
the WarpPointer request to be processed.
2012-12-26 22:03:02 +01:00
Michael Stapelberg
92e2190300 t/503-workspace: sync after switching focus to a different output 2012-12-26 22:02:43 +01:00
Michael Stapelberg
d6e4910c22 userguide: fix typo: s/11x/11px/ 2012-12-26 18:32:13 +01:00
Michael Stapelberg
0d354ebd0c i3-dmenu-desktop: skip broken files (no/empty Exec=) but warn about them 2012-12-26 18:31:33 +01:00
Michael Stapelberg
ba1b3a3240 i3-dmenu-desktop: skip files with broken utf8 but warn about it 2012-12-26 18:31:21 +01:00
Michael Stapelberg
a6c676e5d3 i3-config-wizard: clean all traces of the old config parser (Thanks cradle) 2012-12-26 14:23:47 +01:00
Michael Stapelberg
140c1062b6 drop the flex/bison dependency \o/ 2012-12-25 14:20:21 +01:00
Michael Stapelberg
0e4c956c1d i3-config-wizard: switch away from bison/flex to hand-written parser
This adds some code duplication which we might remove in a future
refactoring or not. Depends on whether unifying the parsers actually
makes the code better or not. I suspect it doesn’t :-).
2012-12-25 14:20:17 +01:00
Michael Stapelberg
f866607c67 i3-dmenu-desktop: strip newlines from dmenu ≥ 4.4 (Thanks saurabhgeek92)
fixes #891
2012-12-25 12:41:00 +01:00
Simon Elsbrock
0045cfa637 move visible scratchpad window to focused workspace
If there is a visible scratchpad on another (non-internal) workspace,
bring it to the focused workspace instead of doing nothing.

closes #784
2012-12-24 19:20:47 +01:00
Michael Stapelberg
061d90f305 move scratchpad test to separate file, otherwise it is non-conclusive 2012-12-24 19:19:32 +01:00
Michael Stapelberg
9882a4dc09 fix formatting in get_process_filename.c 2012-12-24 16:57:30 +01:00
Michael Stapelberg
66b1dadc38 i3-nagbar: don’t quote the -e argument for i3-sensible-terminal
…not all terminals support it
2012-12-24 16:56:20 +01:00
Michael Stapelberg
b3d7531947 refactor both i3-nagbar starts into src/util.c
With this change, libev >= 4 is a hard dependency. It should be present
in all major linux distributions (even the latest ubuntu LTS).
2012-12-24 16:53:20 +01:00
Michael Stapelberg
c127ac3855 remove all references to the old cfgparse 2012-12-24 15:57:02 +01:00
Michael Stapelberg
b304e6ad34 remove old cfgparse.{l,y} 2012-12-24 15:46:57 +01:00
Sascha Kruse
5d4a934864 render_con: initialize int sizes[children]
This fixes a clang-analyzer warning
2012-12-24 15:28:17 +01:00
Michael Stapelberg
4f2922de62 Revert "initialize array to fix clang-analyze warning"
This reverts commit 56e0ceb44e.
2012-12-24 15:28:08 +01:00
Michael Stapelberg
e11252a7af pod2html: remove "(testsuite)" from title, it’s also for i3-dmenu-desktop 2012-12-24 15:27:09 +01:00
Michael Stapelberg
56e0ceb44e initialize array to fix clang-analyze warning 2012-12-24 15:19:20 +01:00
Michael Stapelberg
9ae73b7a2a fix possibly uninitialized variable (Thanks knopwob) 2012-12-24 15:13:47 +01:00
Sascha Kruse
5a567057ab i3-dump-log/main.c: error handling for write(...) 2012-12-24 15:11:19 +01:00
Michael Stapelberg
1a6bddad55 Merge branch 'master' into next 2012-12-24 14:50:15 +01:00
Michael Stapelberg
e67ff4dd1c Merge branch 'fix-mapreq' 2012-12-24 14:50:11 +01:00
Michael Stapelberg
625401d162 Bugfix: handle MapRequests sent between i3 registering as a wm and handling events
This fixes the problem where i3-nagbar does not come up because its
MapRequest is ignored.

fixes #892
2012-12-24 14:49:19 +01:00
Michael Stapelberg
24aa857a89 Bugfix: Correctly close floating windows (Thanks eeemsi) 2012-12-23 18:51:17 +01:00
Michael Stapelberg
3a78d489e6 Render tree before destroying X11 containers upon unmap (Thanks Merovius)
When an X11 window is closed (say, urxvt), i3 gets an UnmapNotify event
and destroys (DestroyWindow) the window decorations. Before this commit,
the DestroyWindow call was sent immediately.

This lead to a situation where — due to the DestroyNotify — EnterNotify
events were generated that would cause the focus to be set to the
underlying window.

With this commit, i3 first renders the tree and pushes changes to X11
before calling DestroyWindow. Therefore, the surrounding containers will
take up any space that was freed by the window which was closed and no
EnterNotify will be generated.

fixes #660
2012-12-23 15:54:49 +01:00
Joep van Delft
79bd2aede5 Draw 1px tab separators left/right instead of 2px on the right only
fixes #894
2012-12-22 16:15:11 +01:00
Michael Stapelberg
ff9c2f0c46 new-test: add launch_with_config to multi-monitor template 2012-12-22 14:08:25 +01:00
Michael Stapelberg
bf2b25a915 Merge branch 'fix-scratch-confreq' 2012-12-22 14:08:14 +01:00
Michael Stapelberg
a1ccca22e6 Merge branch 'master' into next 2012-12-22 14:08:14 +01:00
Michael Stapelberg
36b106a9d3 Bugfix: Ignore ConfigureRequests for scratchpad windows (Thanks MeanEYE)
fixes #898
2012-12-22 14:08:11 +01:00
Michael Stapelberg
e0194f0765 i3-dmenu-desktop: don’t add “geany” if “Geany” is already present (Thanks Tai-Lin Chu) 2012-12-21 00:04:29 +01:00
Michael Stapelberg
b8939e6c9c hacking-howto: clarify where to send patches to (Thanks Vivien) 2012-12-20 23:56:17 +01:00
Michael Stapelberg
5b8df27270 userguide: s/mailclient/mail client/g (Thanks joepd) 2012-12-20 23:54:48 +01:00
Michael Stapelberg
3ca8299637 complete-run: clarify the message about missing ../i3 (Thanks Marcos) 2012-12-20 23:50:50 +01:00
Michael Stapelberg
bb3ae9f960 Merge branch 'master' into next 2012-12-19 21:40:53 +01:00
Michael Stapelberg
770ead6222 Merge branch 'fix-scroll-split' 2012-12-19 21:40:48 +01:00
Michael Stapelberg
721fa7bdad Fix scrolling on a tabbed titlebar which contains split cons (Thanks f8l)
fixes #708
2012-12-19 21:40:26 +01:00
Michael Stapelberg
895f8e05c8 Merge branch 'master' into next 2012-12-19 21:13:12 +01:00
Michael Stapelberg
52ea8ee720 Merge branch 'fix-tab-border' 2012-12-19 21:13:08 +01:00
Michael Stapelberg
ae605bdd39 Also draw right tab border for split containers (Thanks alex)
fixes #696
2012-12-19 21:12:38 +01:00
Michael Stapelberg
4baf944ef0 Merge branch 'master' into next 2012-12-19 18:22:37 +01:00
Michael Stapelberg
3228a5af28 Merge branch 'i3-input-focus' 2012-12-19 18:22:33 +01:00
Michael Stapelberg
5779f573e7 i3-input: restore input focus on exit() (Thanks f8l)
fixes #641
2012-12-19 18:22:03 +01:00
Michael Stapelberg
2a18e9df39 Merge branch 'master' into next 2012-12-17 10:24:46 +01:00
Michael Stapelberg
70c83087e1 Merge branch 'fix-ar' 2012-12-17 10:24:46 +01:00
Kacper Kowalik (Xarthisius)
ef81bd183b Repect AR environment variable 2012-12-17 10:24:42 +01:00
Michael Stapelberg
73ec3dd3b0 Merge branch 'master' into next 2012-12-14 21:50:15 +01:00
Michael Stapelberg
6dc25e0011 Merge branch 'remove-atom-include' 2012-12-14 21:50:10 +01:00
Michael Stapelberg
7658109309 Bugfix: remove superfluous #include <xcb/xcb_atom.h> (Thanks pnutzh4x0r)
This fixes the build on CentOS 6.

fixes #889
2012-12-14 21:49:31 +01:00
Axel Wagner
4273db0444 i3-dump-log: Correct comment to reflect truth 2012-12-14 21:46:40 +01:00
Michael Stapelberg
61a5b9ddd4 Revert "don't use con_is_internal"
This reverts commit c6948c59f5.

Given that master and next now both contain con_is_internal, we can use
it again.
2012-12-14 21:44:20 +01:00
Michael Stapelberg
a0228b0333 Merge branch 'master' into next 2012-12-14 21:42:33 +01:00
Michael Stapelberg
f91e6fb73f Merge branch 'fix-release' 2012-12-14 21:42:21 +01:00
Michael Stapelberg
6dfb08170c fix bind[code|sym] --release (Thanks paolo)
fixes #890
2012-12-14 21:41:56 +01:00
Michael Stapelberg
ff4950a1bb debian/changelog: add dummy entry for the next version 2012-12-12 00:23:35 +01:00
Michael Stapelberg
2bf7793d4d Merge branch 'next' 2012-12-12 00:18:23 +01:00
Michael Stapelberg
4a3552be5e Merge branch 'release-4.4' into next 2012-12-12 00:18:17 +01:00
Michael Stapelberg
970ced9a03 update debian packaging for 4.4 2012-12-12 00:05:51 +01:00
Michael Stapelberg
8c3acbb67f drop debugging-release-version from docs makefile 2012-12-11 22:46:35 +01:00
Michael Stapelberg
fa2da352d1 add release notes for v4.4 2012-12-11 22:45:34 +01:00
Michael Stapelberg
5a63b64fb8 i3-dmenu-desktop: skip .desktop files with Type != Application 2012-12-11 22:43:06 +01:00
Michael Stapelberg
60db534a08 recommend i3-dmenu-desktop in the default config
We might replace dmenu_run in v4.5, depending on the feedback we get for
v4.4.
2012-12-11 22:36:29 +01:00
Michael Stapelberg
f506e35395 drop docs/debugging-release-version, it was integrated into docs/debugging 2012-12-11 22:32:14 +01:00
Michael Stapelberg
18e46ffae5 install i3-dmenu-desktop 2012-12-11 22:31:44 +01:00
Michael Stapelberg
9f7b4b9a43 move i3-dmenu-desktop from contrib to / 2012-12-11 22:10:22 +01:00
Michael Stapelberg
f044eb9e90 i3-dmenu-desktop: add --entry-type=[name|command|both]
The new default is 'both' to add "GNU Image Manipulation Program" as
well as "gimp-2.8" to the menu.
2012-12-10 00:28:32 +01:00
Michael Stapelberg
66f7a607f6 docs/debugging: grammar improvements (Thanks cian) 2012-12-09 17:56:55 +01:00
Michael Stapelberg
4eb6b48c8e add contrib/i3-dmenu-desktop, a script which runs .desktop files via dmenu
See "pod2man --utf8 contrib/i3-dmenu-desktop | man /dev/stdin" for
documentation. Use a line like this in your i3 config file:

    bindsym Mod1+p exec --no-startup-id ~/i3/contrib/i3-dmenu-desktop
2012-12-09 17:04:01 +01:00
Michael Stapelberg
8fc4660140 docs/debugging: simplify, merge with release version instructions 2012-12-09 12:07:25 +01:00
David Coppa
69e15bba5d OpenBSD has getline() now 2012-12-08 17:52:58 +01:00
Antoine Millet
e8149c77b3 i3bar: add min_width and align keys to blocks 2012-12-06 09:48:27 +01:00
Michael Stapelberg
fdf14b8f58 docs/i3bar-protocol: fix example formatting 2012-12-02 17:58:59 +01:00
Michael Stapelberg
aa69b9fc5f userguide: document new_float option (like new_window) 2012-12-02 17:57:24 +01:00
Michael Stapelberg
e025f3b9e6 dump-asy: implement filtering by name, present nodes better
where "better" means that we no longer use (name, orientation,
window-id), but "name" (leaf) or "name" (horizontal-split) for example.
2012-11-27 22:07:37 +01:00
Michael Stapelberg
0560fc7964 dump-asy: start gv without widgets and fit the drawing to window 2012-11-27 22:07:37 +01:00
Michael Stapelberg
23f00ee7d1 dump-asy: let AnyEvent::I3 figure out the socket path 2012-11-27 22:07:37 +01:00
Michael Stapelberg
1ae08b196a Bugfix: Don’t move floating windows when their size constraints forbid resizing (Thanks aksr)
fixes #883
2012-11-27 09:26:31 +01:00
Michael Stapelberg
19cbd3cbec code style fixes for the previous commit
• our function names use underscores
• rewrote the function’s comment
• function comments must be in the source _and_ in the header
• no blank lines after function signatures
2012-11-25 20:55:49 +01:00
Adrien \"schischi\" Schildknecht
f41fa1baa1 The command to resize a floating window now checks the minimum and maximum size. 2012-11-25 20:52:56 +01:00
Emil Mikulic
d2b533328d Fix memory leaks in config_parser.
push_token() doesn't take ownership of its str argument.
2012-11-24 17:39:52 +01:00
Michael Stapelberg
eaf13eace2 userguide: add section with synonym "screen" for "RandR output"
While the docs describe the feature, plenty of people ask for it on IRC.
Let’s see if this makes it easier to find.
2012-11-20 17:11:54 +01:00
Michael Stapelberg
3cb909fa62 config parser: recover after invalid input
This is done by ignoring the rest of the current line and jumping to the
nearest <error> token.

fixes #879
2012-11-20 17:10:29 +01:00
Pavel Löbl
6148136e7c i3bar: Add current binding mode indicator 2012-11-16 13:44:29 +01:00
Michael Stapelberg
773654dbb8 complete-run: run 000-load-deps as early as possible 2012-11-13 21:04:13 +01:00
Michael Stapelberg
5fb9b8ffb8 tests: 000-load-deps: bail out when dependencies are not found, test more of them
This should be a better hint for people who forgot to install the
testsuite dependencies :).
2012-11-13 21:03:44 +01:00
Michael Stapelberg
a3324a5e42 tests: 115-ipc-workspaces: ensure the i3 ipc socket is connected 2012-11-13 21:03:25 +01:00
Michael Stapelberg
305b6ddf2f set LC_NUMERIC=C when dumping nodes in the workspace event
Otherwise the resulting JSON might be invalid because it uses the
locale-specific comma separator, e.g. "16,666" instead of "16.666".
2012-11-13 09:49:08 +01:00
Michael Stapelberg
e809bff1ab t/115: make the test a little shorter by using helper functions 2012-11-13 09:40:29 +01:00
Francesco Mazzoli
a6b6bb670a workspace events test 2012-11-13 09:40:29 +01:00
Francesco Mazzoli
16c8832a7b better docs for the focus workspace ipc event 2012-11-13 09:40:29 +01:00
Francesco Mazzoli
1055973f66 refactor, name changes
We need to send the workspace event earlier, because otherwise 'old'
might already be destroyed (if it was empty).
2012-11-13 09:40:06 +01:00
Francesco Mazzoli
464d387044 take care of non-existant old workspaces 2012-11-13 09:33:03 +01:00
Francesco Mazzoli
74d596e0fc more informative `workspace' events
Add a `current' and `old' properties to the `focus' change type,
containing the current and old workspace respectively.  These additions
are not necessary anywhere else because `focus' is always triggered when
changing ws.
2012-11-13 09:33:00 +01:00
Francesco Mazzoli
b67eedf71a simplify yajl related code
Specifically, put the version dependent code in some macros, and put
that plus the `y' and `ystr' macros in a separate file, `yajl_utils.h'.
2012-11-13 09:32:55 +01:00
Simon Elsbrock
c6948c59f5 bugfix: don't use con_is_internal
fixes #872
2012-11-12 19:49:01 +01:00
Michael Stapelberg
dece12bf18 Merge branch 'master' into next 2012-11-10 09:01:24 +01:00
Michael Stapelberg
17674de5a6 Merge branch 'fix-baf-after-scratchpad' 2012-11-10 09:01:24 +01:00
Michael Stapelberg
81393c93c2 bugfix: fix workspace back_and_forth after displaying a scratchpad window
fixes #868
2012-11-10 09:01:04 +01:00
Quentin Glidic
f0d2d84b1c libi3/font: Use "pango:" prefix to avoid confusion
Also add a user-friendly font description syntax to userguide
2012-11-07 21:23:21 +01:00
Quentin Glidic
783fd66b58 complete-run: Unset I3SOCK 2012-11-07 13:40:51 +01:00
Michael Walle
ae14fe9141 introduce new command to rename focused workspace
The corresponding command is 'rename workspace to <name>'. As a side-effect
this fixes the command 'rename workspace 1 to to'.

Signed-off-by: Michael Walle <michael@walle.cc>
2012-10-31 09:09:56 +01:00
Michael Stapelberg
2f90321d16 docs/testsuite: add "Installing the dependencies" section (Thanks bitonic)
fixes #863
2012-10-30 19:14:11 +01:00
Michael Stapelberg
71ccb4bef2 Merge branch 'master' into next 2012-10-29 16:42:11 +01:00
Michael Stapelberg
eb8c21a5b8 Merge branch 'fix-split-indicator' 2012-10-29 16:42:01 +01:00
Michael Stapelberg
e7a4580c5f Bugfix: force rendering when the parent’s orientation changed
Otherwise, the split indicator might not be refreshed even though it
should be.

fixes #858
2012-10-29 16:41:16 +01:00
Conley Moorhous
7c94e32819 docs/userguide: s/alt/Alt/ 2012-10-25 17:08:20 +02:00
Michael Stapelberg
9b87b2c8ec Implement smart popup_during_fullscreen mode
With this commit, the default behavior is to display popups while there
is a fullscreen application only if the popup belongs to that
application (as determined by the WM_TRANSIENT_FOR hint which
applications have to set properly).

fixes #663
2012-10-24 20:54:28 +02:00
Michael Stapelberg
29b19a7468 spelling error: s/implementaiton/implementation/g 2012-10-24 07:58:03 +02:00
Michael Stapelberg
f500f9d82c keycode default config: s/bindcode/bindsym (Thanks Tim) 2012-10-19 19:26:05 +02:00
Michael Stapelberg
19fef3b4b8 docs/userguide: use $mod consistently (Thanks Conley) 2012-10-16 23:02:04 +02:00
Deiz
aefcb0b668 Skip floating windows in the focus stack when moving through the tree
Includes a test for the new behaviour
2012-10-16 20:03:40 +02:00
Deiz
fdfbc53c0b Focus windows when middle-clicking (X paste)
As with most click-based focusing, this only has an effect when
focus_follows_mouse is disabled.
2012-10-16 20:03:08 +02:00
Deiz
c406b4c2fe Skip floating cons in focus (child|parent) and stop them from being split
Focusing child from a workspace should now skip over the floating con and
go directly to its child. Focusing parent from that grandchild should leave
the workspace focused again.
2012-10-16 20:01:36 +02:00
Michael Stapelberg
b9885ff21e bugfix: don’t send workspace command when at beginning/end of workspaces (Thanks whitequark)
fixes #843
2012-10-14 21:05:44 +02:00
Michael Stapelberg
34a5bbb7e9 exit with a proper error message when there are no outputs available (Thanks flo)
fixes #842
2012-10-14 20:56:13 +02:00
Michael Stapelberg
e964e7b6cd config parser: make newlines okay before opening braces (Thanks aksr) 2012-10-10 08:18:33 +02:00
Michael Stapelberg
39ba955919 Bugfix: Actually set border width in config_directives.c (Thanks strcat) 2012-10-09 22:06:36 +02:00
Deiz
47de7375dd Allow 'focus $dir' to move out of non-global fullscreen containers 2012-10-09 21:26:49 +02:00
Deiz
ca77c12dde Allow workspace contents to be moved if there are only floating children 2012-10-09 21:25:13 +02:00
Deiz
e07803999f Fix fullscreen focus bug and corresponding test flaw
As the workspace might be reached via recursion (e.g. moving from the edge
of a fullscreen split container), it's necessary to check for a fullscreen
container whenever a workspace is reached.
2012-10-09 21:24:04 +02:00
Deiz
7a280f5691 Grab keys with all permutations of lock and numlock
This should prevent all cases of caps lock (or shift lock, on some
keyboards) from interfering with i3 key bindings.
2012-10-09 21:15:06 +02:00
Michael Stapelberg
a06bf27c24 tests: fix error messages, add 'bind' as synonym to mode blocks 2012-10-09 14:11:35 +02:00
Michael Stapelberg
3528d99175 Fix warning: exclude NULL parameters from format string (Thanks knopwob) 2012-10-09 14:09:12 +02:00
Michael Stapelberg
00ac2c4c9c accept ctrl as synonym of control (Thanks SardemFF7) 2012-10-09 14:09:12 +02:00
Michael Stapelberg
80492c8304 error out instead of accepting invalid key bindings (Thanks SardemFF7) 2012-10-09 14:09:08 +02:00
Michael Stapelberg
94d95f2b8c add missing include/config_parser.h (Thanks slowpoke) 2012-10-08 16:28:32 +02:00
Michael Stapelberg
ee36c8507e bugfix: config-parser: bind is a synonym for bindcode 2012-10-08 13:40:44 +02:00
Michael Stapelberg
040a441101 fix warning about printf() field length 2012-10-08 13:30:14 +02:00
Michael Stapelberg
44c16063ed add test.config_parser to .gitignore 2012-10-08 13:27:42 +02:00
Michael Stapelberg
20c0fa7cfb use the new parser by default
you can force the old parser with the command line flag
--force-old-config-parser-v4.4-only (which will be present in v4.4 only,
as the name suggests)
2012-10-08 13:26:42 +02:00
Michael Stapelberg
2738f13798 move owindow definition into the command parser 2012-10-08 13:26:24 +02:00
Michael Stapelberg
68e3e58232 link the parser test binaries with -g 2012-10-08 13:25:57 +02:00
Michael Stapelberg
c2b699f3dc change the commands_parser prefix to 'command' for consistency 2012-10-08 13:25:32 +02:00
Michael Stapelberg
587b92b7a3 t/201-config-parser: test more directives, test error handling 2012-10-08 13:24:47 +02:00
Michael Stapelberg
40c624e1c4 port the entire old config parser to the new one 2012-10-08 13:23:48 +02:00
Michael Stapelberg
6f9e6c16c8 config_parser: implement <number>s, proper error handling 2012-10-08 13:23:06 +02:00
Michael Stapelberg
a635945f85 tests: use new assign syntax, drop legacy test 2012-10-08 13:22:17 +02:00
Michael Stapelberg
85018de433 generate-command-parser: support <number>s, state ID replacing and…
…determining the next state within a function like cfg_criteria_pop() by
passing next_state in the ConfigResult (or CommandResult) and using it
after calling.
2012-10-08 13:20:24 +02:00
Michael Stapelberg
00fca2dabd add first bits of a (custom) config parser 2012-10-08 13:17:46 +02:00
Michael Stapelberg
d36264e403 generate-command-parser: make input/output configurable 2012-10-07 16:31:35 +02:00
Michael Stapelberg
69a77d182e i3-msg.man: fix reference to the "reply section" (Thanks slowpoke) 2012-10-06 22:28:24 +02:00
Michael Stapelberg
a6e1b75b18 allow floating cons to be reached using 'focus parent'
I suppose this was just an oversight. Let’s see if it causes any issues.

fixes #831
2012-10-04 18:50:33 +02:00
Deiz
cae6fb627f Improve startup sequence termination conditions
If a window with _NET_STARTUP_ID set is moved to another workspace, it
will delete any associated startup sequence immediately. This will also
occur if a window has a leader with _NET_STARTUP_ID set, if the leader
has no container (never been mapped).

A startup sequence may also be deleted if it's matched by
startup_workspace_for_window() and its 30-second timeout has elapsed.
2012-10-04 17:48:51 +02:00
Deiz
fdcba7b91a Replace the discrete 'split' Con property with a simple function. 2012-10-04 17:48:08 +02:00
Deiz
d7e5da8b39 Un-fullscreen as needed when moving fullscreen containers
This avoids a case where a fullscreen container could be moved onto a
workspace that already had its own fullscreen container, leading to
two fullscreen containers on top of each other.
2012-10-04 17:46:54 +02:00
Michael Stapelberg
2eeb2a1067 shmlog: Remove O_TRUNC flag for shm_open, we truncate ourselves 2012-10-04 17:05:08 +02:00
Michael Stapelberg
b943e3807d release-notes: s/mod+l/mod+e/ (Thanks hax404) 2012-10-04 17:04:37 +02:00
Michael Stapelberg
34bd8af634 docs/ipc: add a warning to use an existing library (Thanks slowpoke) 2012-10-03 23:59:33 +02:00
Michael Stapelberg
f406f7187c docs/ipc: remove unnecessary newline (Thanks Merovius) 2012-10-03 23:54:35 +02:00
Michael Stapelberg
718d922990 Merge branch 'fix-ws-layout' 2012-10-03 15:08:31 +02:00
Michael Stapelberg
13147978c5 Merge branch 'master' into next 2012-10-03 15:08:31 +02:00
Sascha Kruse
507898484f set workspace_layout in create_workspace_on_output
fixes #835
2012-10-03 15:08:21 +02:00
Deiz
f89bbe0746 Focus the relevant workspace when clicking any container. 2012-10-03 00:15:55 +02:00
Deiz
f4b09862fc Maintain relative positioning when moving floating windows between outputs. 2012-10-03 00:14:57 +02:00
Michael Stapelberg
85dc1b0865 testsuite: add 'new-test' helper script 2012-10-03 00:13:30 +02:00
Michael Stapelberg
029d9040e1 add test for previous commit 2012-10-03 00:04:05 +02:00
Deiz
a9d859f84e Only re-focus the workspace when moving a con if the target ws is hidden. 2012-10-03 00:03:24 +02:00
Deiz
e89a25f81f Implement moving workspaces as if they're regular containers 2012-09-29 00:17:36 +02:00
Michael Stapelberg
72c66a2091 Merge branch 'master' into next 2012-09-29 00:03:42 +02:00
Michael Stapelberg
01ce4bbc92 Merge branch 'fix-floating-move' 2012-09-29 00:03:25 +02:00
Michael Stapelberg
31e8d7f2f8 Bugfix: Correctly move floating windows to invisible workspaces cross-output (Thanks swh) 2012-09-29 00:02:41 +02:00
Michael Stapelberg
43d486441d Bugfix: with one ws per output, don’t crash on cross-output moves (Thanks moju)
fixes #827
2012-09-28 23:04:37 +02:00
Michael Stapelberg
66b389cba1 Make the resize command honor criteria (Thanks Tblue)
fixes #816
2012-09-28 20:36:25 +02:00
Michael Stapelberg
2d0b60bd58 Merge branch 'fix-indicator-pos' 2012-09-28 19:47:16 +02:00
Michael Stapelberg
2252b4f5b9 Merge branch 'master' into next 2012-09-28 19:47:16 +02:00
Michael Stapelberg
a082cf8c65 Bugfix: Draw h-split indicator at the right position
fixes #817
2012-09-28 19:46:50 +02:00
Michael Stapelberg
5d8e3f58f6 Fix 'border toggle' (it "skipped" 1px border) (Thanks joepd)
fixes #818
2012-09-28 19:29:14 +02:00
Michael Stapelberg
6553ecf46d Merge branch 'fix-floating-move' 2012-09-28 18:24:04 +02:00
Michael Stapelberg
cd2a1267c8 Merge branch 'master' into next 2012-09-28 18:24:04 +02:00
Michael Stapelberg
8480b4cb58 Bugfix: don’t crash when dragged floating window closes (Thanks darkraven)
Previously, while the loop would not be executed anymore, the callback
(for actually repositioning the window after a MotionNotify) would still
get called once. This commit avoids that, thus fixing the crash.

fixes #819
2012-09-28 18:23:01 +02:00
Michael Stapelberg
a2daf229fb userguide: document how to "un-scratchpad" a window (Thanks knopwob) 2012-09-28 18:03:36 +02:00
Simon Elsbrock
da2b47c1e5 fix crash: send non-floating window with floating parent to scratchpad (thanks pkordy)
Fix a crash that occured when moving a window to the scratchpad that is
seemingly floating to the user, but actually a descendant of a floating
parent con (and itself non-floating). If that is the case, move the
floating parent container to scratchpad instead of the window.

fixes #740
2012-09-28 17:58:58 +02:00
Michael Stapelberg
584a6b6b59 Revert "raise floating windows when focusing (Thanks Marcos)"
This commit breaks floating window keyboard focus order
(t/135-floating-focus.t) when you have > 2 floating windows. Since
keyboard focus is more important than saving one click to raise floating
windows, I revert the commit.

Note that we cannot implement this without keeping a third list (beneath
floating_windows and focus) for the z coordinate of a floating window.
This seems not worth it.

This reverts commit 064be457e5.
2012-09-28 17:57:17 +02:00
Michael Stapelberg
064be457e5 raise floating windows when focusing (Thanks Marcos) 2012-09-27 12:41:38 +02:00
Michael Stapelberg
0610964c22 add testcase for commit 87525ad 2012-09-27 12:37:38 +02:00
Michael Stapelberg
1cbf665581 remove async-unsafe functions from signal handler 2012-09-27 12:37:27 +02:00
Michael Stapelberg
9c01bdeef7 Revert "Use ev_signal to avoid async-unsafe functions (Thanks Markus)"
This makes our signal handler useless and leads to infinite SIGSEGV
loops because the ev callback handler gets called only from within the
event loop, and control doesn’t necessary get to the event loop…

This reverts commit 514265b529.
2012-09-27 12:34:09 +02:00
Simon Elsbrock
87525ad2d6 fix crash: urgent floating con on separate workspace (thanks Piotr)
If there is a single floating con on a separate workspace that is not
focused, and this con becomes urgent, switching back to that workspace
may result in a crash of i3. This is because while setting the urgency
of parent containers, 'parent' may become NULL in case of floating
containers. This commit checks the validity of parent.

fixes #821
2012-09-27 12:21:18 +02:00
Michael Stapelberg
dcf95fd312 Merge branch 'master' into next 2012-09-27 12:10:14 +02:00
Michael Stapelberg
6a9fdebc87 Merge branch 'fix-manage-unmap' 2012-09-27 12:10:08 +02:00
Michael Stapelberg
a3f3d5670c Bugfix: properly react to windows being unmapped before we can reparent (Thanks xeen, darkraven)
We need to verify that setting the event mask works, and we need to
include StructureNotify to get unmap events at any point in time.
Thanks darkraven for the pointer.

fixes #718
2012-09-27 12:09:06 +02:00
Michael Stapelberg
c31b3b296a Bugfix: Correctly clear the urgency hint when the window is underneath a split-con (+test)
Previously, when you had an urgent container in a stack on some
invisible workspace (say urxvt) and you switched to it, the urgency hint
was not properly cleared.
2012-09-25 15:40:08 +02:00
Michael Stapelberg
8eb39477bf Merge branch 'fix-assign-render' 2012-09-24 23:59:30 +02:00
Michael Stapelberg
0aa306890b Merge branch 'master' into next 2012-09-24 23:59:30 +02:00
Michael Stapelberg
372d47842e Bugfix: Render workspaces created by assignments to use correct coordinates (Thanks meaneye)
Previously, i3 would send width=0, height=0 to windows which were put on
workspaces created by an assignment (that is, invisible workspaces,
which do not get rendered normally).

fixes #653
2012-09-24 23:57:58 +02:00
noxxun
14e6fc77ad rendering: fix bottom line of tabbed borders decoration not continuous
fixes #814

Signed-off-by: noxxun <noxxun@gmail.com>
2012-09-24 23:17:29 +02:00
Yaroslav Molochko
04c58c7325 Implement variable border widths for pixel/normal
fixes #325
2012-09-24 22:20:29 +02:00
Deiz
b235c469c1 Display appropriate cursors when resizing or moving floating windows. 2012-09-23 22:05:19 +02:00
Deiz
e582e19ffd Clicking the root window should try to focus the relevant workspace. 2012-09-23 16:39:35 +02:00
Deiz
a080794e59 Replace duplicate "__" workspace prefix checks with a single function. 2012-09-23 15:47:35 +02:00
Sascha Kruse
2a7359e449 draw empty title if WM_NAME is empty
fixes #811
2012-09-23 12:00:45 +02:00
Sascha Kruse
1806c9802e add descriptive titles to split containers 2012-09-22 20:09:39 +02:00
Sascha Kruse
b741c49212 testcase for propagating urgency 2012-09-22 19:31:46 +02:00
Sascha Kruse
d8a036d776 mark parents of urgent container also as urgent 2012-09-22 19:31:34 +02:00
Pauli Ervi
b41ab04ecd Userguide: Added link from 7.2 to 6.6
The multiple monitors section (7) is probably the most
likely place for someone to go look for how to move
workspaces between monitors (6.6).
2012-09-22 19:05:12 +02:00
Michael Stapelberg
1e143feab1 Close empty workspaces after cross-output move (+test) (Thanks chrysn)
fixes #795
2012-09-22 19:03:19 +02:00
darkraven
9aff503a55 remove unnecessary code in render_con().
The removed code was add by commit 61b8a62 to fix #564. That bug is cause
by rendering the mplayer window again as a floating window (even if it
has been rendered before as a fullscreen window, at line 202). So simply
checking for fullscreen window is enough to solve this problem. Treating
floating/tiling fullscreen window differently is not needed.
2012-09-22 18:13:47 +02:00
Deiz
eb4a7f725d In get_output_next(), avoid an off-by-one for adjacent outputs and || mutually-exclusive failure conditions. 2012-09-22 18:12:49 +02:00
Michael Stapelberg
11378b7012 t/506-focus-right: also verify that focus up/down is a no-op (Thanks swh) 2012-09-22 17:30:44 +02:00
Michael Stapelberg
19883108a9 Make get_output_next() work with non-aligned RandR setups (+test) (Thanks Feh, swh, Moritz)
A good visualization of the new algorithm is this:

           +--------+
           |        |
+--------+=|   S1   |========================
|        | |        |
|   S0   | +--------+
|        |         +--------+
+--------+=========|        |================
                   |   S2   | +--------+
                   |        | |        |
                   +--------+ |   S3   |
                              |        |
                              +--------+

When focus is on S0, 'focus output right' will first match S1 (the
closest output which overlaps in the highlighted area), then S2, but not
S3 (since S3 does not overlap into the highlighted area).

fixes #669
fixes #771
2012-09-22 16:54:59 +02:00
Quentin Glidic
89ca48be20 i3bar: Honor "urgent" protocol hint by unhiding 2012-09-22 15:15:57 +02:00
Quentin Glidic
830829922b i3bar: Allow to force unhide with draw_bars 2012-09-22 15:15:57 +02:00
Quentin Glidic
8210c6be79 i3bar: Allow child to specify signals to use
We now wait for the child process to send the first line before stopping
it to use the signal which might be specified in the i3bar protocol
header
Since clients might use the same signal for both stop and cont, we also
save the stopped state of the child to avoid stopping it while hidden!
2012-09-22 15:13:21 +02:00
Quentin Glidic
1e114d7ab5 i3bar: Fully parse the JSON header 2012-09-22 15:13:21 +02:00
Quentin Glidic
34dc6d4d64 i3bar: Introduce i3bar_child struct 2012-09-22 15:13:21 +02:00
Quentin Glidic
310ae2d0b5 i3bar: Handle the first line with another callback 2012-09-22 15:13:21 +02:00
Quentin Glidic
f691927aa7 i3bar: Split JSON line logic to read_json_input 2012-09-22 15:13:21 +02:00
Quentin Glidic
103b1a3f3a i3bar: Split flat line logic to read_flat_input 2012-09-22 15:13:21 +02:00
Quentin Glidic
3732cef764 i3bar: Split stdin reading logic to get_buffer 2012-09-22 15:13:21 +02:00
Quentin Glidic
13ecc79fcc i3bar: Rename determine_json_version to parse_json_header 2012-09-22 15:13:21 +02:00
Quentin Glidic
f1f0de1c49 docs/i3bar-protocol: Document stop/cont_signal 2012-09-22 15:13:21 +02:00
Quentin Glidic
2e5838fb49 i3bar: Rework unhide/hide on workspace urgency
We now check globally for workspace urgency instead of per-output since
the result is the same but we call unhide_bars/hide_bars only once this
way
2012-09-22 15:13:21 +02:00
Michael Stapelberg
2fba607e4d tests: Bugfix: use exit_gracefully() in t/200-urgency-timer 2012-09-22 14:51:38 +02:00
Sebastian Ullrich
236f9f45e3 Make "[move] workspace number" accept a default ws name after the ws number 2012-09-22 14:34:05 +02:00
Michael Stapelberg
c69fba3662 cfgparse: be forgiving about a missing "ms" after a duration
While it’s certainly better and clearer to specify it, we should do the
right thing when the unit is missing, just like CSS for example
(margin: 0; is okay, margin: 0px; too).
2012-09-22 14:21:35 +02:00
Michael Stapelberg
66d786762a tests: rename double t/198, add boilerplate 2012-09-22 14:20:19 +02:00
Michael Stapelberg
9dbbe400a1 tests: fix t/113-urgent.t after previous commit 2012-09-22 14:19:20 +02:00
Simon Elsbrock
28104a480c implement delayed urgency hint reset
If there is a client with an urgency hint on another workspace and
switching to this workspace would cause the urgency to be reset (by
moving the focusing to the client), delay the reset by some time. This
gives the user the chance to see it.

This commit adds the possibility to configure the urgency delay timer
duration using the 'force_display_urgency_hint' directive. Also,
documentation and a testcase was added to allow for automated checks of
the intended behavior.

fixes #482
2012-09-22 14:12:09 +02:00
chrysn
e15e37f922 fixes #776
this implements both the "move container to workspace back_and_forth" command
and movements to the same workspace when auto_back_and_forth is set.

it includes documentation and test suite additions by michael.

it also simplifies the workspace_show_by_name function (making use of
workspace_get accepting NULL pointers).
2012-09-22 13:35:31 +02:00
Michael Stapelberg
a01bac13fe don’t use reserved identifiers for include guards (left-overs)
fixes #804
2012-09-22 13:31:08 +02:00
Michael Stapelberg
7a2e105931 tests: add testcase for the 'mode' IPC event 2012-09-22 13:20:53 +02:00
Michael Stapelberg
77134c0dbf tests: add missing boilerplate 2012-09-22 12:56:01 +02:00
Pavel Löbl
7cffd79140 Add new subscribe event 'mode' for binding mode changes
Introducing a new event to subscribe called mode. It's fired up
when i3 changes binding mode (like switching from default to resize).
IPC guide adjusted also.
2012-09-22 12:52:49 +02:00
Michael Stapelberg
8c8fce82e5 add proper error handling for in-place restarts (Thanks Markus)
fixes #806
2012-09-21 16:47:43 +02:00
Michael Stapelberg
514265b529 Use ev_signal to avoid async-unsafe functions (Thanks Markus)
Functions such as fprintf() might be unsafe to use in a signal handler,
see http://stackoverflow.com/questions/3941271/#answer-3941563

By using ev_signal, libev will use a tiny signal handler which just
passes on the information and then calls (outside of the signal handler)
our callback function which can use fprintf() and other unsafe
functions.

fixes #803
2012-09-21 16:35:25 +02:00
Michael Stapelberg
d638e3029a don’t use reversed identifiers for include guards (Thanks Markus)
Done with:

    sed -in 's/\(ifndef\|define\) _\([0-9A-Z_]*\)$/\1 I3_\2/' include/**/*.h

fixes #804
2012-09-21 15:36:25 +02:00
Sascha Kruse
f9c903ba62 complete-run.pl: Check for missing executables 2012-09-20 11:37:49 +02:00
Michael Stapelberg
393a1c0851 Merge branch 'desktop-file' 2012-09-20 11:34:26 +02:00
Michael Stapelberg
d852c17468 Merge branch 'master' into next 2012-09-20 11:34:26 +02:00
Kacper Kowalik (Xarthisius)
9fa0dc657b Fix xsession.desktop to comply to fdo standard
For more information please see:
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
2012-09-20 11:34:11 +02:00
Michael Stapelberg
7e313b0385 Merge branch 'remove-ev' 2012-09-20 11:20:00 +02:00
Michael Stapelberg
f039a0ded4 Merge branch 'master' into next 2012-09-20 11:20:00 +02:00
Oliver Kiddle
f7d825062a remove superfluous ev.h include statements 2012-09-20 11:15:17 +02:00
Michael Stapelberg
485b49bbe3 Merge branch 'master' into next 2012-09-20 10:56:58 +02:00
Michael Stapelberg
e1e898f8e1 Merge branch 'tiny-fixes' 2012-09-20 10:56:33 +02:00
Michael Stapelberg
e4019caf7e clean old and new libi3 (Thanks SardemFF7) 2012-09-20 10:55:26 +02:00
Michael Stapelberg
7104780558 spelling fix: s/succesfully/successfully/ 2012-09-20 10:55:03 +02:00
Michael Stapelberg
1bc41edb6d update debian packaging 2012-09-19 18:44:13 +02:00
Michael Stapelberg
9c3ece56d2 Merge branch 'next' 2012-09-19 18:12:41 +02:00
Michael Stapelberg
d7215ac54d Merge branch 'release-4.3' into next 2012-09-19 18:12:35 +02:00
Michael Stapelberg
b9fde552d0 fix make clean targets 2012-09-19 18:05:51 +02:00
Michael Stapelberg
c808a39fb2 man: set version to 4.3 2012-09-19 17:53:27 +02:00
Michael Stapelberg
156bd24f23 man: update i3(1) 2012-09-19 17:53:17 +02:00
Michael Stapelberg
99e91c8049 --help: note that nVidia’s driver supports RandR from 302.17 on 2012-09-19 17:52:56 +02:00
Michael Stapelberg
672c965c56 release notes: update and final touches 2012-09-19 17:46:42 +02:00
Michael Stapelberg
9febbe119a userguide: mention the FAQ 2012-09-19 17:30:44 +02:00
Michael Stapelberg
c5db01e6f8 userguide: make moving cons/workspaces to other outputs its own section
Frequent requests for this functionality on IRC made me aware that it’s
not easily findable.
2012-09-19 17:13:00 +02:00
Simon Elsbrock
91d6fde7f5 hacking-howto: fix wrong anchor to #_tree_reply 2012-09-16 23:28:20 +02:00
Michael Stapelberg
cd4dd365e8 Allow changing the layout of workspaces by storing it (Thanks mhcerri)
Before commit 4976fa3350, setting the
layout of workspaces to something else than the default would just mess
up the parent container of the workspace (the content container).

After that commit, it would create an unnecessary split container when
you change the layout _before_ opening any containers. To avoid this, we
now store the layout (similar to how the 'workspace_layout'
configuration directive works) and apply it when the first container is
attached to the workspace.

Fixes #796
2012-09-16 22:53:41 +02:00
Michael Stapelberg
d660c4bcff Merge branch 'master' into next 2012-09-16 17:59:55 +02:00
Michael Stapelberg
4df409bae6 Merge branch 'fix-fullscreen-scratch' 2012-09-16 17:59:43 +02:00
Simon Elsbrock
fe6e1f496a toggle fullscreen on 'scratchpad show'
If the focused application is in fullscreen mode and 'scratchpad show'
is executed, toggle the fullscreen mode before showing the scratchpad
application. Otherwise, the scratchpad app would not be visible anyways
but focus would be stolen.

fixes #613
2012-09-16 17:59:35 +02:00
Michael Stapelberg
794783defb Merge branch 'master' into next 2012-09-14 13:18:04 +02:00
Michael Stapelberg
0929f68a10 Merge branch 'fix-scratchpad-focus' 2012-09-14 13:18:00 +02:00
Michael Stapelberg
15499bf8e7 Bugfix: Don’t focus the wrong workspace when moving to scratchpad (+test) (Thanks loblik)
The problem was that scratchpad_move() didn’t check whether the source
workspace was focused. Therefore, 'move scratchpad' only worked reliably
interactively , but not when used with criteria.
2012-09-14 13:17:32 +02:00
Michael Stapelberg
22922a9e70 update release notes to reflect the current i3-nagbar situation 2012-09-11 13:19:05 +02:00
Michael Stapelberg
8abd1c48f7 Only launch i3-nagbar for parse errors 2012-09-11 13:17:36 +02:00
Michael Stapelberg
40b12c0a4d Remove support for resize increment size hints for tiling windows
As discussed on the mailing list and the bugtracker.

fixes #540
2012-09-11 13:11:47 +02:00
Michael Stapelberg
0db93d9072 sighandler: use non-existing backtrace filenames ($TMPDIR/i3-backtrace.%pid.%idx.txt) 2012-09-11 13:07:20 +02:00
Michael Stapelberg
e713283605 sasprintf() already handles errors, we don’t need to do that twice 2012-09-11 13:02:59 +02:00
Michael Stapelberg
9d8a4ebc61 sighandler: provide gdb with pipe stdin/stdout fds (necessary for gdb < 7.5) 2012-09-11 12:57:53 +02:00
Bas Pape
38869004fe Replace exit with backtrace in crash dialog
When the user hits 'b', attach gdb and dump a backtrace to the tmpdir
2012-09-11 12:46:03 +02:00
Michael Stapelberg
cfa74c5468 include the testcases in the dist tarball (required for building docs) 2012-09-10 16:49:43 +02:00
Michael Stapelberg
daf2b57222 docs/testsuite: add pointers to additional docs 2012-09-10 14:13:43 +02:00
Michael Stapelberg
338199913b add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
Michael Stapelberg
d745b47269 fix typo 2012-09-10 14:08:52 +02:00
Michael Stapelberg
a4a3c59cf5 debian: add lib-i3test.html and lib-i3test-test.html to docs 2012-09-10 13:31:34 +02:00
Michael Stapelberg
71607ccdd3 tests: document each and every i3test function 2012-09-10 13:30:47 +02:00
Michael Stapelberg
0626c637aa tests: move does_i3_live to i3test::Test 2012-09-10 13:29:50 +02:00
Michael Stapelberg
6bfbec9da3 tests: make cmp_float a real test instruction 2012-09-10 13:24:11 +02:00
Michael Stapelberg
5bea7cb7df docs: generate HTML from testsuite POD documentation 2012-09-10 12:03:14 +02:00
Michael Stapelberg
b4afd20d21 use pwd -P instead of readlink -f (Thanks Marcus Crestani)
readlink -f does not work on Mac OS X
2012-09-09 15:39:49 +02:00
Michael Stapelberg
02ce246caf build fix: remove src/cmdparse.* in make clean
This was removed in commit 8853334bbe
2012-09-09 15:30:37 +02:00
Michael Stapelberg
a1823e59ff don’t errnously detect --release bindings as duplicates 2012-09-06 18:11:16 +02:00
Michael Stapelberg
4186827386 docs/userguide: document the --release flag for key bindings 2012-09-06 17:31:30 +02:00
Michael Stapelberg
b15dd83b26 docs/userguide: use --no-startup-id for executing shell scripts 2012-09-06 17:31:16 +02:00
Michael Stapelberg
548d74015c ignore modifiers for KeyRelease bindings
For the following binding:

    # Simulate ctrl+v upon pressing $mod+x
    bindsym --release $mod+x exec --no-startup-id xdotool key --clearmodifiers ctrl+v

you can now use either:
1. press $mod, press x, release x, release $mod
2. press $mod, press x, release $mod, release x

fixes #485
2012-09-06 17:24:30 +02:00
Michael Stapelberg
c6c6d3a952 naive implementation of 'bindsym --release' (and bindcode)
The implementation is naive because the user has to generate exactly the
event he specified. That is, if you use this binding:

    bindsym --release $mod+x exec import /tmp/latest-screenshot.png

Then it will only be triggered if you hit $mod, hit x, release x,
release $mod. It will not be triggered if you hit $mod, hit x, release
$mod, release x. The reason is that the KeyRelease event in the latter
case will not have the modifier in its flags, so it doesn’t match the
configured binding.
2012-09-06 17:04:31 +02:00
Michael Stapelberg
f44d4ce4b3 re-indent src/config.c 2012-09-06 15:55:38 +02:00
Michael Stapelberg
ea842f9686 update release-notes 2012-09-06 09:48:10 +02:00
Michael Stapelberg
1e3e6997f4 rendering: ceil() instead of truncating for tabbed deco_rect width (Thanks szalik)
In tabbed mode, the available width (say 1280) is divided by the amount
of child containers (say 3). Before this commit, we just truncated the
result and would end up with 426 + 426 + 426 = 1278 pixels that we
render to. Now we render a bit too much, but that’ll at least not give
us graphics corruption on any side :).

fixes #791
2012-09-05 23:54:56 +02:00
Michael Stapelberg
34391ae885 fix format string warnings 2012-09-05 22:26:59 +02:00
Michael Stapelberg
d644dbff64 bugfix: forgot to mark split containers as split = true (+test) (Thanks szalik)
When the workspace layout (formerly orientation) was forced to change
due to a move command, the split container we created was not marked as
split = true, which caused tree_flatten() to errnously kill the contents
of it and thus one window ended up unmanaged.

Also, the logic in tree_flatten() was inverted due to commit de94f6da.

fixes #790
2012-09-05 22:26:52 +02:00
Michael Stapelberg
a598544b5a userguide: point out explicitly how to use startup-notifications 2012-09-05 21:10:26 +02:00
Michael Stapelberg
32d4dbf70f startup-notifications: keep sequence around for 30s after completion
This changes the fact that Firefox would not be launched on the correct
workspace because it marked the startup sequence as completed *before*
actually mapping all of its windows.

To test this, go to workspace 3 and run this command in a terminal:
    i3-msg 'exec iceweasel; workspace 4'
That will make i3 start iceweasel (and create a proper startup
notification context for it), then immediately switch to workspace 4
(before iceweasel could possibly start).

The iceweasel window(s) should appear on workspace 3.
2012-09-05 21:02:52 +02:00
Michael Stapelberg
8d2799c251 Merge branch 'master' into next 2012-09-05 17:09:43 +02:00
Michael Stapelberg
9436e6f26e Merge branch 'fix-nagbar-exit' 2012-09-05 17:09:40 +02:00
Michael Stapelberg
f5a7492a11 Bugfix: Use _exit() instead of exit to avoid calling atexit functions (Thanks f8l)
Basically, this is the same fix as commit 914ca6cf :-/. Once again, we
called exit() instead of _exit(), but this time it lead to a kill(0,
SIGTERM), effectively killing all processes in the i3 process group,
including i3 itself. The cause for the kill(0) is that nagbar_pid is set
to 0 by fork(), signaling we’re in the child process. The cleanup
handler only checks for nagbar_pid being -1 as a special value, however.
2012-09-05 17:09:23 +02:00
Michael Stapelberg
4976fa3350 con_set_layout: always use the parent container, handle workspaces properly
Previously, in case 'layout stacked' (for example) had been called
interactively, con_set_layout would be called with focused->parent,
while with for_window, it’d be called on the actual matching container.

This difference in behavior was the cause for the inability to use
'for_window [class="XTerm"] layout tabbed', which now works \o/, but
more on that below.

The change also allows us to handle the case of the user selecting a
CT_WORKSPACE container properly, that is, by using the special case and
creating a new split container on the workspace which gets all the
contents, but a new layout.

Now, before you are enthusiastic about the change and try to use
for_window magic in your config file, keep in mind: The 'layout' command
acts on the parent split container. That is, when using a line such as
this one:

    for_window [class="XTerm"] layout tabbed

…and opening an XTerm when on a workspace with one single other window,
the whole workspace will be set tabbed (just as previously when you
opened an XTerm and sent 'layout tabbed' manually).

Therefore, to open XTerm in its own tabbed split container, you need to
split before:

    for_window [class="XTerm"] split v, layout tabbed

The comma here is important! It says that the second command should not
be treated as an entirely unrelated command, but it should also relate
the matching window (while it does work with a ';', that is prone to
race-conditions and should be avoided).

fixes #358
2012-09-05 00:22:38 +02:00
Michael Stapelberg
2a37089ad1 Merge branch 'master' into next 2012-09-04 22:49:16 +02:00
Michael Stapelberg
ada6af4244 Merge branch 'fix-1px-flickering' 2012-09-04 22:49:12 +02:00
Michael Stapelberg
8176b55b7b Bugfix: fix flickering with 1pixel border tabbed layouts (Thanks julien)
When you have a tabbed container which has had more than one container
but currently has precisely one container, there was a bit of flickering
when switching workspaces occasionally. This commit fixes it by properly
setting the height of the deco_rect (and thus the X11 window) to not
make the old window contents show up for a minimum period of time.

fixes #777
2012-09-04 22:47:12 +02:00
Michael Stapelberg
232d6ccce9 tests: introduce is_num_children test
This makes it clearer what the tests are actually doing and kills quite
a bit of useless repetitions
2012-09-04 22:24:13 +02:00
Michael Stapelberg
65e5bcfdf4 Merge branch 'master' into next 2012-09-04 20:21:31 +02:00
Michael Stapelberg
562c53d66c Merge branch 'fix-fullscreen-confreq' 2012-09-04 20:21:22 +02:00
Michael Stapelberg
5b95e20a62 Bugfix: Don’t allow ConfigureRequests while in fullscreen (Thanks Piotr)
This fixes a compatibility issue with gnome-terminal and xfce’s
terminal, where fullscreening would lead to moving the window and not
displaying the contents properly.

fixes #788
2012-09-04 20:21:07 +02:00
Michael Stapelberg
73d5dcbbaf x: grab server and process pending events before managing existing windows
fixes #782
2012-09-04 18:02:37 +02:00
Michael Stapelberg
9976e7461e remove xcb-proto from DEPENDS, it’s only a build-time dep of libxcb (Thanks okraits) 2012-09-04 16:53:06 +02:00
Michael Stapelberg
4636eb840d fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
Michael Stapelberg
f18ab28f5c bugfix: memleak: use i3STRING_FREE() instead of FREE() 2012-09-03 00:42:17 +02:00
Michael Stapelberg
2d1ebc2b90 Bugfix: memleak: because we use i3string_from_utf8(), we need to free buffer()
Previously, buffer was directly used and thus not freed, but
i3string_from_utf8() makes a copy.
2012-09-03 00:42:14 +02:00
Michael Stapelberg
48baf3bf65 testcases: add ExtUtils::PkgConfig as explicit dependency
This used to be a transitive dependency through X11::XCB, but the latter
dropped it in version 0.04.
2012-08-31 00:17:06 +02:00
Cian
8202f04bf2 Make the initial mention of 'split h/v' a little easier to understand. 2012-08-31 00:16:58 +02:00
Michael Stapelberg
6d8f61205d accept slashes in RandR output names (+test) (Thanks dbp)
fixes #785
2012-08-28 13:26:12 +02:00
Quentin Glidic
a007283773 i3-input: Fix text drawing offset 2012-08-28 12:06:03 +02:00
Quentin Glidic
af15087b99 i3-input: Do not use a non-loaded font
We must call load_font before any font-related calls like
predict_text_width
2012-08-28 10:58:18 +02:00
Michael Stapelberg
b8ac9591a2 manpage: update force-xinerama nvidia hint 2012-08-27 15:25:22 +02:00
Michael Stapelberg
c97d6198bd manpage: describe keybindings to open a terminal/dmenu (Thanks Joost) 2012-08-27 15:22:19 +02:00
Michael Stapelberg
67999269fd manpage: improve locale setup in example .xsession (Thanks Harald König)
Harald mentioned he was surprised about the locales we recommend in the
.xsession example, so I’ve re-investigated.

Here is the test program I have used:

    #include <stdio.h>
    #include <locale.h>

    int main() {
        /* SUSv2 setlocale(3) says:
         * Internationalised programs must call setlocale() to initiate
         * a specific language operation. This can be done by calling
         * setlocale() as follows: */
        setlocale(LC_ALL, "");

        printf("LC_NUMERIC is %s\n", setlocale(LC_NUMERIC, NULL));
    }

Then, I have unset LANG and LC_*:

    midna /tmp $ env | grep LANG
    midna /tmp $ env | grep LC
    midna /tmp $

Now, observe that LC_ALL overwrites all specific LC variables:

    midna /tmp $ LC_ALL=de_DE.UTF-8 LC_NUMERIC=en_DK.UTF-8 ./localetest
    LC_NUMERIC is de_DE.UTF-8

However, LANG does not:

    midna /tmp $ LANG=de_DE.UTF-8 ./localetest
    LC_NUMERIC is de_DE.UTF-8
    midna /tmp $ LANG=de_DE.UTF-8 LC_NUMERIC=en_DK.UTF-8 ./localetest
    LC_NUMERIC is en_DK.UTF-8

This is consistent with what perldoc perllocale says:
http://perldoc.perl.org/perllocale.html#ENVIRONMENT
2012-08-27 15:07:18 +02:00
Michael Stapelberg
c8cfc77b0a docs/testsuite: mention why using a separate language is great 2012-08-23 20:27:08 +02:00
eeemsi
b9255f51f8 Use (void) instead of () for functions without args 2012-08-23 19:34:37 +02:00
Sebastian Ullrich
d29b62f24f Remove dead code in cmd_workspace_number
If a ws doesn't exist, maybe_back_and_forth
will never return true for it.
2012-08-22 17:58:08 +02:00
Michael Stapelberg
82b73c20c9 testcase for the previous commit 2012-08-22 17:57:58 +02:00
Sebastian Ullrich
eadf1e306f Fix 'back and forth' in 'workspace number' for named ws 2012-08-22 17:57:32 +02:00
Michael Stapelberg
6e75dc7e0e testsuite: add hint about missing DUMMY Xorg module 2012-08-22 17:22:20 +02:00
Michael Stapelberg
7cadc40846 testcase for the previous commit 2012-08-22 17:16:18 +02:00
Sebastian Ullrich
bb853660cf Create ws in "move workspace number n" if not existing
fixes #729
2012-08-22 17:08:02 +02:00
Michael Stapelberg
4622cde7b7 Merge branch 'master' into next 2012-08-22 16:02:02 +02:00
Michael Stapelberg
2ac3b08cf6 Merge branch 'floating-resize-height' 2012-08-22 16:01:57 +02:00
Joel Stemmer
1089b0b201 fix resizing floating windows by height
When resizing floating windows, changing the height was not correctly
handled. This commit fixes that and adds testcases for shrinking and
growing the width and height of floating windows.
2012-08-22 16:01:40 +02:00
Michael Stapelberg
be6190a516 complete-run: check whether Xdummy dies, add a flag to keep the Xdummy output 2012-08-18 16:27:00 +02:00
Michael Stapelberg
ad21037cd2 update DEPENDS, prepare RELEASE-NOTES for 4.3 2012-08-18 15:33:36 +02:00
Michael Stapelberg
5257a1268f Bugfix: don’t change tabbed/stacked cons to splitv/splith layout (Thanks Merovius)
To automagically do the right thing when rotating monitors with regards
to splith/splitv layout (depending on width/height of the monitor), we
change the orientation of existing workspaces and the first child.

If that first child happens to be a stacked/tabbed con, we cannot change
the layout unconditionally (previously, the orientation was not in the
layout, so we never noticed this problem).

fixes #768
2012-08-17 01:55:31 +02:00
Michael Stapelberg
ba8b5c480d debian: make 'i3' recommend dunst 2012-08-13 13:44:54 +02:00
Michael Stapelberg
1173740a35 debian/control: format build-depends nicely, add pango/cairo 2012-08-13 13:44:36 +02:00
Michael Stapelberg
125bf09e70 pango: divide by PANGO_SCALE to get a "normal" font size 2012-08-13 13:39:58 +02:00
Michael Stapelberg
d7b11bde28 i3 --moreversion: use readlink /proc/$pid/exe instead of realpath(argv[0])
The latter is actually wrong. For example, when running i3
--moreversion, it will print $(pwd)/i3 instead of $(which i3). In my
previous tests, this coincidentally was the same.
2012-08-13 13:38:04 +02:00
Michael Stapelberg
ef90ccd1a8 default config: include a short explanation about xft fonts 2012-08-13 13:34:30 +02:00
Michael Stapelberg
2896ae8057 logging: make libi3 use verboselog()/errorlog(), provide it in each caller
While this is a bit ugly, it makes the log messages end up where they
are supposed to: in the shmlog/stdout in case of i3 and on stdout in
case of utilities such as i3-input
2012-08-13 13:27:16 +02:00
Quentin Glidic
6c9bf84d4e userguide: Update Fonts section for Pango support 2012-08-13 11:39:31 +02:00
Quentin Glidic
310f542937 libi3/font: Log the used font 2012-08-13 11:39:30 +02:00
Quentin Glidic
9f7247fd9c libi3: Introduce LOG 2012-08-13 11:39:30 +02:00
Fernando Tarlá Cardoso Lemos
6ff3f7abad libi3: Implement Pango rendering 2012-08-13 11:39:30 +02:00
Quentin Glidic
f06161b58a common.mk: Check for Pango 2012-08-13 11:39:30 +02:00
Fernando Tarlá Cardoso Lemos
ec17a26b0e libi3: Rework font to support multiple backends 2012-08-13 11:39:29 +02:00
Fernando Tarlá Cardoso Lemos
edd9007ebf i3bar: Rename xcb_screen to root_screen for consistency 2012-08-13 11:37:34 +02:00
Fernando Tarlá Cardoso Lemos
5d8ccc5912 libi3: Introduce get_visualtype 2012-08-13 11:37:34 +02:00
Quentin Glidic
210fc6dfed libi3: Rework predict_text_width
predict_text_width now takes an i3String as argument
2012-08-13 11:37:23 +02:00
Quentin Glidic
53365fa887 libi3: Rework draw_text
We now have two versions of draw_text
draw_text: Now takes an i3String
draw_text_ascii: Designed for static strings in plain ASCII
2012-08-13 11:37:21 +02:00
Quentin Glidic
284294e9c2 i3-input: Store and use xcb_char2b_t directly 2012-08-13 11:30:08 +02:00
Quentin Glidic
d89cb04c98 i3-input: Port prompt to i3String 2012-08-13 11:30:08 +02:00
Quentin Glidic
bf177da17d i3/sighandler: Pre-compute i3Strings for text 2012-08-13 11:30:08 +02:00
Quentin Glidic
b6c705a1a4 i3/window: Port window names to i3String 2012-08-13 11:30:08 +02:00
Quentin Glidic
bc5f33878a i3/log.h: Prepare for libi3.h inclusion 2012-08-13 11:30:08 +02:00
Quentin Glidic
50b7764ae4 i3-nagbar: Port to i3String 2012-08-13 11:30:08 +02:00
Quentin Glidic
bbd1b16043 i3bar: Port to i3String 2012-08-13 11:30:05 +02:00
Quentin Glidic
50d52f8f9b i3bar/util.h: Prepare for libi3.h inclusion 2012-08-13 11:29:22 +02:00
Fernando Tarlá Cardoso Lemos
7f22d4fe32 libi3: Implement i3String
New type designed to handle UCS-2/UTF-8 conversion nicely
2012-08-13 11:29:18 +02:00
Quentin Glidic
b01545b131 Makefile: Always link libi3 first 2012-08-13 02:00:01 +02:00
Michael Stapelberg
a7569e6a98 implement error messages when moving to another ws fails (Thanks eeemsi)
fixes #769
2012-08-13 01:57:39 +02:00
Michael Stapelberg
4eff386439 remove obsolete branch reference "(tree)" from starting line 2012-08-13 01:57:23 +02:00
Michael Stapelberg
e68a8dd86c shm-logging: implement i3-dump-log -f (follow)
This changes the SHM log format, it doesn’t use 0-bytes to separate
entries anymore. Instead of using lots of printf() calls in i3-dump-log,
we now do precisely one big write().

So, to be clear: i3-dump-log and i3 both need to be upgraded.
Mismatching versions will lead to garbage output (no crashes of i3, just
garbage output).

The -f flag uses an inter-process pthread_cond_t in the shared memory
header to broadcast the arrival of new messages to all i3-dump-log
processes. This internally uses futexes and thus doesn’t even mean a
kernel call in most cases. inter-process pthread_cond_ts require NPTL
(the Native Posix Thread Library, introduce in Linux 2.6).
2012-08-13 01:06:09 +02:00
Michael Stapelberg
070a18e598 i3bar: update manpage for the i3bar-protocol
fixes #739
2012-08-12 19:26:04 +02:00
Michael Stapelberg
f94edd9fc3 i3bar-protocol: add example (illustration-only!) shell script, clarify {"version":1} header 2012-08-12 18:47:24 +02:00
Michael Stapelberg
e53405c216 i3bar: be less strict about the {"version":1} JSON header 2012-08-12 18:40:15 +02:00
Michael Stapelberg
dbe406641f use errx() instead of err() for custom error message 2012-08-12 18:34:03 +02:00
Michael Stapelberg
68a23b9577 Bugfix: only honor _NET_ACTIVE_WINDOW for visible windows (+test) (Thanks Tucos)
fixes #774
2012-08-12 16:08:53 +02:00
Michael Stapelberg
1e49f1b08a Implement i3 --moreversion
From the code:

    Connects to i3 to find out the currently running version. Useful since it
    might be different from the version compiled into this binary (maybe the
    user didn’t correctly install i3 or forgot te restart it).

Here is an example output:

    $ ./i3 --moreversion
    Binary i3 version:  4.2-202-gb8e782c (2012-08-12, branch "next") © 2009-2012 Michael Stapelberg and contributors
    Running i3 version: 4.2-202-gb8e782c (2012-08-12, branch "next") (pid 14804)

    The i3 binary you just called: /home/michael/i3/i3
    RUNNING BINARY DIFFERENT FROM BINARY ON DISK!
    The i3 binary you are running: /home/michael/i3/i3

    $ i3 restart
    2012-08-12 15:05:28 - Additional arguments passed. Sending them as a command to i3.
    IPC: received EOF instead of reply

    $ ./i3 --moreversion
    Binary i3 version:  4.2-202-gb8e782c (2012-08-12, branch "next") © 2009-2012 Michael Stapelberg and contributors
    Running i3 version: 4.2-202-gb8e782c (2012-08-12, branch "next") (pid 14804)

    The i3 binary you just called: /home/michael/i3/i3
    The i3 binary you are running: /home/michael/i3/i3
2012-08-12 15:10:13 +02:00
Michael Stapelberg
b8e782c983 root_atom_contents: handle CARDINAL atoms such as I3_PID 2012-08-12 14:30:24 +02:00
Michael Stapelberg
394b395455 set I3_PID atom on the root window 2012-08-12 13:51:47 +02:00
Michael Stapelberg
b01d45e027 complete-run: handle bailouts 2012-08-12 13:46:54 +02:00
Michael Stapelberg
884627ef20 use I3__FILE__ for DLOG, leave __FILE__ as is
See also commit 0e752070ac, which broke
source code listings in gdb unless you cd into i3/src. This should give
us best of both :-).
2012-08-12 12:19:47 +02:00
Michael Stapelberg
dd743f3b55 add testcase for previous bugfix (floating window size) 2012-08-12 00:36:44 +02:00
Philipp Middendorf
6225a8983d Bugfix: Properly resize transient floating windows with a decoration
fixes #770
2012-08-12 00:36:26 +02:00
Michael Stapelberg
ae88accf6f testworker: handle EAGAIN
Hopefully this fixes the case where a testworker would die and leave the
whole testsuite run hanging in the air, never completing.
2012-08-12 00:22:17 +02:00
Michael Stapelberg
d92626bc62 complete-run: enable autoflush (useful for debugging)
I used the following command to find hanging workers:

    sort latest/complete-run.log|cut -f 2 -d ' '|uniq -c|grep -v '^[ \t]*2'
2012-08-12 00:20:52 +02:00
Michael Stapelberg
91786c3801 typo: s/transiert/transient/ 2012-08-11 22:53:40 +02:00
Julius Plenz
70ec3867fe clean up zero-byte logfile on immediate exit
Otherwise, a zero-byte log file stays behind after every call to `i3
--get-socketpath`. Also, replace "return" calls with more explicit "exit"
calls.

Before:

$ ls -ld /tmp/i3* | wc -l; \
  repeat 10 i3 --get-socketpath >/dev/null; \
  ls -ld /tmp/i3* | wc -l
1
11

Now:

$ ls -ld /tmp/i3* | wc -l; \
  repeat 10 i3 --get-socketpath >/dev/null; \
  ls -ld /tmp/i3* | wc -l
1
1

Signed-off-by: Julius Plenz <julius@plenz.com>
2012-08-11 02:23:03 +02:00
Valentin Haenel
da924aae6f Bugfix: bump copyright in asciidoc-git.conf 2012-08-10 23:27:23 +02:00
Michael Stapelberg
6ba0944430 scratchpad: fix moving scratchpad window
From the source:

    When starting i3 initially (and after each change to the connected
    outputs), this function fixes the resolution of the __i3
    pseudo-output. When that resolution is not set to a function which
    shares a common divisor with every active output’s resolution,
    floating point calculation errors will lead to the scratchpad window
    moving when shown repeatedly.

fixes #632
2012-08-08 18:45:40 +02:00
Michael Stapelberg
3cdc5c5369 update .gitignore (Thanks SardemFF7) 2012-08-07 10:03:37 +02:00
Michael Stapelberg
95cdfe5cb6 makefile: remove the old loglevels.tmp and loglevels.h on 'make clean' 2012-08-07 10:03:10 +02:00
Michael Stapelberg
0e752070ac explicitly set filenames to $(basename __FILE__)
This makes the debug log a bit more readable, especially since commit
48f1e383ca
2012-08-07 09:55:52 +02:00
Michael Stapelberg
fa4894fbaa Support _NET_ACTIVE_WINDOW ClientMessages
Since we advertise _NET_ACTIVE_WINDOW support (but only set the
corresponding atom currently), it makes sense to also support the
ClientMessage. Apps such as Gajim use it to set focus to the roster
window when clicking on the tray icon for example.

fixes #767
2012-08-07 09:50:47 +02:00
Michael Stapelberg
122130d868 handlers.c: don’t call x_push_changes(croot), tree_render() already does 2012-08-07 09:50:25 +02:00
Michael Stapelberg
1a62c398ac Bugfix: Attach con to nc before calling con_border_style_rect() 2012-08-07 01:13:37 +02:00
Philipp Middendorf
9d9a1d9d29 Bugfix: Add deco_height only when in "normal" border mode.
Also, use con_border_style_rect instead of hard-coded values to
determine the border size.
2012-08-07 01:05:16 +02:00
Michael Stapelberg
506b7f4004 Bugfix for previous commit: Don’t crash with dock windows 2012-08-06 03:11:11 +02:00
Axel Wagner
57effd65b2 Make horizontal edge-borders hidable too 2012-08-06 03:03:00 +02:00
Michael Stapelberg
1b2d222449 Properly report errors in 'focus parent' (Thanks eeemsi)
Also, make X11 errors debug log level only. They are harmless usually.

fixes #762
2012-08-05 20:57:20 +02:00
Michael Stapelberg
afc16953b9 correctly store last_split_layout when we are dealing with a workspace-level layout change (Thanks aksr)
fixes #763
2012-08-05 20:52:42 +02:00
Iakov Davydov
f27735f620 create hide_edge_borders option 2012-08-05 20:26:15 +02:00
Michael Stapelberg
48f1e383ca makefile: canonicalize path when compiling
Compilers store the path with which they were called in the debug
symbols. Therefore, this will make backtraces show something like
../i3-4.2/src/main.c instead of src/main.c.

See also http://stackoverflow.com/questions/6473561/
2012-08-05 17:00:24 +02:00
Michael Stapelberg
952e5b6059 pre-compile all.h, saves quite some build time
before:

$ time CC=clang make -j16
CC=clang make -j16  6,04s user 0,86s system 468% cpu 1,471 total
CC=clang make -j16  6,05s user 0,87s system 468% cpu 1,477 total
CC=clang make -j16  6,15s user 0,86s system 464% cpu 1,510 total
CC=clang make -j16  6,05s user 0,93s system 467% cpu 1,493 total
CC=clang make -j16  6,10s user 0,84s system 461% cpu 1,507 total

$ time CC=gcc make -j16
CC=gcc make -j16  9,91s user 1,43s system 508% cpu 2,231 total
CC=gcc make -j16  10,02s user 1,37s system 500% cpu 2,275 total
CC=gcc make -j16  9,80s user 1,60s system 507% cpu 2,245 total
CC=gcc make -j16  10,02s user 1,44s system 506% cpu 2,264 total
CC=gcc make -j16  9,99s user 1,45s system 505% cpu 2,261 total

after:

$ time CC=clang make -j16
CC=clang make -j16  3,41s user 0,83s system 375% cpu 1,131 total
CC=clang make -j16  3,29s user 0,90s system 373% cpu 1,122 total
CC=clang make -j16  3,35s user 0,77s system 369% cpu 1,116 total
CC=clang make -j16  3,36s user 0,78s system 374% cpu 1,105 total
CC=clang make -j16  3,46s user 0,75s system 373% cpu 1,126 total

$ time CC=gcc make -j16
CC=gcc make -j16  10,74s user 1,44s system 494% cpu 2,462 total
CC=gcc make -j16  10,68s user 1,54s system 497% cpu 2,453 total
CC=gcc make -j16  10,60s user 1,60s system 488% cpu 2,499 total
CC=gcc make -j16  10,63s user 1,51s system 485% cpu 2,502 total
CC=gcc make -j16  10,70s user 1,51s system 497% cpu 2,453 total

Therefore, we enable pre-compiled headers only when CC=clang.
2012-08-05 16:44:11 +02:00
Michael Stapelberg
8a1c8115ca fix a few warnings/places where the clang static analyzer complains 2012-08-05 16:34:38 +02:00
Michael Stapelberg
cab8e3c46f log.h: include left-over slog() prototype 2012-08-05 15:59:45 +02:00
Michael Stapelberg
991a9de0d7 log.h: tell the compiler these logging functions use printf-like formats
This gives us additional warnings and is supported in gcc and clang.
2012-08-05 15:59:08 +02:00
Michael Stapelberg
d5b7146123 docs/ipc: make the reply sections consistent (they contain the reply type) 2012-08-05 14:42:12 +02:00
Michael Stapelberg
0e47d52c43 ipc: clarify the patch version for sth like 4.2 2012-08-05 14:39:45 +02:00
Michael Stapelberg
acdd5287a9 unbreak the build 2012-08-05 14:38:52 +02:00
Michael Stapelberg
78f5f2204d ipc: implement GET_VERSION to find out the i3 version
This is useful for third-party scripts which require certain features
and want to error out cleanly when they are run with an old i3 version.

Additionally, i3 --version might be different from what’s actually
running (an old version of the binary), so i3-msg -t get_version will be
the best way to figure out the i3 version you are actually running from
this commit on.
2012-08-05 14:30:05 +02:00
Quentin Glidic
f80b877c6b man/i3bar: Reference j4status 2012-08-05 14:01:20 +02:00
Michael Stapelberg
ac8b2f637f cleanup i3 sync protocol messages 2012-08-04 16:34:57 +02:00
Michael Stapelberg
1d95d296a5 parser: remove debug messages
The new parser is proven by now (v4.2 was released 4 months ago), so
removing these messages will make the logfile more readable.
2012-08-04 16:31:57 +02:00
Michael Stapelberg
fb4ee17b05 Merge branch 'master' into next 2012-08-04 16:10:37 +02:00
Michael Stapelberg
c5cfe22511 Merge branch 'fix-coords' 2012-08-04 16:09:46 +02:00
Michael Stapelberg
74510c59c7 floating_fix_coordinates: properly deal with negative positions 2012-08-04 16:09:16 +02:00
Michael Stapelberg
d57d51da6d Bugfix: Properly fix floating coordinates when disabling outputs (Thanks Tucos)
Since the content containers are not yet updated (they will be when
rendering), we need to use the output containers’s rects instead.
2012-08-04 16:09:16 +02:00
Michael Stapelberg
e867fd8105 Bugfix: fix floating coordinates when moving assigned workspaces 2012-08-04 16:09:10 +02:00
Michael Stapelberg
e36674c5b8 Fix a crash when the current output cannot be determined (Thanks Tucos)
This is only a cosmetical change though, the fix for the root cause can
be found in the commits following this one.
2012-08-04 15:19:11 +02:00
Michael Stapelberg
2f22fae119 i3-migrate-config-to-v4: use layout toggle split (Thanks eeemsi) 2012-08-04 12:46:37 +02:00
Michael Stapelberg
79083f3b34 ensure the layout is not L_DEFAULT anymore, even if last_split_layout is not initialized (Thanks eeemsi) 2012-08-04 03:43:12 +02:00
Michael Stapelberg
de94f6da1a Introduce splith/splitv layouts, remove orientation
With this commit, the "default" layout is replaced by the splith and
splitv layouts. splith is equivalent to default with orientation
horizontal and splitv is equivalent to default with orientation
vertical.

The "split h" and "split v" commands continue to work as before, they
split the current container and you will end up in a split container
with layout splith (after "split h") or splitv (after "split v").

To change a splith container into a splitv container, use either "layout
splitv" or "layout toggle split". The latter command is used in the
default config as mod+l (previously "layout default"). In case you have
"layout default" in your config file, it is recommended to just replace
it by "layout toggle split", which will work as "layout default" did
before when pressing it once, but toggle between horizontal/vertical
when pressing it repeatedly.

The rationale behind this commit is that it’s cleaner to have all
parameters that influence how windows are rendered in the layout itself
rather than having a special parameter in combination with only one
layout. This enables us to change existing split containers in all cases
without breaking existing features (see ticket #464). Also, users should
feel more confident about whether they are actually splitting or just
changing an existing split container now.

As a nice side-effect, this commit brings back the "layout toggle"
feature we once had in i3 version 3 (see the userguide).

AFAIK, it is safe to use in-place restart to upgrade into versions
after this commit (switching to an older version will break your layout,
though).

Fixes #464
2012-08-04 03:13:24 +02:00
Michael Stapelberg
077e021e26 tests: implement --xtrace in complete-run.pl 2012-08-04 03:12:06 +02:00
Michael Stapelberg
1b3435807a add missing \n in debug message 2012-08-04 03:12:06 +02:00
Michael Stapelberg
dbd248fe1f makefile: store $I3_VERSION in dist tarballs
This is necessary because the autobuilder uses a dist tarball to build
i3 from. If we store $VERSION, the autobuiluder binaries will not run in
developer mode, thus defeating the purpose of developer mode.
2012-08-04 01:11:55 +02:00
Michael Stapelberg
cc7f16007a Display i3-nagbar when commands lead to an error
e.g. pressing Mod1+x when having the following in your configfile:

    bindsym Mod1+x some invalid command

will lead to an i3-nagbar instance popping up, offering you to view the
error log (which will contain parser errors from this commit on).
2012-08-02 17:45:09 +02:00
Michael Stapelberg
9191b56924 config: require confirmation when exiting i3 (Thanks Felicitus)
Fixes #751
2012-08-02 16:17:42 +02:00
Michael Stapelberg
4cba4c89ad Add xfce4-terminal to i3-sensible-terminal
Fixes #753
2012-08-02 15:20:17 +02:00
Michael Stapelberg
9f05354c1f cfgparse: Write custom scripts for i3-sensible-terminal
This workaround is necessary for terminal emulators which parse -e in a
different way: some accept a list of arguments (-e command arg1 arg2 …),
some accept only one argument (-e "command arg1 arg2 …"). Therefore, we
just create a script and pass that as the one and only argument.
2012-08-02 15:17:10 +02:00
Michael Stapelberg
c64047157d config-wizard: use the level 0 keysym whenever it’s unambiguous
From the code:

    Try to use the keysym on the first level (lower-case). In case
    this doesn’t make it ambiguous (think of a keyboard layout
    having '1' on two different keys, but '!' only on keycode 10),
    we’ll stick with the keysym of the first level.

    This reduces a lot of confusion for users who switch keyboard
    layouts from qwerty to qwertz or other slight variations of
    qwerty (yes, that happens quite often).
2012-08-02 02:14:56 +02:00
darkraven
875130e7e8 Automatically hide i3bar when it's unneeded.
When a workspace marked 'urgent', i3bar unhide
itself. if I want to hide it again, I must press the
modifier.This sometimes annoys me.

In this patch I change the above behavior to this:
If a urgent workspace occurs, i3bar will unhide itself;
and when you navigates away from the last urgent
workspace and there is no more urgent workspace, i3bar
will hide itself.
2012-08-02 01:44:25 +02:00
Quentin Glidic
395a6aaee5 common.mk: Rework version usage 2012-07-30 21:13:03 +02:00
Michael Stapelberg
ea31cde43b docs/ipc: update links to libraries 2012-07-23 11:03:16 +02:00
Michael Stapelberg
b8d77eb59e docs/ipc: document the 'window' field (Thanks jh)
fixes #758
2012-07-23 11:01:52 +02:00
Michael Stapelberg
0f22b105c1 Fix linking by linking libi3 first and its dependencies afterwards
Interestingly, compilation was only broken on some systems apparently
2012-07-23 10:56:44 +02:00
Quentin Glidic
eb66337020 common.mk: Little reordering 2012-07-23 00:13:16 +02:00
Quentin Glidic
0b4ee7a1da common.mk: Split XCB common flags 2012-07-23 00:12:55 +02:00
Quentin Glidic
5e0cd52f10 common.mk: Split XCB keyboard flags 2012-07-23 00:06:37 +02:00
Quentin Glidic
51a0f312f2 common.mk: Split WM XCB flags 2012-07-23 00:04:01 +02:00
Quentin Glidic
fde8c0dd85 common.mk: Split Xlib flags 2012-07-23 00:04:01 +02:00
Quentin Glidic
5cf3751482 common.mk: Move -lm to i3_LIBS 2012-07-22 23:53:51 +02:00
Quentin Glidic
60bc6b0400 common.mk: Split Xcursor flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
85b261c162 common.mk: Split yajl flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
30934ea316 common.mk: Split libev flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
79fc8462c0 common.mk: Split libpcre flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
e232c06885 common.mk: Split libstartup-notification flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
c7029a5e21 common.mk: Introduce I3_*FLAGS
CPPFLGES, CFLAGS and LDFLAGS should be user variables
We now provide default flags but use I3_*FLAGS flags for our own needed
flags

Also reoder lib flags a bit
2012-07-22 23:53:49 +02:00
Quentin Glidic
3b1b72ecbb *.mk: Support passing specific CFLAGS/LIBS 2012-07-22 23:53:13 +02:00
Michael Stapelberg
ac7278eb1a resizing: traverse containers up properly (+test) (Thanks oblique)
In certain situations (when you have a h-split within a h-split) you
couldn’t properly resize previously. This commit makes the resize
command properly traverse up the containers.

fixes #754
2012-07-22 21:37:26 +02:00
Michael Stapelberg
a97e70d483 Merge branch 'master' into next 2012-07-22 21:26:00 +02:00
Michael Stapelberg
fbff593f1e Merge branch 'fix-resize-retcode' 2012-07-22 21:25:53 +02:00
Michael Stapelberg
83dc5d5cb6 Bugfix: Fix duplicate return value for 'resize' command 2012-07-22 21:25:38 +02:00
Michael Stapelberg
45b3033996 debian: i3bar.1 has been moved to man/ 2012-07-22 21:07:32 +02:00
Michael Stapelberg
d555872753 Bugfix: include i3-input/i3-input.mk in the dist tarballs 2012-07-22 21:04:35 +02:00
Quentin Glidic
8029fae6a9 Move mans to the new Makefile layout 2012-07-22 20:27:13 +02:00
Quentin Glidic
e452acb30e Add stub Makefiles to allow subdir make calls 2012-07-22 19:57:48 +02:00
Quentin Glidic
66adb62e1f Move docs to the new Makefile layout 2012-07-22 19:57:48 +02:00
Quentin Glidic
46713c9e6d Makefile: Remove SUBDIRS 2012-07-22 19:57:47 +02:00
Quentin Glidic
420019f2d0 Update .gitignore 2012-07-22 19:57:22 +02:00
Quentin Glidic
4c0b519976 Move i3-dump-log to the new Makefile layout 2012-07-22 19:57:22 +02:00
Quentin Glidic
1a1eb0f3f2 Move i3bar to the new Makefile layout 2012-07-22 19:57:22 +02:00
Quentin Glidic
8910a138ff Move i3-nagbar to the new Makefile layout 2012-07-22 19:57:22 +02:00
Quentin Glidic
eb08d33692 Move i3-input to the new Makefile layout 2012-07-22 19:57:21 +02:00
Quentin Glidic
bbede0ba00 Move i3-msg to the new Makefile layout 2012-07-22 19:57:21 +02:00
Quentin Glidic
0c2e4d8347 Move i3-config-wizard to the new Makefile layout 2012-07-22 19:57:21 +02:00
Quentin Glidic
e3b9ffe381 Move libi3 to the new Makefile layout 2012-07-22 19:57:21 +02:00
Quentin Glidic
8853334bbe New Makefile layout, move i3 to it 2012-07-22 19:57:18 +02:00
Quentin Glidic
97d857a5d0 commom.mk: Support V make variable (verbose build) 2012-07-22 18:45:12 +02:00
Quentin Glidic
bdc078914b i3: Replace loglevels by a global debug logging
File-limited were not used nor really useful
Besides, they are painful to maintain in Makefile rules compared to the
benefit
2012-07-22 18:41:12 +02:00
Michael Stapelberg
1f682eb9c8 Merge branch 'master' into next 2012-07-16 19:24:41 +02:00
Michael Stapelberg
167b38b184 Merge branch 'fix-yajl1-warnings' 2012-07-16 19:24:33 +02:00
Michael Stapelberg
8f2e225db9 i3bar: Fix warnings with libyajl1 (Thanks prg)
yajl1 has the status yajl_status_insufficient_data, which in our stream
parsing context basically means "ok". Therefore, in yajl1, we no longer
print an error in this case.
2012-07-16 19:23:37 +02:00
Michael Stapelberg
2e6206373c Merge branch 'master' into next 2012-07-11 19:06:21 +02:00
Michael Stapelberg
f989467184 Merge branch 'fix-empty-strings' 2012-07-11 19:06:17 +02:00
Marcel Hellwig
3daa3e052f Don't display empty strings from i3status in i3bar 2012-07-11 19:06:02 +02:00
Michael Stapelberg
b9e6d37efb Merge branch 'master' into next 2012-07-10 22:53:39 +02:00
Michael Stapelberg
9b74f2de11 Merge branch 'i3bar-tray' 2012-07-10 22:53:36 +02:00
Michael Stapelberg
8a3574f301 i3bar: inform _all_ clients of new tray selection owner
This fixes a problem with X-chat (and possibly others).

Fixes: #745
2012-07-10 22:52:14 +02:00
Michael Stapelberg
a65394646c tests: t/504: ensure cursor position
Otherwise, the cursor might be at (1025, 0) due to previous testcases
and we wouldn’t start up on the correct workspace.
2012-06-29 23:21:32 +02:00
Michael Stapelberg
f0f45aa84d tests: t/166-assign.t: use wait_for_window
While it’s generally intended that wait_for_window is not called within
this testcase, in the first test instruction it was a mistake. The
window in fact gets mapped and therefore we should call wait_for_window.
2012-06-29 23:20:46 +02:00
Michael Stapelberg
c5d0472158 Explicitly disconnect in the 'exit' command
This fixes a race condition when running the tests. I think that the X11
server has more time to clean up the resources when we do an explicit
disconnect. The symptom I was seeing was that sometimes, i3 couldn’t
become the window manager on one of the Xdummy instances.
2012-06-29 23:13:25 +02:00
Michael Stapelberg
daee3218c9 tests: make t/166-assign.t more robust
…by using the new syntax which will not trigger i3-nagbar. Checking for
i3-nagbar is inherently prone to race conditions since i3-nagbar does
not communicate in any way that it’s there.
2012-06-29 21:28:10 +02:00
Michael Stapelberg
19946ee14d tests: make t/159-socketpath more robust
…by getting the socket path from i3 and then checking that it conforms
to what we expect. Previously we monitored /tmp, which can go wrong in
various ways, especially since i3’s directory within /tmp is not
predictable (by design).
2012-06-29 21:23:28 +02:00
Michael Stapelberg
072daa94b3 Merge branch 'master' into next 2012-06-27 17:49:36 +02:00
Michael Stapelberg
3fe3fdd2f9 Merge branch 'fix-reload' 2012-06-27 17:49:19 +02:00
Michael Stapelberg
6e9bbe67ce Bugfix: fix reload crashes in rare cases (Thanks Tucos)
Depending on the memory layout, it could happen that bind->command was
exchanged with something else while the parser still accessed it.

Therefore, we now copy the command and let the parser use that copy.
2012-06-27 17:48:22 +02:00
Michael Stapelberg
7afb33d8f8 Merge branch 'master' into next 2012-06-25 21:44:20 +02:00
Michael Stapelberg
28d453a276 Merge branch 'fix-C' 2012-06-25 21:44:07 +02:00
Michael Stapelberg
6146f39b8a when using i3 -C, don’t send remaining arguments via IPC (Thanks Somelauw) 2012-06-25 21:43:41 +02:00
Michael Stapelberg
97a5fb2ec0 Merge branch 'master' into next 2012-06-24 21:22:44 +02:00
Michael Stapelberg
27a5cceb61 Merge branch 'gitignore' 2012-06-24 21:22:39 +02:00
stfn
7374633422 Fix up .gitignore 2012-06-24 21:22:26 +02:00
Michael Stapelberg
23c28e5208 Merge branch 'master' into next 2012-06-24 17:30:45 +02:00
Michael Stapelberg
421fd9a772 Merge branch 'userguide-containers' 2012-06-24 17:30:39 +02:00
Michael Stapelberg
453cc68e40 add section about implicit containers to the userguide (Thanks mloskot) 2012-06-24 17:30:18 +02:00
Michael Stapelberg
d4f8450ea9 Merge branch 'master' into next 2012-06-10 21:30:36 +02:00
Michael Stapelberg
1ad6eea4a8 userguide: make the default clear for focus_follows_mouse and new_window 2012-06-10 21:30:14 +02:00
Michael Stapelberg
f28afc8f6b Merge branch 'master' into next 2012-06-10 21:05:58 +02:00
Michael Stapelberg
67c425ad97 Merge branch 'i3bar-handle-negative' 2012-06-10 21:05:44 +02:00
Michael Stapelberg
599f7cc2a4 i3bar: handle clicks with negative coordinates (Thanks Julian)
This can happen if you move your mouse pointer to the very left of the
screen and then click. For better usability, we handle this edge case
like a click on pixel 0.
2012-06-10 21:04:51 +02:00
Michael Stapelberg
f96e998abb Merge branch 'master' into next 2012-06-10 18:31:54 +02:00
Michael Stapelberg
3587155c47 makefile: don’t try to install i3.welcome 2012-06-10 18:31:42 +02:00
Michael Stapelberg
3f37458b7c Merge branch 'master' into next 2012-06-10 18:25:14 +02:00
Michael Stapelberg
21a5d4f4c1 manpages: don’t build i3-wsbar(1) from pod 2012-06-10 18:24:44 +02:00
Michael Stapelberg
cf91dc676a Merge branch 'master' into next 2012-06-10 18:23:26 +02:00
Michael Stapelberg
5e735744ce also don’t ship GOALS 2012-06-10 18:23:20 +02:00
Michael Stapelberg
bb167f6bed Merge branch 'master' into next 2012-06-10 18:21:18 +02:00
Michael Stapelberg
09da8a27cb don’t ship i3.welcome and i3-wsbar in the tarballs anymore 2012-06-10 18:21:06 +02:00
Michael Stapelberg
5a29e61a46 Merge branch 'master' into next 2012-06-10 18:19:29 +02:00
Michael Stapelberg
65f88f431d add banner.svg to contrib/ 2012-06-10 18:19:17 +02:00
Michael Stapelberg
a27ee11d89 add sticker SVG to contrib/ 2012-06-10 18:18:58 +02:00
Michael Stapelberg
318b1fa2e2 add slides from 2012-03-16 (German) 2012-06-10 18:17:02 +02:00
Michael Stapelberg
6c5f938699 delete unused/outdated i3.welcome 2012-06-10 18:16:02 +02:00
Michael Stapelberg
0859f61cd0 delete GOALS, see website instead 2012-06-10 18:14:39 +02:00
Michael Stapelberg
2731a74edd delete render-tree (unfinished/unused) 2012-06-10 18:12:05 +02:00
Michael Stapelberg
b704238cf6 Introduce contrib/
contrib is a place for scripts which live in the i3 git repository
because they are closely related. However, they should not be shipped
with the distribution packages for example.
2012-06-10 18:10:37 +02:00
Michael Stapelberg
c008f3f928 Merge branch 'master' into next 2012-06-10 18:08:23 +02:00
Michael Stapelberg
6dc69bbd00 delete old release notes 2012-06-10 18:08:14 +02:00
Michael Stapelberg
a15fe0e332 Merge branch 'master' into next 2012-06-10 17:57:25 +02:00
Michael Stapelberg
f4a86d9eda Merge branch 'fix-split-horiz' 2012-06-10 17:57:06 +02:00
Michael Stapelberg
f0b56c5e98 parser: reorder v/h/vertical/horizontal
This eliminates an error message upon split horizontal which did not
occur in older i3 versions. The command itself worked just fine.
2012-06-10 17:56:28 +02:00
Michael Stapelberg
ecd238b65e ignore "current" when searching for named workspaces 2012-06-03 19:44:42 +02:00
Pavel Löbl
2afecaf355 Add a new command 'move to workspace current'
Added a new command 'move to workspace current' which can be used
with criteria to move a window to the current workspace.
2012-06-03 19:42:56 +02:00
Pavel Löbl
51173baf28 Fix 'move to workspace' when used with criteria
When moving window from other (not current) workspace to another
workspace with criteria we should stay on current workspace.

And we should exit early when criteria was specified but didn't
match any window.
2012-06-03 19:41:45 +02:00
Pavel Löbl
4611f875ff Fix a mistake in comment 2012-06-03 19:38:43 +02:00
Michael Stapelberg
f2dde5f5dd update refcard (Thanks Moritz Bandemer) 2012-06-03 17:17:11 +02:00
Fernando Tarlá Cardoso Lemos
fffc53c246 Restrict "move to workspace" commands in fullscreen. 2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos
4452bfb942 Prevent moving out of fullscreen containers. 2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos
8bf4e9e059 Restrict directional focus in fullscreen.
This reuses the same fullscreen focus logic to ensure that focus
doesn't escape a fullscreen container.
2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos
250c260eaa Allow focus child/parent when in fullscreen.
This is now restricted according to the already defined fullscreen
focus constraints. Test case 157 was removed, as we don't prevent
level up/down in fullscreen anymore. Those commands are properly
tested in fullscreen by test case 156.

Fixes: #612
2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos
da1e232757 Refined the fullscreen focus constraints.
Basically, a focus change can't escape a fullscreen container. The
only exception is per-output fullscreen containers, as you should
be able to focus a container in a different workspace in this case.

This is an improvement on 4eab046e, now considering the difference
between global and per-output fullscreen and taking the tree
structure into account to determine what escaping the fullscreen
container means. It only affects targeted focus commands in the
form "for_window [...] focus", but it lays the foundation for
forthcoming fixes to all other focus commands.
2012-06-03 16:24:53 +02:00
Michael Stapelberg
0618ef649e Merge branch 'master' into next 2012-05-30 17:27:22 +02:00
Michael Stapelberg
807d2288b6 Merge branch 'use-xkb-kc2ks' 2012-05-30 17:27:18 +02:00
David Coppa
7a67938f3c Replace deprecated XKeycodeToKeysym() with XkbKeycodeToKeysym() 2012-05-30 17:24:43 +02:00
Michael Stapelberg
1103f94c34 Merge branch 'master' into next 2012-05-28 23:37:26 +02:00
Michael Stapelberg
24b1fcfd1a Merge branch 'tests-focus-parent-child' 2012-05-28 23:37:22 +02:00
Fernando Tarlá Cardoso Lemos
485871ffdd Get rid of references to level up/down.
In v4 syntax, that's focus parent/child.
2012-05-28 23:37:15 +02:00
Michael Stapelberg
d154d347ec Merge branch 'master' into next 2012-05-18 09:14:38 +02:00
Michael Stapelberg
04b5ec8165 Merge branch 'fix-keycodes' 2012-05-18 09:14:34 +02:00
David Coppa
7d657a6a65 Fix errors in i3.config.keycodes (bindsym -> bindcode) 2012-05-18 09:14:22 +02:00
Michael Stapelberg
e969ed502b Merge branch 'master' into next 2012-05-16 06:24:53 +02:00
Michael Stapelberg
0cce707451 Merge branch 'fix-stray-ws-number' 2012-05-16 06:24:50 +02:00
Michael Stapelberg
ec4e6d1cdf Fix stray workspaces "number 1" being created when having workspace number 1 in your config 2012-05-16 06:24:16 +02:00
Michael Stapelberg
85d6c75b94 Merge branch 'master' into next 2012-05-12 08:24:20 +02:00
Michael Stapelberg
d1443f9c71 Merge branch 'i3bar-fix-null' 2012-05-12 08:24:09 +02:00
Michael Stapelberg
156a06e495 i3bar: Don’t crash when full_text is missing or null in the JSON input (Thanks fernandotcl) 2012-05-12 08:23:51 +02:00
Michael Stapelberg
ed957d60a7 Merge branch 'master' into next 2012-05-09 21:08:28 +02:00
Michael Stapelberg
56f6d01ba3 Merge branch 'focus-in-fullscreen' 2012-05-09 21:08:25 +02:00
Fernando Tarlá Cardoso Lemos
4eab046e8f Allow focus w/ target when in fs in some cases.
If the target is in a different workspace, there's no reason why
we wouldn't allow the user to focus it. We already allow this when
focusing a workspace, for example.
2012-05-09 21:08:19 +02:00
Michael Stapelberg
eab9f46c33 Merge branch 'master' into next 2012-05-09 20:39:26 +02:00
Michael Stapelberg
687ad3b44e Merge branch 'fix-workspace-number' 2012-05-09 20:39:23 +02:00
Ondrej Grover
edae08a4d9 maybe_back_and_forth now sets render_tree 2012-05-09 20:38:41 +02:00
Michael Stapelberg
42dcb4e8c4 make maybe_back_and_forth static 2012-05-09 20:34:40 +02:00
Ondrej Grover
b88ab981fd bugfix: less differentiation between named and numbered workspaces
calling workspace by number now also checks for switching back and forth
and creates a new workspace if no workspace starting with that number is
found

also removed the obsolete tree_render() in favor of setting
cmd_output->needs_tree_render to true
2012-05-09 20:33:59 +02:00
Michael Stapelberg
ec4dddb608 tests: add test to verify workspace_auto_back_and_forth works with 'workspace number' 2012-05-09 20:33:41 +02:00
Michael Stapelberg
82e0eaa315 tests: Check that 'workspace number <number>' opens a new workspace 2012-05-09 20:33:11 +02:00
Michael Stapelberg
c04343d26d Merge branch 'master' into next 2012-05-09 20:16:15 +02:00
TunnelWicht
4f93e0587a don’t wrap when changing workspaces by mouse wheel scrolling 2012-05-09 20:16:02 +02:00
Michael Stapelberg
1c0b542c07 Merge branch 'master' into next 2012-05-09 20:06:45 +02:00
Michael Stapelberg
78721065e0 Merge branch 'fix-static-analysis' 2012-05-09 20:06:42 +02:00
Michael Stapelberg
62d3329906 remove dead code
This was a left-over of commit 9d68d780e2
2012-05-09 20:00:46 +02:00
Michael Stapelberg
f229570bbc remove unused variable 2012-05-09 19:58:50 +02:00
Michael Stapelberg
a9b57a44a9 Remove set but never read variable
This was due to the changes in commit d25e77ce75
2012-05-09 19:56:21 +02:00
Michael Stapelberg
2a0fb1db69 Merge branch 'master' into next 2012-05-09 19:47:19 +02:00
Michael Stapelberg
8b55b2c24c Merge branch 'fix-dump-log-errmsg' 2012-05-09 19:47:10 +02:00
Michael Stapelberg
1b536d70cc Improve the main error message of i3-dump-log 2012-05-09 19:46:44 +02:00
Michael Stapelberg
eeb6ff9237 Move is_debug_build() to libi3/ 2012-05-09 19:12:20 +02:00
Pavel Löbl
d13ba7ca53 Fix floating precision bug
When calculating coordinates we should multiply at first otherwise
we lose precision when i3 is compiled without sse2 support.

The following code prints "Res1: 348 Res2: 349" when compiled with
-O0 -mno-sse2 and "Res1: 349 Res2: 349" with -O0 -msee2.

Note that -msse2 is default flag on 64bit OSes.

int main() {
  double a = 349.0 / 768;
  double b = 349.0 * 768;
  int res1 = a * 768;
  int res2 = b / 768;
  printf("Res1: %d Res2: %d\n", res1, res2);
  return 0;
}

Thanks guys for helping me to hunt down this one.
2012-05-06 14:13:59 +02:00
Pavel Löbl
8557b05a2c t/141-resize.t: do not compare float values directly. use i3test.pm::cmp_float which compares using precision of 1e-6. 2012-05-05 19:15:43 +02:00
Michael Stapelberg
6bbcddab29 Merge branch 'fix-invalid-cmd-reply' 2012-05-02 22:02:37 +02:00
Michael Stapelberg
bbe607899c Send proper error messages upon parser failures, use yajl for generating command replies
Fixes: #693
2012-05-02 22:01:50 +02:00
Michael Stapelberg
87cb664236 Merge branch 'fix-spelling' 2012-05-02 20:21:03 +02:00
Michael Stapelberg
5a29eb20e0 Fix spelling of success
Fixes: #695
2012-05-02 20:20:45 +02:00
Michael Stapelberg
1066676185 Merge branch 'build-mac-os-x' 2012-05-02 20:08:34 +02:00
Michael Stapelberg
280a35717b log.c: len is always positive, remove useless check (Thanks Marcus) 2012-05-02 20:07:59 +02:00
Michael Stapelberg
07a385bb7a don’t link against librt on Mac OS X (Thanks Marcus) 2012-05-02 20:06:57 +02:00
Michael Stapelberg
eedd1a64d7 Make log.c figure out the physical amount of memory on Mac OS X (Thanks Marcus) 2012-05-02 20:05:07 +02:00
Michael Stapelberg
4e734bf331 makefile: use LDFLAGS when linking test.commands_parser (Thanks Marcus) 2012-05-02 20:00:50 +02:00
Michael Stapelberg
fda8b3d44d Merge branch 'release-4.2' 2012-04-25 23:30:18 +02:00
Michael Stapelberg
e69c54df07 debian: install the RELEASE-NOTES as upstream changelog for now 2012-04-25 23:21:10 +02:00
Michael Stapelberg
327267cc33 debian: bump changelog 2012-04-25 23:19:52 +02:00
Michael Stapelberg
d5ed466e0f /usr/share/applications/i3.desktop: drop the encoding key, UTF-8 is now required 2012-04-25 23:18:22 +02:00
Michael Stapelberg
2b290c0bcc debian: add i3-dump-log.1 to manpages 2012-04-25 23:18:04 +02:00
Michael Stapelberg
5fbbf3c09e add release notes for v4.2 2012-04-25 23:06:39 +02:00
Michael Stapelberg
3a378f7cb1 i3bar: don’t immediately redraw bars after kicking tray clients 2012-04-24 12:04:35 +02:00
Michael Stapelberg
abd6f24bf2 a few little corrections for the previous commit 2012-04-23 23:21:51 +02:00
Mateusz Poszwa
27b7f6a6e5 man/i3-input.man: Add description of options and improve examples. 2012-04-23 23:16:51 +02:00
Michael Stapelberg
17b477d25d i3bar: when kicking tray clients, remove them immediately
This should fix empty spaces showing up instead of tray icons sometimes.
2012-04-22 20:53:01 +02:00
Michael Stapelberg
78891c1c62 i3bar: when tray_output == primary and there is no primary output, fall back to the first available output 2012-04-22 20:51:15 +02:00
Michael Stapelberg
17e4d7ede1 i3bar: kick tray clients after output configuration changed
This makes i3bar reflect xrandr --output foo --primary changes immediately.
2012-04-22 20:43:52 +02:00
Michael Stapelberg
189b27b01e i3bar: Bugfix: Properly update the primary flag 2012-04-22 20:43:43 +02:00
Michael Stapelberg
54222d5617 Merge branch 'master' into next 2012-04-22 20:11:25 +02:00
Michael Stapelberg
75720fa88e Merge branch 'fix-i3bar-dying-tray' 2012-04-22 20:11:07 +02:00
Michael Stapelberg
97d17f2f5b i3bar: Bugfix: Properly reparent tray clients before killing the bar window when outputs disappear
Fixes: #655
2012-04-22 20:10:29 +02:00
Michael Stapelberg
cc9f0ab353 bump copyright in --version (Thanks joepd) 2012-04-22 13:04:24 +02:00
Michael Stapelberg
2c23eb4c75 cfgparse: accept force-xinerama as a synonym of force_xinerama 2012-04-21 12:48:34 +02:00
Michael Stapelberg
63ea509482 ipc: update the links to the python libraries on github (Thanks BusMaster) 2012-04-14 20:32:41 +02:00
Michael Stapelberg
3a42038b8f add missing docs/refcard_style.css to git 2012-04-13 13:38:06 +02:00
Michael Stapelberg
70c27d9be4 fix broken link in docs/debugging (Thanks nh2) 2012-04-13 13:30:04 +02:00
Michael Stapelberg
b4ef809101 debian: update changelog with new upload, add .menu file, update email, bump standards-version, fix section 2012-04-12 16:32:19 +02:00
Michael Stapelberg
41d034a6db replace the refcard with an HTML version (by SardemFF7)
This eliminates our build-depedency on latex.
2012-04-12 16:04:29 +02:00
Michael Stapelberg
1bb165a29a tests: warp the pointer to in multi-monitor tests to avoid flaky tests 2012-04-09 14:48:57 +02:00
Michael Stapelberg
983ba656fc t/166-assign: wait until the window is definitely mapped 2012-04-09 14:48:25 +02:00
Michael Stapelberg
7210ab22d7 t/166-assign: remove unnecessary sleeps 2012-04-09 14:48:15 +02:00
Michael Stapelberg
0f10ccdf12 Implement fake-outputs option (cmdline, cfg) for multi-monitor testing
This kills the dependency on xdmx and makes the testsuite simpler
and more flexible (in the output sizes / configurations).
2012-04-09 14:28:36 +02:00
Michael Stapelberg
fa6a3d57d2 Only resize when the left/right mouse button is used, not when scrolling (Thanks eeemsi) 2012-04-08 21:04:21 +02:00
Michael Stapelberg
eec41d1276 Fix warning: properly initialize 'workspace' variable 2012-04-08 20:45:49 +02:00
Michael Stapelberg
373b4ad74a Implement 'rename workspace <old_name> to <new_name>' 2012-04-08 20:40:00 +02:00
Michael Stapelberg
ad513b4799 Implement 'move [container|window] to workspace number <number>' 2012-04-08 20:33:46 +02:00
Michael Stapelberg
72078c704e Implement 'workspace number <number>' to switch to named workspaces 2012-04-08 19:17:46 +02:00
Michael Stapelberg
42bbdbdfc1 Prevent changing focus outside a container when scrolling on the decorations
Fixes: #557
2012-04-08 18:33:45 +02:00
Michael Stapelberg
849e06f21e Replace the old fullscreen container when requesting fullscreen
Fixes: #510
2012-04-08 17:53:37 +02:00
Michael Stapelberg
2d110c90e6 Implement resize <grow|shrink> <width|height>, use it in the default config
Fixes: #576
2012-04-08 16:00:15 +02:00
Michael Stapelberg
24ac6e32aa Bugfix: Properly terminate lines not ending with a newline (Thanks xeen)
Previously, we didn’t check for a newline and thus could be corrupting
formerly valid UTF-8 input, such as
    echo -n '↓'

Fixes: #671
2012-04-07 19:15:41 +02:00
Michael Stapelberg
250577da36 Force WM_TAKE_FOCUS event to be sent when clicking
This fixes more problems with Eclipse.
See also commit 1962c30dfb
2012-04-07 16:24:53 +02:00
Michael Stapelberg
bd0adb45d2 Merge branch 'fix-eclipse-focus' 2012-04-07 16:23:39 +02:00
Michael Stapelberg
b0b03eedd3 Force WM_TAKE_FOCUS event to be sent when clicking
This fixes more problems with Eclipse.
See also commit 1962c30dfb
2012-04-07 16:22:58 +02:00
Michael Stapelberg
c0c2fd631b add a testcase for the previous commit 2012-04-05 18:12:24 +02:00
Peter Bui
a29eece9dc Bug 676: if scratchpad window is active on a non-visible workspace, then "scratchpad show" should move it to the current visible workspace. 2012-04-05 18:10:45 +02:00
Jose Pereira
9a58c1fcaa Added option to select primary display on tray_output 2012-04-05 14:42:07 +02:00
Michael Stapelberg
206b96202c Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792

The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4.
2012-03-31 10:53:04 +02:00
Michael Stapelberg
d519659ea7 i3bar: kill child processes when exit()ing (they might be stopped) (Thanks darkraven) 2012-03-26 17:36:00 +02:00
Michael Stapelberg
941267e98e testsuite: explicitly start Xdummy with -nolisten tcp 2012-03-26 17:00:44 +02:00
Michael Stapelberg
e19c7b7bae A few style fixes for the previous commit 2012-03-26 17:00:35 +02:00
darkraven
9d68d780e2 Use 32bit visual only when needed. Thus we could drop the --enable-32bit-visual option. 2012-03-26 16:50:44 +02:00
Fernando Tarlá Cardoso Lemos
95f510e724 Don't multiply by sizeof(char) twice.
This is a no-op, since sizeof(char) is 1. But still, we shouldn't
multiply twice, it's misleading.
2012-03-26 16:47:44 +02:00
Fernando Tarlá Cardoso Lemos
484c2a697b Document text_len in the draw_text description. 2012-03-26 16:47:23 +02:00
Pavel Löbl
f78f137ed0 Extends move command for floating windows 2012-03-25 11:06:49 +02:00
Michael Stapelberg
2763a23cc7 userguide: add a hint to xev (Thanks toxios) 2012-03-22 13:10:36 +01:00
Michael Stapelberg
d4523de6c8 Merge branch 'master' into next 2012-03-21 22:30:08 +01:00
Michael Stapelberg
07d4dfe387 Merge branch 'fix-eclipse-focus' 2012-03-21 22:29:51 +01:00
Michael Stapelberg
1962c30dfb Force WM_TAKE_FOCUS event to be sent again upon EnterNotify
This fixes focus problems with Eclipse. Apparently, Eclipse waits for getting
notified about the focus, and since it used non-managed windows, i3 didn’t care
to update the focus.

Fixes: #621, #675
2012-03-21 22:27:31 +01:00
Michael Stapelberg
36fdab7b6a Merge branch 'master' into next 2012-03-21 21:41:13 +01:00
Michael Stapelberg
ea97119a76 Merge branch 'leavestates' 2012-03-21 21:40:55 +01:00
Michael Stapelberg
1f6fbaf240 cfgparse: leave EAT_WHITESPACE and BINDSYM_COND states on EOL (Thanks dothebart)
Fixes: #642
2012-03-21 21:40:44 +01:00
Michael Stapelberg
4172e43c9c debugging trick: keep a symbol pointing to I3_VERSION around
This way, gdb will include the i3 version in backtraces.
2012-03-21 20:48:00 +01:00
Michael Stapelberg
e09e077b76 Merge branch 'master' into next 2012-03-21 20:24:29 +01:00
Michael Stapelberg
7997fd667b Merge branch 'fix-floating-restart' 2012-03-21 20:24:03 +01:00
Michael Stapelberg
afed6da0e5 Bugfix: Fix restart with for_window floating configuration (Thanks garga)
Fixes: #668

Calling tree_close with dont_kill_parent=true will avoid it from closing the
workspace if it’s empty (and it’s temporarily empty, because 'floating disable'
detaches, then re-attaches the window).
2012-03-21 20:14:50 +01:00
Michael Stapelberg
2abfb5a88b Bugfix: Also clear the command parser’s stack upon invalid commands (Thanks helgikrs)
Fixes: #652
2012-03-21 17:20:07 +01:00
Michael Stapelberg
607ba6fcde i3bar: Fix memory for old plain-text input (Thanks Han) 2012-03-19 22:30:20 +01:00
Michael Stapelberg
e7761a342b Merge branch 'master' into next 2012-03-19 21:42:08 +01:00
Michael Stapelberg
d43a91e45a Merge branch 'fix-i3bar-multi-dpy' 2012-03-19 21:42:00 +01:00
Michael Stapelberg
8b4ad8c6bd Fix i3bar when using multiple displays (Thanks brimstone) 2012-03-19 21:41:45 +01:00
Michael Stapelberg
45d5f1fbaa i3-config-wizard: use fgetln on OpenBSD, too (Thanks David Coppa) 2012-02-21 15:23:58 +01:00
Michael Stapelberg
d085e88d02 t/158-wm_take_focus: use sync_with_i3 instead of a timeout 2012-02-21 14:37:55 +01:00
Michael Stapelberg
41400d8a16 t/164-kill-win-vs-client: get rid of sleep()s 2012-02-21 14:28:37 +01:00
Michael Stapelberg
bee1e90b1e t/187-commands-parser: shave off a bit of time by consolidating calls 2012-02-21 14:22:26 +01:00
Michael Stapelberg
b21a675a9c t/171-config-migrate: shave off a bit of time by consolidating migrate_config calls 2012-02-21 14:11:04 +01:00
Michael Stapelberg
06a9820b5f t/166-assign: check for i3-nagbar in the process hierarchy instead of sleep(1) 2012-02-21 13:58:49 +01:00
Michael Stapelberg
7e05a0700a tests: don’t wait for window map event in open_special
Since the window doesn’t get mapped at all in these tests (it’s assigned to an
invisible workspace), this saves us a timeout of 2 seconds :).
2012-02-21 13:40:53 +01:00
Michael Stapelberg
ab9ba6fcf9 Use gettimeofday() and struct timevals instead of time()
Initially I thought using the second precision time() function is good enough,
but to make t/113-urgent.t considerably faster (>2s vs. 0.08s), we put in a
little more effort and use gettimeofday. Otherwise, this test blocks the whole
testsuite from completing much faster on modern machines :).
2012-02-21 13:38:49 +01:00
Michael Stapelberg
1ab3621656 re-add src/cmdparse.* to clean target for people who are switching from the master branch / have old build dirs 2012-02-16 23:44:18 +00:00
Michael Stapelberg
a3ee8491fd i3bar: compile with yajl < 2 2012-02-16 23:41:58 +00:00
Michael Stapelberg
7f93d9fd82 debian: add i3bar-protocol.html to docs 2012-02-16 23:32:36 +00:00
Michael Stapelberg
31b9d24c2b Implement the i3bar JSON protocol (with fallback to plain text)
If the first line of the input starts with {"version":, then the input is
considered to be JSON, otherwise it is interpreted as plain text.

Only the "full_text" and "color" parts of a block are currently understood by
i3bar.
2012-02-16 23:28:18 +00:00
Michael Stapelberg
a6c461264c add docs/i3bar-protocol 2012-02-16 20:39:34 +00:00
Michael Stapelberg
a2d80c4ab9 tests: add a testcase for the floating size constraints 2012-02-16 18:43:47 +00:00
Michael Stapelberg
62a1ee7c45 use signed integer types for the floating size constraints 2012-02-16 18:41:54 +00:00
Michael Stapelberg
d78da44ad1 cfgparse: also accept negative numbers 2012-02-16 18:41:48 +00:00
D Thompson
82146fcebf Implement support for user configuration of constraints on floating window dimensions. 2012-02-16 18:31:28 +00:00
Michael Stapelberg
5edacf4943 Merge branch 'master' into next 2012-02-15 22:05:28 +00:00
Michael Stapelberg
47c2f29fc0 Merge branch 'fix-i3bar-highlight' 2012-02-15 22:05:07 +00:00
Simon Kämpe
51e6e48992 Highlight i3bar ws when changing output w/ mouse. 2012-02-15 22:05:01 +00:00
Michael Stapelberg
3827d3758c Render only once for all matching assignments (Thanks rami)
Fixes: #608
2012-02-15 21:02:40 +00:00
Michael Stapelberg
e114b3dba2 Refactor the interface of commands.c
This change has two implications:

1) tree_render() will now be called precisely once for input which consists of
   multiple commands (like "focus left; focus right"). Also, the caller of
   parse_command() has to call it. This makes us able to fix tickets such as
   ticket #608 (where multiple tree_render() calls are noticable).

2) The output of a command is now a JSON array of return values of the
   individual subcommands. In the case of "focus left; focus right", this is:

   [{"success":true}, {"success":true}]

   While this is incompatible with what i3 returned before, the return value of
   commands was undocumented and therefore not subject to our API stability.
2012-02-15 20:57:25 +00:00
Michael Stapelberg
58ecd14900 Implement support for chosing a 32 bit visual (necessary for pseudo-transparency) (Thanks darkraven)
You need to specify the --enable-32bit-visual flag when starting i3. This is
done because everything feels sluggish on my system when using a 32 bit visual
instead of a 24 bit visual. Fast > fancy.
2012-02-15 18:56:07 +00:00
Michael Stapelberg
19f3f84d29 tests: add test for previous commit 2012-02-15 18:08:53 +00:00
Fernando Tarlá Cardoso Lemos
36a1a8282f Fix the coords of floating cons when moving workspaces.
Fixes floating containers seemingly showing up in the wrong
workspace after moving workspaces containing floating containers.

We must *always* fix the coordinates of floating containers when
moving workspaces across outputs. That's because the coordinates
of floating containers are *not* relative to the workspaces.
2012-02-15 18:03:37 +00:00
Michael Stapelberg
6d0dcf06ef tests: make t/504-move-workspace-to-output consistent with the previous commit 2012-02-15 18:02:02 +00:00
Fernando Tarlá Cardoso Lemos
a22f161ab5 If moving the last ws, create a new one in its place.
This seems better than refusing to move the last workspace.
2012-02-15 17:59:33 +00:00
Michael Stapelberg
974e70459d tests: add a test for the urgent= criteria 2012-02-14 22:47:40 +00:00
Jeremy O'Brien
53541817ef Implement urgency flag matcher
Currently it supports the following options:
"oldest": match the first window that triggered an urgent event
"latest": match the last window that triggered an urgent event
2012-02-14 22:47:10 +00:00
Fernando Tarlá Cardoso Lemos
23abfcf7f2 Mention floating_fix_coordinates in the hacking how-to. 2012-02-14 21:51:13 +00:00
Michael Stapelberg
9a67e6070c debian: add debugging-releas-version.html to docs 2012-02-12 11:21:08 +00:00
Michael Stapelberg
c3125b4424 docs/debugging: cover development version, add debugging-release-version 2012-02-12 11:18:17 +00:00
Michael Stapelberg
51728bab77 Merge branch 'master' into next 2012-02-12 10:21:01 +00:00
Michael Stapelberg
630a820ccd Merge branch 'fixes-cfg-wizard' 2012-02-12 10:20:56 +00:00
beauby
b3e3ecf722 Fixed a memory leak 2012-02-12 10:19:34 +00:00
beauby
4f14850173 BugFix: keep the indentation of config.keycodes 2012-02-12 10:19:06 +00:00
Michael Stapelberg
fd2ff3a6ef Bugfix: insert ending double quote at the right position (Thanks mxf) 2012-02-10 19:55:40 +00:00
Michael Stapelberg
82247fd0ab Bugfix: Correctly handle missing ending double quotes (+test) (Thanks mxf) 2012-02-10 19:49:38 +00:00
Michael Stapelberg
2daa8d422a Merge branch 'master' into next
Conflicts:
	i3-config-wizard/main.c
2012-02-10 00:03:18 +00:00
Michael Stapelberg
138197f925 Merge branch 'fix-freebsd-getline' 2012-02-10 00:02:20 +00:00
beauby
891831be3a Fixed the fgetln workaround 2012-02-10 00:02:08 +00:00
Michael Stapelberg
2f8d3d3390 Bugfix: Properly handle workspace names with double quotes (+test) (Thanks kvapen) 2012-02-07 22:50:27 +00:00
Michael Stapelberg
ed2bcc15e3 Merge branch 'master' into next 2012-02-07 17:42:58 -05:00
Michael Stapelberg
1ddde16895 Merge branch 'fix-split' 2012-02-07 17:42:41 -05:00
Michael Stapelberg
0fc459892e Bugfix: Properly split when the current container is alone within a stacked/tabbed con (+test) (Thanks aksr)
Fixes: #630
2012-02-07 17:42:35 -05:00
Michael Stapelberg
4fe974408d Merge branch 'master' into next 2012-02-07 17:41:36 -05:00
Michael Stapelberg
b5d8ed1bed Merge branch 'fix-workspace_layout' 2012-02-07 17:41:15 -05:00
Michael Stapelberg
4f98bbf5ff Bugfix: Obey workspace_layout when re-inserting floating containers (+test) (Thanks aksr)
The code wasn’t using con_attach and therefore didn’t obey workspace_layout.

Fixes: #631
2012-02-07 17:41:00 -05:00
Michael Stapelberg
e04628e581 Error message was missing a slash 2012-02-07 17:38:45 -05:00
Michael Stapelberg
efa1cada29 tests: Make i3 create its temporary files in /tmp/i3-testsuite
This behavior can be avoided by passing dont_create_temp_dir => 1 to
launch_with_config (or activate_i3).

This commit fixes t/159-socketpaths.t being flaky on non-systemd computers.
2012-02-07 17:38:45 -05:00
Michael Stapelberg
c1e0c38b27 randr: Skip workspaces which are assigned to a different output when creating a new workspace
If you had workspace 1, 2, 3, 4 on LVDS1 and you enabled HDMI2 (where workspace
1 to workspace 5 are assigned to HDMI2), i3 would look for a new workspace for
LVDS1 (since all workspaces were moved), create workspace 5, move that over due
to assignment and then create workspace 6. Effectively, you would end up with
an empty workspace 5.
2012-02-07 21:10:16 +00:00
Fernando Tarlá Cardoso Lemos
8cffde232f Don't migrate unfocused empty workspaces when disabling output.
This is more similar to what happens when you close the last client
of an unfocused workspace (the workspace gets reaped).
2012-02-07 20:45:14 +00:00
Michael Stapelberg
194f986975 docs/ipc: remove the log_markers request (it was removed from the code) 2012-02-07 20:43:58 +00:00
Jure Ziberna
1858afc880 docs/ipc: added python library 2012-02-06 20:16:27 +00:00
Fernando Tarlá Cardoso Lemos
8b29250c32 Fix the text alignment in the workspace indicator.
We now use 5px padding for the workspace text on both sides. Some
fonts will look off-by-one (e.g. fixed), but that's because X core
fonts have padding. This padding is per-char, varies wildly across
different fonts, and would be a major pain to offset for. Even if
we could take this padding into account, this would probably make
things look even worse for some fonts.
2012-01-29 23:08:58 +00:00
Michael Stapelberg
0f360f16ab i3bar: make the ws buttons a bit smaller (like before) and improve the centering 2012-01-29 20:55:54 +00:00
Michael Stapelberg
8a57cb48c8 testcases: requires Test::More >= 0.94 (for subtests) 2012-01-29 18:03:03 +00:00
Michael Stapelberg
36464c7a54 Merge branch 'master' into next 2012-01-29 18:02:48 +00:00
Michael Stapelberg
714c8fcbe7 Merge branch 'fix-floating-disappear' 2012-01-29 18:02:44 +00:00
Fernando Tarlá Cardoso Lemos
55525015cc Fix coords of floating containers when the output is disabled.
This prevents floating containers from "disappearing" when their
associated output is disabled. Thanks Michael for the advice.
2012-01-29 18:02:27 +00:00
Michael Stapelberg
29aa28b623 commands_parser: use safewrapper functions 2012-01-28 10:35:18 +00:00
Michael Stapelberg
144be37517 i3bar: correctly check errors when getting the _XEMBED_INFO property
This fixes a problem where starting gnome-settings-daemon (maybe other
programs, too) would leave an empty spot in i3bar’s tray area.
2012-01-28 10:22:43 +00:00
Marcelo Cerri
5a2673d08a Fixed worspace clicking area for i3bar (branch next) 2012-01-28 10:08:14 +00:00
Michael Stapelberg
cc8a3c1019 i3bar: make the space between workspace buttons 1 px again 2012-01-28 10:05:51 +00:00
Michael Stapelberg
c5e777c76e manpages: update i3-msg.man 2012-01-27 22:39:51 +00:00
Michael Stapelberg
7cdddc6524 add comments to src/commands.c 2012-01-27 22:32:40 +00:00
Michael Stapelberg
18aeb262d3 userguide: document 'fullscreen global' 2012-01-27 22:32:25 +00:00
Michael Stapelberg
3229f7677f Rip out the old command parser, remove migration code 2012-01-27 22:11:03 +00:00
Michael Stapelberg
76ad5dac63 Bugfix: Free old criteria matching window list (Thanks piroko) 2012-01-27 21:47:55 +00:00
Michael Stapelberg
d22458cde0 complete-run: make --valgrind, --strace, --coverage-testing work again 2012-01-27 21:36:40 +00:00
Michael Stapelberg
cc2fda9242 Merge branch 'master' into next
Conflicts:
	debian/changelog
2012-01-27 19:56:58 +00:00
Michael Stapelberg
536580fe73 debian: add 4.1.2-2 upload to changelog 2012-01-27 19:56:34 +00:00
Michael Stapelberg
c7ea8c42b6 Merge branch 'master' into next
Conflicts:
	debian/changelog
2012-01-27 19:34:15 +00:00
Michael Stapelberg
49cf36cd59 Merge branch 'release-4.1.2' 2012-01-27 19:26:42 +00:00
Michael Stapelberg
4c1e2fdd94 add release notes for 4.1.2 2012-01-27 19:23:56 +00:00
Michael Stapelberg
8b8573c36e bump manpage version 2012-01-27 19:23:56 +00:00
Michael Stapelberg
177d2c269f update debian/changelog 2012-01-27 19:23:54 +00:00
Michael Stapelberg
0a50add8cc add show-download-count.sh to git 2012-01-26 20:53:19 +00:00
Michael Stapelberg
9381da2bf0 Also install /usr/share/applications/i3.desktop
With this file, you can use the following command to run i3 in GNOME:

    gconftool-2 -s /desktop/gnome/session/required_components/windowmanager i3 --type string
2012-01-26 18:16:13 +00:00
Michael Stapelberg
19dc92a9a5 new parser: correctly handle leading/trailing newlines (+test) (Thanks helgikrs) 2012-01-25 22:00:32 +00:00
Michael Stapelberg
57a96bb61f Add presentation slides from 2012-01-25 2012-01-25 21:16:21 +00:00
Michael Stapelberg
0c742f5f87 debian: add support for dpkg-buildpackage -j parallelism
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=209008#202
2012-01-23 22:22:24 +00:00
Michael Stapelberg
fbaa6d4a3d revert the debugging changes
Building a non-optimized (-O0 vs. -O2) Debian package required:

    echo 'export DEB_BUILD_OPTIONS=noopt' >> ~/.pbuilderrc
2012-01-23 22:21:44 +00:00
Michael Stapelberg
79d28f84c1 debug commit for the autobuilder, please ignore 2012-01-23 19:58:30 +00:00
Fernando Tarlá Cardoso Lemos
d579992528 Force redrawing the indicators after a move.
Fixes a bug where splitting then moving in the other orientation
(e.g. v-splitting and moving right) would result in the old
indicators not disappearing.
2012-01-22 17:25:08 +00:00
Michael Stapelberg
ae049449af force rendering in more cases 2012-01-22 17:24:55 +00:00
Michael Stapelberg
ef522b4dc1 Force re-rendering after changing the orientation of a split container 2012-01-22 13:19:37 +00:00
Michael Stapelberg
f9bc434e2a Implement highlighting right/bottom borders of splitted windows
Fixes #299
2012-01-22 11:22:15 +00:00
Michael Stapelberg
318d4fdeef make in-place restarts use socket activation, too (for faster/less flaky tests) 2012-01-21 23:03:09 +00:00
Michael Stapelberg
3b7f4d428e Correctly restore focus after in-place restarts
Note: This change requires two in-place restarts when you are upgrading
in-place from an old version.

Fixes #611
2012-01-21 18:35:15 +00:00
Michael Stapelberg
fabcd7d911 Merge branch 'master' into next 2012-01-21 15:08:36 +00:00
Michael Stapelberg
ac84ed002b Merge branch 'fix-randr-floating' 2012-01-21 15:08:20 +00:00
Michael Stapelberg
077d2433a7 Bugfix: Fix coordinates when the rect of an output changes (Thanks Paul)
Fixes #623
2012-01-21 15:07:53 +00:00
Michael Stapelberg
53f19576d6 i3-config-wizard: Mark the currently selected modifier with an arrow (Thanks jjfoerch)
Boldface seems to be unrecognizable on some systems.

Fixes #607
2012-01-21 14:32:35 +00:00
Michael Stapelberg
fc27c19761 Merge branch 'master' into next
Conflicts:
	testcases/t/005-floating.t
2012-01-21 14:22:29 +00:00
Michael Stapelberg
cccf078f1e Merge branch 'fix-floating-pos' 2012-01-21 14:21:34 +00:00
Michael Stapelberg
cb4c9b9d27 Bugfix: Position floating windows exactly where their geometry specified (Thanks B-Con)
Fixes #619
2012-01-21 14:20:55 +00:00
Michael Stapelberg
6ffc0f94cb Ignore aspect ratio during fullscreen mode (fixes MPlayer subtitles) (Thanks mxf, alexander)
Fixes: #594
2012-01-21 13:29:06 +00:00
Michael Stapelberg
8d72a77c7a Merge branch 'master' into next
Conflicts:
	src/handlers.c
2012-01-21 11:50:22 +00:00
Michael Stapelberg
9798e5cae6 Merge branch 'fix-fullscreen-enternotify' 2012-01-21 11:49:52 +00:00
Michael Stapelberg
7a4d8ed6ed Bugfix: Force a new sequence number after UnmapNotify
This should fix the problem where (legitimate) EnterNotifys arrived with the
same sequence as the UnmapNotify and was ignored.

Fixes: #609
2012-01-21 11:49:46 +00:00
Michael Stapelberg
27b089e430 Fix prototype 2012-01-21 11:49:35 +00:00
Michael Stapelberg
47fd15649a Bugfix: Only ignore EnterNotify events after UnmapNotifies from managed windows
This should fix (some?) focus follows mouse problems.

Conflicts:

	src/handlers.c
2012-01-21 11:46:23 +00:00
Michael Stapelberg
fa83b46dfa Draw a separator line after each tab (doesn’t use extra space) (by Aaron Small) 2012-01-21 11:07:10 +00:00
Michael Stapelberg
1784b3858d Bugfix: Redraw right border after rendering the window title (Thanks fernandotcl)
Fixes #368
2012-01-21 11:03:57 +00:00
Michael Stapelberg
1d5071ebbe i3bar: ignore the "socket_path" config option (redundant anyway) 2012-01-20 22:29:24 +00:00
Michael Stapelberg
45b4d71a0b handle the old bar color config syntax in a backwards-compatible way 2012-01-20 22:26:17 +00:00
Michael Stapelberg
b5c25761d5 Bugfix: i3bar: Use the correct keys when reading the color config 2012-01-20 22:03:52 +00:00
Michael Stapelberg
31b7ec29fd Re-implement bar borders (by Angelo Haller)
This re-introduces borders around the workspace buttons in i3bar.
No additional pixels will be consumed (you will not lose any space for your
windows).
2012-01-20 21:36:50 +00:00
Michael Stapelberg
57bf93ebaf Merge branch 'master' into next 2012-01-20 18:14:34 +00:00
Michael Stapelberg
af97a3e56d Merge branch 'fix-xcb-compat' 2012-01-20 18:14:12 +00:00
Michael Stapelberg
07e495d2d0 Fix xcb_compat.h to make i3 compile with older xcb versions (Thanks David Coppa) 2012-01-20 18:13:52 +00:00
Michael Stapelberg
759ed0b6e3 Merge branch 'master' into next 2012-01-20 18:10:52 +00:00
Michael Stapelberg
113a96dd0d Merge branch 'fix-ewmh' 2012-01-20 18:10:49 +00:00
Michael Stapelberg
4f26d6f2a1 Bugfix: Setup the _NET_SUPPORTING_WM_CHECK atom in a standards-compliant way
This makes chrome (and probably other apps, too) receive changes of the
_NET_ACTIVE_WINDOW and thus show its bookmark dialog properly.

Fixes: #544
2012-01-20 18:09:53 +00:00
Michael Stapelberg
a2823d3aeb Bugfix: Don’t increment 'walk' before checking it (Thanks MasterofJOKers) 2012-01-19 19:01:47 +00:00
Michael Stapelberg
fd8e1c98c9 Merge branch 'master' into next
Conflicts:
	src/handlers.c
2012-01-18 19:18:22 +00:00
Michael Stapelberg
67ff74d4e3 Merge branch 'fix-focus' 2012-01-18 19:17:48 +00:00
Michael Stapelberg
2d14ced024 Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients
This fixes problems with Qt apps (like Quassel) and apparently Eclipse since
the last commit.
2012-01-18 19:16:57 +00:00
Michael Stapelberg
f32cc6f4ae Merge branch 'master' into next 2012-01-17 23:39:04 +00:00
Michael Stapelberg
e2b97a6fda Merge branch 'fix-take-focus' 2012-01-17 23:34:52 +00:00
Michael Stapelberg
21a2971b24 Bugfix: Either use SetInputFocus *or* send WM_TAKE_FOCUS, not both
This fixes problems with the Oracle JRE7, which checks the current focus after
receiving WM_TAKE_FOCUS and just does nothing when the focus is on one of its
windows. Hopefully it doesn’t introduce any regressions :).
2012-01-17 23:33:33 +00:00
Michael Stapelberg
62cde927a5 Bugfix: Only ignore EnterNotify events after UnmapNotifies from managed windows
This should fix (some?) focus follows mouse problems.
2012-01-17 20:37:36 +00:00
Michael Stapelberg
518d210a9b hacking-howto: point out that the parser is not used for the configfile (yet) (Thanks fernandotcl) 2012-01-16 23:41:24 +00:00
Michael Stapelberg
fa4a909f34 hacking-howto: describe the new commands parser 2012-01-16 22:44:28 +00:00
Michael Stapelberg
a59090ac2e Bugfix: Make generate-command-parser.pl compatible with perl 5.10 2012-01-16 21:20:48 +00:00
Michael Stapelberg
4f975aa060 Merge branch 'new-parser' into next 2012-01-14 21:30:02 +00:00
Michael Stapelberg
a532f5ac39 Implement a new parser for commands. (+test)
On the rationale of using a custom parser instead of a lex/yacc one, see this
quote from src/commands_parser.c:
     We use a hand-written parser instead of lex/yacc because our commands are
     easy for humans, not for computers. Thus, it’s quite hard to specify a
     context-free grammar for the commands. A PEG grammar would be easier, but
     there’s downsides to every PEG parser generator I have come accross so far.

     This parser is basically a state machine which looks for literals or strings
     and can push either on a stack. After identifying a literal or string, it
     will either transition to the current state, to a different state, or call a
     function (like cmd_move()).

     Special care has been taken that error messages are useful and the code is
     well testable (when compiled with -DTEST_PARSER it will output to stdout
     instead of actually calling any function).

During the migration phase (I plan to completely switch to this parser before
4.2 will be released), the new parser will parse every command you send to
i3 and save the resulting call stack. Then, the old parser will parse your
input and actually execute the commands. Afterwards, both call stacks will be
compared and any differences will be logged.

The new parser works with 100% of the test suite and produces identical call
stacks.
2012-01-14 21:29:57 +00:00
Michael Stapelberg
f81c89ac28 Refactor the code out of src/cmdparse.y to src/commands.c
This is the first step towards our new parser.
2012-01-14 16:59:52 +00:00
Michael Stapelberg
608def6c6e cmdparse.l: [^t] is enough (Thanks f8l) 2012-01-10 23:09:00 +00:00
Michael Stapelberg
0174f1c183 Merge branch 'move-workspace-to-output' into next 2012-01-10 22:16:57 +00:00
Michael Stapelberg
814695d8bb Implement 'move workspace to output <output>'
Fixes: #541
2012-01-10 22:16:50 +00:00
Michael Stapelberg
a4a59a797f tests: use open_window to avoid motion notifies which in turn trigger endless loops
Using 'open' will not create an X11 window (while open_window does), so we will
get spurious motion notify events when switching focus, leading to endless loops.
2012-01-10 22:16:09 +00:00
Michael Stapelberg
df9b338175 Introduce synonyms: 'move to workspace' and 'move container to workspace' and 'move window to workspace'
This makes the new 'move workspace to output' command much more clear
2012-01-10 22:16:09 +00:00
Michael Stapelberg
9c11ef4b23 Merge branch 'workspace_on_output' into next 2012-01-08 16:33:48 +00:00
Michael Stapelberg
6585d289cf add testcase for workspace next_on_output/prev_on_output 2012-01-08 16:33:16 +00:00
Michael Stapelberg
6e4a86b7d1 tests: make focused_ws multi-monitor-safe, document it 2012-01-08 16:32:58 +00:00
Michael Stapelberg
6df971d5d5 Ignore next_on_output/prev_on_output when looking for the first workspace 2012-01-08 16:31:07 +00:00
Michael Stapelberg
58f331c50a userguide: document workspace next_on_output/prev_on_output 2012-01-08 16:30:48 +00:00
Max Alexander Busse
fba2582b2e Switch and Move to next workspace on the same Output. As requested in \#554 2012-01-08 16:24:21 +00:00
Michael Stapelberg
659e06a170 Merge branch 'i3bar-hide-mod' into next 2012-01-08 12:54:10 +00:00
Michael Stapelberg
c72367660f update userguide to reflect the modifier option in i3bar config 2012-01-08 12:52:45 +00:00
dbp
a3081c488a Allow different modifier keys for showing hidden i3bar. 2012-01-08 12:47:41 +00:00
Michael Stapelberg
f88c779457 Merge branch 'master' into next 2012-01-08 12:30:41 +00:00
Michael Stapelberg
af73d3bffe Merge branch 'fix-floating-assign' 2012-01-08 12:30:23 +00:00
Michael Stapelberg
96c491a488 Bugfix: Fix assignments of floating windows to (yet) unused workspaces (Thanks zeus)
The problem was that the workspace was considered empty for a brief period of
time when entering floating mode. This happened when you assigned Gimp to a
workspace which is not in use yet.
2012-01-08 12:28:49 +00:00
Michael Stapelberg
d662ba3c0c Merge branch 'focus-output' into next 2012-01-08 12:03:31 +00:00
Michael Stapelberg
c92aa648cb document the 'focus output' command 2012-01-08 12:02:59 +00:00
Michael Stapelberg
47a25aa883 bump copyright 2012-01-08 12:00:19 +00:00
Michael Stapelberg
07d07719f0 add testcase for 'focus output' 2012-01-08 11:59:24 +00:00
Michael Stapelberg
5c3077bc78 wrap 'focus output': when on the right-most output and focusing right, it will focus the left-most output 2012-01-08 11:58:45 +00:00
Michael Stapelberg
e3051629d1 remove trailing whitespace and empty lines 2012-01-08 11:44:01 +00:00
Max Alexander Busse
d0b3a943f0 Feature: focus the output right/left/above/below 2012-01-08 11:43:31 +00:00
Michael Stapelberg
470ee00012 Merge branch 'master' into next 2012-01-07 18:50:46 +00:00
Michael Stapelberg
3ce7f03f02 Merge branch 'fix-assignment-open' 2012-01-07 18:50:43 +00:00
Michael Stapelberg
d4238c778a Bugfix: Open new windows in the correct place when assignments match (+test) (Thanks Don) 2012-01-07 18:50:00 +00:00
Michael Stapelberg
6345124049 Merge branch 'master' into next
Conflicts:
	src/con.c
2012-01-07 18:21:12 +00:00
Michael Stapelberg
313a700e86 Merge branch 'fix-fullscreen-move' 2012-01-07 18:19:48 +00:00
Michael Stapelberg
f78caf8c58 Bugfix: Don’t lose focus on fullscreen windows when another window gets moved to that workspace (+test) (Thanks rami)
Fixes: #606
2012-01-07 18:18:36 +00:00
Michael Stapelberg
0e1b1dd984 Bugfix: Correctly handle 'move scratchpad' on workspace level (+test) (Thanks mseed)
Fixes: #597
2012-01-07 17:36:30 +00:00
Michael Stapelberg
3254188cda Bugfix: Show scratchpad on the correct output (+test)
Fixes: #596
2012-01-07 16:53:37 +00:00
Michael Stapelberg
89dded044b forgot include/shmlog.h 2012-01-07 14:59:58 +00:00
Michael Stapelberg
dee7c07ad2 shmlog: store meta information in the buffer itself, store path as X11 atom
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg
ed37a63942 tests: add scratchpad test 2012-01-05 21:41:23 +00:00
Michael Stapelberg
91499ed2c7 properly serialize floating/scratchpad state when restarting 2012-01-05 21:41:20 +00:00
Michael Stapelberg
ec7ed75c01 tests: make t/143 actually verify floating windows are restored properly 2012-01-05 21:20:53 +00:00
Michael Stapelberg
fca57ed077 Change prototype of handlers to static void, remove a bit of old code 2011-12-30 11:30:56 +01:00
Michael Stapelberg
019347b14c update comment in include/data.h 2011-12-30 11:23:15 +01:00
Michael Stapelberg
68544a519e Handle vsnprintf overflows (Thanks Han) 2011-12-30 01:26:36 +01:00
Michael Stapelberg
9a46335e25 docs/userguide: refer to the new i3bar options in "8.1. Displaying a status line" 2011-12-30 00:59:32 +01:00
Michael Stapelberg
2ec689ec7d Fix i3-config-wizard on FreeBSD 7.x (without getline()) (Thanks garga) 2011-12-30 00:50:54 +01:00
Michael Stapelberg
a2031a8894 Log the configfile name in verbose log, not only debug log (Thanks Han) 2011-12-29 00:04:48 +01:00
Michael Stapelberg
ac3541c28c update i3-sensible-* (Thanks Han) 2011-12-29 00:01:49 +01:00
Michael Stapelberg
27c442c9c1 Merge branch 'test-multi-monitor' into next 2011-12-26 20:51:01 +01:00
Michael Stapelberg
dd9743b272 tests: Implement multi-monitor tests using Xdmx 2011-12-26 20:48:57 +01:00
Michael Stapelberg
457ca0e15a debian/changelog bump for next 2011-12-24 16:29:21 +01:00
Michael Stapelberg
20b8b1a22a Merge branch 'master' into next 2011-12-24 16:28:48 +01:00
Michael Stapelberg
71d261fd77 debian: re-add build-indep/build-arch targets to debian/rules 2011-12-24 16:24:00 +01:00
Michael Stapelberg
293f28e68b bump manpage version 2011-12-24 16:10:22 +01:00
Michael Stapelberg
2a5db98419 Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager} 2011-12-24 15:59:56 +01:00
Michael Stapelberg
eae4347ea3 i3-sensible-terminal: check $TERMINAL to not call 'which' without parameters (Thanks Fandekasp) 2011-12-24 15:59:18 +01:00
Michael Stapelberg
4a807091b5 add release notes for v4.1.1 2011-12-24 15:59:04 +01:00
Michael Stapelberg
fd4ba8ea06 update debian/changelog 2011-12-24 15:58:58 +01:00
Michael Stapelberg
cea6f7ad96 Merge branch 'master' into next 2011-12-24 15:37:13 +01:00
Michael Stapelberg
93a416ee7e Merge branch 'doc-fixes' 2011-12-24 15:37:03 +01:00
Miguel de Val-Borro
1d2c63de5c Fix a few spelling typos 2011-12-24 15:36:43 +01:00
Michael Stapelberg
538247a843 s/xwininfo/xprop (Thanks Miguel) 2011-12-24 15:36:11 +01:00
Miguel de Val-Borro
e7e2ed94fd Fix typo in keyboard binding example in the user guide 2011-12-24 15:35:15 +01:00
Michael Stapelberg
8a67f15ef4 add missing scratchpad.{c,h} 2011-12-21 23:17:52 +00:00
Michael Stapelberg
c88b231232 Merge branch 'scratchpad' into next 2011-12-21 23:16:47 +00:00
Michael Stapelberg
08986a1798 Implement scratchpad functionality (see userguide) 2011-12-21 23:15:32 +00:00
Michael Stapelberg
311b9e24df tests: implement restart testing (actual option still missing) 2011-12-21 23:15:30 +00:00
Michael Stapelberg
622b94f176 Merge branch 'master' into next 2011-12-20 18:44:26 +00:00
Michael Stapelberg
74cd4d2ed8 Merge branch 'fix-float-close' 2011-12-20 18:44:23 +00:00
Michael Stapelberg
d963018990 Bugfix: Don’t close workspace when there are still floating windows on it (Thanks noxxun) (+test)
Fixes: #595
2011-12-20 18:44:15 +00:00
Michael Stapelberg
1f2c9306a2 Merge branch 'master' into next
Conflicts:
	testcases/t/159-socketpaths.t
2011-12-18 18:02:08 +00:00
Michael Stapelberg
32fb917948 Merge branch 'fix-temp-path' 2011-12-18 17:59:56 +00:00
Michael Stapelberg
c21172a6f6 Create a secure temp path instead of a predictable one (Thanks Han)
With this commit, i3 will now use either $XDG_RUNTIME_DIR/i3 (XDG_RUNTIME_DIR
is only writable by the user, so this is not a problem) or a secure temporary
location in /tmp, following the pattern /tmp/i3-<user>.XXXXXX
2011-12-18 17:59:31 +00:00
Michael Stapelberg
c4298b9311 Merge branch 'master' into next 2011-12-18 17:25:15 +00:00
Michael Stapelberg
7eb2ca405e Merge branch 'fix-floating-move' 2011-12-18 17:24:58 +00:00
Michael Stapelberg
4fba2d5f91 Bugfix: Correctly check boundaries and reassign floating windows when moving (Thanks xpt)
Fixes: #592
2011-12-18 17:24:27 +00:00
Fernando Tarlá Cardoso Lemos
fbf6d20e05 Fix the signal handler popup text.
Thanks to Michael for the heads-up.
2011-12-18 15:43:00 +00:00
Michael Stapelberg
2ba09f5419 Merge branch 'master' into next 2011-12-18 15:19:09 +00:00
Michael Stapelberg
59a694edea Merge branch 'fix-float-resize' 2011-12-18 15:18:47 +00:00
Michael Stapelberg
ec28f3b982 Bugfix: Fix floating resize for floating split containers (+test)
Fixes: #588
2011-12-18 15:18:20 +00:00
Michael Stapelberg
4412ccbe5a Merge branch 'master' into next 2011-12-17 22:35:13 +00:00
Michael Stapelberg
386477b789 Merge branch 'fix-bindsym' 2011-12-17 22:34:55 +00:00
Michael Stapelberg
7a80d903a5 keygrabbing: only look in the appropriate columns when resolving keysyms
Fixes: #585

This commit fixes the problem of i3 wrongly grabbing/interpreting (!) some key
bindings. Basically, when you have, say, "bindsym Mod1+4 workspace 4", but you
also have "bindsym Mod1+semicolon focus right" (both are default), and your
keyboard layout has semicolon on Mode_switch + 4, the "workspace 4" keybinding
was shadowed by the "focus right" keybinding, because that also resolves to
semicolon.

So, from now on, i3 will only consider column 0 and 1 for normal bindings and
column 2 and 3 for bindings using Mode_switch (columns as seen in xmodmap
-pke).
2011-12-17 22:31:21 +00:00
Michael Stapelberg
76202a824d re-indent translate_keysyms() 2011-12-17 22:28:28 +00:00
Michael Stapelberg
0d210277f0 x: Handle expose-events by only copying the requested region from our pixmap
This is faster than always updating the whole pixmap and should be safe.
2011-12-17 20:08:56 +00:00
Michael Stapelberg
6f8b284586 Merge branch 'master' into next 2011-12-17 18:48:14 +00:00
Michael Stapelberg
7daac50807 Merge branch 'fix-resize-focus' 2011-12-17 18:47:53 +00:00
Michael Stapelberg
664e30903c Bugfix: Don’t change focus after (graphical) resizing 2011-12-17 18:47:29 +00:00
Michael Stapelberg
a930994dc9 Merge branch 'master' into next 2011-12-17 17:16:39 +00:00
Michael Stapelberg
422846e1c5 Merge branch 'fix-configure-request' 2011-12-17 17:16:35 +00:00
Michael Stapelberg
75c57c4eef Bugfix: Ignore ConfigureRequests with out-of-bound coordinates (+test)
JDownloader seems to use these for its captcha popups when focus is not on the
same workspace, for some weird reason.
2011-12-17 17:15:52 +00:00
Michael Stapelberg
db174234ce Merge branch 'master' into next
Conflicts:
	debian/changelog
2011-12-17 15:28:51 +00:00
Michael Stapelberg
fcfdfedcb5 Merge branch 'fix-fullscreen-focus' 2011-12-17 15:28:25 +00:00
Michael Stapelberg
1ff321bc3f Bugfix: Disallow focusing other windows when in fullscreen mode (Thanks aksr)
Fixes: #579
2011-12-17 15:28:17 +00:00
Michael Stapelberg
d972704205 update debian changelog 2011-12-17 14:30:40 +00:00
Michael Stapelberg
ef224cdb98 Merge branch 'master' into next
Conflicts:
	testcases/t/173-get-marks.t
2011-12-17 14:22:57 +00:00
Michael Stapelberg
6694a201eb Merge branch 'fix-mark' 2011-12-17 14:22:31 +00:00
Michael Stapelberg
b46ab649f5 Bugfix: Fix setting the same mark repeatedly on different windows (+test)
Fixes: #582
2011-12-17 14:22:23 +00:00
Michael Stapelberg
5a345db18b Merge branch 'master' into next 2011-12-17 13:55:45 +00:00
Michael Stapelberg
49947317ba Merge branch 'fix-floatingmod-deco' 2011-12-17 13:55:42 +00:00
Michael Stapelberg
87b6bf7a54 Bugfix: Make resizing work when pressing floating_modifier + right mouse button on window decorations
Fixes: #583
2011-12-17 13:55:16 +00:00
Michael Stapelberg
9e688a2277 Merge branch 'master' into next 2011-12-17 12:21:13 +00:00
Michael Stapelberg
1c6de74d4f Merge branch 'fix-mod-resizing' 2011-12-17 12:21:09 +00:00
Michael Stapelberg
f6c0a1e161 Bugfix: Make resizing of tiling windows with floating_modifier use absolute coordinates
Fixes: #580
2011-12-17 12:20:27 +00:00
Michael Stapelberg
69b143e5ca complete-run: automatically display test output when running a single test 2011-12-17 11:20:32 +00:00
Michael Stapelberg
95508c3469 complete-run: fix uninitialized warning 2011-12-17 11:20:16 +00:00
Michael Stapelberg
81f4b6fc1a complete-run: don’t parallelize more than the number of tests 2011-12-17 11:19:31 +00:00
Michael Stapelberg
da8d0baa74 tests: add test for previous commit 2011-12-17 11:18:43 +00:00
Michael Stapelberg
9cec9e09ed Merge branch 'master' into next 2011-12-17 11:18:35 +00:00
Michael Stapelberg
e83b191492 Merge branch 'fix-var-tabs' 2011-12-17 11:18:17 +00:00
Michael Stapelberg
acb3bdd05e Bugfix: Skip leading whitespace in variable assignments (Thanks ben)
Fixes: #577
2011-12-17 11:16:34 +00:00
Michael Stapelberg
1c72e8b69e Make complete-run store the timings, schedule tests and print time estimate
Yay for self-optimizing software and time estimates
2011-12-16 22:00:41 +00:00
Michael Stapelberg
1f0c0cdd51 docs/ipc: the command has a reply now 2011-12-15 17:30:32 +00:00
Michael Stapelberg
6610215aaa Merge branch 'logbuf' into next 2011-12-10 11:35:37 +00:00
Michael Stapelberg
87d98a128f tests: disable SHM logging, we redirect anyways 2011-12-10 11:32:15 +00:00
Michael Stapelberg
0af05710b2 add i3-dump-log, a tool to dump the SHM log 2011-12-10 11:27:40 +00:00
Michael Stapelberg
966c654112 implement the GET_LOG_MARKERS IPC request/reply 2011-12-10 11:16:32 +00:00
Michael Stapelberg
d25a05f06b add TYPE_GET_LOG_MARKERS to i3-msg 2011-12-10 11:16:12 +00:00
Michael Stapelberg
f7a73f4a68 fix the SHM log size 2011-12-10 11:15:57 +00:00
Michael Stapelberg
d034248de0 sighandler: handle all "Core" signals 2011-12-10 11:05:37 +00:00
Michael Stapelberg
aa82adb5c0 Introduce --shmlog-size flag, unlink SHM log when exiting 2011-12-10 10:51:55 +00:00
Michael Stapelberg
e65ee63763 Implement logging to a SHM ringbuffer
This feature is automatically enabled when running a debug version of i3.
The logfile will use 1% of your physical RAM size, but at max 25 MiB.
2011-12-10 10:50:33 +00:00
Michael Stapelberg
4cd5bf94cf i3-nagbar: add -t to the synopsis (Thanks gamo) 2011-12-07 18:19:11 +00:00
Maik Fischer
9a7d7919a6 testcases: introduce TestWorker.pm
instead of executing a new perl interpreter (via TAP::Parser)
each time we start a testfile, fork a TestWorker for each display.

Each worker preloads i3test via 'require', blocking waits on its ipc
to get a new filename, forks itself upon arrival and 'do'es this
testscript.
2011-12-04 14:14:20 +01:00
Maik Fischer
55c474d864 testcases: move Xdummy cleanup code to StartXDummy 2011-12-04 14:14:20 +01:00
Maik Fischer
43b8b8356d complete-run: add cleanup sighandler 2011-12-04 14:14:20 +01:00
Maik Fischer
2d188bfc9b complete-run: reorder code to make code flow more clear 2011-12-04 14:14:20 +01:00
Maik Fischer
6a5ca32c5a complete-run: die if X11::XCB couldn’t connect to a display 2011-12-04 14:14:20 +01:00
Maik Fischer
8349190e09 testcases: always start i3 through i3test::launch_with_config
this will pave the way to just call BAIL_OUT and stop the currently
running testfile if i3 died for whatever reason.
2011-12-04 14:14:20 +01:00
Maik Fischer
e8d2fbbac8 testcases: Makefile.PL: NAME =~ s/ /-/
since NAME is used to generate targets,
a space will lead to invalid syntax eg:
Makefile:547: warning: overriding commands for target `i3'
Makefile:536: warning: ignoring old commands for target `i3'
2011-12-04 14:14:20 +01:00
Maik Fischer
423b891995 StartXdummy.pm: make Xdummy startup a bit more robust 2011-12-04 14:14:20 +01:00
Michael Stapelberg
b1b139df1e hacking-howto: talk about the tree data structure 2011-11-30 20:55:48 +00:00
Michael Stapelberg
6c112f2a9a Merge branch 'master' into next 2011-11-30 20:34:54 +00:00
Michael Stapelberg
70e6ba1d0b Merge branch 'noworkarea' 2011-11-30 20:34:49 +00:00
Michael Stapelberg
d25e77ce75 Don’t set the _NET_WM_WORKAREA hint at all (Thanks cg)
Fixes: #539
2011-11-30 20:33:07 +00:00
Michael Stapelberg
fb90a556c8 Merge branch 'master' into next 2011-11-30 20:10:45 +00:00
Michael Stapelberg
5cfea9fad5 Merge branch 'displayversion' 2011-11-30 20:10:42 +00:00
Michael Stapelberg
fb0ad1e8f9 display i3 version in errors, make conversion message an error 2011-11-30 20:09:32 +00:00
Michael Stapelberg
0f9fbcbd25 Merge branch 'master' into next 2011-11-29 22:37:11 +00:00
Michael Stapelberg
bd3219ac68 Merge branch 'fix-nested-resize' 2011-11-29 22:37:08 +00:00
Michael Stapelberg
626e3efb48 Bugfix: Fix 'resize' command in nested containers (Thanks mseed)
Fixes: #559
2011-11-29 22:36:40 +00:00
Michael Stapelberg
eb7b933e2b man: change URL (Thanks aksr) 2011-11-29 22:36:00 +00:00
Michael Stapelberg
f2b73b64be Merge branch 'master' into next 2011-11-29 21:24:05 +00:00
Michael Stapelberg
9cb24375f7 Merge branch 'v4-keywords' 2011-11-29 21:24:01 +00:00
Michael Stapelberg
0e56fcb971 add a few more keywords to make i3 recognize configs as v4 2011-11-29 21:20:42 +00:00
Michael Stapelberg
df2236c5ee Merge branch 'master' into next 2011-11-29 20:50:11 +00:00
Michael Stapelberg
40ad2f182b Merge branch 'fix-resize' 2011-11-29 20:50:09 +00:00
Michael Stapelberg
59283cce93 Bugfix: Fix resizing for (e.g.) v-split containers in h-split containers
Fixes: #562
2011-11-29 20:48:59 +00:00
Michael Stapelberg
752b101916 Merge branch 'master' into next 2011-11-28 23:28:03 +00:00
Michael Stapelberg
2fb06e612f Merge branch 'fix-tab-focus' 2011-11-28 23:27:46 +00:00
Michael Stapelberg
bd4b240d56 Bugfix: Ignore EnterNotify events to prevent wrong focus in complex tabbed/stacked layouts (Thanks Phlogistique)
Fixes #560

Finally we have a good explanation and example for why we need to ignore
EnterNotify events which were caused by an Unmap :).
2011-11-28 23:26:45 +00:00
Michael Stapelberg
356d80c15b Merge branch 'master' into next 2011-11-27 21:44:28 +00:00
Michael Stapelberg
dd63495ce0 Merge branch 'fix-whitespace' 2011-11-27 21:44:25 +00:00
mgsnova
cedeb88682 convert tabs into whitespaces in config files 2011-11-27 21:44:00 +00:00
Jan-Erik Rediger
f23d675de9 Implement new "i3bar_command" option for bar.
This allows you to specify an alternate path to the i3bar binary.
The userguide docu is included.
2011-11-27 21:40:57 +00:00
Fernando Tarlá Cardoso Lemos
0e6d1909b8 Handle the case where there's no font char infos.
Fixes i3bar crash with some fonts (and possible i3 crash too).
Thanks to xeen for reporting the issue.
2011-11-27 19:58:06 +00:00
Michael Stapelberg
1a3b82eb02 Merge branch 'master' into next 2011-11-26 22:25:06 +00:00
Michael Stapelberg
3c1c67e3f1 Merge branch 'fix-baf' 2011-11-26 22:24:53 +00:00
Michael Stapelberg
d686f2f873 Bugfix: Don’t create a workspace named "back_and_forth" on startup
Fixes #565
2011-11-26 22:24:30 +00:00
Michael Stapelberg
f5dce848b8 Merge branch 'master' into next 2011-11-26 22:18:01 +00:00
Michael Stapelberg
79dda6e57b Merge branch 'fix-dock-focus' 2011-11-26 22:17:58 +00:00
Michael Stapelberg
31acb91d90 Bugfix: Fix crash on '[class="i3bar"] focus' (+test) (Thanks f8l)
Fixes #575
2011-11-26 22:17:34 +00:00
Fernando Tarlá Cardoso Lemos
340592a532 Invalidate cached pixmaps on reload and redraw.
After a reload, the drawing parameters for the decorations might
have changed, so we need to invalidate the cache and force a redraw
of the currently visible decorations. Also, don't leak the previous
font when reloading by freeing it before parsing the config.
2011-11-26 21:51:49 +00:00
Michael Stapelberg
67c2c03f76 Merge branch 'master' into next 2011-11-26 21:30:44 +00:00
Michael Stapelberg
629ac57efb Merge branch 'fix-comment' 2011-11-26 21:30:40 +00:00
Michael Stapelberg
eeab1f0659 Fix comment for the previous commit 2011-11-26 21:30:26 +00:00
Michael Stapelberg
5c59c0296c tests: add test for ticket #561 (floating window size when changing border) 2011-11-26 21:20:00 +00:00
Michael Stapelberg
555dd48f09 Merge branch 'master' into next 2011-11-26 21:19:30 +00:00
Michael Stapelberg
d213f537a5 Merge branch 'fix-float-border' 2011-11-26 21:19:26 +00:00
Michael Stapelberg
970d11709e Bugfix: Retain absolute window position and size when changing floating borders (Thanks binzter)
Fixes: #561
2011-11-26 21:18:23 +00:00
Michael Stapelberg
d805d1bbea Merge branch 'master' into next 2011-11-24 23:50:11 +00:00
Michael Stapelberg
c36042dfb1 Merge branch 'fix-norandr' 2011-11-24 23:50:08 +00:00
Michael Stapelberg
227a58b0c3 Bugfix: Fix startup when RandR is not present 2011-11-24 23:49:35 +00:00
Michael Stapelberg
2f36214f89 hacking-howto: little fixes 2011-11-24 23:49:20 +00:00
Michael Stapelberg
8d433ecc6b hacking-howto: s/iFunc/Func/ (Thanks mxf) 2011-11-23 22:17:50 +00:00
Michael Stapelberg
52d000f45e Merge branch 'hacking-howto' into next 2011-11-23 21:54:52 +00:00
Michael Stapelberg
f91f6c52e9 hacking-howto: document X11 pushing/drawing 2011-11-23 21:54:40 +00:00
Michael Stapelberg
5efb81250a hacking-howto: document v4 rendering 2011-11-23 21:54:38 +00:00
Michael Stapelberg
2359c5049d hacking-howto: document thought-experiment (why cgroups don’t solve the window starts on wrong workspace problem) 2011-11-23 21:04:29 +00:00
Michael Stapelberg
1e35dcba97 hacking-howto: rendering (INCOMPLETE) 2011-11-23 21:04:29 +00:00
Michael Stapelberg
2c0d7cbcc1 hacking-howto: update 'Data structures' for v4 2011-11-23 21:04:29 +00:00
Michael Stapelberg
26750e7abc Merge branch 'testsuite' into next 2011-11-23 20:34:02 +00:00
Maik Fischer
475dc3c532 testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
Maik Fischer
ec877f2ec4 i3test.pm: add before_map hook to open_window 2011-11-23 20:33:44 +00:00
Maik Fischer
9b8d9f7303 i3test.pm: open_(floating_)window: take arguments as hashref or key-value list 2011-11-23 20:33:44 +00:00
Maik Fischer
c2229b905a testcases: replace sleep with sync_with_i3 where appropiate 2011-11-23 20:33:44 +00:00
Maik Fischer
33e9c29022 testcases: t/144-*: use open_window instead of launching urxvt 2011-11-23 20:33:44 +00:00
Michael Stapelberg
d0d804ba69 Merge branch 'testsuite' into next 2011-11-23 00:04:53 +00:00
Maik Fischer
6bf13b413e testcases: t/116-*: reinvent ignore() from Test::Deep 2011-11-23 00:03:09 +00:00
Maik Fischer
2f36351ab3 testcases: Makefile.PL: fix tabbing 2011-11-23 00:03:06 +00:00
Maik Fischer
228671227d .gitignore: add generated testcases/Makefile 2011-11-23 00:03:03 +00:00
Maik Fischer
372b98d08e testcases: drop EV dependency 2011-11-23 00:03:00 +00:00
Maik Fischer
8d83697cc2 testcases: use Test::More is_deeply, don't depend on Test::Deep 2011-11-23 00:02:57 +00:00
Maik Fischer
3a9d94bba4 testcases: don't sync_with_i3() before $x->input_focus
since input_focus calls it anyways
2011-11-23 00:02:54 +00:00
Maik Fischer
0702f1fb7b testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
Maik Fischer
293517fb2e testcases: drop open_floating_window()s $x parameter, use global 2011-11-23 00:02:47 +00:00
Michael Stapelberg
f7f1ec5dab Merge branch 'master' into next 2011-11-22 22:08:43 +00:00
Michael Stapelberg
e09bb51c14 Merge branch 'fix-warning' 2011-11-22 22:08:40 +00:00
Michael Stapelberg
0ea64ae404 Fix prototype in include/xcursor.h (Thanks Greg Kroah-Hartman) 2011-11-22 22:08:22 +00:00
Michael Stapelberg
acf29dbfd5 Makefiles: introduce $(FLEX) and $(BISON) 2011-11-22 00:01:01 +00:00
Michael Stapelberg
bf105e1d7d Merge branch 'testsuite' into next 2011-11-21 23:52:18 +00:00
Maik Fischer
fce7570f96 testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
Maik Fischer
e9acd36ce4 t/005-floating.t: fix potentional race condition 2011-11-21 23:51:01 +00:00
Maik Fischer
da403b3667 testcases: use $x in wait_for_(un)map change to wait_for_(un)map($win)
wait_for_unmap currently ignores its $window parameter, since
X11::XCB doesn't provide $event->{window} for unmap events yet.
2011-11-21 23:50:58 +00:00
Maik Fischer
65471a6b18 testcases: only export eq_deeply, cmp_deeply from Test::Deep 2011-11-21 23:50:55 +00:00
Maik Fischer
ea2aba4319 testcases: undo 0f386a96 t/144-regress-floating-resize.t
wait_for_map can't be used, since we don't set structure_notify
on the urxvts windows
2011-11-21 23:50:52 +00:00
Maik Fischer
db6de84d0b testcases: use global $x in wait_for_event, drop $x parameter 2011-11-21 23:50:48 +00:00
Maik Fischer
30ea33decb testcases: let i3test.pm export $x, adapt testcases 2011-11-21 23:50:43 +00:00
Maik Fischer
1b1d7941ec testcases: correctly enable lexical pragmata
eval 'package foo; use strict;' enables strict within eval, it does
not leak into the surrounding scope.
Also fix various warnings/compile errors found due to now enabled
strict and warnings.
2011-11-21 23:50:39 +00:00
Maik Fischer
0a65b770e8 i3test.pm: bail_out if injection of exported modules fails 2011-11-21 23:50:36 +00:00
Maik Fischer
e72899efb6 testcases: move i3test::X11 from 170-force_focus_wrapping.t into i3test.pm 2011-11-21 23:50:33 +00:00
Michael Stapelberg
af810df8da Merge branch 'master' into next 2011-11-21 23:10:09 +00:00
Michael Stapelberg
5bb279d450 Merge branch 'fix-float-fs' 2011-11-21 23:10:06 +00:00
Michael Stapelberg
61b8a62132 Bugfix: fix fullscreen with floating windows
Fixes: #564
2011-11-21 23:04:49 +00:00
Michael Stapelberg
32e58e7b39 Merge branch 'drawing' into next (Thanks fernandotcl)
(from the 'less code duplication & more uniform behavior' department)
2011-11-21 21:49:07 +00:00
Michael Stapelberg
561cf3719f little style fixes 2011-11-21 21:48:24 +00:00
Fernando Tarlá Cardoso Lemos
344c04af12 Implement set_font_colors.
This paves the way for other font rendering backends. Fonts and
colors shouldn't be specified manually from now on.
2011-11-21 20:52:32 +00:00
Fernando Tarlá Cardoso Lemos
eafc7af606 Make all programs use draw_text. 2011-11-21 20:52:29 +00:00
Fernando Tarlá Cardoso Lemos
5c2088c87e Enhance libi3 and use it in i3bar.
Abstracted draw_text and predict_text_width into libi3. Use
predict_text_width from libi3 in i3 too. This required tracking
xcb_connection in a xcb_connection_t *conn variable that libi3
expects to be available in i3bar.
2011-11-21 20:52:26 +00:00
Michael Stapelberg
70151ea238 Merge branch 'master' into next 2011-11-21 19:56:03 +00:00
Michael Stapelberg
402daf30b7 Merge branch 'fix-focusin-dock' 2011-11-21 19:56:00 +00:00
Michael Stapelberg
5f8d719835 Bugfix: Skip dock clients when handling FocusIn events (Thanks cradle) 2011-11-21 19:55:41 +00:00
Maik Fischer
0f386a96e7 testcases: fix race conditions in various tests 2011-11-21 19:21:14 +00:00
Maik Fischer
af793c9030 complete-run: wait for all jobs to be finished 2011-11-21 19:20:52 +00:00
Maik Fischer
4f2b1c3a66 testsuite: Makefile.PL: do not rename Makefile while running make clean 2011-11-21 19:14:46 +00:00
Michael Stapelberg
8a9b093bc3 tests: replace left-over move before/after commands (Thanks mxf) 2011-11-21 18:54:20 +00:00
Michael Stapelberg
2783aa9fc9 tests: add t/180-fd-leaks to ensure i3 does not leak fds on exec 2011-11-20 10:52:21 +00:00
Michael Stapelberg
3abd7ab073 complete-run: close all fds except for 0, 1, 2
running in a VIM subshell leads to one more fd, for example
2011-11-20 10:51:21 +00:00
Michael Stapelberg
b0ee2dfd32 complete-run: close the old socket fd 2011-11-20 10:24:13 +00:00
Michael Stapelberg
ee43861fc4 Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager} 2011-11-19 14:10:39 +00:00
Michael Stapelberg
0ffcc00b15 i3-sensible-terminal: check $TERMINAL to not call 'which' without parameters (Thanks Fandekasp) 2011-11-19 14:08:18 +00:00
Michael Stapelberg
b6e859787e clarify comments about socket activation (Thanks mxf) 2011-11-16 23:14:57 +00:00
Michael Stapelberg
84cf3ec3cb ipc: set CLOEXEC on client file descriptors (Thanks biiter) 2011-11-16 21:42:48 +00:00
Michael Stapelberg
70793d8bb9 libi3/ucs2_conversion: tiny style fixes 2011-11-16 21:41:55 +00:00
Michael Stapelberg
33ee4679e7 tests: store temp configs in /tmp/ 2011-11-16 21:41:45 +00:00
Michael Stapelberg
3665f3e755 tests: Bugfix: Fix socket activation (see comment) 2011-11-16 21:41:00 +00:00
Fernando Tarlá Cardoso Lemos
fb11cc2d14 Consolidate all convert_* functions into libi3.
Some minor fixes along the way as well. Very minor stuff, unlikely
to ever be visible to the user.
2011-11-16 20:54:30 +00:00
Michael Stapelberg
061f24b247 debian: make meta-package i3 depend on the precise version of i3-wm (Thanks Merovius)
This has the advantage that apt-get install i3/sid actually does what you expect :).
2011-11-16 20:10:48 +00:00
Michael Stapelberg
a5de88d2ec debian: include PNGs of the userguide in docs 2011-11-15 23:44:14 +00:00
Michael Stapelberg
09a28f603f userguide: use bar blocks in the bar related examples 2011-11-15 23:42:41 +00:00
Michael Stapelberg
7498ddd12f ipc: set CLOEXEC on client file descriptors (Thanks biiter) 2011-11-15 23:39:43 +00:00
Michael Stapelberg
77a9e4b18f complete-run: implement --strace, make --valgrind log to test-specific file 2011-11-15 23:30:17 +00:00
Michael Stapelberg
5b4f8eb7e2 userguide: s/enter/Return (use correct keysym) (Thanks mxf) 2011-11-15 20:20:54 +00:00
Michael Stapelberg
9cbf34ac14 lib/SocketActivation: Bugfix: remove old code which leaks the socket file descriptor to i3 2011-11-15 19:54:03 +00:00
Michael Stapelberg
433720d27a docs/userguide: make it clear how to use multiple output directives (Thanks moemoe) 2011-11-13 12:54:10 +00:00
Michael Stapelberg
cc1a7d35d9 docs/userguide: fix typo (Thanks sycamorex) 2011-11-13 10:51:58 +00:00
Michael Stapelberg
b991952fdf debian: add changelog entry for upcoming version (for autobuilder) 2011-11-11 23:00:08 +00:00
Michael Stapelberg
0adbffb386 Merge branch 'next' 2011-11-11 22:49:20 +00:00
Michael Stapelberg
0c2fe85c36 Merge branch 'release-4.1' into next 2011-11-11 22:49:15 +00:00
Michael Stapelberg
56a9ce62ef update debian/patches 2011-11-11 22:40:38 +00:00
Michael Stapelberg
c7a4d5971c debian: add new manpages to i3-wm.manpages 2011-11-11 22:37:01 +00:00
Michael Stapelberg
4954b7241d bump manpage version to 4.1 2011-11-11 22:33:45 +00:00
Michael Stapelberg
1b9067c6a2 Add manpages for i3-sensible-{pager,editor,terminal} 2011-11-11 22:29:10 +00:00
Michael Stapelberg
f7754a960a update debian packaging 2011-11-11 22:17:49 +00:00
Michael Stapelberg
6325b194b9 Add release notes for v4.1 2011-11-11 21:47:43 +00:00
Michael Stapelberg
b1cca92ee7 debian: update changelog 2011-11-11 21:28:32 +00:00
Michael Stapelberg
1e5cd4b769 Bugfix: Only go to the parent container in resizing if that is actually a split container
(as opposed to a workspace)

This fixes a regression in resizing. We do need testcases for these things.
2011-11-11 19:19:14 +00:00
Michael Stapelberg
60bfc3a600 Bugfix: Correctly handle --no-startup-id with quoted exec commands (Thanks aksr)
Parser changes shortly before a release. What could possibly go wrong.
2011-11-11 00:28:04 +00:00
Michael Stapelberg
41cf2468c0 docs/userguide: make the bar config reflect reality
Forgot to update this when changing the color.
2011-11-10 23:37:53 +00:00
Michael Stapelberg
b808cc5d18 Bugfix: Render floating windows after rendering all outputs (Thanks mw)
Fixes #548

See the comment on why this is necessary.
2011-11-10 20:30:51 +00:00
Michael Stapelberg
df095f9d68 Bugfix: Fix tabbed container resizing check (Thanks julien)
Fixes: #534

Turns out that my check was wrong. We actually just need to make sure we are
dealing with the split container.
2011-11-10 19:35:36 +00:00
Michael Stapelberg
ed66a30410 mark parameters const 2011-11-10 19:17:36 +00:00
Michael Stapelberg
e73538a56f t/154-regress-multiple-dock: s/next v/focus right 2011-11-10 18:43:03 +00:00
Michael Stapelberg
bebd2fceb6 Bugfix: Correctly return to initial state after prev/next/back_and_forth (Thanks Brian)
Fixes: #552
2011-11-10 18:42:24 +00:00
Michael Stapelberg
62f0a9e21d s/1/true 2011-11-10 18:38:29 +00:00
Michael Stapelberg
7f9b65f6a7 i3bar: fix event handling
i3bar would only handle one event at a time instead of all pending events.
2011-11-09 23:23:21 +00:00
Michael Stapelberg
e85a352fcf i3bar: correctly handle unmapped tray clients, reconfigure tray icons after mapping/unmapping (Thanks IsoLnCHiP)
Fixes #550
2011-11-09 23:22:44 +00:00
Michael Stapelberg
2c48280017 complete-run: remove Carp::Always, slipped in when debugging 2011-11-09 22:41:56 +00:00
Michael Stapelberg
316318c1fc complete-run: don’t print long logfile paths, they are useless by now anyway 2011-11-09 22:38:29 +00:00
Michael Stapelberg
d30eaedebc Merge remote-tracking branch 'mxf/complete-run-statusline' into next 2011-11-09 22:36:32 +00:00
Michael Stapelberg
6bdd12a584 Bugfix: Correctly fill the buffer with zeros 2011-11-09 22:23:33 +00:00
Maik Fischer
7633aa67a1 complete-run: log verbose output, display statuslines instead 2011-11-09 23:00:10 +01:00
Michael Stapelberg
332dbfe9c1 Enable (unlimited) core dumps when running i3 development versions
Also prints out useful stuff:

    CORE DUMPS: You are running a development version of i3, so coredumps were
    automatically enabled (ulimit -c unlimited).
    CORE DUMPS: Your current working directory is "/home/michael/i3".
    CORE DUMPS: Your core_pattern is: /tmp/%e.core.%p
    i3 (tree) version 4.0.2-479-g26ab2ac (2011-11-08, branch "next") starting

This does not affect child processes of i3.

The intention of this change is to make debugging easier – it’s one less thing
users of the development version have to worry about when trying to help with
debugging.
2011-11-08 22:49:25 +00:00
Michael Stapelberg
26ab2ac008 Bugfix: Insert container at the correct position on workspace-level when workspace_layout == default
Fixes #533

The problem was that the code was always executed. While it *attaches* the new
container to the workspace container, it also sets current = NULL and thus
always appends the container instead of inserting it after the currently
focused child. So now, we just don’t execute that code at all for
workspace_layout == default.
2011-11-08 20:37:24 +00:00
Michael Stapelberg
715fe580af docs/userguide: s/shrinked/shrunk (Thanks f8l) 2011-11-08 18:06:44 +00:00
Michael Stapelberg
31b01798dd lib/SocketActivation: don’t make POSIX export everything (Thanks mxf) 2011-11-07 23:45:28 +00:00
Michael Stapelberg
c8eb7b08ac lib/StartXDummy: use close STDOUT, STDERR instead of POSIX::close (Thanks mxf) 2011-11-07 23:39:45 +00:00
Michael Stapelberg
3f76522344 update docs/testsuite with the simpler invocation of complete-run.pl 2011-11-07 23:22:41 +00:00
Michael Stapelberg
4cbb757408 Merge branch 'complete-run' into next 2011-11-07 23:18:36 +00:00
Michael Stapelberg
bf12befd6d lib/StartXDummy.pm: document why we use -config /dev/null 2011-11-07 23:07:08 +00:00
Michael Stapelberg
afc488021f complete-run.pl: automatically start Xdummy instances unless -d is specified
This makes running the testsuite incredibly easy:
    $ ./complete-run.pl
:)
2011-11-07 23:04:45 +00:00
Michael Stapelberg
8b887e8447 complete-run: Bugfix: return condvar when $dont_start is true 2011-11-07 22:38:06 +00:00
Michael Stapelberg
f0cc13f356 i3bar: fix indention in src/child.c 2011-11-07 21:34:50 +00:00
Michael Stapelberg
2a78a5f2b6 ipc: fix memory leaks when clients disconnect 2011-11-07 21:34:39 +00:00
Michael Stapelberg
0615cb3595 complete-run.pl: implement --help 2011-11-07 21:21:51 +00:00
Michael Stapelberg
fdf7b1706c complete-run: Bugfix: Don’t call recv inside a callback when cleanly exiting i3 2011-11-07 20:56:36 +00:00
Michael Stapelberg
dbd6440432 complete-run: Use Carp::Always to get nice stacktraces in case of errors 2011-11-07 20:56:04 +00:00
Michael Stapelberg
c75cc525f7 lib/SocketActivation: use single quotes (for consistency) 2011-11-07 20:54:33 +00:00
Michael Stapelberg
1c0d69d4e6 complete-run: implement --valgrind 2011-11-07 20:53:49 +00:00
Michael Stapelberg
389fdcf79f complete-run: pass outdir (not only logpath) to activate_i3() 2011-11-07 20:52:14 +00:00
Fernando Tarlá Cardoso Lemos
af335f0403 Don't call free on statically allocated strings.
Fixes segfault when the option -f is used. Also, don't leak prompt
strings. We either keep FREE to prevent leaking, or choose to leak
and avoid strdup. Another option would be using a flag to indicate
whether or not the strings are heap allocated, but it's overkill.
2011-11-07 19:57:25 +00:00
Fernando Tarlá Cardoso Lemos
d5613905c8 Plug minor leaks in string conversion routines. 2011-11-07 19:57:11 +00:00
Michael Stapelberg
ddf261432a i3bar: change default color for active workspace buttons to make them visible
Previously, you could not figure out which workspace is displayed on a screen
which is not focused.
2011-11-07 19:52:21 +00:00
Michael Stapelberg
a977b2d96e i3bar: fix -h output (Thanks IsoLnCHiP) 2011-10-31 20:44:55 +00:00
Michael Stapelberg
2b6504d310 Bugfix: RandR: Correctly keep focus on the focused workspace when an output disappears (Thanks AlexanderB, xeen) 2011-10-31 12:11:34 +00:00
Michael Stapelberg
51e0d1b741 docs/userguide: clarify proportional resizing with floating modifier (Thanks Donald) 2011-10-29 22:58:32 +01:00
Michael Stapelberg
50d14718f4 fix t/120-multiple-cmds: open a window before moving 2011-10-27 23:30:29 +01:00
Michael Stapelberg
8e3cef33d9 Error out early if there is nothing to move
Fixes: #532
2011-10-27 23:27:33 +01:00
Michael Stapelberg
09a07b9169 docs/userguide: update the workspace assignment section 2011-10-27 22:45:34 +01:00
Michael Stapelberg
5227b29b0f Make named workspace assignments work again
Please note that you need a quoted string for the workspace name.
Example:
    workspace "1: www" output HDMI2

Fixes: #456
2011-10-27 22:43:53 +01:00
Michael Stapelberg
a4cb4a64d4 Bugfix: warp pointer during the EnterNotify-disabled phase
Following bug:
1) Assign workspace 9 to output HDMI2
2) On HDMI2, be on workspace 1
3) Focus a different output, say LVDS1
4) Execute i3 'workspace 9'
5) Something happens, but you end up back on ws 1

(this is due to an EnterNotify being generated when warping)
2011-10-27 22:29:47 +01:00
Michael Stapelberg
4330c723ae Merge branch 'move-floating' into next 2011-10-27 21:52:59 +01:00
Michael Stapelberg
18c2ef33d3 docs/userguide: Document the move syntax 2011-10-27 21:52:39 +01:00
Michael Stapelberg
df980bffa4 Make 'move' handle floating windows properly
This means you can now specify an amount of pixels for the move command. The
default is 10. Note that this of course only works for floating windows.

Example:
  move left 20 px
2011-10-27 21:46:15 +01:00
Michael Stapelberg
edfa9febae extend t/124-move.t to test move for floating containers 2011-10-27 21:46:01 +01:00
Michael Stapelberg
ca0c2a46e4 t/124-move.t: re-activate test for useless move commands 2011-10-27 21:22:41 +01:00
Michael Stapelberg
e25991f538 Bugfix: Don’t invoke resizing when clicking on the decoration in a > 1 child split con (Thanks julien)
Fixes: #534
2011-10-27 20:36:55 +01:00
Michael Stapelberg
af1871e414 Bugfix: Only fallback on the font if it’s actually set (Thanks phnom) 2011-10-26 21:21:55 +01:00
Michael Stapelberg
ee804a0635 Also call workspace_show() when moving cursor to an empty output (Thanks mw) 2011-10-25 23:41:52 +01:00
Michael Stapelberg
38447c4b47 Bugfix: Correctly use workspace_show() when focus changes to a different output via EnterNotify or FocusIn (Thanks pnutzh4x0r)
This makes i3bar show the correct workspace when you move your mouse from one
output to another.
2011-10-25 23:04:10 +01:00
Michael Stapelberg
e710477a07 Bugfix: properly handle comments in colors {} blocks of bar config (+test) (Thanks fernandotcl) 2011-10-25 22:31:57 +01:00
Michael Stapelberg
704c9967b2 Merge branch 'exec_nosn' into next 2011-10-25 22:23:35 +01:00
Michael Stapelberg
af6f8ca7c2 complete-run: clear the DESKTOP_STARTUP_ID environment variable before starting i3 2011-10-25 22:21:59 +01:00
Michael Stapelberg
91d589b176 tests: extend t/175-startup-notification to test the --no-startup-id flag 2011-10-25 22:21:37 +01:00
Michael Stapelberg
73d4737e42 docs/userguide: document the --no-startup-id flag for exec directives in the config 2011-10-25 22:21:09 +01:00
Michael Stapelberg
15f36cdc91 docs/userguide: document the --no-startup-id flag 2011-10-25 22:18:40 +01:00
Michael Stapelberg
bbfbd28dfa Add a --no-startup-id flag for exec (command), exec (config), exec_always (config) 2011-10-25 22:18:17 +01:00
Michael Stapelberg
726f2a1e5a normalize file headers across **/*.{h,c} 2011-10-25 21:19:38 +01:00
Michael Stapelberg
8660ae4e12 bar config: fall back to the i3 font (Thanks pl) 2011-10-25 20:50:57 +01:00
Michael Stapelberg
35bd2d27c0 i3bar: put tray icons in the save-set (prevents them from crashing when i3bar exits/crashes) 2011-10-24 20:11:32 +01:00
Fernando Tarlá Cardoso Lemos
d490bae8a2 Close empty workspaces if they're not visible.
Previously, we'd only close an empty workspace when we moved away
from it. Now we also close it when the last client exits, as long
as that workspace is not visible anymore.
2011-10-24 00:12:14 +01:00
Michael Stapelberg
f4469eee0b get rid of xcb.c in all i3-* tools
open_input_window was slightly different for each of them, so it made no sense
to generalize it (then we would end up with a thin and useless wrapper).
2011-10-23 23:20:57 +01:00
Michael Stapelberg
a58018cf66 Add libi3/load_font, use it everywhere
…except for i3bar, which needs slightly more information about the font
2011-10-23 22:37:11 +01:00
Michael Stapelberg
6d01d37b03 remove unused cached_fonts TAILQ 2011-10-23 22:03:20 +01:00
Michael Stapelberg
8da6049ca9 Actually make load_font only fallback if 'fallback' is true 2011-10-23 22:02:11 +01:00
Michael Stapelberg
29f9f8c090 Fix tests: s/i3bar/bar {/ and hash prefix for color codes in GET_BAR_CONFIG 2011-10-23 21:51:43 +01:00
Michael Stapelberg
3e7f941b83 Fix comment in run_assignments (Thanks xeen) 2011-10-23 21:45:12 +01:00
Michael Stapelberg
91134f75c0 Move get_mod_mask to libi3, use it in i3 and i3-config-wizard
Also, the API changed a bit. There are two functions now, both assume you
already got the keysyms (which is the case for i3 and i3-config-wizard),
one gets the modifier mapping for you (aio_get_mod_mask_for) while the other
assumes you also got that. No roundtrips are required for the latter.
2011-10-23 21:26:15 +01:00
Michael Stapelberg
a512b99a51 Introduce --get_socketpath and --force_xinerama as synonyms for --get-socketpath and --force-xinerama 2011-10-23 19:41:40 +01:00
Michael Stapelberg
c2d04116d4 i3-input: Remove unused get_mod_mask from xcb.c 2011-10-23 19:37:28 +01:00
Michael Stapelberg
05d097bb36 i3-input: fix handling of Mode_switch (makes special characters work again)
This seems to have only worked before in certain settings, where the modifiers
were configured in a way that it matched by chance…
2011-10-23 19:34:48 +01:00
Michael Stapelberg
7c04e23ab7 i3-input: Bugfix: font must be dynamically allocated, we FREE it later 2011-10-23 19:34:21 +01:00
Michael Stapelberg
7d487b0314 remove unused get_mod_mask from i3-config-wizard/xcb.{c,h} 2011-10-23 18:33:21 +01:00
Michael Stapelberg
6dc6ba11fc Eliminate xcb_change_gc_single everywhere with C99 2011-10-23 18:06:25 +01:00
Michael Stapelberg
9eda7fb6fb move strndup to libi3 2011-10-23 18:02:01 +01:00
Michael Stapelberg
78fea8e1fb i3-nagbar: eliminate xcb_change_gc_single with C99 2011-10-23 17:55:58 +01:00
Michael Stapelberg
ada4857ad2 Fix colors in i3bar (Thanks julien)
i3bar previously used get_colorpixel on strings without the leading # (ff0000
instead of #ff0000). Since it uses libi3’s get_colorpixel now we needed to
update a few places.
2011-10-23 17:48:44 +01:00
Michael Stapelberg
91ae73b1f6 i3-config-wizard: eliminate xcb_change_gc_single with C99 2011-10-23 17:45:40 +01:00
Michael Stapelberg
cb9bbcfccf Move get_colorpixel to libi3, use it everywhere else 2011-10-23 17:38:21 +01:00
Michael Stapelberg
0086bcb2b4 i3-input: eliminate xcb_change_gc_single usage with C99 2011-10-23 17:26:06 +01:00
Michael Stapelberg
4f57d49318 add libi3/ipc_connect, use it in i3-config-wizard, i3-input, i3bar 2011-10-23 17:18:14 +01:00
Michael Stapelberg
4539546f48 debian: update package descriptions 2011-10-23 17:01:56 +01:00
Michael Stapelberg
d8eb4f3fdc debian: use ${perl:Depends}, remove perl from build-deps, update recommends
We can drop the perl module recommends since i3-wsbar no longer ships with i3.
2011-10-23 16:53:16 +01:00
Michael Stapelberg
31cb3dda8d cfgparse: use different literal strings for ambiguous keywords in bar context 2011-10-23 16:41:23 +01:00
Michael Stapelberg
499d4c11e0 i3bar: make len an integer for %.*s in sasprintf 2011-10-23 16:39:39 +01:00
Michael Stapelberg
96f67a53a5 i3bar: check exit code of pipe() 2011-10-23 14:31:43 +01:00
Michael Stapelberg
5ec5a07dd2 docs/userguide: use the correct color keywords (Thanks Atsutane) 2011-10-23 13:17:32 +01:00
Michael Stapelberg
9d15a00ba8 introduce sasprintf() in libi3, use it everywhere 2011-10-23 13:16:56 +01:00
Michael Stapelberg
14abafb3c8 makefile: correctly depend on libi3/*.c to recompile libi3 when necessary 2011-10-23 13:16:39 +01:00
Michael Stapelberg
886aabe826 add libi3/libi3.a to .gitignore 2011-10-23 13:16:26 +01:00
Michael Stapelberg
d87b0f13a0 i3-input: use IPC functions from libi3 2011-10-23 13:15:20 +01:00
Michael Stapelberg
4ddc32f8ee i3-config-wizard: use IPC functions from libi3 2011-10-23 13:12:52 +01:00
Michael Stapelberg
41551178a8 i3bar: makefile: correctly depend on libi3 2011-10-23 12:10:20 +01:00
Michael Stapelberg
620b192e90 debian: raise dependency on debhelper 2011-10-23 12:02:03 +01:00
Michael Stapelberg
82c8a77e7d lower dependency on libstartup-notification, fix build-dep in debian/control 2011-10-23 12:01:22 +01:00
Michael Stapelberg
98baa222f7 remove obsolete TERM_EMU build option 2011-10-23 12:00:56 +01:00
Michael Stapelberg
6927e899e6 makefile: use /bin/echo to get consistent results for the escaping
On the buildbot slave machine, we have a different version of zsh which seems
to handle this slightly different with the built-in echo…
2011-10-23 11:31:55 +01:00
Fernando Tarlá Cardoso Lemos
b8df07d8cf Bump dh compat to 7, simplify debian/rules.
Also added hardening flags. We can't enable PIE because i3bar seems
to have problems with that. We also shouldn't enable bindnow, as it
the startup performance penalty (though probably not too bad) might
not be acceptable for i3-msg and i3-input.
2011-10-23 11:07:22 +01:00
Michael Stapelberg
10d3281b0f remove/shorten a lot of debugging messages
Some of them are useless nowadays, others very unlikely to be a problem.
Those which might still be interesting somewhen in the future are just
commented out.
2011-10-23 00:15:13 +01:00
Michael Stapelberg
42d355f2b7 normalize modelines/headers across src/*.c 2011-10-22 23:40:02 +01:00
Michael Stapelberg
0298c72802 Bugfix: i3.config: status_command, not status_line (Thanks eeemsi) 2011-10-22 18:28:11 +01:00
Michael Stapelberg
a3268248eb update manpage for 'bar' config (Thanks eeemsi) 2011-10-22 18:23:29 +01:00
Michael Stapelberg
d75560981e Merge branch 'bar-config' into next 2011-10-22 17:02:49 +01:00
Michael Stapelberg
753d67fb64 migration from exec i3bar to bar config: i3 substitutes exec with a bar block, shows nagbar 2011-10-22 16:33:00 +01:00
Michael Stapelberg
d7eba46de5 i3-nagbar: Implement -t warning, makes colors yellow(ish) 2011-10-22 16:16:06 +01:00
Michael Stapelberg
409dcf44db i3-migrate-config-to-v4: generate a bar {} block instead of exec i3bar 2011-10-22 15:24:18 +01:00
Michael Stapelberg
95c2e86db9 i3bar: delete include/queue.h, use i3’s copy 2011-10-22 15:08:24 +01:00
Michael Stapelberg
bc2c63d4ed i3bar: change default font to the i3 default one 2011-10-22 15:00:31 +01:00
Michael Stapelberg
3ee8bd502d i3bar: change default colors to fit the i3 look & feel
The new default looks like this (like in docs/userguide):

	colors {
		background #000000
		statusline #ffffff
		focused_workspace  #ffffff #285577
		active_workspace   #888888 #222222
		inactive_workspace #888888 #222222
		urgent_workspace   #ffffff #900000
	}

If you want to go back to the previous colors, use:

	colors {
		background #000000
		statusline #ffffff
		focused_workspace  #ffffff #480000
		active_workspace   #ffffff #480000
		inactive_workspace #ffffff #240000
		urgent_workspace   #ffffff #002400
	}
2011-10-22 12:34:06 +01:00
Michael Stapelberg
9b84348201 Bugfix: fix off by one when copying the hex colorcode (Thanks fernandotcl) 2011-10-21 23:22:48 +01:00
Michael Stapelberg
014c3e4b95 i3bar: Bugfix: Don’t crash when tray_output is not set (Thanks fernandotcl) 2011-10-21 23:15:15 +01:00
Michael Stapelberg
77961ad9c8 cfgparse: Don’t use asprintf when parsing hex colors 2011-10-21 23:09:57 +01:00
Michael Stapelberg
3a99c914e0 tests: default bar mode changed 2011-10-21 23:00:38 +01:00
Michael Stapelberg
3baeeb1834 Bugfix: properly transition in and out of the COLOR_COND state (Thanks fernandotcl) 2011-10-21 22:58:53 +01:00
Michael Stapelberg
202b216c14 docs/userguide: document the output bar option 2011-10-21 22:22:02 +01:00
Michael Stapelberg
15f021b4fc i3bar: Implement the output option 2011-10-21 22:17:41 +01:00
Michael Stapelberg
6de1590e59 i3bar: spit out an error on wrong bar id 2011-10-21 20:04:55 +01:00
Michael Stapelberg
a3b7ba15ed i3bar: also use the position option when in 'hide' mode 2011-10-21 19:59:25 +01:00
Michael Stapelberg
0f2642a9c9 docs/userguide: document the tray_output bar option 2011-10-21 19:50:40 +01:00
Michael Stapelberg
8a24be9555 i3bar: implement the tray_output option 2011-10-21 19:47:56 +01:00
Michael Stapelberg
d71db710dd i3bar: use safewrappers from libi3 2011-10-21 19:30:46 +01:00
Michael Stapelberg
c65d13ff9f i3bar: makefile: fix dependency on libi3 2011-10-21 19:06:53 +01:00
Michael Stapelberg
0298a32e37 i3bar: makefile: prefix messages with [i3bar] 2011-10-21 19:03:54 +01:00
Michael Stapelberg
bc679b0168 change default config to use 'bar' blocks (Thanks mxf) 2011-10-21 19:01:02 +01:00
Michael Stapelberg
cf67966fa0 i3bar: document -b in --help (Thanks mxf) 2011-10-21 18:59:59 +01:00
Michael Stapelberg
2647f47ec5 bar config: make dock mode the default 2011-10-20 23:38:55 +01:00
Michael Stapelberg
0f3d31124d docs/userguide: document the bar configuration 2011-10-20 23:38:34 +01:00
Michael Stapelberg
d970b19b59 i3bar: update manpage 2011-10-20 22:55:24 +01:00
Michael Stapelberg
caee0a0fda cfgparse: eliminate absolute states, use yy_push_state/yy_pop_state
This fixes a problem with workspace assignments.
I tested i3 -C with three user configs (Thanks SardemFF7, julien, xeen)
and did not notice any problems.
2011-10-20 22:38:46 +01:00
Michael Stapelberg
12d866e4f6 Don’t start i3-nagbar when using -C to validate the config 2011-10-20 22:25:59 +01:00
Michael Stapelberg
bf408c9a08 tests: depend on AnyEvent::I3 0.09 (for get_bar_config) 2011-10-20 20:31:44 +01:00
Michael Stapelberg
093507fc38 ipc: document the GET_BAR_CONFIG request/reply 2011-10-20 20:16:07 +01:00
Michael Stapelberg
2bda05d1b8 docs/ipc: fix example end 2011-10-20 19:51:01 +01:00
Michael Stapelberg
a33c720ce8 docs/ipc: document i3 --get-socketpath 2011-10-20 19:46:57 +01:00
Michael Stapelberg
c5caa9682c i3bar: don’t reconnect, but exit(0) on EOF
Since i3 starts i3bar instances as necessary, EOF is considered a signal to
either shutdown because i3 exited or because it is restarting.
2011-10-20 19:08:41 +01:00
Michael Stapelberg
230b238870 Actually start i3bar instances for each configured bar 2011-10-20 19:03:40 +01:00
Michael Stapelberg
ab2d96ba48 tests: modify $PATH so that it prefers the compiled versions of everything in ../ 2011-10-20 19:02:08 +01:00
Michael Stapelberg
ad0f13a0a9 Clean bars before reloading the config (+test)
While the configuration gets updated in i3, the i3bar processes will not pick
up these changes. We have to think about a good way to do that.
2011-10-20 18:47:09 +01:00
Michael Stapelberg
a5be27cb79 Make i3bar get its config from i3 via IPC
In order to not duplicate configuration options and make stuff confusing, we
dropped the commandline flags (except for socket_path and bar_id). This means
that you *have to* specify bar_id when starting i3bar. The best way is to let
i3 start i3bar, which it will do automatically for every bar {} configuration
block it finds.
2011-10-19 22:58:19 +01:00
Michael Stapelberg
15bface10d Create different IDs for each bar (+test) 2011-10-19 19:57:39 +01:00
Michael Stapelberg
063b124e35 Implement parsing bar {} config blocks 2011-10-18 22:16:04 +01:00
Michael Stapelberg
d9f3a31cb7 tests: add a test to check that bar configs are parsed correctly 2011-10-18 22:15:48 +01:00
Michael Stapelberg
149b05aacf ipc: when requesting the bar config without a payload, return an array of available bar IDs 2011-10-18 22:12:46 +01:00
Michael Stapelberg
e3cbdea1fc Bugfix: Correctly close the colors map in the IPC bar config reply 2011-10-18 22:11:44 +01:00
Michael Stapelberg
c2c6ca25d5 Make the barconfig list a TAILQ 2011-10-18 22:11:27 +01:00
Michael Stapelberg
24ede1c834 add an IPC request to get the bar configuration (by ID) 2011-10-18 19:05:49 +01:00
Michael Stapelberg
4898f78e5e add a data structure for 'bar' configuration 2011-10-18 19:05:49 +01:00
Michael Stapelberg
f26a344dfa reformat include/config.h 2011-10-18 19:05:49 +01:00
Peter Bui
9d67ae2202 Focus new window only if it is on a visible workspace on the current focused output. 2011-10-18 18:56:39 +01:00
Michael Stapelberg
a506e59b3c Bugfix: Fix segfault when starting i3 (Thanks pnutzh4x0r) 2011-10-18 18:47:07 +01:00
Michael Stapelberg
f09d9a4c37 log: use localtime_r instead of localtime
localtime_r does not have the side-effect of behaving like it called tzset(),
in particular it will save one stat(/etc/localtime) syscall. This is not a big
deal, but it makes the strace output cleaner and thus more useful :).
2011-10-18 18:32:47 +01:00
Michael Stapelberg
744def377a Merge branch 'workspace_baf' into next 2011-10-17 23:35:19 +01:00
Michael Stapelberg
82ec0169cb tests: add t/176-workspace-baf for the workspace back_and_forth feature 2011-10-17 23:34:29 +01:00
Michael Stapelberg
178be03fa6 Implement 'workspace back_and_forth' (Patch by Michael Walle) 2011-10-17 23:17:56 +01:00
Michael Stapelberg
c3a18104cd docs/Makefile: use $(ASCIIDOC), add asciidoc 'latest git docs' config 2011-10-15 23:32:04 +01:00
Michael Stapelberg
88f147ebe4 debian: use debian/i3-wm.manpages instead of manuall installing manpages 2011-10-15 22:36:03 +01:00
Michael Stapelberg
914ca6cfe7 Bugfix: Use _exit in forking to avoid calling the libev cleanup handler (Thanks xeen) 2011-10-15 16:56:47 +01:00
Michael Stapelberg
32b97745ec Don’t call ev_destroy_loop with ev < 4 in atexit (Thanks xeen) 2011-10-15 16:56:32 +01:00
Maik Fischer
fce422d99e i3test.pm: use strict; use warnings; and fix related bugs 2011-10-12 22:21:57 +01:00
Michael Stapelberg
27dadb4ad9 testcases/makefile: add modeline, add testsuite-* and latest to 'clean' target 2011-10-10 21:56:43 +01:00
Michael Stapelberg
71a3da1ef3 t/175-startup-notification: don’t wait for i3 mapping the window
It is on a different workspace and will therefore not get mapped.
Syncing is enough.
2011-10-10 16:00:34 +01:00
Michael Stapelberg
819980ce2b Merge branch 'startup-notification' into next 2011-10-10 15:54:23 +01:00
Michael Stapelberg
5f52c78aa0 Change the root window cursor to 'watch' during startups 2011-10-10 15:54:18 +01:00
Michael Stapelberg
ad9ffcc917 debian: update debian/control with new build-dep libstartup-notification0-dev 2011-10-10 15:54:18 +01:00
Michael Stapelberg
a09d2eee74 add libstartup-notification to DEPENDS 2011-10-10 15:54:18 +01:00
Michael Stapelberg
2ad4fbb34a startup: delete the startup sequence upon completion, make the timeout complete it 2011-10-10 15:54:18 +01:00
Michael Stapelberg
ae7dec2774 Move the includes after the include guard, no need to include these files more than once 2011-10-10 15:54:17 +01:00
Michael Stapelberg
997a539a8a Implement timeouts for startup notifications 2011-10-10 15:54:17 +01:00
Michael Stapelberg
6ac098a45e support _NET_STARTUP_ID on the client leader window
(necessary for GIMP, geeqie, …)
2011-10-10 15:54:17 +01:00
Michael Stapelberg
4204b8e2b0 Get the _NET_STARTUP_ID in manage_window, get the corresponding workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg
7750382b89 test: set the _NET_STARTUP_ID before mapping the window 2011-10-10 15:54:17 +01:00
Michael Stapelberg
499d89bdb0 Keep track of startup notifications in a TAILQ, save workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg
f4f4d782bb implement a startup monitor, move code to src/startup.c 2011-10-10 15:54:17 +01:00
Michael Stapelberg
198f16ece9 add testcase for the startup notification protocol 2011-10-10 15:54:17 +01:00
Michael Stapelberg
c812cdcf9a make handle_client_message not return anything
The function returned an int for historical reasons.
2011-10-10 15:54:17 +01:00
Michael Stapelberg
d1d4f39f9e save the last timestamp received by X11 in last_timestamp
We need it for startup notifications (to generate a unique id)

Conflicts:

	include/i3.h
	src/main.c
2011-10-10 15:54:17 +01:00
Michael Stapelberg
b9db72dc8a Implement support for startup notifications
This only sets up startup notifications for the 'exec' commands and directives.

Monitoring startups follows later.
2011-10-10 15:54:17 +01:00
Michael Stapelberg
2a29d9c2c1 Make conn_screen available outside of main()
Will be used in other parts of the code for startup notification
2011-10-10 15:54:17 +01:00
Michael Stapelberg
fb4b012013 i3bar: Bugfix: Add tray icon padding when calculating text position (Thanks Bacardi55) 2011-10-10 15:09:39 +01:00
Raphael Kubo da Costa
51116b46f1 Use $(MAKE) instead of hardcoding `make' in the Makefiles.
When one is using gmake or anything other than make itself, the same
command should be used in the Makefiles too.
2011-10-10 11:43:16 +01:00
Raphael Kubo da Costa
99825ff268 common.mk: Silence some remaining pkg-config calls.
Some pkg-config calls still didn't redirect stderr to /dev/null, causing
the gnome-config error messages to be printed.
2011-10-10 11:43:02 +01:00
Michael Stapelberg
c5e9527abc i3bar: include xcb_compat.h for older XCB versions (Thanks motif) 2011-10-10 11:37:56 +01:00
Michael Stapelberg
1942594ae9 makefile: redirect stderr to /dev/null when invoking pkg-config
This silences an error about gnome-config not being installed (pkg-config seems
to use gnome-config as a fall-back on some systems).
2011-10-09 18:35:58 +01:00
Michael Stapelberg
0f74f9b921 remove left-over type definition for mode_info 2011-10-09 18:25:21 +01:00
Michael Stapelberg
45a9eeb29d Bugfix: Don’t use a blank after comma in ldflags_for_lib calls (Thanks Raphael)
'-l foo' instead of '-lfoo' is a problem on FreeBSD.
2011-10-09 18:24:06 +01:00
Michael Stapelberg
f595347792 Merge branch 'i3bar-cleanup' into next 2011-10-09 14:45:58 +01:00
Michael Stapelberg
18991a65c7 log WM_NAME (non-utf-8 window titles) 2011-10-09 14:45:34 +01:00
Michael Stapelberg
a70e2057c8 i3bar: set WM_CLASS and WM_NAME 2011-10-09 14:45:23 +01:00
Michael Stapelberg
64a7017c32 i3bar: add modelines to all files 2011-10-09 14:28:20 +01:00
Michael Stapelberg
ea89cf179a Merge branch 'i3bar-tray-size' into next 2011-10-09 13:52:05 +01:00
Michael Stapelberg
e77f08d1fc i3bar: handle ConfigureRequests for tray children (fixes gtk3 size issue)
Thanks to yvesf for this simple python test script:

    from gi.repository import Gtk as gtk

    def cb(*a):
        print a

    def si_popup(*a):
        print a

    status_icon = gtk.StatusIcon()
    status_icon.set_from_stock(gtk.STOCK_OPEN)
    status_icon.connect("activate", cb)

    gtk.main()
2011-10-09 13:50:46 +01:00
Michael Stapelberg
b561b911ee i3bar: add modeline to src/xcb.c 2011-10-09 13:50:39 +01:00
Michael Stapelberg
29c185dd0b Move fake_configure_notify to libi3 2011-10-09 13:40:15 +01:00
Michael Stapelberg
d78a2444e5 Bugfix: make i3bar depend on libi3 2011-10-09 13:05:29 +01:00
Michael Stapelberg
dbeef95ec5 Merge remote-tracking branch 'mxf/merge' into next 2011-10-08 22:01:41 +01:00
Maik Fischer
19b13a0af5 testcases: add Makefile.PL to automatically install deps via CPAN 2011-10-08 20:58:37 +01:00
Michael Stapelberg
0a1a32e06a Fix 'make dist' 2011-10-08 19:12:28 +01:00
Michael Stapelberg
c67b1bc84f remove obsolete CMDMODE and TODO files, update LICENSE 2011-10-08 15:18:04 +01:00
Michael Stapelberg
ae1ab9eb27 tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
Michael Stapelberg
c48a092e24 testsuite: delete obsolete makefile 2011-10-08 14:30:47 +01:00
Michael Stapelberg
8724a0babf debian: add testsuite.html to i3-wm.docs 2011-10-08 13:01:43 +01:00
Michael Stapelberg
30901ccf6e docs/testsuite: s/more ugly/uglier (Thanks fernandotcl) 2011-10-06 07:58:39 +01:00
Michael Stapelberg
1688ab475a Merge branch 'testsuite' into next 2011-10-06 00:08:06 +01:00
Michael Stapelberg
1056ecc885 complete-run: eliminate dependency on EV 2011-10-05 23:52:19 +01:00
Michael Stapelberg
27a38a3917 complete-run: explicitly state why we need to overwrite SIGCHLD 2011-10-05 23:29:58 +01:00
Michael Stapelberg
3136573a70 tests: eliminate List::MoreUtils 2011-10-05 23:21:36 +01:00
Michael Stapelberg
b9224634dd tests: eliminate Try::Tiny 2011-10-05 23:21:23 +01:00
Michael Stapelberg
689f3b8cf7 tests: Eliminate IO::Scalar 2011-10-05 23:17:09 +01:00
Michael Stapelberg
b9cd9132d0 tests: remove unused Proc::Background 2011-10-05 20:48:34 +01:00
Michael Stapelberg
cdd9dc3144 docs/testsuite: explain how socket activation works in i3 2011-10-05 20:46:47 +01:00
Michael Stapelberg
cef2eb9e9a Merge branch 'testsuite' into next 2011-10-04 23:39:59 +01:00
Michael Stapelberg
bd33c09845 tests: move i3test.pm from t/lib to lib/ 2011-10-04 23:39:36 +01:00
Michael Stapelberg
57484553e6 tests: use a lot higher timeouts
This makes the tests more robust on a machine which is loaded.
Also, it makes the tests run (significantly) longer if anything goes wrong.
2011-10-04 23:36:57 +01:00
Michael Stapelberg
359717970d tests: don’t overwrite $timeout, kill timer when done 2011-10-04 23:36:43 +01:00
Michael Stapelberg
4e1d50fa3a tests: Convert all testcases to use the new launch_with_config API
It now returns a pid directly, not a Proc::Background object.
2011-10-04 23:34:23 +01:00
Michael Stapelberg
8d9b4c3c04 tests: launch_with_config: use socket activation 2011-10-04 23:33:38 +01:00
Michael Stapelberg
bf33c8d7c9 tests: SocketActivation: append to the logfile, more comments 2011-10-04 23:31:33 +01:00
Michael Stapelberg
c8d42fbabe tests: SocketActivation: only close() and dup2() if fileno(socket) != 3 2011-10-04 23:31:06 +01:00
Michael Stapelberg
6c7c4d52d0 tests: Refactor the socket activation into lib/SocketActivation.pm 2011-10-04 23:30:30 +01:00
Michael Stapelberg
a94ec5ee4e tests: re-order dependencies in complete-run, make clear which are shipped with Perl 2011-10-04 20:10:11 +01:00
Michael Stapelberg
53121c746c tests: remove unused dependency Proc::Background from complete-run 2011-10-04 20:05:12 +01:00
Michael Stapelberg
aa65b721b8 tests: eliminate dependency on the DateTime module by using POSIX::strftime 2011-10-04 20:03:08 +01:00
Michael Stapelberg
20d6ae4110 tests: make complete-run use POSIX::close(3) instead of reserving a file descriptor when starting
This makes it possible to run complete-run.pl with a "tainted" environment in
which fd 3 (and possibly others) are already present.
2011-10-04 19:58:17 +01:00
Michael Stapelberg
658bf5adff Bugfix: Warp pointer to the correct window when using the 'focus' command
Comment in the code makes the fix clear, I think.

Steps to reproduce the issue:
1) On the right monitor, open two terminals (h-split workspace)
2) 'i3 mark foo' on the right terminal
3) Focus the left terminal
4) Switch to the left monitor
5) i3 '[con_mark="foo"] focus'
6) the left window will contain the pointer (and is focused for a short period
   of time, or even permanently due to race conditions)
2011-10-03 21:54:36 +01:00
Michael Stapelberg
201268d9b2 Merge branch 'master' into next 2011-10-03 19:31:12 +01:00
Michael Stapelberg
f4877773c3 Merge branch 'fix-i3bar-man' 2011-10-03 19:31:09 +01:00
Noe Rubinstein
a5938c4073 escape font name
The double-dash gets scrambled by a2x otherwise
2011-10-03 19:30:47 +01:00
Michael Stapelberg
963c8cfb20 Merge branch 'ws_next' into next 2011-10-02 22:22:03 +01:00
Michael Stapelberg
b829fce813 Mention 'move workspace next/prev' in the userguide 2011-10-02 22:21:38 +01:00
Michael Stapelberg
32ea923721 add a test for the 'move workspace next/prev' command 2011-10-02 22:18:21 +01:00
Noe Rubinstein
1eab86b916 add "move workspace next" and "move workspace prev"
some factorization would be better here, however I don't really know my
way around bison
2011-10-02 22:03:47 +01:00
Michael Stapelberg
b2ad9a77c8 rename the internal function to _workspace_show, add a comment to workspace_show_by_name 2011-10-02 22:03:16 +01:00
Noe Rubinstein
92cc4494aa refactor workspace_show and friends 2011-10-02 21:57:00 +01:00
Michael Stapelberg
29fb09ae74 Merge branch 'msg' into next 2011-10-02 19:21:27 +01:00
Michael Stapelberg
b755397687 Make i3 send arguments as command to a running i3 instance (like i3-msg)
From i3 --help:

If you pass plain text arguments, i3 will interpret them as a command
to send to a currently running i3 (like i3-msg). This allows you to
use nice and logical commands, such as:

	i3 border none
	i3 floating toggle
	i3 kill window
2011-10-02 19:20:43 +01:00
Michael Stapelberg
4243a4053e Cleanup i3 --help 2011-10-02 18:55:15 +01:00
Michael Stapelberg
046cf99585 Move ipc_send_message and ipc_recv_message to libi3
Make i3-msg and src/ipc.c use it
2011-10-02 18:33:36 +01:00
Michael Stapelberg
ff86852453 i3-msg: use smalloc, sstrdup from libi3 2011-10-02 18:11:01 +01:00
Michael Stapelberg
501dc36b98 move sstrdup, scalloc, smalloc, srealloc to libi3, improve error messages 2011-10-02 18:09:30 +01:00
Michael Stapelberg
8f5dd749c3 Include libi3.h (Thanks fernandotcl) 2011-10-02 16:41:26 +01:00
Michael Stapelberg
e3ba716d42 Makefile: include libi3/ in 'dist' 2011-10-02 16:36:49 +01:00
Michael Stapelberg
1f7cb178f9 Merge branch 'get-socketpath' into next 2011-10-02 16:13:23 +01:00
Michael Stapelberg
23796ea900 Implement i3 --get-socketpath, useful for IPC scripts
In order to not depend on X11 just for getting the socket paths, scripts or
other programs can now use i3 --get-socketpath. Since i3 must be present on the
computer anyways, this saves one dependency :).
2011-10-02 16:12:10 +01:00
Michael Stapelberg
6af8b0941c i3-msg: use socket_path_from_x11 from libi3 2011-10-02 16:11:55 +01:00
Michael Stapelberg
094c26556e Introduce libi3, an *internal* library to eliminate code duplication 2011-10-02 16:11:30 +01:00
Michael Stapelberg
4f6e58e250 Makefiles: prefix compilation messages (for parallel builds) 2011-10-02 16:04:18 +01:00
Michael Stapelberg
e73812802c makefile: make SUBDIRS constant 2011-10-02 16:03:09 +01:00
Michael Stapelberg
679bceccc4 remove obsolete comment 2011-10-02 13:18:12 +01:00
Michael Stapelberg
3537f2d4ca Merge branch 'master' into next 2011-10-02 12:57:27 +01:00
Michael Stapelberg
454cc746d7 Merge branch 'userguide-mark' 2011-10-02 12:57:25 +01:00
Michael Walle
ba7b325469 userguide: fix typo
Signed-off-by: Michael Walle <michael@walle.cc>
2011-10-02 12:57:16 +01:00
Michael Stapelberg
0482dc7546 Merge branch 'master' into next 2011-10-01 17:44:46 +01:00
Michael Stapelberg
1f472b0962 Merge branch 'cloexec-errorlog' 2011-10-01 17:44:43 +01:00
Michael Walle
8adcf3e5d1 set close-on-exec flag on errorlogfile
Make sure the file descriptor is closed within the child after forking.

Signed-off-by: Michael Walle <michael@walle.cc>
2011-10-01 17:44:22 +01:00
Michael Stapelberg
3629934b0a Check for PCRE version and disable PCRE_UCP for <= 8.10 2011-09-30 20:31:32 +01:00
Michael Stapelberg
c0d198bbc9 Include i3-sensible-* in 'make dist' 2011-09-29 21:04:39 +01:00
Michael Stapelberg
db33da2258 Merge branch 'master' into next 2011-09-26 20:12:07 +01:00
Michael Stapelberg
6ce2f4d394 Merge branch 'fix-focus-ipc' 2011-09-26 20:12:03 +01:00
Michael Stapelberg
abaa8c2356 Bugfix: IPC: Correctly dump the 'focus' array 2011-09-26 20:11:47 +01:00
Michael Stapelberg
683bfa58d5 tests: Use AnyEvent::I3’s get_marks (requires AE::I3 >=0.08)
We also don’t bother with timeouts anymore. It’s expected to run the tests with
a sufficiently recent version of i3. The tests will just hang if it doesn’t
work.
2011-09-26 19:36:27 +01:00
Michael Stapelberg
18691b6838 Merge branch 'nagbar-wrap' into next 2011-09-25 18:47:23 +01:00
Michael Stapelberg
6420b2b102 Introduce the i3-sensible-{pager,editor,terminal} scripts
The former two provide fallbacks in case $PAGER or $EDITOR is not set (which
might be more common than you think, because they have to be set in
~/.xsession, not in the shell configuration!) while the latter tries to launch
a terminal emulator. The scripts are most prominently used in i3-nagbar, which
alerts the user when the configuration is broken for some reason. Also,
i3-sensible-terminal is used in the default configuration.

This commit does not rely on the shell supporting ${PAGER:-less} anymore, which
is not the case for 'fish'.
2011-09-25 18:46:37 +01:00
Michael Stapelberg
1675499f15 docs/testsuite: a few corrections by fernandotcl 2011-09-25 14:23:47 +01:00
Michael Stapelberg
0e8eb5747a s/This adds up quickly/Delays add up quickly (Thanks mxf) 2011-09-24 20:11:23 +01:00
Michael Stapelberg
efec744747 Merge branch 'testsuite' into next 2011-09-24 20:10:21 +01:00
Michael Stapelberg
d174ff16ed Add docs/testsuite 2011-09-24 20:10:01 +01:00
Michael Stapelberg
1eb011aae1 tests: make sure to leave no tempfiles behind 2011-09-24 16:28:21 +01:00
Michael Stapelberg
10a9d2a439 tests: Bugfix: 11-goto.t: use mktemp for generating a random mark, not base64
The base64 string could contain / and + which is treated specially since we
implemented PCRE support :)
2011-09-24 15:56:43 +01:00
Michael Stapelberg
761dac5514 tests: lib/i3test: Use //= instead of unless exists $args{key} (Thanks mxf) 2011-09-24 15:44:42 +01:00
Michael Stapelberg
378611c11c tests: refactor t/58-wm_take_focus to use wait_for_event 2011-09-24 15:38:31 +01:00
Michael Stapelberg
de5286da59 tests: lib/i3test: Remove open_standard_window, introduce open_window
open_window has a better API than open_standard_window. It uses named
parameters and supplies default values for everything you don’t specify. This
way, you can use every feature which X11::XCB::Window supports.
2011-09-24 15:11:37 +01:00
Michael Stapelberg
c3eb9f6c45 tests: complete-run: remove debugging messages 2011-09-24 13:13:26 +01:00
Michael Stapelberg
1a438f12ed tests: complete-run: display time i3 took for starting up 2011-09-24 13:13:09 +01:00
Michael Stapelberg
e244a75801 tests: complete_run: directly use X11::XCB instead of ::Connection
This saves about 0.5s wallclock time due to not starting up Moose/Mouse.
This is worthwhile when you develop a new feature and you are often invoking
complete_run for one specific test.
2011-09-24 13:09:20 +01:00
Michael Stapelberg
4da5b7e784 tests: use wait_for_{map,unmap} to eliminate more sleep()s 2011-09-24 13:08:02 +01:00
Michael Stapelberg
4821b13cae tests: lib/i3test: provide wait_for_map and wait_for_unmap
These functions should be used instead of calling wait_for_event directly when
waiting for MAP_NOTIFY or UNMAP_NOTIFY
2011-09-24 13:07:05 +01:00
Michael Stapelberg
38a9eabff1 tests: implement sync_with_i3 and use it instead of sleep()
Also use open_standard_window() in a few more places where appropriate
2011-09-24 11:15:08 +01:00
Michael Stapelberg
3167e9ad2d lib/i3test.pm: reformat exports list 2011-09-22 23:13:13 +01:00
Michael Stapelberg
1481cd95c9 Implement the I3_SYNC client protocol
This is mainly useful for the testsuite. The tests can wait until i3 processed
all X11 events and then continue. This eliminates sleep() calls which leads to
a more robust and faster testsuite.
2011-09-22 23:13:12 +01:00
Michael Stapelberg
83560c85d8 lib/i3test.pm: Don’t sleep(0.25), but wait until the window was mapped
This makes it faster and less racey
2011-09-22 23:13:12 +01:00
Michael Stapelberg
daebe28b09 Merge branch 'master' into next 2011-09-22 23:11:14 +01:00
Michael Stapelberg
30dea1fda6 Merge branch 'fix-dragging-fullscreen' 2011-09-22 23:11:11 +01:00
Yves Fischer
0c367f9e4c Skip dragging of floating cons in fullscreen mode 2011-09-22 23:10:48 +01:00
Michael Stapelberg
1717b88174 Merge branch 'master' into next 2011-09-22 20:11:44 +01:00
Michael Stapelberg
ef0f4e7299 Merge branch 'fix-close-focus' 2011-09-22 20:10:59 +01:00
Michael Stapelberg
4dbda73114 Bugfix: Correctly revert focus to other floating windows when closing a floating window
Uncovered by the testsuite \o/
2011-09-22 20:10:51 +01:00
Michael Stapelberg
143663f031 Merge branch 'master' into next 2011-09-20 22:37:08 +01:00
Michael Stapelberg
67aab7c8bd Merge branch 'fix-variables-cfg' 2011-09-20 22:37:00 +01:00
Michael Stapelberg
77ae3cd8f7 Bugfix: use bufcopy instead of buf when boundary checking (Thanks thomasba)
Also replace the useless (bufcopy + (next - bufcopy)) with next
2011-09-20 22:36:23 +01:00
Michael Stapelberg
de7c2841ed Merge branch 'master' into next 2011-09-20 21:42:51 +01:00
Michael Stapelberg
06177223e2 Merge branch 'fix-variables-cfg' 2011-09-20 21:42:48 +01:00
Michael Stapelberg
cd6c3fedcb A bit more boundary-checking when replacing variables.
Makes valgrind happy
2011-09-20 21:42:26 +01:00
Michael Stapelberg
e1949aa694 Bugfix: Correctly split key/value when parsing variables (Thanks xeen) 2011-09-20 21:42:09 +01:00
Michael Stapelberg
3073fe0bc8 update docs/multi-monitor to include the output names and refer to the force_xinerama config directive 2011-09-19 23:21:38 +01:00
Michael Stapelberg
ab04526aa1 mention the force_xinerama configfile directive in the userguide 2011-09-19 23:18:40 +01:00
Michael Walle
5aa43d61f8 Add force_xinerama configuration option
The configuration option does the same as the commandline parameter, except
it can be easily set by the user (e.g. you are using KDM and can't start a
session through ~/.xsession).

Signed-off-by: Michael Walle <michael@walle.cc>
2011-09-19 23:10:38 +01:00
Michael Stapelberg
0c51b57b99 Merge branch 'master' into next 2011-09-19 19:20:18 +01:00
Michael Stapelberg
181bd6008d Merge branch 'fix-i3bar-x11' 2011-09-19 19:20:16 +01:00
Michael Stapelberg
7064cfc2a0 i3bar: Bugfix: Check if the X11 connection is unavailable
This fixes the condition where the i3 socket for some reason did not produce an
error, but the X server exited (earlier than i3?) and the left-over i3bar
process would consume 100% CPU.

How to reproduce the problem:
1) Start ./testcases/Xdummy :8
2) Start DISPLAY=:8 i3bar -s <socket path to i3 on :0>
3) Kill the Xdummy
2011-09-19 19:17:25 +01:00
Michael Stapelberg
05c0a8985b Merge branch 'master' into next 2011-09-18 17:44:00 +01:00
Michael Stapelberg
11ab7cf32a Merge branch 'fix-focus' 2011-09-18 17:43:57 +01:00
Michael Stapelberg
2fe0949abd Bugfix: Only change focus in tree_close() when the container was focused before
Fixes: #441

I’m not sure if that’s really all there is to it. Seems a bit too simple :).
We’ll see if I missed some corner cases in the next few days…
2011-09-18 17:43:02 +01:00
Michael Stapelberg
46409ad656 Merge branch 'master' into next 2011-09-18 17:02:52 +01:00
Michael Stapelberg
1f95fbfa3e Merge branch 'fix-floating-move' 2011-09-18 17:02:49 +01:00
Michael Stapelberg
a82f5750de Bugfix: Avoid out of bounds coordinates when moving floating windows (Thanks eeemsi)
This commit makes the coordinates proportional when moving floating windows.
That is, if you have a window at the bottom of your 1920 px monitor and move it
to your 800 px monitor, it will be at the bottom of the 800 px monitor (and not
out of bounds).
2011-09-18 17:00:29 +01:00
Michael Stapelberg
14dd830270 Merge branch 'role-criterion' into next 2011-09-18 16:10:05 +01:00
Michael Stapelberg
9a76887a28 docs/userguide: document the window_role criterion 2011-09-18 16:06:52 +01:00
Michael Stapelberg
5542af316f t/65-for_window: add tests for window_role 2011-09-18 16:05:54 +01:00
Michael Stapelberg
b3adaa2983 Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446

This is handy for matching specific windows of a multi-window application, for
example only Pidgin’s buddy list window.
2011-09-18 16:05:10 +01:00
Michael Stapelberg
99168a84a9 tests: also make launch_with_config() log to LOGPATH 2011-09-18 15:35:04 +01:00
Michael Stapelberg
c88425147e Merge branch 'master' into next 2011-09-18 14:39:33 +01:00
Michael Stapelberg
254299b4cd Merge branch 'fix-output-focus' 2011-09-18 14:39:30 +01:00
Michael Stapelberg
7a2e92a116 Bugfix: Use con_orientation(). Fixes switching between different outputs
Fixes: #518

For stacking containers, direct access using con->orientation is wrong, we need
to use con_orientation().
2011-09-18 14:38:39 +01:00
Michael Stapelberg
5c57e205f0 Merge branch 'i3-input-fmt' into next 2011-09-18 13:58:08 +01:00
Michael Stapelberg
12e096cf73 i3-input: update manpage 2011-09-18 13:57:39 +01:00
Michael Stapelberg
1737a78fcd i3-input: implement -F (format) option, deprecate -p (prefix)
This introduces the '-F format' parameter, which takes a format and replaces %s
in it with the user input. An example: The user should enter the target
workspace name. The appropriate i3-input invocation looks like this:

    i3-input -F 'workspace "%s"' -P 'Switch to workspace: '
2011-09-18 13:51:11 +01:00
Michael Stapelberg
fddee471e8 i3-input: add missing \n in --help 2011-09-18 13:21:45 +01:00
Michael Stapelberg
46ab86b88d i3-input: reformat main.c 2011-09-18 13:20:59 +01:00
Michael Stapelberg
0bc44ffc37 Merge branch 'master' into next 2011-09-18 00:40:42 +01:00
Michael Stapelberg
b9053c6f8f Merge branch 'fix-floating-move' 2011-09-18 00:40:39 +01:00
Peter Bui
a5012f6021 fix-bug-515: always adjust floating position when moving to another output
Floating con position needs to be adjusted when moving to another
output, regardless of whether or not the target workspace is visible.
2011-09-18 00:38:32 +01:00
Michael Stapelberg
b4ab4703c9 Merge branch 'master' into next 2011-09-17 20:55:13 +01:00
Michael Stapelberg
1fbe070f03 Merge branch 'fix-warp-same' 2011-09-17 20:55:10 +01:00
Michael Stapelberg
755c618cd4 Bugfix: Don’t warp the pointer if it already is on the target output (Thanks cls, pnutzh4x0r)
My testcase was putting a floating window on the left output, but overlapping a
little to the right output. Then switch to a workspace on the right output.
2011-09-17 20:53:24 +01:00
Michael Stapelberg
4dc0a86faf Merge branch 'floating-focus' into next 2011-09-17 19:29:52 +01:00
Michael Stapelberg
c8c95030ad tests: extend t/35-floating-focus to use focus left/right on floating windows 2011-09-17 19:29:23 +01:00
Michael Stapelberg
e6a854a742 Remove obsolete code for floating focus 2011-09-17 19:29:06 +01:00
Michael Stapelberg
172f3563f7 Implement focus switching (focus left/right) for floating windows
Fixes: #475
2011-09-17 19:28:41 +01:00
Michael Stapelberg
fe35c80741 Also make compilation possible on systems with libev 3
From the source:

    We need ev >= 4 for the following code. Since it is not *that* important
    (it only makes sure that there are no i3-nagbar instances left behind) we
    still support old systems with libev 3.
2011-09-17 17:55:36 +01:00
Michael Stapelberg
85063124a1 document the dependency on libev >=4.0 for ev_cleanup (Thanks phnom)
libev 4.00 was released 2010-10-25, so nearly a year ago.
2011-09-17 17:49:12 +01:00
Michael Stapelberg
7a38d8ac56 Merge branch 'master' into next 2011-09-17 14:13:05 +01:00
Michael Stapelberg
18129cf0b0 Merge branch 'fix-float-size' 2011-09-17 14:12:47 +01:00
Michael Stapelberg
7a43af04af Tests: fix floating size, add a test to check floating size when starting in tiling 2011-09-17 14:12:16 +01:00
Michael Stapelberg
deab3ac338 Send the correct X11 border_width in faked ConfigureNotifys 2011-09-17 14:11:55 +01:00
Michael Stapelberg
f2f636f9e7 Bugfix: Honor the X11 window border in ConfigureRequests 2011-09-17 14:11:01 +01:00
Michael Stapelberg
983a679537 Bugfix: Honor the X11 window border when calculating dimensions for floating windows 2011-09-17 14:10:35 +01:00
Michael Stapelberg
f6eaa8a580 Bugfix: Don’t use top border height twice when calculating dimensions for floating windows 2011-09-17 14:09:57 +01:00
Michael Stapelberg
5a85c9efd2 fix build in 'next' (Thanks thomasba) 2011-09-14 23:16:23 +01:00
Michael Stapelberg
ad568aa8c1 Merge branch 'master' into next 2011-09-14 23:00:02 +01:00
Michael Stapelberg
1e18952d09 Merge branch 'fix-floating-confreq' 2011-09-14 22:59:59 +01:00
Michael Stapelberg
b1aa8107b3 Bugfix: Correctly handle ConfigureRequests for floating windows in multi-monitor setups (Thanks thomasba)
Fixes #519
2011-09-14 22:59:19 +01:00
Michael Stapelberg
6b541d382b Bugfix: Don’t fix floating coordinates when reassigning (fixes flickering)
This fixes flickering when moving floating windows between different monitors.
2011-09-14 22:58:51 +01:00
Michael Stapelberg
355082a74c Merge branch 'fix-reload-assignments' into next 2011-09-11 23:42:12 +01:00
Michael Stapelberg
dc790cfa32 Bugfix: Correctly free old assignments when reloading
Fixes #516
2011-09-11 23:41:46 +01:00
Michael Stapelberg
f3716e45cf re-indent load_configuration() 2011-09-11 23:31:06 +01:00
Michael Stapelberg
095970b67e update changelog (no, not releasing anytime soon) 2011-09-11 23:19:59 +01:00
Michael Stapelberg
2c7148c46e Same bugfix as 2a215fd, but for assignments with invalid criteria 2011-09-11 22:54:41 +01:00
Michael Stapelberg
717ae819c5 Merge branch 'master' into next 2011-09-11 22:52:44 +01:00
Michael Stapelberg
67cf46fa62 Merge branch 'fix-empty-criteria' 2011-09-11 22:52:41 +01:00
Michael Stapelberg
2a215fd7e2 Bugfix: Ignore for_window commands with empty (invalid) criteria (+test) (Thanks aksr) 2011-09-11 22:52:33 +01:00
Michael Stapelberg
a41bfba47a finally remove the deprecated 'screen' keyword from cfgparse.l 2011-09-11 22:27:31 +01:00
Michael Stapelberg
2ef54057e6 Merge branch 'new-assign' into next 2011-09-11 22:15:51 +01:00
Michael Stapelberg
24dbddc395 docs/userguide: fix the for_window syntax 2011-09-11 22:15:14 +01:00
Michael Stapelberg
332476cf0e docs/userguide: document the new assign syntax 2011-09-11 22:15:05 +01:00
Michael Stapelberg
d82698efa7 make the old assign syntax trigger an i3-nagbar warning (it’s deprecated), adjust test 2011-09-11 22:01:36 +01:00
Michael Stapelberg
e47e100819 Introduce a new syntax for the 'assign' command:
Instead of using a quoted string to specify the class / title, the assign
command now uses criteria, just like the for_window command or the command
scopes.

An example comes here:

    # Assign all Chromium windows (including popups) to workspace 1: www
    assign [class="^Chromium$"] → 1: www

    # Make the main browser window borderless
    for_window [class="^Chromium$" title=" - Chromium$"] border none

This gives you more control over the matching process due to various reasons:

1) Criteria work case-sensitive by default. Use the (?i) option if you want a
   case-insensitive match, like this:
   assign [class="(?i)^ChroMIUM$"] → 1

2) class and instance of WM_CLASS can now be matched separately. For example,
   when starting urxvt -name irssi, xprop will report this:
   WM_CLASS(STRING) = "irssi", "URxvt"
   The first part of this is the instance ("irssi"), the second part is the
   class ("URxvt").
   An appropriate assignment looks like this:
   assign [class="^URxvt$" instance="irssi"] → 2

3) You can now freely use a forward slash (/) in all strings since that is no
   longer used to separate class from title (in-band signaling is bad, mhkay?).
2011-09-11 21:54:13 +01:00
Michael Stapelberg
d03dffe012 Kill left-over i3-nagbar processes on 'exit' 2011-09-11 21:49:35 +01:00
Michael Stapelberg
9b671bda83 docs/userguide: provide an example of case-insensitive matching with PCRE (Thanks stfn) 2011-09-11 21:17:13 +01:00
Michael Stapelberg
b3e1fb1f3b Make the old 'assign' case-insensitive again (+test) (Thanks aksr) 2011-09-11 21:16:45 +01:00
Michael Stapelberg
67cf37ce66 Merge branch 'pcre' into next 2011-09-11 11:41:29 +01:00
Michael Stapelberg
c1c1730516 pcre: enable UCP, UTF-8 (if available), extend t/19-match 2011-09-11 11:40:51 +01:00
Michael Stapelberg
1a91c695e7 mention PCRE in docs/userguide 2011-09-11 11:10:09 +01:00
Michael Stapelberg
8f0e0dee58 debian: add libpcre3-dev as build-dependency 2011-09-10 23:56:23 +01:00
Michael Stapelberg
430dadfa34 document the new dependency on libpcre in the DEPENDS file 2011-09-10 23:55:49 +01:00
Michael Stapelberg
2fc54aadf1 Implement support for PCRE regular expressions for all criteria (for_window, commands, assignments) 2011-09-10 23:53:11 +01:00
Michael Stapelberg
8e04867e51 extend t/19-match to also test regular expressions 2011-09-10 23:52:39 +01:00
Michael Stapelberg
32ad9f7e3a i3-msg: include newline at the end of the reply 2011-09-05 22:55:31 +02:00
Michael Stapelberg
71b4fe9e60 Merge branch 'clean-resize' into next 2011-09-05 22:36:45 +02:00
Michael Stapelberg
77ae771476 Restrict 'resize' command to left/right for horizontal cons, up/down for vertical cons
This makes the interface much clearer and avoids confusion about which key to
press in which situation.
2011-09-05 22:36:04 +02:00
Michael Stapelberg
0a42a16429 Merge branch 'fix-wsnum' into next 2011-09-05 22:25:48 +02:00
Michael Stapelberg
bf4d166330 extend t/17-workspace.t to check if the numbers are assigned correctly 2011-09-05 22:24:28 +02:00
Michael Stapelberg
8928b5f55d Bugfix: Correctly handle workspace names which do not start with a zero 2011-09-05 22:21:10 +02:00
Michael Stapelberg
b4809e9ba7 Merge branch 'master' into next 2011-08-31 14:45:14 +02:00
Michael Stapelberg
a65b5fd910 Merge branch 'fix-leaks' 2011-08-31 14:45:11 +02:00
Michael Stapelberg
e1631d6320 properly free memory/close fd upon errors (Thanks xeen)
Found with the static analyzer cppcheck
2011-08-31 14:44:48 +02:00
Michael Stapelberg
c3d0957efd Merge branch 'master' into next 2011-08-29 16:05:11 +02:00
Michael Stapelberg
69dc632a4e Merge branch 'fix-userguide' 2011-08-29 16:05:08 +02:00
Michael Stapelberg
1aa7eeb700 docs/userguide: state that mod+shift+space toggles, add link to criteria in for_window (Thanks Don) 2011-08-29 16:04:42 +02:00
Michael Stapelberg
1a34d250bb Merge branch 'master' into next 2011-08-29 15:17:53 +02:00
Michael Stapelberg
04a886e4ee Merge branch 'fix-borderless' 2011-08-29 15:17:50 +02:00
Michael Stapelberg
640071163f docs/userguide: new_window: s/borderless/none/ (Thanks bjonnh) 2011-08-29 15:17:31 +02:00
Michael Stapelberg
a4804a53b8 Merge branch 'master' into next 2011-08-28 20:18:03 +02:00
Michael Stapelberg
79802cf824 debian: bump version so that apt prefers source builds over debian repository versions 2011-08-28 20:17:38 +02:00
Michael Stapelberg
abafb2b235 Merge branch 'master' into next 2011-08-28 20:07:29 +02:00
Michael Stapelberg
0b2e974893 Merge branch 'release-4.0.2' 2011-08-28 20:07:26 +02:00
Michael Stapelberg
cd9056afc7 debian: wrap debian/control correctly 2011-08-28 19:56:46 +02:00
Michael Stapelberg
f7b23e3a41 bump version number in man/asciidoc.conf 2011-08-28 19:47:03 +02:00
Michael Stapelberg
042d60c9e6 add release notes for v4.0.2 2011-08-28 19:17:43 +02:00
Michael Stapelberg
8b0fecf559 debian: update changelog for the 4.0.2 release 2011-08-28 19:09:57 +02:00
Michael Stapelberg
44ae1b50ef Merge branch 'fix-wsnum' into next 2011-08-28 18:17:25 +02:00
Michael Stapelberg
dfda878272 Bugfix: Correctly assign a number to workspaces starting with '0: ' (Thanks SardemFF7) 2011-08-28 18:17:02 +02:00
Michael Stapelberg
e7d6cd0f1c Merge branch 'master' into next 2011-08-28 18:03:06 +02:00
Michael Stapelberg
17c0ec19b2 Merge branch 'userguide' 2011-08-28 18:03:03 +02:00
Michael Stapelberg
5796f72885 docs/userguide: properly document command chaining and criteria 2011-08-28 18:02:49 +02:00
Michael Stapelberg
e5f10022e7 docs/userguide: properly document the resize command 2011-08-28 17:51:37 +02:00
Michael Stapelberg
aa65b507ad Merge branch 'master' into next 2011-08-28 17:44:59 +02:00
Michael Stapelberg
1d83e776f1 Merge branch 'fix-urls' 2011-08-28 17:44:57 +02:00
Mark Kusch
1953f2c707 s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
Michael Stapelberg
57e7266da4 Merge branch 'master' into next 2011-08-28 17:41:23 +02:00
Michael Stapelberg
3950aa730c Merge branch 'fix-ipc-name' 2011-08-28 17:40:15 +02:00
Peter Bui
6e59d693d2 Use name_json if available, rather than non-descriptive name. 2011-08-28 17:36:16 +02:00
Michael Stapelberg
f0a0236b7b Merge branch 'master' into next 2011-08-28 17:02:19 +02:00
Michael Stapelberg
833e4233fc Merge branch 'migrate-indention' 2011-08-28 17:02:17 +02:00
Michael Stapelberg
96b219f27b migrate-config: use \s, be a bit more whitespace tolerant (+test) (Thanks sbedivere)
Fixes: #457
2011-08-28 17:01:59 +02:00
Michael Stapelberg
6037050015 Merge branch 'master' into next 2011-08-28 16:18:24 +02:00
Michael Stapelberg
b76b9be75a Merge branch 'wizard-fix-mods' 2011-08-28 16:18:21 +02:00
Michael Stapelberg
0dc11b5d22 i3-config-wizard: Bugfix: Check the modifier mapping to decide whether to use Mod1 or Mod4
Fixes #491

Before, we assumed XK_Alt_L was in Mod1 and XK_Super_L was in Mod4 (which is
true on most systems). Now we just check if the keycode is in Mod1 or Mod4 and
write the config accordingly.
2011-08-28 16:16:53 +02:00
Michael Stapelberg
16188af8bf Merge branch 'master' into next 2011-08-28 15:47:35 +02:00
Michael Stapelberg
c96b5a12a7 Merge branch 'fix-floatdock' 2011-08-28 15:47:31 +02:00
Michael Stapelberg
5618875df8 Bugfix: Make 'floating enable' check for dock windows (Thanks edelkind)
Fixes #501
2011-08-28 15:46:50 +02:00
Michael Stapelberg
0b0a2dad51 t/66-assign: check if i3 crashes when assigning a dock window to floating 2011-08-28 15:43:51 +02:00
Michael Stapelberg
f269d85232 Merge branch 'master' into next 2011-08-28 14:55:17 +02:00
Michael Stapelberg
3380f76310 Merge branch 'userguide-wrapping' 2011-08-28 14:55:14 +02:00
Michael Stapelberg
c846ff272f docs/userguide: document force_focus_wrapping config directive 2011-08-28 14:54:58 +02:00
Michael Stapelberg
61cbf7a658 Merge branch 'colors-userguide' into next 2011-08-27 16:47:53 +02:00
Michael Stapelberg
808491a020 Merge branch 'colors-userguide' 2011-08-27 16:47:49 +02:00
Michael Stapelberg
30c892adf4 docs/userguide: use the default colors in the colors example 2011-08-27 16:47:36 +02:00
Michael Stapelberg
057e0e9794 Merge branch 'master' into next 2011-08-27 15:28:34 +02:00
Michael Stapelberg
47ae4d4f66 Merge branch 'fix-userguide' 2011-08-27 15:28:31 +02:00
Michael Stapelberg
2d627ad9de docs/userguide: s/mod+h/mod+s for stacking (Thanks Tim) 2011-08-27 15:28:11 +02:00
Michael Stapelberg
8114ecda47 Merge branch 'master' into next 2011-08-27 13:47:57 +02:00
Michael Stapelberg
9e46f7bd8f Merge branch 'fix-dock-reconfigure' 2011-08-27 13:47:51 +02:00
Michael Stapelberg
e97a7e34f7 Bugfix: Re-implement reconfiguring height of dock windows (+test) (Thanks thomasba) 2011-08-27 13:47:10 +02:00
Michael Stapelberg
6c42a179ec Merge branch 'master' into next 2011-08-27 13:03:20 +02:00
Michael Stapelberg
05d10fdb2c Merge branch 'fix-focus-assign' 2011-08-27 13:03:17 +02:00
Michael Stapelberg
4c01dbd726 Bugfix: Don’t always focus floating windows (fixes focus stealing with assignments) (+test) (Thanks aksr) 2011-08-27 13:02:44 +02:00
Michael Stapelberg
4cb95b3ab3 Merge branch 'fix-yajl-warning' into next 2011-08-26 23:33:40 +02:00
stfn
8e8b9b93f4 ipc.c: Fix warning 2011-08-26 23:33:11 +02:00
Michael Stapelberg
7d2978ead4 Merge branch 'master' into next 2011-08-26 19:18:16 +02:00
Michael Stapelberg
ffb5c7d50c Merge branch 'fix-move-focus' 2011-08-26 19:18:13 +02:00
Michael Stapelberg
f53f954a33 Bugfix: Re-enable X11 Eventmask *after* pushing all the X11 changes
This should fix focus problems where EnterNotify events were generated while
moving windows. Hopefully it does not trigger any regressions :).

Fixes #500
2011-08-26 19:17:52 +02:00
Michael Stapelberg
afff328c59 Merge branch 'master' into next 2011-08-26 12:37:04 +02:00
Michael Stapelberg
fdc4413c46 Merge branch 'fix-duplicate-ws-assign' 2011-08-26 12:37:00 +02:00
Michael Stapelberg
12e15609ef Bugfix: Correctly recognize duplicate workspace assignments (Thanks Moredread)
Example of a faulty config:

    workspace 5 VGA1
    workspace 5 LVDS1

Fixes #498, #499
2011-08-26 12:35:42 +02:00
Michael Stapelberg
6fdb2c0df2 Merge branch 'master' into next 2011-08-26 03:33:36 +02:00
Michael Stapelberg
a96a2d243c update changelog (not releasing yet) 2011-08-26 03:33:26 +02:00
Michael Stapelberg
53a9ace3a6 Merge branch 'master' into next 2011-08-26 03:24:14 +02:00
Michael Stapelberg
ed6f5d214c Merge branch 'fix-warning' 2011-08-26 03:24:10 +02:00
Michael Stapelberg
7bf465af9f Fix prototype of con_inside_focused 2011-08-26 03:23:57 +02:00
Michael Stapelberg
a57a2b9ccb Merge branch 'master' into next 2011-08-26 03:18:16 +02:00
Michael Stapelberg
0b7e6d44b3 Merge branch 'fix-focus-parent' 2011-08-26 03:18:12 +02:00
Michael Stapelberg
7fca7f029f Correctly render containers when a split container is focused 2011-08-26 03:17:41 +02:00
Michael Stapelberg
6d91a6248e Merge branch 'master' into next 2011-08-26 02:02:50 +02:00
Michael Stapelberg
194c220508 Merge branch 'fix-assign' 2011-08-26 02:02:47 +02:00
Michael Stapelberg
7741608a9d Bugfix: Only consider tiling windows when attaching tiling windows to workspaces (Thanks Tucos)
Fixes #436
2011-08-26 02:01:06 +02:00
Michael Stapelberg
6e6eb407e0 Merge branch 'master' into next 2011-08-26 01:20:18 +02:00
Michael Stapelberg
f86ac3534e Merge branch 'wizard-click' 2011-08-26 01:20:14 +02:00
Michael Stapelberg
3fda67f5e5 i3-config-wizard: handle mouse button clicks on <win> and <alt> 2011-08-26 01:19:46 +02:00
Michael Stapelberg
4984b81282 Merge branch 'master' into next 2011-08-25 21:59:19 +02:00
Michael Stapelberg
a153311040 Merge branch 'fix-set-tabs' 2011-08-25 21:59:15 +02:00
Michael Stapelberg
f06059ec94 Bugfix: Accept '\t' in the 'set' command, don’t die but ELOG in case of errors (Thanks atsutane) 2011-08-25 21:58:03 +02:00
Michael Stapelberg
c7ac1f9077 Merge branch 'master' into next 2011-08-25 18:51:02 +02:00
Michael Stapelberg
b7a3d8505b Merge branch 'fix-i3bar-input' 2011-08-25 18:50:58 +02:00
Michael Stapelberg
39cff5c31f i3bar: Bugfix: When receiving EOF, immediately redraw and discard input 2011-08-25 18:46:08 +02:00
Michael Stapelberg
9c587a767c Bugfix: set statusline = NULL, print error messages about EOF/SIGCHLD to stderr (Thanks cls) 2011-08-25 17:10:45 +02:00
Michael Stapelberg
e411223f8b Merge branch 'master' into next 2011-08-25 14:11:51 +02:00
Michael Stapelberg
461e7ef505 Merge branch 'fix-userguide-namedws' 2011-08-25 14:11:48 +02:00
Michael Stapelberg
ca77646de6 docs/userguide: add paragraph about named workspaces, discourage use of 'ipc-socket' 2011-08-25 14:11:31 +02:00
Michael Stapelberg
4fcca74e2b Merge branch 'master' into next 2011-08-25 00:24:12 +02:00
Michael Stapelberg
1d6e41e493 Merge branch 'fix-deco-1pixel' 2011-08-25 00:24:09 +02:00
Michael Stapelberg
4f22e12c5c Bugfix: Correctly render non-leaf containers (Thanks eeemsi, mseed)
Fixes #465
2011-08-25 00:23:33 +02:00
Michael Stapelberg
2acbf4d4a4 Compilation fix: Add dont_warp=false 2011-08-24 23:06:49 +02:00
Michael Stapelberg
75c11cb894 Merge branch 'master' into next 2011-08-24 23:00:12 +02:00
Michael Stapelberg
53cec79181 Merge branch 'fix-move-float-output' 2011-08-24 23:00:03 +02:00
Michael Stapelberg
698d97cd02 Bugfix: Correctly warp floating windows when using the 'move' command 2011-08-24 22:59:46 +02:00
Michael Stapelberg
cd2d7ef484 Bugfix: Correctly keep focus when moving non-leaf windows 2011-08-24 22:55:56 +02:00
Michael Stapelberg
1d9a2abc05 Bugfix: Fix coordinates when moving a floating window to a different output 2011-08-24 22:54:10 +02:00
Michael Stapelberg
37a40671c9 Merge branch 'master' into next 2011-08-24 22:43:31 +02:00
Michael Stapelberg
3690bc6eef Merge branch 'fix-floating-negative' 2011-08-24 22:43:25 +02:00
Michael Stapelberg
62e9eab4e5 Merge branch 'master' into next
Conflicts:
	src/floating.c
2011-08-24 22:43:15 +02:00
Michael Stapelberg
7558c1ddbd Bugfix: Correctly handle current_output == NULL
Fixes t/66-assign.t
2011-08-24 22:41:17 +02:00
Michael Stapelberg
f26dd1a7b1 Merge branch 'fix-floating-centering' 2011-08-24 22:27:59 +02:00
Peter Bui
a33bfa81d2 Move centering code to before sanity check 2011-08-24 22:27:15 +02:00
Michael Stapelberg
eacbf986a0 Merge branch 'master' into next 2011-08-24 18:49:40 +02:00
Michael Stapelberg
4021c54b93 Merge branch 'fix-i3bar-cutoff' 2011-08-24 18:49:37 +02:00
Michael Stapelberg
7af39906da i3bar: Bugfix: Correctly allocate pixmap for statuslines which are longer than your screen
In case of a 1024 px screen and a 1128 px status line, the status line was not
only cut off (it has to be, obviously), but the right part showed some black
pixels.
2011-08-24 18:48:29 +02:00
Michael Stapelberg
0e46f17fff Merge branch 'master' into next 2011-08-24 18:25:16 +02:00
Michael Stapelberg
6bcc670257 update changelog (not releasing yet) 2011-08-24 18:24:59 +02:00
Michael Stapelberg
c527497a4b Merge branch 'master' into next 2011-08-24 16:58:47 +02:00
Michael Stapelberg
b31948aecb Merge branch 'fix-assign-screen' 2011-08-24 16:58:43 +02:00
Michael Stapelberg
247e115835 Bugfix: Correctly place floating windows on their appropriate output (Thanks kraM)
Fixes #452

This might also fix problems with Firefox where Firefox only displays a white
window (my guess is that it mapped a floating window outside of the actually
visible area for some reason).
2011-08-24 16:57:35 +02:00
Michael Stapelberg
ff85023b08 Merge branch 'master' into next 2011-08-24 15:14:53 +02:00
Michael Stapelberg
63fff5a4e1 Merge branch 'fix-resize-in-con' 2011-08-24 15:14:50 +02:00
Michael Stapelberg
0d35feb71b Bugfix: Make the 'resize' command work inside tabbed/stacked cons (+test) (Thanks sbedivere)
Fixes #461
2011-08-24 15:14:04 +02:00
Michael Stapelberg
27ade541a9 Initialize output (fixes compiler warning) 2011-08-24 01:34:56 +02:00
Michael Stapelberg
1f028a72b8 Merge branch 'i3bar-systray' into next 2011-08-24 01:18:55 +02:00
Michael Stapelberg
06ba1c0e65 Fix compilation with xcb 0.3.6 2011-08-24 01:18:27 +02:00
Michael Stapelberg
1c2c22d117 i3bar: properly end the XEMBED protocol by reparenting the dock clients to root, flush connection before disconnecting 2011-08-24 01:18:27 +02:00
Michael Stapelberg
bd2a3363c0 i3bar: tray: little cleanups, more comments 2011-08-24 01:18:27 +02:00
Michael Stapelberg
55e503c17b i3bar: request the appropriate _NET_SYSTEM_TRAY atom for the display we are running on 2011-08-24 01:18:27 +02:00
Michael Stapelberg
893878cbcc i3bar: send XEMBED_EMBEDDED_NOTIFY after reparenting/mapping tray clients 2011-08-24 01:18:27 +02:00
Michael Stapelberg
737cd10bdf i3bar: properly handle the _XEMBED_INFO property 2011-08-24 01:18:27 +02:00
Michael Stapelberg
7df43989c9 i3bar: correctly handle multiple tray clients 2011-08-24 01:18:27 +02:00
Michael Stapelberg
2046e4112f i3bar: Correctly handle removal of tray clients 2011-08-24 01:18:27 +02:00
Michael Stapelberg
6efa7a754d i3bar: trigger an update after docking a new client 2011-08-24 01:18:27 +02:00
Michael Stapelberg
025dd68f62 i3bar: quick & dirty systray implementation
Works correctly only with exactly one dock client on exactly one output. Maybe
not even then. You have been warned. Proof-of-concept code ;).
2011-08-24 01:18:26 +02:00
Michael Stapelberg
642a745004 Merge branch 'master' into next 2011-08-24 00:57:36 +02:00
Michael Stapelberg
16f9c9aee7 Merge branch 'fix-focustoggle' 2011-08-24 00:57:32 +02:00
Michael Stapelberg
b8a656bca7 Add test for the 'focus mode_toggle' issue (#487) 2011-08-24 00:57:25 +02:00
Michael Stapelberg
0848844f2d Bugfix: Fix 'focus mode_toggle' on an empty workspace (Thanks BeF)
Fixes #487
2011-08-24 00:55:11 +02:00
Michael Stapelberg
b28457f663 Merge branch 'master' into next 2011-08-23 21:32:56 +02:00
Michael Stapelberg
3f147b77ab Merge branch 'fix-path' 2011-08-23 21:32:24 +02:00
Michael Stapelberg
9f9fc82cc6 Don’t use absolute paths in the default config (Thanks cls)
Fixes #489
2011-08-23 21:30:09 +02:00
Michael Stapelberg
cc2ca32b13 Merge branch 'master' into next 2011-08-22 12:44:58 +02:00
Michael Stapelberg
df076113a6 debian: s/dwm-tools/suckless-tools (Thanks sur5r) 2011-08-22 12:44:44 +02:00
Michael Stapelberg
2cd8231fce Merge branch 'master' into next 2011-08-20 17:48:49 +02:00
Michael Stapelberg
e0d7ce1232 Merge branch 'fix-querypointer' 2011-08-20 17:48:39 +02:00
Michael Stapelberg
f15559eb1f Don’t die, but ELOG and fallback when the pointer cannot be queried (Thanks Niklas) 2011-08-20 17:48:07 +02:00
Michael Stapelberg
22e30061f3 Merge branch 'master' into next 2011-08-17 16:37:09 +02:00
Michael Stapelberg
0f077f1dbf Merge branch 'fix-assignfocus' 2011-08-17 16:37:05 +02:00
Michael Stapelberg
f172359ba5 Bugfix: Don’t change focus when assigned windows start on invisible workspaces (+test) (Thanks ioflag)
Fixes #468
2011-08-17 16:36:19 +02:00
Michael Stapelberg
1779719b80 Merge branch 'move-output' into next 2011-08-17 16:13:11 +02:00
Michael Stapelberg
ec317e78c1 use 'break' instead of 'return', the generated code will end up in a switch statement 2011-08-17 16:12:48 +02:00
Peter Bui
7ddba4995f BUG-396: Implement move output <RANDR-OUTPUT> command
Also add support for move output <up|down|left|right> and update
userguide about the new command.
2011-08-17 16:10:11 +02:00
Michael Stapelberg
06ef7f72e4 Merge branch 'master' into next 2011-08-17 13:44:01 +02:00
Michael Stapelberg
f3cfd3fce3 update changelog (not releasing yet) 2011-08-17 13:43:47 +02:00
Michael Stapelberg
4cf2cab626 Merge branch 'master' into next 2011-08-17 13:37:33 +02:00
Michael Stapelberg
84afc79e0b Merge branch 'fix-startfocus' 2011-08-17 13:37:30 +02:00
Michael Stapelberg
09ad9808f6 Bugfix: Set focus to where the mouse pointer is when starting (Thanks nutron)
Fixes #477
2011-08-17 13:37:08 +02:00
Michael Stapelberg
2eab8d7f20 Merge branch 'master' into next 2011-08-17 12:29:15 +02:00
Michael Stapelberg
4f0a3fd1ba Merge branch 'fix-wsnext' 2011-08-17 12:29:12 +02:00
Michael Stapelberg
7c6f693c8a Bugfix: Don’t consider the workspace next/prev command when looking for named workspaces
Fixes #469
2011-08-17 12:28:45 +02:00
Michael Stapelberg
7eacf8dd04 Merge branch 'master' into next 2011-08-17 12:17:29 +02:00
Michael Stapelberg
13ecbf43c9 Merge branch 'fix-verbose' 2011-08-17 12:17:26 +02:00
Michael Stapelberg
22882f4e89 Bugfix: Initialize verbose to 'false' (Thanks tilman)
Verbosity was set to 'true' when we started the tree branch.
We forgot to set it back to 'false' :-).
2011-08-17 12:16:32 +02:00
Michael Stapelberg
7a22bd1cf3 Merge branch 'master' into next 2011-08-17 12:14:17 +02:00
Michael Stapelberg
336ce56cf3 Merge branch 'fix-warping' 2011-08-17 12:14:03 +02:00
Peter Bui
36224f86d1 Only warp pointer once during x_push_changes()
- Introduce warp_to static variable in x.c that stores the coordinates
  to warp to as a Rect.

- Add x_set_warp_to function to set this variable.  Use in _tree_next,
  workspace_show, and con_move_to_workspace.

- In x_push_chanages, if warp_to is set, then call xcb_warp_pointer_rect
  and then reset it to NULL.

This fixes all know bugs for pointer warping for me.
2011-08-17 12:12:40 +02:00
Michael Stapelberg
2abe23d6ff Merge branch 'master' into next 2011-08-17 01:52:45 +02:00
Michael Stapelberg
637d2a3d62 Merge branch 'use-xcb-atoms' 2011-08-17 01:52:41 +02:00
Michael Stapelberg
7951445849 xcb: use predefined XCB_ATOM_ atoms, don’t request them 2011-08-17 01:41:19 +02:00
Michael Stapelberg
2f116df901 Merge branch 'master' into next 2011-08-12 23:11:13 +02:00
Michael Stapelberg
c8e6de1382 Merge branch 'i3bar-fixes' 2011-08-12 23:10:21 +02:00
Michael Stapelberg
dddce72bd7 little comment spelling fixes 2011-08-12 23:09:59 +02:00
Michael Stapelberg
72ef8a7c19 Pass NULL to XkbOpenDisplay, it will read $DISPLAY itself 2011-08-12 23:09:36 +02:00
Michael Stapelberg
3892d616cf Bugfix: Use correct buffer size, quote workspace names
This fixes problems with the workspace 'next' and workspace names longer than
40 characters
2011-08-12 22:57:02 +02:00
Axel Wagner
4e0ccbf57b Merge branch 'i3bar_fix_tabs' into next 2011-08-12 18:44:36 +02:00
Axel Wagner
7cb7700b02 i3bar: Fixup indentions 2011-08-12 18:43:09 +02:00
Michael Stapelberg
d3efa73dd7 Merge branch 'master' into next 2011-08-11 22:22:44 +02:00
Michael Stapelberg
79479617c7 Merge branch 'warp-pointer' 2011-08-11 22:22:36 +02:00
Valentin Voigt
bf0c67b2af Warp cursor when changing workspace. 2011-08-11 22:13:50 +02:00
Axel Wagner
9ccb3987ad Merge branch 'master' into next 2011-08-10 23:56:16 +02:00
Axel Wagner
318dfce42f Merge branch 'i3bar_warning_fix' 2011-08-10 23:55:20 +02:00
Axel Wagner
94d55f34e1 i3bar: Fix prototypes (thx sECuRE) 2011-08-10 23:54:27 +02:00
Michael Stapelberg
3af7692a92 Merge branch 'tests-optimize' into next 2011-08-10 15:57:28 +02:00
Michael Stapelberg
5524785877 testsuite: eliminate sleep, wait until i3 replies via IPC 2011-08-10 15:56:39 +02:00
Michael Stapelberg
10f871b57b implement "socket activation": passing IPC sockets to i3 2011-08-10 15:55:27 +02:00
Michael Stapelberg
016ecb65fb Merge branch 'master' into next 2011-08-09 10:02:55 +02:00
Michael Stapelberg
6b1dce27f7 Merge branch 'fix-moving-focus' 2011-08-09 10:02:51 +02:00
Peter Bui
d8cf36ce83 Fix two focus issues when switching/moving workspaces
1. Fix focus when moving to same workspace.

If we have a single window on a workspace and we switch to the same
worksapce, focus_next will be the workspace container, rather than the
current window, so simply call con_descend_focused to ensure we set the
focus to a window.

2. Fix focus when moving a container to a visible workspace.

Call workspace_show before we attaching to new visible workspace, so we
don't get in the weird situation where target workspace has focused
window, but it isn't considered focused.
2011-08-09 10:01:08 +02:00
Michael Stapelberg
f8d834c62d Merge branch 'master' into next 2011-08-09 09:47:10 +02:00
Michael Stapelberg
042b10e068 Merge branch 'fix-resize' 2011-08-09 09:47:06 +02:00
Michael Stapelberg
98cc37e223 swap up/down, also modify the testcase 2011-08-09 09:46:02 +02:00
Peter Bui
3316d8b8ba Resize uses up and down, not bottom and top
- Fix userguide resize example
- Update migration script
2011-08-09 09:42:36 +02:00
Michael Stapelberg
639a4baf7b Merge branch 'new-new_float' into next 2011-08-09 09:30:12 +02:00
Michael Stapelberg
74687fa97c tests: add t/74-border-config which checks new_window and new_float 2011-08-09 09:29:59 +02:00
Mateusz Poszwa
42db9de7ec Add new_float config option.
This option sets the default border style for containers automatically put into floating mode.

Fixes #264
2011-08-09 09:29:53 +02:00
Mateusz Poszwa
cd5ebc2dca src/manage.c: properly set automatic flag when calling floating_enable() 2011-08-09 09:29:47 +02:00
Michael Stapelberg
eb0a56fad1 Merge branch 'get-marks' into next 2011-08-09 09:28:06 +02:00
Michael Stapelberg
4253aa4ba2 Merge branch 'master' into next 2011-08-09 09:27:55 +02:00
Michael Stapelberg
5dcbb341d1 Merge branch 'new-fix-leaks' 2011-08-09 09:27:40 +02:00
Michael Stapelberg
cd1add1f3c Bugfix: don’t free the old json_output, the caller does that 2011-08-09 09:27:28 +02:00
Michael Stapelberg
95416175cd Bugfix: use FREE to correctly handle NULL replies 2011-08-09 09:27:24 +02:00
Peter Bui
5e06b1b21d Fix some potential memory leaks 2011-08-09 09:27:15 +02:00
Michael Stapelberg
fadf9088db docs/ipc: make the GET_MARKS docs a little more precise 2011-08-09 08:22:58 +02:00
Michael Stapelberg
dab3a0b85a tests: add testcase for the GET_MARKS ipc request 2011-08-09 08:19:48 +02:00
Helgi Kristvin Sigurbjarnarson
3cc22dcbe4 Preserve marks between restarts. 2011-08-09 08:19:31 +02:00
Helgi Kristvin Sigurbjarnarson
96ed68de16 Add support for get_marks in i3-msg 2011-08-09 08:19:11 +02:00
Helgi Kristvin Sigurbjarnarson
35d7ef0ddd Feature: implement GET_MARKS 2011-08-09 08:04:33 +02:00
Michael Stapelberg
e304902874 Merge branch 'master' into next 2011-08-07 20:45:20 +02:00
Michael Stapelberg
6fb5d6e313 initialize most to NULL, fixes warning 2011-08-07 20:45:06 +02:00
Michael Stapelberg
8b9ba5fd0b Merge branch 'master' into next 2011-08-07 18:15:10 +02:00
Michael Stapelberg
b0f0a045bc update changelog (no, we are not releasing) 2011-08-07 18:15:01 +02:00
Michael Stapelberg
091b72f3a9 Merge branch 'master' into next 2011-08-07 18:03:56 +02:00
Michael Stapelberg
503f318b53 Merge branch 'fix-split-docs' 2011-08-07 18:03:51 +02:00
Michael Stapelberg
0ec208bd75 docs/userguide: use bindsym for the 'split' example (Thanks Jan) 2011-08-07 18:03:29 +02:00
Michael Stapelberg
9260cd7e12 Merge branch 'master' into next 2011-08-07 17:56:37 +02:00
Michael Stapelberg
e17d49e6a4 Merge branch 'fix-ws-direction' 2011-08-07 17:56:32 +02:00
Michael Stapelberg
d39261a1f0 rewrite con_descend_orientation
It now uses the container orientation (if it is appropriate, the last focused
one otherwise) to recurse. This works better if the target workspace is in
vertical orientation when you use right/left or if it is in horizontal
orientation but you use up/down.
2011-08-07 15:57:36 +02:00
Michael Stapelberg
99ba193ce7 Bugfix: the up/down directions were swapped
Also compare 'output' and 'current' in the same order in both parts of the
condition to make the comparison more clear.
2011-08-07 15:46:24 +02:00
Michael Stapelberg
692d65b0fd little style fixes 2011-08-07 15:24:51 +02:00
Peter Bui
a547365a88 Implement switching focus across screens.
Modify _tree_next() so that when we reach the workspace container:

1. Find the next corresponding output (screen) using the added
get_output_next().

2. If there is another output, find the visible workspace.

3. Call workspace_show on found workspace.

4. Find the appropriate window to focus (leftmost/rightmost, etc.) using
con_descend_direction, and then focus it.

I've only tested on horizontal monitors (left/right).
2011-08-07 14:33:07 +02:00
Michael Stapelberg
94ba655794 Merge branch 'master' into next 2011-08-06 18:54:50 +02:00
Michael Stapelberg
865c193971 Merge branch 'fix-floating-raise' 2011-08-06 18:54:44 +02:00
Michael Stapelberg
cd5e74bd8e Bugfix: Call tree_render() before starting the dragging when dragging a floating window (Thanks eeemsi)
Fixes #462
2011-08-06 18:53:39 +02:00
Michael Stapelberg
2631ad4c07 Merge branch 'master' into next 2011-08-05 01:04:28 +02:00
Michael Stapelberg
863b3898a6 Merge branch 'fix-border-rendering' 2011-08-05 01:04:24 +02:00
Michael Stapelberg
ec0d67410a Fix border rendering (Thanks Paride Legovini) 2011-08-05 01:03:56 +02:00
Michael Stapelberg
6e95004d6c Merge branch 'master' into next 2011-08-04 23:37:40 +02:00
Michael Stapelberg
d4f32382c9 Merge branch 'fix-restart' 2011-08-04 23:37:34 +02:00
Michael Stapelberg
f2e1e220a4 Bugfix: Use the right format string (Thanks pnutzh4x0r) 2011-08-04 23:34:23 +02:00
Michael Stapelberg
7e0cbf18f9 Bugfix: Correctly parse the 'focused' (it’s a bool, no longer int) when restoring layout (Thanks andi) 2011-08-04 22:58:19 +02:00
Michael Stapelberg
93c3596619 Merge branch 'master' into next 2011-08-04 22:21:42 +02:00
Michael Stapelberg
93f475778f Merge branch 'fix-stacking' 2011-08-04 22:21:27 +02:00
Michael Stapelberg
1d50cff7ca Bugfix: Fix stacking order
The commit 192dbdabd6 introduced a regression
here (open three floating windows and try to raise them with clicking to see
what i mean)
2011-08-04 22:19:30 +02:00
Michael Stapelberg
31724a9a92 Merge branch 'check-duplicate' into next 2011-08-04 21:45:58 +02:00
Michael Stapelberg
ecc2cae3f7 Bugfix: use ELOG to actually get the error message into the logfile shown by i3-nagbar 2011-08-04 21:43:55 +02:00
Michael Stapelberg
4e350664ae Bugfix: Check that ->symbol != NULL before using strcasecmp() 2011-08-04 21:38:13 +02:00
Michael Stapelberg
787dd4059f little style fixes for the previous patch 2011-08-04 21:25:47 +02:00
Radek Tříška
9d101d8473 check_for_duplicate_bindings 2011-08-04 20:37:01 +02:00
Michael Stapelberg
e9395149b9 Merge branch 'master' into next 2011-08-04 20:11:44 +02:00
Michael Stapelberg
8510a4e322 Merge branch 'fix-instance-criterion' 2011-08-04 20:11:40 +02:00
Michael Stapelberg
51119c75c1 extend t/65-for_window to check for the 'instance' criterion 2011-08-04 20:11:01 +02:00
Mateusz Poszwa
1913bf0e5c Add "instance" to matching criteria 2011-08-04 20:10:31 +02:00
Michael Stapelberg
65ce6fe264 Merge branch 'master' into next 2011-08-04 00:41:11 +02:00
Michael Stapelberg
3d7f0f4ce3 Merge branch 'i3-wsbar-fixes' 2011-08-04 00:40:48 +02:00
Michael Stapelberg
6ad00b1dff i3-wsbar: display a separator between workspaces for every output when --show-all is used (Thanks marforio)
Fixes #417
2011-08-04 00:40:40 +02:00
Michael Stapelberg
9d3c99ee38 i3-wsbar: correctly handle EOF on stdin 2011-08-04 00:40:40 +02:00
Michael Stapelberg
3038ad6c26 i3-wsbar: make workspace names clickable (Thanks marforio) 2011-08-04 00:40:40 +02:00
Michael Stapelberg
926ca651ef Merge branch 'wsnum' into next 2011-08-04 00:34:43 +02:00
Simon Kampe
837bb50826 Parsing workspace name so if the first part is a number, the workspace will get this number. If no number is found it will default to -1. 2011-08-04 00:30:07 +02:00
Michael Stapelberg
0330e868bc Merge branch 'master' into next 2011-08-04 00:16:13 +02:00
Michael Stapelberg
4fd877608d Merge branch 'ws-nextprev' 2011-08-04 00:16:08 +02:00
Peter Bui
1750192f63 Modify workspace next/prev to account for workspaces on all outputs.
Generally, the traversal goes: numbered workspaces in order, and then
named workspaces in the order in which they appear in the tree.

Example:
    Output 1:       Output 2:
	1 3 D C         2 4 B A

Traversal: 1, 2, 3, 4, D, C, B, A, 1, ...

Note, after the numbered workspaces, we traverse the named workspaces
from output 1, and then output 2, etc.
2011-08-04 00:12:09 +02:00
Michael Stapelberg
2e0f5335f4 Merge branch 'master' into next 2011-08-04 00:11:00 +02:00
Michael Stapelberg
8287a94292 Merge branch 'fix-wsnum' 2011-08-04 00:10:56 +02:00
Michael Stapelberg
d0741975f1 Bugfix: Use the appropriate number when assigning numbered workspaces in randr.c 2011-08-04 00:10:23 +02:00
Michael Stapelberg
c883e7050a Include <limits.h> in all.h 2011-08-04 00:10:04 +02:00
Michael Stapelberg
4c3a8957ee Merge branch 'master' into next 2011-08-03 20:49:01 +02:00
Michael Stapelberg
d0f1d8aa71 Merge branch 'doc-floating' 2011-08-03 20:48:57 +02:00
Michael Stapelberg
92481b133c docs/userguide: the correct command is 'floating enable', not 'mode floating' (Thanks Sander)
Fixes: #453
2011-08-03 20:48:28 +02:00
Michael Stapelberg
2d155efa07 Merge branch 'master' into next 2011-08-03 20:44:18 +02:00
Michael Stapelberg
b4882dc2b8 Merge branch 'fix-chromium-tabbar' 2011-08-03 20:44:10 +02:00
Michael Stapelberg
e616b45c83 Bugfix: realloc() with size == 0 works like free() and returns NULL, so don’t die() 2011-08-03 20:43:08 +02:00
Michael Stapelberg
192dbdabd6 Bugfix: Correctly set the _NET_CLIENT_LIST_STACKING hint (fixes chromium tabbar)
Fixes #287
2011-08-03 20:07:03 +02:00
Michael Stapelberg
583fd93aef Merge branch 'master' into next 2011-08-03 14:49:33 +02:00
Michael Stapelberg
04a4d7c44a Merge branch 'fix-floating-resize' 2011-08-03 14:49:23 +02:00
Michael Stapelberg
cc5f3ce95a Bugfix: Fix 'resize' with direction != 'up' for floating windows
Fixes #447
2011-08-03 14:48:52 +02:00
Michael Stapelberg
3ef7e3cee4 t/41-resize: also verify resize for floating windows 2011-08-03 14:48:33 +02:00
Michael Stapelberg
746472e5e4 Merge branch 'master' into next 2011-08-03 13:01:41 +02:00
Michael Stapelberg
521cc544f6 Merge branch 'workspace-order-fix' into next 2011-08-03 12:18:42 +02:00
Michael Stapelberg
cdae1b7f74 Merge branch 'workspace-order-fix' 2011-08-03 12:18:40 +02:00
Michael Stapelberg
9800d5286f Bugfix: Correctly check if the workspace already exists 2011-08-03 12:18:30 +02:00
Michael Stapelberg
903747fa14 Merge branch 'fix-dpkg-build' into next 2011-08-03 04:10:27 +02:00
Michael Stapelberg
3e077a0a31 Merge branch 'fix-dpkg-build' 2011-08-03 04:10:24 +02:00
Michael Stapelberg
4e87d6af30 debian: fix debian/rules for multiple builds (Thanks ccount) 2011-08-03 04:09:59 +02:00
Michael Stapelberg
4760f721e6 Merge branch 'workspace-startup-order' 2011-08-03 03:33:34 +02:00
Michael Stapelberg
dfbed047c8 Merge branch 'workspace-startup-order' into next 2011-08-03 03:33:31 +02:00
Michael Stapelberg
dcba8024de also handle quoted workspace names, extend t/72 for that 2011-08-03 03:33:12 +02:00
Michael Stapelberg
0092b245a1 Bugfix: When looking for an unused workspace, try the named workspaces first
Fixes: #449
2011-08-03 03:08:59 +02:00
Michael Stapelberg
72d2b2c9bd add testcase to check if i3 starts on the first named workspace (ticket #449) 2011-08-03 02:56:24 +02:00
Michael Stapelberg
edfbfd131c Merge branch 'tests-i3lib-launch' into next 2011-08-03 02:14:05 +02:00
Michael Stapelberg
034ecbc930 Merge branch 'tests-i3lib-launch' 2011-08-03 02:14:00 +02:00
Michael Stapelberg
003f7043c5 t/70-force-focus-wrapping: use launch_with_config 2011-08-03 02:12:29 +02:00
Michael Stapelberg
7956289c2b t/67-workspace_layout: use launch_with_config 2011-08-03 02:04:52 +02:00
Michael Stapelberg
8734534b5c t/66-assign: use launch_with_config 2011-08-03 02:03:26 +02:00
Michael Stapelberg
506d8797b2 tests: implement i3test::launch_with_config, use it in t/65-for_window 2011-08-03 00:03:13 +02:00
Michael Stapelberg
3fa361be2f Merge branch 'fix-resize-too-much' into next 2011-08-02 22:32:37 +02:00
Michael Stapelberg
fefbc3d384 Merge branch 'fix-resize-too-much' 2011-08-02 22:32:34 +02:00
Michael Stapelberg
719022d80a Bugfix: Ensure that the percentage is > 0.05 when using the 'resize' cmd (Thanks rogutes)
Fixes #437
2011-08-02 22:31:45 +02:00
Michael Stapelberg
c43288a249 Merge branch 'fix-multi-for_window' into next 2011-08-02 19:46:36 +02:00
Michael Stapelberg
554a43ca4a Bugfix: Make the criteria rules recursive in src/cfgparse.y, too (Thanks f8l) 2011-08-02 19:46:14 +02:00
Michael Stapelberg
b57e8570c9 t/65-for_window: add a testcase for multiple criteria 2011-08-02 19:46:10 +02:00
Michael Stapelberg
56499d8374 tests: make t/65-for-window.t use separate i3 instances 2011-08-02 19:21:09 +02:00
Michael Stapelberg
23f5ba211f Merge branch 'multi-keycodes-fix' 2011-08-02 10:47:23 +02:00
Michael Stapelberg
610620ec45 Merge branch 'multi-keycodes-fix' into next 2011-08-02 10:47:12 +02:00
Michael Stapelberg
c9194b4297 Bugfix: Correctly bind on multiple keycodes if a symbol has more than one (Thanks ubitux) 2011-08-02 10:47:03 +02:00
Michael Stapelberg
83da21e13f update debian packaging 2011-08-01 23:35:08 +02:00
Michael Stapelberg
f48a472d46 Merge branch 'next' 2011-08-01 23:28:08 +02:00
Michael Stapelberg
009090093c make dist: include i3bar, pre-generate its manpage 2011-08-01 23:27:50 +02:00
Michael Stapelberg
d6480be215 Merge branch 'next' 2011-08-01 23:18:53 +02:00
Michael Stapelberg
1f0b24df0c add release notes for 4.0.1 2011-08-01 23:18:32 +02:00
Michael Stapelberg
49400a2c0f also start i3bar in the keycode config template 2011-08-01 21:23:44 +02:00
Michael Stapelberg
784ab40cd1 Merge branch 'darwin-fixes' into next 2011-08-01 18:09:47 +02:00
Michael Stapelberg
32ce533d54 enable -Wl,--as-needed only on Linux (doesn’t work on Mac OS X) 2011-08-01 18:09:27 +02:00
Michael Stapelberg
29d579c4cc makefile: redirect stderr of 'which' to /dev/null when checking for lcov 2011-08-01 17:12:04 +02:00
Michael Stapelberg
fef5a69b09 Mac OS X fixes: include string.h, add strndup(), disable xmllint for the docs 2011-08-01 16:17:59 +02:00
Michael Stapelberg
3c68a9158c LDFLAGS: add -Wl,--as-needed. reduces .so dependencies
Let’s see if that works on all systems :)
2011-08-01 16:13:38 +02:00
Michael Stapelberg
339a7cb8c3 make i3bar use i3’s common.mk 2011-08-01 16:13:19 +02:00
Michael Stapelberg
22bac9fd9a Merge i3bar into next 2011-08-01 15:55:27 +02:00
Michael Stapelberg
9e4bd9a157 docs/userguide: remove the bar.* color keys (Thanks aksr) 2011-08-01 14:42:21 +02:00
Michael Stapelberg
9fbf6e3992 docs/userguide: use i3bar instead of dzen2 in the 'exec' example (Thanks ubitux) 2011-08-01 14:40:01 +02:00
Michael Stapelberg
a0bb296f1b update debian packaging 2011-08-01 14:39:45 +02:00
Michael Stapelberg
eeb44e3703 Merge branch 'next' 2011-08-01 00:52:32 +02:00
Michael Stapelberg
c6a9abd795 docs/userguide: update keyboard-layer images, remove incomplete warning 2011-07-31 23:53:10 +02:00
Michael Stapelberg
0ba5ba9f78 docs/userguide: document for_window (Thanks aksr) 2011-07-31 23:38:08 +02:00
Michael Stapelberg
998d44a3d4 update i3.man 2011-07-31 23:34:28 +02:00
Michael Stapelberg
d53c6f5c30 add a manpage for i3-migrate-config-to-v4 2011-07-31 23:22:50 +02:00
Michael Stapelberg
3204caa98d i3-migrate-config-to-v4: drop the .pl suffix
As lintian (a Debian package checker) mentions, it is more clever to install it
without the extension, since the implementation language might change.
2011-07-31 23:11:05 +02:00
Michael Stapelberg
052b69a4bf add a manpage for i3-config-wizard 2011-07-31 23:08:25 +02:00
Michael Stapelberg
74191652d4 makefile: use $SUBDIRS for clean/distclean 2011-07-31 23:01:16 +02:00
Michael Stapelberg
8b526679ef debian: bump standards-version, update website 2011-07-31 22:42:31 +02:00
Michael Stapelberg
a5cba4c540 debian: update changelog 2011-07-31 22:34:47 +02:00
Michael Stapelberg
f703dd96f5 update date in RELEASE-NOTES-4.0 2011-07-31 22:25:37 +02:00
Michael Stapelberg
fde1ea0a8a remove obsolete docs/tree-migrating 2011-07-31 22:19:46 +02:00
Michael Stapelberg
7748db8b9a make dist: cleanup τεχ files before copying 2011-07-31 22:18:48 +02:00
Michael Stapelberg
fca6420584 remove old RELEASE-NOTES from git. they are archived in the i3-website git 2011-07-31 22:07:02 +02:00
Michael Stapelberg
14976c9e01 remove website/ from git, it got its own repository
See 'i3-website' at http://code.i3wm.org/i3-website
2011-07-31 22:03:27 +02:00
Michael Stapelberg
0f276fdefa Merge branch 'next' 2011-07-31 22:01:01 +02:00
Axel Wagner
3302b22f71 Bugfix: Delay event-subscription until reconnect (thx aniou) 2011-07-31 18:26:52 +02:00
Axel Wagner
8d09ed7bf5 Update changelog and copyright, bump version and more 2011-07-31 16:16:17 +02:00
Axel Wagner
8e275d85b5 Correct some minor mistakes in the manpage (thx sECuRE) 2011-07-31 15:58:14 +02:00
Axel Wagner
56158329b3 Merge branch 'tree' into next 2011-07-31 15:54:59 +02:00
Michael Stapelberg
ed84e6db64 i3status: update website for 2.3 release 2011-07-21 23:17:45 +02:00
Axel Wagner
a2a7de5e54 Respect and use CPPFLAGS 2011-07-19 04:21:36 +02:00
Axel Wagner
8734337fb5 Stop the reconn-timer before starting it again, else it's running twice 2011-07-15 01:31:02 +02:00
Axel Wagner
3d05fe7a52 Use cleanup() in child.c 2011-07-10 04:34:18 +02:00
Michael Stapelberg
97827372af Bugfix: Correctly handle EOF on stdin (Thanks woddf2) 2011-07-10 04:31:53 +02:00
Michael Stapelberg
0a790e2b42 website: fix mailing list archives URL 2011-06-17 18:46:51 +02:00
Michael Stapelberg
85ad5374cf update website for 3.ε-bf3 2011-05-08 14:55:22 +02:00
Michael Stapelberg
57a30d7773 debian: update packaging 2011-05-08 14:40:21 +02:00
Michael Stapelberg
c44717e6ad makefile: add yajl-fallback to 'make dist' 2011-05-08 14:33:06 +02:00
Michael Stapelberg
4d63226a1a update packaging for 3.ε-bf3 2011-05-08 14:16:59 +02:00
Michael Stapelberg
ef3e241b78 Bugfix: Assign BORDER_BOTTOM instead of BORDER_RIGHT (Thanks Jan) 2011-05-06 13:11:00 +02:00
Michael Stapelberg
539fd43c08 website: OpenBSD port is now maintained by David Coppa 2011-05-06 12:59:27 +02:00
Michael Stapelberg
37798e3ba5 add release notes for 3.e-bf3 2011-05-04 20:50:20 +02:00
Michael Stapelberg
06700c90ef Remove dependency on xcb-event (Thanks Felicitus) 2011-05-04 19:33:43 +02:00
Michael Stapelberg
498a38ac0a Remove dependency on xcb-property 2011-05-03 22:49:59 +02:00
Axel Wagner
3b19edf148 Fix unaligned memory access on sparc (Thanks David Coppa) 2011-05-03 12:39:10 +02:00
Axel Wagner
778268c9bb Fix unaligned memory access on sparc (Thanks David Coppa) 2011-05-03 12:38:57 +02:00
Michael Stapelberg
de92142085 Fix unaligned memory access on sparc (Thanks David Coppa) 2011-04-28 21:47:14 +02:00
Axel Wagner
ddddc82cbd yajl-compatibility: Forgot to git-add that one 2011-04-28 20:56:14 +02:00
Axel Wagner
cdc5e6527f yajl-compatibility: Forgot to git-add that one 2011-04-28 20:55:40 +02:00
Michael Stapelberg
a9c0b44ce1 yajl compatibility: forgot add_subscription (Thanks badboy) 2011-04-28 20:25:57 +02:00
Axel Wagner
31f661ec73 Fix compiler-warnings from libev 2011-04-28 20:24:52 +02:00
Axel Wagner
08d454b25e Apply ugly yajl-compatibility-fix (thx sECuRE) 2011-04-28 20:24:32 +02:00
Axel Wagner
b150ec1c47 Apply ugly yajl-compatibility-fix (thx sECuRE) 2011-04-28 20:23:12 +02:00
Axel Wagner
e7c2b25ddd Fix compiler-warnings from libev 2011-04-28 19:54:31 +02:00
Michael Stapelberg
646fcc3dbc Make code compatible with yajl 2.0 *and* 1.0 2011-04-27 20:04:34 +02:00
Axel Wagner
d31384e955 Revert "Allow space after space"
This reverts commit c9334c922de120a08e66cb3a8c340fc1a453bf55.
2011-04-22 01:18:57 +02:00
Axel Wagner
bf078c673f Allow space after space 2011-04-22 00:42:24 +02:00
Axel Wagner
ed5ac7f41d Implement disabling the workspace buttons („thx“ sECuRE) 2011-04-21 20:24:02 +02:00
Axel Wagner
26993574f5 Revert "Don't draw on backbuffer, when hiding (thx sECuRE)"
This reverts commit f51ba2d7ecf3f560c8ce4d3ab8419ecf6265839c.

This commit introduced a regression, which prevented i3bar to be redrawn
at all in some circumstances. It will later be reintroduced in a bigger
refactoring of event-dependencies
2011-03-21 17:29:11 +01:00
Axel Wagner
edcc373077 Fix typo in comment (thx sECuRE) 2011-03-20 19:52:20 +01:00
Axel Wagner
ba748d72ff Collapse two ChangeGC-calls (thx sECuRE) 2011-03-20 19:50:03 +01:00
Axel Wagner
52e70c3802 Add Color for focused ws (thx phnom) 2011-03-20 19:29:30 +01:00
Axel Wagner
a5a9afcf2e Bugfix: Skip inactive outputs, when unmapping 2011-03-19 23:28:26 +01:00
Axel Wagner
16f7574851 Bugfix: Skip inactive outputs, when unmapping 2011-03-19 23:28:10 +01:00
Axel Wagner
682458f4d7 Don't draw on backbuffer, when hiding (thx sECuRE) 2011-03-19 23:27:50 +01:00
Axel Wagner
49608121e0 XClearArea can't be used on pixmaps (thx sECuRE) 2011-03-19 23:06:59 +01:00
Axel Wagner
1b2002e1c8 XClearArea can't be used on pixmaps (thx sECuRE) 2011-03-19 23:04:09 +01:00
Axel Wagner
9f5b715bd6 bugfix: Skip inactive outputs on redraw (thx sECuRE) 2011-03-19 22:31:42 +01:00
Axel Wagner
fea94757cd Don't reallocate the backbuffer on every refresh (thx sECuRE) 2011-03-19 22:31:40 +01:00
Axel Wagner
a847454a42 bugfix: Skip inactive outputs on redraw (thx sECuRE) 2011-03-19 22:30:59 +01:00
Axel Wagner
aaf60c6321 Don't reallocate the backbuffer on every refresh (thx sECuRE) 2011-03-19 22:27:35 +01:00
Axel Wagner
2fd7449e29 Add support for I3_SOCKET_PATH-atom 2011-03-19 22:06:08 +01:00
Axel Wagner
d993f8a3a1 Auto-update NUM_ATOMS by putting it into the enum (thx sECuRE) 2011-03-19 20:58:05 +01:00
Michael Stapelberg
31da1eb0c1 Only send WM_TAKE_FOCUS when the client supports it in the protocols atom
Fixes launching xterm, for example
2011-03-18 17:26:19 +01:00
Michael Stapelberg
86117db434 Make i3 compatible with the very latest xcb
This involves:
 • Compiling with xcb-util instead of xcb-{atom,aux} (they merged the libraries)
 • Not using xcb-{event,property} anymore (code removed upstream)
 • Not using the predefined WINDOW, CARDINEL, … atoms (removed upstream)
 • Using the new xcb_icccm_* data types/functions instead of just xcb_*
   (for example xcb_icccm_get_wm_hints instead of xcb_get_wm_hints)

Also I refactored the atoms to use x-macros.
2011-03-18 16:36:50 +01:00
Michael Stapelberg
f5afe2f67e Send WM_TAKE_FOCUS when setting focus (fixes java problems) 2011-03-17 22:44:29 +01:00
Axel Wagner
5219493ffe Bugfix: Don't SIGSTOP child in dockmode 2011-03-14 09:24:32 +01:00
Axel Wagner
7fb6258fbd Use DISPLAY in XKB-code 2011-03-14 09:20:16 +01:00
Axel Wagner
dfd566511e Bugfix: Don't segfault, if child was killed 2011-03-14 09:17:06 +01:00
Michael Stapelberg
7cb1ca5a92 website: update for i3lock 2.1 2011-03-13 20:42:57 +01:00
Fernando Tarlá Cardoso Lemos
9bcdd2f614 Correct minor issues reported by the analyzer.
Found with the Clang Static Analyzer.
2011-02-26 03:03:50 +01:00
Fernando Tarlá Cardoso Lemos
c8032d552d Correct minor issues reported by the analyzer.
Found with the Clang Static Analyzer.
2011-02-26 03:03:30 +01:00
Axel Wagner
64f2a7561d Implement dock-positioning 2011-02-21 15:53:32 +01:00
Axel Wagner
23a9814090 Correct typo 2011-02-16 19:53:42 +01:00
Axel Wagner
0248045067 Bugfix: Don't override DEBUG-env in Makefile 2011-02-05 15:59:03 +01:00
Axel Wagner
acb52fc654 Bugfix: Don't override DEBUG-env in Makefile 2011-02-05 15:20:40 +01:00
Axel Wagner
972be13dc5 Bugfix: _only_ stop child, if hide_on_modifier is set (thx cradle) 2011-02-04 10:05:48 +01:00
Axel Wagner
29d03f917b Bugfix: _only_ stop child, if hide_on_modifier is set (thx cradle) 2011-02-04 10:04:54 +01:00
Michael Stapelberg
371fa3bae2 docs: add tree-*.png (for tree-migrating) 2011-01-29 18:30:43 +01:00
Michael Stapelberg
52a7cdc557 docs/ipc: document that the highest bit is 1 for event replies 2011-01-29 18:06:56 +01:00
Michael Stapelberg
1c0e4cae1d add docs/tree-migrating 2011-01-29 15:10:51 +01:00
Michael Stapelberg
b99bae6e4a docs/ipc: add reference to ThePub’s python library 2011-01-28 13:07:00 +01:00
Axel Wagner
4a10a2edba Bugfix: Use free-workspaces() in xcb-cleanup (thx dothebart) 2011-01-26 12:58:15 +01:00
Axel Wagner
1cf054f2b4 Bugfix: free() output-names seperately (thx dothebart) 2011-01-26 12:58:11 +01:00
Axel Wagner
ff925f58e8 Bugfix: Use free-workspaces() in xcb-cleanup (thx dothebart) 2011-01-26 12:57:44 +01:00
Axel Wagner
8fa720d6b9 Bugfix: free() output-names seperately (thx dothebart) 2011-01-26 12:57:38 +01:00
Axel Wagner
9bcc6216c8 Bugfix: Also free() the head of slist/tailq (Thx dothebart) 2011-01-26 02:00:55 +01:00
Axel Wagner
e9ef6d186a Bugfix: free() text, after drawing it (thx dothebart) 2011-01-26 02:00:51 +01:00
Axel Wagner
51ffd4c3dd Bugfix: free() workspace-list of outputs seperately (thx dothebart) 2011-01-26 02:00:46 +01:00
Axel Wagner
17a795aba1 Remove superflous FREE_SLIST 2011-01-26 02:00:40 +01:00
Axel Wagner
31863efc04 Bugfix: free() workspace-names seperately (thx dothebart) 2011-01-26 02:00:29 +01:00
Axel Wagner
9c7db93993 Bugfix: free() command-string, after it is not needed anymore 2011-01-26 02:00:25 +01:00
Axel Wagner
18e6caf0a9 Bugfix: Test for outputs == NULL 2011-01-26 02:00:20 +01:00
Axel Wagner
dc7cfeaa4f Bugfix: Also free() the head of slist/tailq (Thx dothebart) 2011-01-26 01:54:36 +01:00
Axel Wagner
d9f35859fa Bugfix: free() text, after drawing it (thx dothebart) 2011-01-26 01:54:36 +01:00
Axel Wagner
9d22b29166 Bugfix: free() workspace-list of outputs seperately (thx dothebart) 2011-01-26 01:54:36 +01:00
Axel Wagner
7a7faff96d Remove superflous FREE_SLIST 2011-01-26 01:54:36 +01:00
Axel Wagner
da1b65dd86 Bugfix: free() workspace-names seperately (thx dothebart) 2011-01-26 01:54:36 +01:00
Axel Wagner
cc71c77329 Bugfix: free() command-string, after it is not needed anymore 2011-01-26 01:54:36 +01:00
Axel Wagner
94ca5c73cc Bugfix: Test for outputs == NULL 2011-01-26 01:54:36 +01:00
Fernando Tarlá Cardoso Lemos
ceff1487da Round up as well if needed (thanks Merovius). 2011-01-23 13:22:11 +01:00
Raphael Kubo da Costa
ca296c1c8b Build fix: Explicitly include stdint.h before cfgparse.tab.h
cfgparse.tab.h uses uint32_t, which is defined in stdint.h.

Should fix the build of 3.ε-bf2 on FreeBSD.

Signed-off-by: Raphael Kubo da Costa <kubito@gmail.com>
2011-01-23 13:19:25 +01:00
Axel Wagner
c9ee3eb21e Change default socketpath to /tmp/i3-ipc.sock 2011-01-22 17:41:24 +01:00
Michael Stapelberg
2a968135e5 update website for 3.ε-bf2 2011-01-19 21:39:50 +01:00
Michael Stapelberg
5a26ef0fce add debian/source/format 2011-01-19 21:33:38 +01:00
Michael Stapelberg
64b535a7aa fix typo in release notes 2011-01-19 21:28:57 +01:00
Michael Stapelberg
922f60260f update debian/ for 3.ε-bf2 2011-01-19 21:26:13 +01:00
Michael Stapelberg
94993e11d1 add release notes for 3.ε-bf2 2011-01-19 21:23:30 +01:00
Axel Wagner
1369e36d7c Use tree-command for workspace-switching 2011-01-14 19:16:52 +01:00
Axel Wagner
2064df9e5d Display socket-path in connection-error-message 2011-01-14 17:33:58 +01:00
Axel Wagner
4762152e1c Display socket-path in connection-error-message 2011-01-14 17:33:40 +01:00
Axel Wagner
caca38b68e Use I3SOCK environment-variable 2011-01-11 05:03:14 +01:00
Axel Wagner
84b574167e Use I3SOCK environment-variable 2011-01-11 05:02:55 +01:00
Michael Stapelberg
9bd74473ad website: add reference to the ubuntu lucid repository 2011-01-09 02:55:48 +01:00
Fernando Tarlá Cardoso Lemos
29f153c634 Separate the lines received in a single read.
Fixes the case where multiple lines are read in a single read syscall
(it could be better optimized in the future). Also fixes a memory
corruption issue when rec == 0.
2011-01-08 14:57:00 +01:00
Fernando Tarlá Cardoso Lemos
96e14d8103 Separate the lines received in a single read.
Fixes the case where multiple lines are read in a single read syscall
(it could be better optimized in the future). Also fixes a memory
corruption issue when rec == 0.
2011-01-08 14:56:52 +01:00
Axel Wagner
cd4b77ab72 Bugfix: If hide-on-modifier is set, stop the child after starting 2011-01-06 17:35:47 +01:00
Axel Wagner
5f32bfa6d8 Bugfix: Recreate double-buffers on reconfiguring (thx sECuRE) 2011-01-06 17:35:40 +01:00
Axel Wagner
34dd4bc89e Bugfix: If hide-on-modifier is set, stop the child after starting 2011-01-06 17:35:23 +01:00
Axel Wagner
2183435da6 Bugfix: Recreate double-buffers on reconfiguring (thx sECuRE) 2011-01-06 17:28:21 +01:00
Axel Wagner
497a091fbb Use strerror() for more usefull errormessages 2011-01-01 16:55:13 +01:00
Axel Wagner
2aeea30cc7 Use strerror() for more usefull errormessages 2011-01-01 16:54:40 +01:00
Axel Wagner
4c7f131fc5 Fix typo (thx julien) 2011-01-01 15:46:59 +01:00
Axel Wagner
8f0518c5c5 Only use font_info after we know, the request succeded 2011-01-01 15:46:53 +01:00
Axel Wagner
b40b921228 Fix typo (thx julien) 2011-01-01 15:36:30 +01:00
Axel Wagner
08a5a2fdb0 Only use font_info after we know, the request succeded 2011-01-01 15:19:17 +01:00
Axel Wagner
600c4ae95c Use "*buffer == '\0'" instead of "strlen(buffer) == 0" (thanks dothebart) 2011-01-01 15:08:43 +01:00
Axel Wagner
64d8d40b25 Use "*buffer == '\0'" instead of "strlen(buffer) == 0" (thanks dothebart) 2011-01-01 15:07:28 +01:00
Axel Wagner
3daab599ca Bugfix: Recover from closed socket 2010-12-26 20:03:06 +01:00
Axel Wagner
b3970b36a5 Bugfix: Recover from closed socket 2010-12-26 20:02:37 +01:00
Axel Wagner
3c85c514d4 Merge branch 'master' into tree 2010-12-26 15:27:32 +01:00
Axel Wagner
ff0522fe95 Bugfix: Send child a SIGCONT, so it reacts to SIGTERM (no zombies \o/) 2010-12-26 14:48:39 +01:00
Axel Wagner
cdf56f16bf Revert "Double-fork() to avoid zombies"
This reverts commit a4eafae108b63f5df76eea2958aee8cf95cb1ad6.
2010-12-26 14:48:14 +01:00
Axel Wagner
29aaced900 Send child a SIGCONT, so it reacts to SIGTERM (no zombies \o/) 2010-12-26 14:45:31 +01:00
Axel Wagner
f539f76e5b Revert "Double-fork() to avoid zombies"
This reverts commit a4eafae108b63f5df76eea2958aee8cf95cb1ad6.
2010-12-26 14:44:28 +01:00
Axel Wagner
73bbc7529f Merge branch 'master' into next 2010-12-23 16:51:36 +01:00
Axel Wagner
a39db9ae82 Remove unnecessary declaration 2010-12-23 16:50:48 +01:00
Axel Wagner
d0077fb483 Update changelog and manpage 2010-12-23 16:44:02 +01:00
Axel Wagner
9912d7fdbb Update changelog and manpage 2010-12-23 16:39:53 +01:00
Axel Wagner
94a8273b09 Merge branch 'next' 2010-12-23 16:34:19 +01:00
Axel Wagner
537851b929 Switch back ws_fg and ws_bg (Thanks julien) 2010-12-03 17:59:28 +01:00
Axel Wagner
a3e37b059f Switch back ws_fg and ws_bg (Thanks julien) 2010-12-03 17:59:16 +01:00
Michael Stapelberg
53b3b1cb96 Bugfix: use bufcopy instead of buf (Thanks fernando) 2010-11-26 22:39:53 +01:00
Michael Stapelberg
ad8065e366 Bugfix: Correctly count variables when parsing the configfile (Thanks dbp) 2010-11-26 11:25:02 +01:00
Michael Stapelberg
3de12beef6 make i3bar work with tree branch again (current_workspace is a string now) 2010-11-22 09:44:29 +01:00
Michael Stapelberg
bb5f4eea88 bugfix: need to use window_type instead of type in t/04-floating.t 2010-11-12 20:37:18 +01:00
Axel Wagner
a88f7fb392 We don't need sig_quit 2010-11-11 03:01:40 +01:00
Axel Wagner
8301d3d9f3 Send a SIGTERM instead of a SIGQUIT to exit the child 2010-11-11 02:59:17 +01:00
Axel Wagner
33202881c4 Handle SIGTERM/-INT/-HUP 2010-11-11 02:57:39 +01:00
Axel Wagner
d5e3b58d47 -V actually does not take an argument (yet) 2010-11-11 02:57:25 +01:00
Axel Wagner
eada483765 Double-fork() to avoid zombies 2010-11-10 18:46:47 +01:00
Michael Stapelberg
e6cd2931a0 update debian/ to include all documentation/bump standars version 2010-11-06 14:40:18 +01:00
Axel Wagner
23b62f621d Add support for bar_fg and bar_bg 2010-11-04 13:46:50 +01:00
Axel Wagner
127c082e83 Call init_colors() earlier 2010-11-04 13:46:33 +01:00
Axel Wagner
214382a030 Mention the color-options in the manpage 2010-11-04 12:43:41 +01:00
Axel Wagner
992612c89d Some stylechanges to previous commit 2010-11-04 12:27:10 +01:00
Fernando Tarlá Cardoso Lemos
6376cf99d2 Custom colors can be set from the command line. 2010-11-04 11:51:26 +01:00
Fernando Tarlá Cardoso Lemos
73728f519b Added a distclean target. 2010-11-04 11:50:47 +01:00
Axel Wagner
80172c88c5 Don't map bars on creation, if hide_on_modifier is enabled 2010-10-24 23:03:44 +02:00
Axel Wagner
4830288c7b Place bar at the bottom of the screen, when creating them 2010-10-24 22:56:08 +02:00
Michael Stapelberg
6146ad45c9 Bugfix: Properly call init_workspaces() when RandR is known but not present 2010-10-23 17:18:59 +02:00
Michael Stapelberg
3bb963cf31 Bugfix: Don’t setup event handler when RandR base event is not set 2010-10-23 17:18:41 +02:00
Axel Wagner
cddda0c965 Remove unnecessary dependencies 2010-10-22 00:32:29 +02:00
Fernando Tarlá Cardoso Lemos
b1060ff938 Fixed overflow and underflow bugs when resizing. 2010-10-18 00:06:32 +02:00
Michael Stapelberg
182256bf71 website/blog: include link to blog in menu 2010-10-17 19:18:04 +02:00
Michael Stapelberg
ef381e1e85 blog: add feed, s/utf8/utf-8 in charset 2010-10-17 19:14:55 +02:00
Michael Stapelberg
54fcc5fc3e add blog/ (jekyll folder structure for http://i3.zekjur.net/blog/) 2010-10-17 18:43:19 +02:00
Michael Stapelberg
d1e3fd192f Bugfix: Initialize variable 'root' earlier
Fixes a regression introduced in commit f2896d3 (create_window(), invoked
indirectly in expand_table_{rows,cols}, uses the root variable).
2010-10-10 20:18:31 +02:00
Fernando Tarlá Cardoso Lemos
83a82d77bf Info about client.background for the user guide. 2010-10-07 19:28:50 +02:00
Fernando Tarlá Cardoso Lemos
6d54b5a506 Fix possible rounding errors. 2010-09-24 15:52:04 +02:00
Fernando Tarlá Cardoso Lemos
fa3ad8be10 Support for custom bg colors for clients. 2010-09-24 15:46:57 +02:00
Stefan Schneider-Kennedy
5ed0c0a042 Opera flash plugin no longer prevents in-page focus changing. Specifically, clicking a focussed window no longer forces set_focus. 2010-09-24 15:40:05 +02:00
Michael Stapelberg
622d680fa8 website: update i3status for the 2.2 release 2010-09-23 00:54:17 +02:00
Michael Stapelberg
545aaa7569 Use sstrdup() instead of strdup() 2010-09-22 23:10:49 +02:00
Axel Wagner
27fa078159 Adding a manpage 2010-09-17 18:27:07 +02:00
Axel Wagner
920721bb93 Use DLOG/ELOG-macros, provide --verbose-option 2010-09-17 06:49:28 +02:00
Axel Wagner
ca1a295714 Clean the XCB-errorhandling a little bit up 2010-09-17 05:55:38 +02:00
Axel Wagner
60bab3db28 Use font_ascent instead of font_height, it's more elegant 2010-09-17 05:29:01 +02:00
Axel Wagner
a75cb6e785 Rename xcb_screens to xcb_screen, it's really just one 2010-09-17 05:28:22 +02:00
Axel Wagner
93453c64f2 Add some more comments 2010-09-17 05:26:31 +02:00
Axel Wagner
c82556f0f2 Use only xcb_query_font() 2010-09-17 03:51:41 +02:00
Axel Wagner
7fda48aa9f We don't need get_string_width anymore 2010-09-17 03:11:49 +02:00
Axel Wagner
5deb95de33 Make i3_default_sock_path a local variable 2010-09-17 03:04:40 +02:00
Axel Wagner
0e4487e489 Move child_pid into child.c 2010-09-17 03:03:43 +02:00
Axel Wagner
d245d14765 Use realloc instead of manually reallocating 2010-09-17 02:28:56 +02:00
Axel Wagner
a702ced322 Add CHANGELOG 2010-09-17 02:21:09 +02:00
Axel Wagner
52120e3ed5 Use draw_text() to render text to the correct spot 2010-09-17 02:17:18 +02:00
Axel Wagner
0dc802c7b5 Write a wrapper around xcb_image_text_16()
xcb_image_text_16() can only process up to 255 glyphs, so we
write a wrapper around it for arbitrary long strings
2010-09-17 01:52:04 +02:00
Axel Wagner
c5dc3d49aa We don't need to crop at that point 2010-09-17 01:51:10 +02:00
Axel Wagner
2ce9c4024f Draw the statusline to a seperate buffer-pixmap 2010-09-17 01:18:50 +02:00
Axel Wagner
4ec3e7a619 Define Macros MAX and MIN 2010-09-17 01:16:53 +02:00
Michael Stapelberg
f2896d34e0 Bugfix: use the global root variable, don’t get the first one (Thanks quaec)
The case of an X11 server having multiple displays is handled correctly by the
code in src/mainx.c. However, due to some functions not being correctly
refactored and still getting the first screen (and also the first root window)
from the XCB connection, i3 was operating on the wrong root window.
2010-09-09 15:35:48 +02:00
Axel Wagner
4d38bf81ba Allocate the right amount of memory for ev_child 2010-09-07 17:28:56 +02:00
Axel Wagner
17484d82f2 Allocate the right amount of memory for ev_child 2010-09-07 17:28:15 +02:00
Michael Stapelberg
f6638b4b9e website: update i3lock website (for the 2.0 release) 2010-09-05 14:08:21 +02:00
Axel Wagner
4e298d5a1d Reimplement double-buffering
Due to a merge-fuckup, the double-buffer-code got lost. Know flickering
should not happen anymore.
2010-09-04 18:26:30 +02:00
Fernando Tarlá Cardoso Lemos
6cf7ac7655 Validate the ws number for client assignment. 2010-09-01 11:54:07 +02:00
Axel Wagner
0963a0e5ac Merge branch 'hide' into next 2010-08-26 00:03:41 +02:00
Axel Wagner
c4c918cb06 Make hide_on_modifier configurable 2010-08-26 00:02:35 +02:00
Axel Wagner
386abde4df Put usage-message in own function 2010-08-26 00:01:24 +02:00
Axel Wagner
c2ad6167e9 Put the bars on top, when reconfiguring 2010-08-25 23:36:25 +02:00
Axel Wagner
701448c342 Unhide on urgent-hint 2010-08-25 21:50:01 +02:00
Axel Wagner
a83e7699e7 Send the child SIGSTOPs and SIGCONTs 2010-08-25 18:31:03 +02:00
Axel Wagner
3c1a6384ab Define overrride-redirect
The bars should not be in dockmode, when hide-on-mod is active
2010-08-25 18:23:33 +02:00
Axel Wagner
53ec74a4ab Implement hide-on-modifier 2010-08-25 18:11:06 +02:00
Axel Wagner
6034eee647 Remove trailing newline from stdin 2010-08-25 04:58:28 +02:00
Axel Wagner
bef80146e6 Don't manually strip dzen-formats.
Instead "output_format = none" should be used in the i3status-config
2010-08-24 14:01:48 +02:00
Axel Wagner
14b885adf1 Only copy the double-buffer on expose-events 2010-08-22 10:24:32 +02:00
Axel Wagner
6ad922dbd5 Add declaration, accidentally lost in last commit 2010-08-21 13:29:38 +02:00
Axel Wagner
fe24eb748c Implement double-buffering to get rid of flickering 2010-08-21 13:27:51 +02:00
Axel Wagner
5015cdc4d0 Implement double-buffering to get rid of flickering 2010-08-21 13:24:05 +02:00
Axel Wagner
84d7da0acf Correct typo in usage-message 2010-08-19 22:13:40 +02:00
Axel Wagner
ddf8bd63c7 Added some error handling for xcb 2010-08-18 03:58:32 +02:00
Axel Wagner
60da522e13 Add licensing information 2010-08-07 18:05:16 +02:00
Axel Wagner
04e2cd1dfe Add version-option 2010-08-07 03:50:22 +02:00
Axel Wagner
e7ba3183df Correct behaviour of parsing null-values in src/outputs.c 2010-08-07 02:37:12 +02:00
Axel Wagner
c03e850171 Correct the Macro-calls in src/xcb.c 2010-08-07 02:34:02 +02:00
Axel Wagner
dcbf0c71d2 Move font-height-calculation to the end of init_xcb() 2010-08-07 02:22:20 +02:00
Axel Wagner
6780d87593 Use a while-loop in xcb_chk_cb() to account for the xcb-buffer 2010-08-07 02:20:01 +02:00
Axel Wagner
188d4c18cc Merge handle_xcb_event() into xcb_chk_cb() 2010-08-07 02:19:25 +02:00
Axel Wagner
cee972280d Add comments 2010-08-07 02:10:05 +02:00
Axel Wagner
b1a8ddd9d7 We don't need a callback for null-values 2010-08-07 01:57:00 +02:00
Axel Wagner
660c77bdb8 Reconfigure to the correct coordinates 2010-08-06 05:53:38 +02:00
Axel Wagner
55047c1633 Refresh the workspace-list on output-events 2010-08-06 05:52:01 +02:00
Axel Wagner
a4b1e0d01a Modify the active-flag on parsing the output-list 2010-08-06 05:49:57 +02:00
Axel Wagner
36445f500f Use correct default-path for ipc-socket 2010-08-06 04:11:44 +02:00
Axel Wagner
fae997038d Remove superflous xcb_flush()es 2010-08-06 03:42:33 +02:00
Axel Wagner
1daa395a77 Added Unicode-Support 2010-08-06 03:32:05 +02:00
Axel Wagner
7d7867acce Be more strict with encapsulation
I.e. move the xcb-event-handling into xcb.c and the
child-process-communications into newly created child.c.
Also change some includes.
2010-08-05 05:09:59 +02:00
Axel Wagner
51d466c41c Cleanup some Memory Leaks 2010-08-04 04:07:16 +02:00
Axel Wagner
27aa9a640e Display statusline (without formats) 2010-08-04 03:34:18 +02:00
Axel Wagner
8595d3bb48 Change the indention-style 2010-08-03 21:20:11 +02:00
Michael Stapelberg
26c61850bd Bugfix: Replay unhandled pointer events (Thanks Marcus) 2010-07-31 14:58:14 +02:00
Axel Wagner
49eef0db3f Making Mouse-clicks work 2010-07-30 04:19:32 +02:00
Axel Wagner
f4b7394655 Implement workspace-change on mouse-wheel 2010-07-30 03:48:46 +02:00
Axel Wagner
43c057f19a Migrate to queue.h 2010-07-30 03:11:54 +02:00
Axel Wagner
654b51fef1 Correctly parse the urgent-hint 2010-07-29 20:19:59 +02:00
Axel Wagner
71cb49b847 Move XCB-Event-Handling to xcb.c 2010-07-27 10:18:29 +02:00
Axel Wagner
ff2ee04e0d Use font-size to correctly determine the size of the bars and buttons. 2010-07-27 02:16:49 +02:00
Axel Wagner
3883ae2738 Handling Exposure-Events 2010-07-26 23:51:51 +02:00
Axel Wagner
0f4164dd0f Print the workspace-names 2010-07-26 19:55:02 +02:00
Axel Wagner
8a274bd279 Draw the workspace-buttons 2010-07-26 17:21:46 +02:00
Michael Stapelberg
65058e0349 website: add link to refcard.pdf 2010-07-23 21:40:09 +02:00
Axel Wagner
72b55fdd4f Get outputs on start. Create dock window for every output. 2010-07-23 05:04:13 +02:00
Axel Wagner
a3a7a2ca52 Add temporary files to .gitignore 2010-07-23 04:44:12 +02:00
Axel Wagner
fb2afacce3 Rework the IPC-Code 2010-07-23 04:43:43 +02:00
Axel Wagner
02df973564 Start tracking changes 2010-07-22 01:15:18 +02:00
Fernando Tarlá Cardoso Lemos
20fc7681b1 Don't draw stacked decors overlapping a fs window.
When both a fullscreen window and a floating window existed at the same time,
we used to configure stack_win as a sibling of the floating window. Now we
first check if a fullscreen window exists so that the decorations are always
behind it.
2010-07-20 22:19:38 +02:00
Michael Stapelberg
935f950ce2 Bugfix: Render decoration of single window in tabbed/stacked container (Thanks Fernando) 2010-07-11 22:23:32 +02:00
Michael Stapelberg
f70530d575 website: update fedora link, add RHEL, CentOS (Thanks cassmodiah) 2010-07-03 19:29:24 +02:00
Michael Stapelberg
14e882826e debian: bump compatibility to 6 2010-06-23 18:30:02 +02:00
Michael Stapelberg
5b80d4907c debian: update changelog 2010-06-23 18:29:58 +02:00
Michael Stapelberg
bda1201b5c debian: add watch file 2010-06-23 18:19:39 +02:00
Michael Stapelberg
2fd8774249 Bugfix: i3-wsbar: properly catch errors when writing to child process
This comes at the expense of having Try::Tiny as additional dependency,
but I think Try::Tiny is widely available.
2010-06-16 19:27:56 +02:00
Michael Stapelberg
2c305b5429 Bugfix: Don’t crash when a dock client starts up with nonsense coordinates (Thanks dothebart)
This fixes ticket #229
2010-06-16 19:16:05 +02:00
Michael Stapelberg
c024a23142 website: add download link to the new release 2010-06-09 10:14:21 +02:00
Michael Stapelberg
7d05f1a1a0 debian: update i3-wm.docs 2010-06-09 09:59:33 +02:00
Michael Stapelberg
78dc8fc36e Add documentation for external workspace bars 2010-06-09 09:57:43 +02:00
Michael Stapelberg
9bd6bbd70d debian: update changelog 2010-06-09 09:53:36 +02:00
Michael Stapelberg
2ba223b03a Add release notes for 3.ε-bf1 2010-06-09 09:53:18 +02:00
Michael Stapelberg
acac2eb92f website: s/systemcalls/system calls, update title 2010-06-08 18:27:31 +02:00
Michael Stapelberg
22f63ee2ec website: add links to i3status/i3lock/dzen2 on download page 2010-06-08 18:26:49 +02:00
Michael Stapelberg
756fff9d6a website: add link to wsbar.html 2010-06-08 18:26:38 +02:00
Michael Stapelberg
acc9d59e97 Bugfix: Correctly check asprintf() return value
Fixes a crash when invalid multibyte window titles are set as _NET_WM_NAME
2010-05-28 12:09:36 +02:00
Michael Stapelberg
0f83666a9c update debian packaging 2010-05-28 00:05:50 +02:00
Michael Stapelberg
e25d9c5f55 Bugfix: Update _NET_WM_STATE when clients request changes via ClientMessage
This fixes problems with Chromium fullscreen mode
2010-05-26 23:12:36 +02:00
Michael Stapelberg
e68aa1f414 Bugfix: Don’t invert directions when resizing floating clients (top/left) (Thanks João) 2010-05-24 19:21:24 +02:00
Michael Stapelberg
23d7460040 Bugfix: Don’t leak file descriptors (Thanks InfraRed) 2010-05-24 00:10:09 +02:00
Michael Stapelberg
c1dc551efc website: arch linux package was renamed 2010-04-12 20:54:02 +02:00
Michael Stapelberg
ccb5361ae9 website: add i3status release 2010-04-11 00:19:19 +02:00
Michael Stapelberg
e0a5981d9b add link to ubuntu up-to-date packages 2010-04-09 00:41:41 +02:00
Michael Stapelberg
2f7001376a Bugfix: correctly initialize workspaces if RandR is not available (Thanks stesie) 2010-04-06 20:52:34 +02:00
Michael Stapelberg
60a00221b4 website: update link to arch linux package 2010-03-30 23:49:32 +02:00
695 changed files with 89634 additions and 21169 deletions

14
.clang-format Normal file
View File

@@ -0,0 +1,14 @@
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BasedOnStyle: google
ColumnLimit: 0
ForEachMacros: [ TAILQ_FOREACH, TAILQ_FOREACH_REVERSE, SLIST_FOREACH, CIRCLEQ_FOREACH, CIRCLEQ_FOREACH_REVERSE, NODES_FOREACH, NODES_FOREACH_REVERSE, FOREACH_NONINTERNAL]
IndentWidth: 4
InsertBraces: true
PointerBindsToType: false
SortIncludes: false
SpaceBeforeParens: ControlStatements
TypenameMacros: [ SLIST_HEAD, SLIST_ENTRY, LIST_HEAD, LIST_ENTRY, SIMPLEQ_HEAD, SIMPLEQ_ENTRY, TAILQ_HEAD, TAILQ_ENTRY, CIRCLEQ_HEAD, CIRCLEQ_ENTRY ]

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
.git

11
.editorconfig Normal file
View File

@@ -0,0 +1,11 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.{c,h}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

58
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,58 @@
# 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
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.
## i3 feature requests
1. Read the [project goals](https://i3wm.org) on the website and make sure that
they are compatible with the feature you want to suggest.
2. We are generally happy with the current feature set of i3 and instead focus
on maintenance such as stability and fixing bugs. New features will rarely
be considered if they require additional configuration and/or commands, or
if they add significant complexity (either through the exposed configuration
or mental complexity) to the project.
3. Explain in detail what problem the feature addresses and why existing
features fall short.
4. Consider whether the feature could instead be implemented using the
[IPC](https://i3wm.org/docs/ipc.html) or other external tooling.
## 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
add a small single-line file starting with a number (see examples) containing
a short explanation of your change either in the
[changes](../release-notes/changes) or the
[bugfixes](../release-notes/bugfixes/) 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.

30
.github/GOVERNANCE.md vendored Normal file
View File

@@ -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 GitHubs “Member” badge.
* BDFL: a single individual who makes decisions when consensus cannot be
reached. i3s 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).

73
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,73 @@
<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.
-->
## I'm submitting a…
<!--
Check one of the following options with "x".
Please note that at this point we focus on maintaining i3 and fixing bugs, and will rarely consider features which require further configuration or significant complexity.
In such cases you should consider and present specific benefits derived from adding this feature such that it can be weighed against the cost of additional complexity and maintenance.
-->
<pre>
[ ] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)
</pre>
## Current Behavior
<!--
Describe the current behavior,
e.g., »When pressing Alt+j (focus left), the window above the current window is focused.«
-->
## Expected Behavior
<!--
Describe the desired behavior you expect after mitigation of the issue,
e.g., »The window left next to the current window should be focused.«
-->
## Reproduction Instructions
<!--
For bug reports, please provide detailed instructions on how the bug can be reproduced.
For feature requests you can remove this section.
E.g., »Open three windows in a V[A H[B C]] layout on a new workspace«
-->
## Environment
<!--
Please include your exact i3 version.
Note that we only support the latest major release and the current development version. If you are using an older version of i3, please first update to the current release version and reproduce the issue there.
-->
Output of `i3 --moreversion 2>&-`:
<pre>
i3 version:
</pre>
<!--
For bug reports, please include your (complete) i3 config with which the issue occurs. You can either paste the file directly or provide a link to a service such as pastebin.
If you would like to help debugging the issue, please try to reduce the config such that it is as close to the default config as possible while still reproducing the issue. This can help us bisect the root cause.
-->
<pre>
</pre>
<!--
Providing a logfile can help us trace the root cause of an issue much quicker. You can learn how to generate the logfile here:
https://i3wm.org/docs/debugging.html
Providing the logfile is optional.
-->
<pre>
Logfile URL:
</pre>
<!--
Please also answer the questions below to help us process your issue faster. If you have any other information to share, please add it here as well.
-->
<pre>
- Linux Distribution & Version:
- Are you using a compositor (e.g., xcompmgr or compton):
</pre>

107
.github/ISSUE_TEMPLATE/bug_report.yml vendored Executable file
View File

@@ -0,0 +1,107 @@
name: Bug Report
description: Create a report to help us improve.
labels: [bug]
body:
- type: checkboxes
id: terms
attributes:
label: Welcome
options:
- label: Yes, I'm using the latest major release or the current development version. These are the only supported versions.
required: true
- label: Yes, I've searched similar issues and discussions on GitHub and didn't find any.
required: true
- type: textarea
id: current
attributes:
label: Current Behavior
placeholder: |-
Describe the current behavior,
e.g., »When pressing Alt+j (focus left), the window above the current window is focused.«
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
placeholder: |-
Describe the desired behavior you expect after mitigation of the issue,
e.g., »The window left next to the current window should be focused.«
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction Instructions
placeholder: |-
Please provide detailed instructions on how the bug can be reproduced.
E.g., »Open three windows in a V[A H[B C]] layout on a new workspace«
validations:
required: true
- type: textarea
id: version
attributes:
label: i3 version
description: |-
Paste the output of
```
i3 --moreversion 2>&-
```
render: text
validations:
required: true
- type: textarea
id: config
attributes:
label: Config file
description: |-
Please include your (complete) i3 config with which the issue occurs.
If you would like to help debugging the issue, please try to reduce the config such that it is as close to the default config as possible while still reproducing the issue. This can help us bisect the root cause.
render: text
validations:
required: true
- type: input
id: distro
attributes:
label: Linux distribution & Version
validations:
required: true
- type: dropdown
id: compositor
attributes:
label: Are you using a compositor?
description: |-
Try running
```shell
pidof picom
pidof compton
```
If any IDs show up, you are running a compositor
options:
- I don't know
- I am sure I don't run any compositor
- picom
- compton
- Other
validations:
required: true
- type: input
id: verbose-output
attributes:
label: Logfile
description: |-
Providing the URL to a logfile can help us trace the root cause of an issue much quicker. You can learn how to generate the logfile here:
https://i3wm.org/docs/debugging.html
Providing the logfile is optional.
validations:
required: false

7
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
contact_links:
- name: Userguide
url: https://i3wm.org/docs/userguide.html
about: i3 Users Guide
- name: Ask a question or request support for using i3
url: https://github.com/i3/i3/discussions/new
about: Ask a question or request support for using i3

57
.github/ISSUE_TEMPLATE/feature_request.yml vendored Executable file
View File

@@ -0,0 +1,57 @@
name: Feature request
description: Suggest an idea for this project
labels: [enhancement]
body:
- type: checkboxes
id: terms
attributes:
label: Welcome
options:
- label: Yes, I've searched similar issues and discussions on GitHub and didn't find any.
required: true
- type: checkboxes
id: impact
attributes:
label: Impact
description: |-
Please note that at this point we focus on maintaining i3 and fixing bugs, and will rarely consider features which require further configuration or significant complexity.
In such cases you should consider and present specific benefits derived from adding this feature such that it can be weighed against the cost of additional complexity and maintenance.
Keep in mind that i3 provides a powerful way to interact with it through its IPC interface: https://i3wm.org/docs/ipc.html.
options:
- label: This feature requires new configuration and/or commands
required: false
- type: textarea
id: current
attributes:
label: Current Behavior
placeholder: |-
Describe the current behavior,
e.g., »When pressing Alt+j (focus left), the window above the current window is focused.«
validations:
required: true
- type: textarea
id: desired
attributes:
label: Desired Behavior
placeholder: |-
Describe the desired behavior you expect after mitigation of the issue,
e.g., »The window left next to the current window should be focused.«
validations:
required: true
- type: textarea
id: version
attributes:
label: i3 version
description: |-
Paste the output of
```
i3 --moreversion 2>&-
```
render: text
validations:
required: true

98
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,98 @@
name: GitHub Actions
on:
push:
branches: [ next, master, actions ]
pull_request:
branches: [ next ]
jobs:
build:
name: build and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
DOCKER_EMAIL: ${{ secrets.DOCKER_EMAIL }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BALTO_TOKEN: ${{ secrets.BALTO_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: construct container name
run: |
echo "BASENAME=i3wm/travis-base:$(date +'%Y-%m')-$(./travis/ha.sh travis/travis-base.Dockerfile)" >> $GITHUB_ENV
echo "BASENAME_UBUNTU=i3wm/travis-base-ubuntu:$(date +'%Y-%m')-$(./travis/ha.sh travis/travis-base-ubuntu.Dockerfile)" >> $GITHUB_ENV
- name: fetch or build Docker container
run: |
docker pull ${{ env.BASENAME }} || ./travis/docker-build-and-push.sh ${{ env.BASENAME }} travis/travis-base.Dockerfile
- name: fetch or build extra Docker containers
if: github.ref == 'refs/heads/next' && matrix.compiler == 'gcc'
run: |
docker pull ${{ env.BASENAME_UBUNTU }} || ./travis/docker-build-and-push.sh ${{ env.BASENAME_UBUNTU }} travis/travis-base-ubuntu.Dockerfile
- name: build i3
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.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 -D_FORTIFY_SOURCE=3" meson setup .. -Ddocs=true -Dmans=true -Db_sanitize=address --buildtype=debugoptimized && ninja -v'
- name: Upload docs html for manual inspection
uses: actions/upload-artifact@v4
with:
name: i3-docs
path: |
build/*.html
if: matrix.compiler == 'gcc'
- name: check spelling
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/check-spelling.pl
- name: run i3 tests
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} ./travis/run-tests.sh
- name: Archive test logs
uses: actions/upload-artifact@v4
with:
name: test-logs
path: build/testsuite-*
if: ${{ failure() }}
- name: build dist tarball
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf distbuild; mkdir distbuild && cd distbuild && meson setup .. -Ddocs=true -Dmans=true && meson dist --no-tests'
- name: build Debian packages
if: github.ref == 'refs/heads/next' && matrix.compiler == 'gcc'
run: |
echo "::group::Debian amd64"
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/debian-build.sh deb/debian-amd64/DIST
echo "::endgroup::"
echo "::group::Ubuntu amd64"
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME_UBUNTU }} ./travis/debian-build.sh deb/ubuntu-amd64/DIST
echo "::endgroup::"
- name: push Debian packages to balto
if: github.ref == 'refs/heads/next' && matrix.compiler == 'gcc'
run: |
travis/push-balto.sh
- name: build docs
if: github.ref == 'refs/heads/next' && matrix.compiler == 'gcc'
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/docs.sh
- name: push docs to GitHub pages
if: github.ref == 'refs/heads/next' && matrix.compiler == 'gcc'
run: |
travis/deploy-github-pages.sh
formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check & print release notes
run: ./release-notes/generator.pl
- name: Install dependencies
run: |
sudo apt-get install -y clang-format-15
- name: Check formatting
run: clang-format-15 --dry-run --Werror $(git ls-files '*.c' '*.h')
- name: Verify safe wrapper functions are used
run: ./travis/check-safe-wrappers.sh

59
.gitignore vendored
View File

@@ -1,37 +1,52 @@
*.o
tags
include/loglevels.h
loglevels.tmp
include/GENERATED_*.h
include/all.h.pch
*~
*.swp
*.gcda
*.gcno
testcases/testsuite-*
testcases/latest
*.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/i3-msg.1
man/i3-msg.xml
man/i3-msg.html
man/i3-nagbar.1
man/i3-nagbar.xml
man/i3-nagbar.html
man/i3-wsbar.1
man/i3-wsbar.xml
man/i3-wsbar.html
man/i3-input.1
man/i3-input.xml
man/i3-input.html
man/i3.1
man/i3.xml
man/i3.html
man/*.1
man/*.xml
man/*.html
*.tar.bz2*
i3
i3-input/i3-input
i3-nagbar/i3-nagbar
i3-msg/i3-msg
i3-config-wizard/i3-config-wizard
docs/*.html
docs/*.aux
docs/*.out
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
# 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

82
AnyEvent-I3/Changes Normal file
View File

@@ -0,0 +1,82 @@
Revision history for AnyEvent-I3
0.19 2024-04-09
* use Carp for errors (includes stacktraces)
* introduce (preferred) RUN_COMMAND spelling
* migrate tooling to ExtUtils::MakeMaker
* implement the tick event
* introduce the sync IPC command
* introduce the GET_BINDING_STATE IPC command
0.18 2017-08-19
* support the GET_CONFIG command
0.17 2017-04-09
* support the shutdown event
* use lib '.' for Perl 5.25.11+
0.16 2014-10-03
* support the barconfig_update and binding event
0.15 2013-02-18
* support the window event
0.14 2012-09-22
* support the mode event
0.13 2012-08-05
* support the GET_VERSION request with a fall-back to i3 --version
0.12 2012-07-11
* taint mode fix: remove relative directories from $ENV{PATH}
0.11 2012-07-10
* taint mode fix for FreeBSD
0.10 2012-07-09
* Use i3 --get-socketpath by default for determining the socket path
* Bugfix: Also delete callbacks which are triggered due to an error
0.09 2011-10-12
* Implement GET_BAR_CONFIG request
0.08 2011-09-26
* Implement GET_MARKS request
* The synopsis mentioned ->workspaces, but its ->get_workspaces
0.07 2010-11-21
* Implement GET_TREE request
0.06 2010-06-16
* Add check to Makefile to abort in a Windows environment (neither i3 nor
unix sockets available)
0.05 2010-06-09
* use getpwuid() to resolve ~ in socket paths instead of glob()
0.04 2010-03-27
* use new default ipc-socket path, glob() path, bump version
0.03 2010-03-26
* fix MANIFEST
0.02 2010-03-23
* first upload to CPAN

13
AnyEvent-I3/MANIFEST Normal file
View File

@@ -0,0 +1,13 @@
Changes
lib/AnyEvent/I3.pm
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
README
t/00-load.t
t/01-workspaces.t
t/02-sugar.t
t/boilerplate.t
t/manifest.t
t/pod-coverage.t
t/pod.t

13
AnyEvent-I3/MANIFEST.SKIP Normal file
View File

@@ -0,0 +1,13 @@
^\.git/
\.bak$
blib/
^Makefile$
^Makefile.old$
Build
Build.bat
^pm_to_blib
\.tar\.gz$
^pod2htm(.*).tmp$
^AnyEvent-I3-
^MYMETA.*
^MANIFEST\.bak

100
AnyEvent-I3/Makefile.PL Normal file
View File

@@ -0,0 +1,100 @@
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
if ( $^O eq 'MSWin32' ) {
die "AnyEvent::I3 cannot be used on win32 (unix sockets are missing)";
}
my %meta = (
name => 'AnyEvent-I3',
author => 'Michael Stapelberg, C<< <michael at i3wm.org> >>',
license => ['perl'],
'meta-spec' => { version => 2 },
resources => {
repository => {
url => 'git://github.com/i3/i3',
web => 'https://github.com/i3/i3',
type => 'git',
},
bugtracker => {
web => 'https://github.com/i3/i3/issues',
},
homepage => 'https://i3wm.org/',
license => ['https://dev.perl.org/licenses'],
},
);
my %requirements = (
configure_requires => {
'ExtUtils::MakeMaker' => 6.36,
},
build_requires => {
'ExtUtils::MakeMaker' => 6.36
},
runtime_requires => {
'AnyEvent' => 0,
'AnyEvent::Handle' => 0,
'AnyEvent::Socket' => 0,
'JSON::XS' => 0,
},
test_requires => {
'Test::More' => 0.80,
},
);
my %merged_requirements = (
'ExtUtils::MakeMaker' => 0,
'AnyEvent' => 0,
'AnyEvent::Handle' => 0,
'AnyEvent::Socket' => 0,
'JSON::XS' => 0,
'Test::More' => 0.80,
);
$meta{prereqs}{configure}{requires} = $requirements{configure_requires};
$meta{prereqs}{build}{requires} = $requirements{build_requires};
$meta{prereqs}{runtime}{requires} = $requirements{runtime_requires};
$meta{prereqs}{test}{requires} = $requirements{test_requires};
my %MM_Args = (
AUTHOR => 'Michael Stapelberg',
NAME => 'AnyEvent::I3',
DISTNAME => 'AnyEvent-I3',
EXE_FILES => [],
MIN_PERL_VERSION => '5.006',
VERSION_FROM => 'lib/AnyEvent/I3.pm',
ABSTRACT_FROM => 'lib/AnyEvent/I3.pm',
test => {
TESTS => 't/*.t',
},
);
sub is_eumm {
eval { ExtUtils::MakeMaker->VERSION( $_[0] ) };
}
is_eumm(6.30) and $MM_Args{LICENSE} = $meta{license}[0];
is_eumm(6.47_01) or delete $MM_Args{MIN_PERL_VERSION};
is_eumm(6.52)
and $MM_Args{CONFIGURE_REQUIRES} = $requirements{configure_requires};
is_eumm(6.57_02) and !is_eumm(6.57_07) and $MM_Args{NO_MYMETA} = 1;
if ( is_eumm(6.63_03) ) {
%MM_Args = (
%MM_Args,
TEST_REQUIRES => $requirements{test_requires},
BUILD_REQUIRES => $requirements{build_requires},
PREREQ_PM => $requirements{runtime_requires},
);
}
else {
$MM_Args{PREREQ_PM} = \%merged_requirements;
}
unless ( -f 'META.yml' ) {
$MM_Args{META_ADD} = \%meta;
}
WriteMakefile(%MM_Args);

40
AnyEvent-I3/README Normal file
View File

@@ -0,0 +1,40 @@
AnyEvent-I3
This module connects to the i3 window manager using the UNIX socket based
IPC interface it provides (if enabled in the configuration file). You can
then subscribe to events or send messages and receive their replies.
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc AnyEvent::I3
You can also look for information at:
RT, CPAN's request tracker
https://rt.cpan.org/NoAuth/Bugs.html?Dist=AnyEvent-I3
The i3 window manager website
https://i3wm.org
LICENSE AND COPYRIGHT
Copyright (C) 2010 Michael Stapelberg
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See https://dev.perl.org/licenses/ for more information.

View File

@@ -0,0 +1,597 @@
package AnyEvent::I3;
# vim:ts=4:sw=4:expandtab
use strict;
use warnings;
use JSON::XS;
use AnyEvent::Handle;
use AnyEvent::Socket;
use AnyEvent;
use Encode;
use Carp;
=head1 NAME
AnyEvent::I3 - communicate with the i3 window manager
=cut
our $VERSION = '0.19';
=head1 VERSION
Version 0.19
=head1 SYNOPSIS
This module connects to the i3 window manager using the UNIX socket based
IPC interface it provides (if enabled in the configuration file). You can
then subscribe to events or send messages and receive their replies.
use AnyEvent::I3 qw(:all);
my $i3 = i3();
$i3->connect->recv or die "Error connecting";
say "Connected to i3";
my $workspaces = $i3->message(TYPE_GET_WORKSPACES)->recv;
say "Currently, you use " . @{$workspaces} . " workspaces";
...or, using the sugar methods:
use AnyEvent::I3;
my $workspaces = i3->get_workspaces->recv;
say "Currently, you use " . @{$workspaces} . " workspaces";
A somewhat more involved example which dumps the i3 layout tree whenever there
is a workspace event:
use Data::Dumper;
use AnyEvent;
use AnyEvent::I3;
my $i3 = i3();
$i3->connect->recv or die "Error connecting to i3";
$i3->subscribe({
workspace => sub {
$i3->get_tree->cb(sub {
my ($tree) = @_;
say "tree: " . Dumper($tree);
});
}
})->recv->{success} or die "Error subscribing to events";
AE::cv->recv
=head1 EXPORT
=head2 $i3 = i3([ $path ]);
Creates a new C<AnyEvent::I3> object and returns it.
C<path> is an optional path of the UNIX socket to connect to. It is strongly
advised to NOT specify this unless you're absolutely sure you need it.
C<AnyEvent::I3> will automatically figure it out by querying the running i3
instance on the current DISPLAY which is almost always what you want.
=head1 SUBROUTINES/METHODS
=cut
use Exporter qw(import);
use base 'Exporter';
our @EXPORT = qw(i3);
use constant TYPE_RUN_COMMAND => 0;
use constant TYPE_COMMAND => 0;
use constant TYPE_GET_WORKSPACES => 1;
use constant TYPE_SUBSCRIBE => 2;
use constant TYPE_GET_OUTPUTS => 3;
use constant TYPE_GET_TREE => 4;
use constant TYPE_GET_MARKS => 5;
use constant TYPE_GET_BAR_CONFIG => 6;
use constant TYPE_GET_VERSION => 7;
use constant TYPE_GET_BINDING_MODES => 8;
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_STATE)
] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} } );
my $magic = "i3-ipc";
# TODO: auto-generate this from the header file? (i3/ipc.h)
my $event_mask = (1 << 31);
my %events = (
workspace => ($event_mask | 0),
output => ($event_mask | 1),
mode => ($event_mask | 2),
window => ($event_mask | 3),
barconfig_update => ($event_mask | 4),
binding => ($event_mask | 5),
shutdown => ($event_mask | 6),
tick => ($event_mask | 7),
_error => 0xFFFFFFFF,
);
sub i3 {
AnyEvent::I3->new(@_)
}
sub _call_i3 {
my ($args) = @_;
chomp(my $result = qx(i3 $args));
if ($result =~ /^([^\0]+)$/) {
return $1;
}
warn "Calling i3 $args failed. Is DISPLAY set and is i3 in your PATH?";
return undef;
}
=head2 $i3 = AnyEvent::I3->new([ $path ])
Creates a new C<AnyEvent::I3> object and returns it.
C<path> is an optional path of the UNIX socket to connect to. It is strongly
advised to NOT specify this unless you're absolutely sure you need it.
C<AnyEvent::I3> will automatically figure it out by querying the running i3
instance on the current DISPLAY which is almost always what you want.
=cut
sub new {
my ($class, $path) = @_;
# We have I3SOCK now
$path ||= $ENV{I3SOCK};
$path ||= _call_i3('--get-socketpath');
# Check if we need to resolve ~
if ($path =~ /~/) {
my $home = $ENV{HOME};
confess "Could not get home directory" unless $home and -d $home;
$path =~ s/~/$home/g;
}
if(!-S $path) {
die "$path is not a socket", $/;
}
bless { path => $path } => $class;
}
=head2 $i3->connect
Establishes the connection to i3. Returns an C<AnyEvent::CondVar> which will
be triggered with a boolean (true if the connection was established) as soon as
the connection has been established.
if ($i3->connect->recv) {
say "Connected to i3";
}
=cut
sub connect {
my ($self) = @_;
my $cv = AnyEvent->condvar;
tcp_connect "unix/", $self->{path}, sub {
my ($fh) = @_;
return $cv->send(0) unless $fh;
$self->{ipchdl} = AnyEvent::Handle->new(
fh => $fh,
on_read => sub { my ($hdl) = @_; $self->_data_available($hdl) },
on_error => sub {
my ($hdl, $fatal, $msg) = @_;
delete $self->{ipchdl};
$hdl->destroy;
my $cb = $self->{callbacks};
# Trigger all one-time callbacks with undef
for my $type (keys %{$cb}) {
next if ($type & $event_mask) == $event_mask;
$cb->{$type}->();
delete $cb->{$type};
}
# Trigger _error callback, if set
my $type = $events{_error};
return unless defined($cb->{$type});
$cb->{$type}->($msg);
}
);
$cv->send(1)
};
$cv
}
sub _data_available {
my ($self, $hdl) = @_;
$hdl->unshift_read(
chunk => length($magic) + 4 + 4,
sub {
my $header = $_[1];
# Unpack message length and read the payload
my ($len, $type) = unpack("LL", substr($header, length($magic)));
$hdl->unshift_read(
chunk => $len,
sub { $self->_handle_i3_message($type, $_[1]) }
);
}
);
}
sub _handle_i3_message {
my ($self, $type, $payload) = @_;
return unless defined($self->{callbacks}->{$type});
my $cb = $self->{callbacks}->{$type};
$cb->(decode_json $payload);
return if ($type & $event_mask) == $event_mask;
# If this was a one-time callback, we delete it
# (when connection is lost, all one-time callbacks get triggered)
delete $self->{callbacks}->{$type};
}
=head2 $i3->subscribe(\%callbacks)
Subscribes to the given event types. This function awaits a hashref with the
key being the name of the event and the value being a callback.
my %callbacks = (
workspace => sub { say "Workspaces changed" }
);
if ($i3->subscribe(\%callbacks)->recv->{success}) {
say "Successfully subscribed";
}
The special callback with name C<_error> is called when the connection to i3
is killed (because of a crash, exit or restart of i3 most likely). You can
use it to print an appropriate message and exit cleanly or to try to reconnect.
my %callbacks = (
_error => sub {
my ($msg) = @_;
say "I am sorry. I am so sorry: $msg";
exit 1;
}
);
$i3->subscribe(\%callbacks)->recv;
=cut
sub subscribe {
my ($self, $callbacks) = @_;
# Register callbacks for each message type
for my $key (keys %{$callbacks}) {
if (!exists $events{$key}) {
warn "Could not subscribe to event type '$key'." .
" Supported events are " . join(" ", sort keys %events), $/;
next;
}
my $type = $events{$key};
$self->{callbacks}->{$type} = $callbacks->{$key};
}
$self->message(TYPE_SUBSCRIBE, [ keys %{$callbacks} ])
}
=head2 $i3->message($type, $content)
Sends a message of the specified C<type> to i3, possibly containing the data
structure C<content> (or C<content>, encoded as utf8, if C<content> is a
scalar), if specified.
my $reply = $i3->message(TYPE_RUN_COMMAND, "reload")->recv;
if ($reply->{success}) {
say "Configuration successfully reloaded";
}
=cut
sub message {
my ($self, $type, $content) = @_;
confess "No message type specified" unless defined($type);
confess "No connection to i3" unless defined($self->{ipchdl});
my $payload = "";
if ($content) {
if (not ref($content)) {
# Convert from Perls internal encoding to UTF8 octets
$payload = encode_utf8($content);
} else {
$payload = encode_json $content;
}
}
my $message = $magic . pack("LL", length($payload), $type) . $payload;
$self->{ipchdl}->push_write($message);
my $cv = AnyEvent->condvar;
# We dont preserve the old callback as it makes no sense to
# have a callback on message reply types (only on events)
$self->{callbacks}->{$type} =
sub {
my ($reply) = @_;
$cv->send($reply);
undef $self->{callbacks}->{$type};
};
$cv
}
=head1 SUGAR METHODS
These methods intend to make your scripts as beautiful as possible. All of
them automatically establish a connection to i3 blockingly (if it does not
already exist).
=cut
sub _ensure_connection {
my ($self) = @_;
return if defined($self->{ipchdl});
$self->connect->recv or confess "Unable to connect to i3 (socket path " . $self->{path} . ")";
}
=head2 get_workspaces
Gets the current workspaces from i3.
my $ws = i3->get_workspaces->recv;
say Dumper($ws);
=cut
sub get_workspaces {
my ($self) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_WORKSPACES)
}
=head2 get_outputs
Gets the current outputs from i3.
my $outs = i3->get_outputs->recv;
say Dumper($outs);
=cut
sub get_outputs {
my ($self) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_OUTPUTS)
}
=head2 get_tree
Gets the layout tree from i3 (>= v4.0).
my $tree = i3->get_tree->recv;
say Dumper($tree);
=cut
sub get_tree {
my ($self) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_TREE)
}
=head2 get_marks
Gets all the window identifier marks from i3 (>= v4.1).
my $marks = i3->get_marks->recv;
say Dumper($marks);
=cut
sub get_marks {
my ($self) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_MARKS)
}
=head2 get_bar_config
Gets the bar configuration for the specific bar id from i3 (>= v4.1).
my $config = i3->get_bar_config($id)->recv;
say Dumper($config);
=cut
sub get_bar_config {
my ($self, $id) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_BAR_CONFIG, $id)
}
=head2 get_version
Gets the i3 version via IPC, with a fall-back that parses the output of i3
--version (for i3 < v4.3).
my $version = i3->get_version()->recv;
say "major: " . $version->{major} . ", minor = " . $version->{minor};
=cut
sub get_version {
my ($self) = @_;
$self->_ensure_connection;
my $cv = AnyEvent->condvar;
my $version_cv = $self->message(TYPE_GET_VERSION);
my $timeout;
$timeout = AnyEvent->timer(
after => 1,
cb => sub {
warn "Falling back to i3 --version since the running i3 doesnt support GET_VERSION yet.";
my $version = _call_i3('--version');
$version =~ s/^i3 version //;
my $patch = 0;
my ($major, $minor) = ($version =~ /^([0-9]+)\.([0-9]+)/);
if ($version =~ /^[0-9]+\.[0-9]+\.([0-9]+)/) {
$patch = $1;
}
# Strip everything from the © sign on.
$version =~ s/ ©.*$//g;
$cv->send({
major => int($major),
minor => int($minor),
patch => int($patch),
human_readable => $version,
});
undef $timeout;
},
);
$version_cv->cb(sub {
undef $timeout;
$cv->send($version_cv->recv);
});
return $cv;
}
=head2 get_config
Gets the raw last read config from i3. Requires i3 >= 4.14
=cut
sub get_config {
my ($self) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_CONFIG);
}
=head2 send_tick
Sends a tick event. Requires i3 >= 4.15
=cut
sub send_tick {
my ($self, $payload) = @_;
$self->_ensure_connection;
$self->message(TYPE_SEND_TICK, $payload);
}
=head2 sync
Sends an i3 sync event. Requires i3 >= 4.16
=cut
sub sync {
my ($self, $payload) = @_;
$self->_ensure_connection;
$self->message(TYPE_SYNC, $payload);
}
=head2 command($content)
Makes i3 execute the given command
my $reply = i3->command("reload")->recv;
die "command failed" unless $reply->{success};
=cut
sub command {
my ($self, $content) = @_;
$self->_ensure_connection;
$self->message(TYPE_RUN_COMMAND, $content)
}
=head1 AUTHOR
Michael Stapelberg, C<< <michael at i3wm.org> >>
=head1 BUGS
Please report any bugs or feature requests to C<bug-anyevent-i3 at
rt.cpan.org>, or through the web interface at
L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-I3>. I will be
notified, and then you'll automatically be notified of progress on your bug as
I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc AnyEvent::I3
You can also look for information at:
=over 2
=item * RT: CPAN's request tracker
L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=AnyEvent-I3>
=item * The i3 window manager website
L<https://i3wm.org>
=back
=head1 ACKNOWLEDGEMENTS
=head1 LICENSE AND COPYRIGHT
Copyright 2010-2012 Michael Stapelberg.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See https://dev.perl.org/licenses/ for more information.
=cut
1; # End of AnyEvent::I3

10
AnyEvent-I3/t/00-load.t Normal file
View File

@@ -0,0 +1,10 @@
#!perl
use Test::More tests => 1;
BEGIN {
use_ok( 'AnyEvent::I3' ) || print "Bail out!
";
}
diag( "Testing AnyEvent::I3 $AnyEvent::I3::VERSION, Perl $], $^X" );

View File

@@ -0,0 +1,29 @@
#!perl
# vim:ts=4:sw=4:expandtab
use Test::More tests => 3;
use AnyEvent::I3;
use AnyEvent;
my $i3 = i3();
my $cv = AnyEvent->condvar;
# Try to connect to i3
$i3->connect->cb(sub { my ($v) = @_; $cv->send($v->recv) });
# But cancel if we are not connected after 0.5 seconds
my $t = AnyEvent->timer(after => 0.5, cb => sub { $cv->send(0) });
my $connected = $cv->recv;
SKIP: {
skip 'No connection to i3', 3 unless $connected;
my $workspaces = $i3->message(1)->recv;
isa_ok($workspaces, 'ARRAY');
ok(@{$workspaces} > 0, 'More than zero workspaces found');
ok(defined(@{$workspaces}[0]->{num}), 'JSON deserialized');
}
diag( "Testing AnyEvent::I3 $AnyEvent::I3::VERSION, Perl $], $^X" );

29
AnyEvent-I3/t/02-sugar.t Normal file
View File

@@ -0,0 +1,29 @@
#!perl
# vim:ts=4:sw=4:expandtab
use Test::More tests => 3;
use AnyEvent::I3;
use AnyEvent;
my $i3 = i3();
my $cv = AnyEvent->condvar;
# Try to connect to i3
$i3->connect->cb(sub { my ($v) = @_; $cv->send($v->recv) });
# But cancel if we are not connected after 0.5 seconds
my $t = AnyEvent->timer(after => 0.5, cb => sub { $cv->send(0) });
my $connected = $cv->recv;
SKIP: {
skip 'No connection to i3', 3 unless $connected;
my $workspaces = i3->get_workspaces->recv;
isa_ok($workspaces, 'ARRAY');
ok(@{$workspaces} > 0, 'More than zero workspaces found');
ok(defined(@{$workspaces}[0]->{num}), 'JSON deserialized');
}
diag( "Testing AnyEvent::I3 $AnyEvent::I3::VERSION, Perl $], $^X" );

View File

@@ -0,0 +1,55 @@
#!perl
use strict;
use warnings;
use Test::More tests => 3;
sub not_in_file_ok {
my ($filename, %regex) = @_;
open( my $fh, '<', $filename )
or die "couldn't open $filename for reading: $!";
my %violated;
while (my $line = <$fh>) {
while (my ($desc, $regex) = each %regex) {
if ($line =~ $regex) {
push @{$violated{$desc}||=[]}, $.;
}
}
}
if (%violated) {
fail("$filename contains boilerplate text");
diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
} else {
pass("$filename contains no boilerplate text");
}
}
sub module_boilerplate_ok {
my ($module) = @_;
not_in_file_ok($module =>
'the great new $MODULENAME' => qr/ - The great new /,
'boilerplate description' => qr/Quick summary of what the module/,
'stub function definition' => qr/function[12]/,
);
}
TODO: {
local $TODO = "Need to replace the boilerplate text";
not_in_file_ok(README =>
"The README is used..." => qr/The README is used/,
"'version information here'" => qr/to provide version information/,
);
not_in_file_ok(Changes =>
"placeholder date/time" => qr(Date/time)
);
module_boilerplate_ok('lib/AnyEvent/I3.pm');
}

13
AnyEvent-I3/t/manifest.t Normal file
View File

@@ -0,0 +1,13 @@
#!perl
use strict;
use warnings;
use Test::More;
unless ( $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
eval "use Test::CheckManifest 0.9";
plan skip_all => "Test::CheckManifest 0.9 required" if $@;
ok_manifest();

View File

@@ -0,0 +1,18 @@
use strict;
use warnings;
use Test::More;
# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
all_pod_coverage_ok();

12
AnyEvent-I3/t/pod.t Normal file
View File

@@ -0,0 +1,12 @@
#!perl
use strict;
use warnings;
use Test::More;
# Ensure a recent version of Test::Pod
my $min_tp = 1.22;
eval "use Test::Pod $min_tp";
plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
all_pod_files_ok();

47
CMDMODE
View File

@@ -1,47 +0,0 @@
---------------------
- Command mode
---------------------
This is the grammar for the 'command mode' (your configuration file
uses these commands, too).
left := <h> | <cursor-left>
right := <l> | <cursor-right>
up := <j> | <cursor-up>
down := <k> | <cursor-down>
where := <left|right|up|down> | <tag>
move := <m>
snap := <s>
cmd := [ <times> ] [ <move> | <snap> ] <where>
with := <w> { [ <times> ] <where> }+ <space> <cmd>
jump := [ "<window class>[/<window title>]" | <workspace> [ <column> <row> ] ]
focus := focus [ <times> | floating | tiling | ft ]
(travels the focus stack backwards, <times> number of times (by default 1).
So by specifying "focus 1" it selects the window which last had the focus
before you focused the current one window.
The following 3 special values are also valid:
'floating' (select the next floating window).
'tiling' (select the next tiling window).
'ft' (toggle tiling/floating: if the current window is floating,
select the next tiling window and vice-versa)
special := [ exec <path> | kill | exit | restart ]
input := [ <cmd> | <with> | <jump> | <focus> | <special> ]
you can cancel command mode by pressing escape anytime.
Some examples:
Select the window on the left:
h
Select the window two places on the left:
2h
Move window to the right:
ml
Move window and window on the bottom to the right:
wk ml

65
DEPENDS
View File

@@ -4,36 +4,41 @@
"min" means minimum required version
"lkgv" means last known good version
┌─────────────┬────────┬────────┬────────────────────────────────────────┐
│ dependency │ min. │ lkgv │ URL │
├─────────────┼────────┼────────┼────────────────────────────────────────┤
│ pkg-config │ 0.25 │ 0.26 │ http://pkgconfig.freedesktop.org/ │
xcb-proto │ 1.3 │ 1.6 │ http://xcb.freedesktop.org/dist/ │
libxcb 1.1.93 │ 1.7 │ http://xcb.freedesktop.org/dist/ │
│ xcb-util │ 0.3.3 │ 0.3.8 │ http://xcb.freedesktop.org/dist/
libev │ 3.0 │ 4.04 │ http://libev.schmorp.de/
flex │ 2.5.35 │ 2.5.35 │ http://flex.sourceforge.net/
bison │ 2.4.1 │ 2.4.1 │ http://www.gnu.org/software/bison/
yajl │ 1.0.8 │ 2.0.1 │ http://lloyd.github.com/yajl/
asciidoc8.3.0 │ 8.6.4 │ http://www.methods.co.nz/asciidoc/
xmlto0.0.23 │ 0.0.23 │ http://www.methods.co.nz/asciidoc/
docbook-xml │ 4.5 │ 4.5 │ http://www.methods.co.nz/asciidoc/
libxcursor │ 1.1.11 │ 1.1.11 │ http://ftp.x.org/pub/current/src/lib/
Xlib1.3.3 │ 1.4.3 │ http://ftp.x.org/pub/current/src/lib/
└─────────────┴────────┴────────┴────────────────────────────────────────┘
┌─────────────┬────────┬────────┬─────────────────────────────────────────────────────────────
│ dependency │ min. │ lkgv │ URL
├─────────────┼────────┼────────┼─────────────────────────────────────────────────────────────
│ pkg-config │ 0.25 │ 0.29 │ https://pkgconfig.freedesktop.org/
libxcb │ 1.1.93 │ 1.12 │ https://xcb.freedesktop.org/dist/
xcb-util0.3.3 0.4.1 │ https://xcb.freedesktop.org/dist/
│ xkbcommon │ 0.4.0 │ 0.6.1 │ https://xkbcommon.org/
xkbcommon-x11│ 0.4.0 │ 0.6.1 │ https://xkbcommon.org/
util-cursor³⁴│ 0.0.99 │ 0.1.3 │ https://xcb.freedesktop.org/dist/
util-wm⁴ │ 0.3.8 │ 0.3.8 │ https://xcb.freedesktop.org/dist/
util-keysyms⁴│ 0.3.8 │ 0.4.0 │ https://xcb.freedesktop.org/dist/
util-xrm⁴1.0.0 │ 1.0.0 │ https://github.com/Airblader/xcb-util-xrm/
libev 4.0 │ 4.19 │ http://libev.schmorp.de/
yajl │ 2.0.1 │ 2.1.0 │ https://lloyd.github.com/yajl/
asciidoc │ 8.3.0 │ 8.6.9 │ http://www.methods.co.nz/asciidoc/
xmlto0.0.23 │ 0.0.23 │ http://www.methods.co.nz/asciidoc/
│ Pod::Simple² │ 3.22 │ 3.22 │ http://search.cpan.org/dist/Pod-Simple/ │
│ docbook-xml │ 4.5 │ 4.5 │ http://www.methods.co.nz/asciidoc/ │
│ PCRE │ 8.12 │ 8.38 │ https://www.pcre.org/ │
│ libsn¹ │ 0.10 │ 0.12 │ https://freedesktop.org/wiki/Software/startup-notification/ │
│ pango │ 1.30.0 │ 1.40.1 │ http://www.pango.org/ │
│ cairo │ 1.14.4 │ 1.14.6 │ https://cairographics.org/ │
└──────────────┴────────┴────────┴─────────────────────────────────────────────────────────────┘
¹ libsn = libstartup-notification
² Pod::Simple is a Perl module required for converting the testsuite
documentation to HTML. See https://michael.stapelberg.de/cpan/#Pod::Simple
³ xcb-util-cursor, to be precise.
⁴ Depending on your distribution, this might be considered part of xcb-util.
i3-msg, i3-input, i3-nagbar and i3-config-wizard do not introduce any new
dependencies.
i3bar, i3-msg, i3-input, i3-nagbar and i3-config-wizard do not introduce any
new dependencies.
i3-wsbar is implemented in Perl and has the following dependencies:
i3-migrate-config-to-v4 and i3-dmenu-desktop are implemented in Perl, but have
no dependencies besides Perl 5.10.
• IPC::Run
• Try::Tiny
• AnyEvent
• AnyEvent::I3
All of them are available at CPAN, see http://search.cpan.org/
Use your distributions packages or cpan(1) to install them.
i3-migrate-config-to-v4 is implemented in Perl, but it has no dependencies
besides Perl 5.10.
i3-save-tree is also implemented in Perl and needs AnyEvent::I3 (>= 0.12) and
JSON::XS. While i3-save-tree is not required for running i3 itself, it is
strongly recommended to provide it in distribution packages.

6
GOALS
View File

@@ -1,6 +0,0 @@
GOALS (these have to be fullfilled all the time):
* Do _NOT_ use autotools or a similar mechanism. Instead, document all
requirements properly so that packagers for every plattform can easily
provide users with a package. Those who build software for themselves
do know how to install requirements, if they are documented.

1
I3_VERSION Normal file
View File

@@ -0,0 +1 @@
4.19.1-non-git

43
LICENSE
View File

@@ -1,27 +1,26 @@
Copyright (c) 2009, Michael Stapelberg
All rights reserved.
Copyright © 2009, Michael Stapelberg and contributors
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.

138
Makefile
View File

@@ -1,138 +0,0 @@
TOPDIR=$(shell pwd)
include $(TOPDIR)/common.mk
# Depend on the object files of all source-files in src/*.c and on all header files
AUTOGENERATED:=src/cfgparse.tab.c src/cfgparse.yy.c src/cmdparse.tab.c src/cmdparse.yy.c
FILES:=$(filter-out $(AUTOGENERATED),$(wildcard src/*.c))
FILES:=$(FILES:.c=.o)
HEADERS:=$(filter-out include/loglevels.h,$(wildcard include/*.h))
# Recursively generate loglevels.h by explicitly calling make
# We need this step because we need to ensure that loglevels.h will be
# updated if necessary, but we also want to save rebuilds of the object
# files, so we cannot let the object files depend on loglevels.h.
ifeq ($(MAKECMDGOALS),loglevels.h)
#UNUSED:=$(warning Generating loglevels.h)
else
UNUSED:=$(shell $(MAKE) loglevels.h)
endif
SUBDIRS=i3-msg i3-input i3-nagbar i3-config-wizard
# Depend on the specific file (.c for each .o) and on all headers
src/%.o: src/%.c ${HEADERS}
echo "CC $<"
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -c -o $@ $<
all: i3 subdirs
i3: src/cfgparse.y.o src/cfgparse.yy.o src/cmdparse.y.o src/cmdparse.yy.o ${FILES}
echo "LINK i3"
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
subdirs:
for dir in $(SUBDIRS); do \
echo ""; \
echo "MAKE $$dir"; \
$(MAKE) -C $$dir; \
done
loglevels.h:
echo "LOGLEVELS"
for file in $$(ls src/*.c src/*.y src/*.l | grep -v 'cfgparse.\(tab\|yy\).c'); \
do \
echo $$(basename $$file .c); \
done > loglevels.tmp
(echo "char *loglevels[] = {"; for file in $$(cat loglevels.tmp); \
do \
echo "\"$$file\", "; \
done; \
echo "};") > include/loglevels.h;
src/cfgparse.yy.o: src/cfgparse.l src/cfgparse.y.o ${HEADERS}
echo "LEX $<"
flex -i -o$(@:.o=.c) $<
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
src/cmdparse.yy.o: src/cmdparse.l src/cmdparse.y.o ${HEADERS}
echo "LEX $<"
flex -Pcmdyy -i -o$(@:.o=.c) $<
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cmdparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
src/cfgparse.y.o: src/cfgparse.y ${HEADERS}
echo "YACC $<"
bison --debug --verbose -b $(basename $< .y) -d $<
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)
src/cmdparse.y.o: src/cmdparse.y ${HEADERS}
echo "YACC $<"
bison -p cmdyy --debug --verbose -b $(basename $< .y) -d $<
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cmdparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)
install: all
echo "INSTALL"
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/i3
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions
$(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || $(INSTALL) -m 0644 i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
$(INSTALL) -m 0644 i3.welcome $(DESTDIR)$(SYSCONFDIR)/i3/welcome
$(INSTALL) -m 0644 i3.desktop $(DESTDIR)$(PREFIX)/share/xsessions/
$(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir install; \
done
dist: distclean
[ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
[ ! -e i3-${VERSION}.tar.bz2 ] || rm i3-${VERSION}.tar.bz2
mkdir i3-${VERSION}
cp i3-migrate-config-to-v4 i3.config.keycodes DEPENDS GOALS LICENSE PACKAGE-MAINTAINER TODO RELEASE-NOTES-${VERSION} i3.config i3.desktop i3.welcome pseudo-doc.doxygen i3-wsbar Makefile i3-${VERSION}
cp -r src i3-msg i3-nagbar i3-config-wizard yajl-fallback include man i3-${VERSION}
# Only copy toplevel documentation (important stuff)
mkdir i3-${VERSION}/docs
# Pre-generate documentation
make -C docs
# Cleanup τεχ output files
find docs -regex ".*\.\(aux\|out\|log\|toc\|bm\|dvi\|log\)" -exec rm '{}' \;
find docs -maxdepth 1 -type f ! \( -name "*.xcf" -or -name "*.svg" \) -exec cp '{}' i3-${VERSION}/docs \;
# Only copy source code from i3-input
mkdir i3-${VERSION}/i3-input
find i3-input -maxdepth 1 -type f \( -name "*.c" -or -name "*.h" -or -name "Makefile" \) -exec cp '{}' i3-${VERSION}/i3-input \;
sed -e 's/^GIT_VERSION:=\(.*\)/GIT_VERSION:=$(shell echo '${GIT_VERSION}' | sed 's/\\/\\\\/g')/g;s/^VERSION:=\(.*\)/VERSION:=${VERSION}/g' common.mk > i3-${VERSION}/common.mk
# Pre-generate a manpage to allow distributors to skip this step and save some dependencies
$(MAKE) -C man
cp man/*.1 i3-${VERSION}/man/
tar cfj i3-${VERSION}.tar.bz2 i3-${VERSION}
rm -rf i3-${VERSION}
clean:
rm -f src/*.o src/*.gcno src/cfgparse.tab.{c,h} src/cfgparse.yy.c src/cfgparse.{output,dot} src/cmdparse.tab.{c,h} src/cmdparse.yy.c src/cmdparse.{output,dot} loglevels.tmp include/loglevels.h
(which lcov >/dev/null && lcov -d . --zerocounters) || true
$(MAKE) -C docs clean
$(MAKE) -C man clean
for dir in $(SUBDIRS); do \
echo ""; \
echo "CLEAN $$dir"; \
$(MAKE) TOPDIR=$(TOPDIR) -C $$dir distclean; \
done
distclean: clean
rm -f i3
for dir in $(SUBDIRS); do \
echo ""; \
echo "DISTCLEAN $$dir"; \
$(MAKE) TOPDIR=$(TOPDIR) -C $$dir distclean; \
done
coverage:
rm -f /tmp/i3-coverage.info
rm -rf /tmp/i3-coverage
lcov -d . -b . --capture -o /tmp/i3-coverage.info
genhtml -o /tmp/i3-coverage/ /tmp/i3-coverage.info

View File

@@ -10,21 +10,25 @@ packages for them.
Please make sure the manpage for i3 will be properly created and installed
in your package.
Also please provide the path to a suitable terminal emulator which is installed
as a dependency of your package (e.g. urxvt). On systems which have a special
commend to launch the best available terminal emulator, please use this one
(e.g. x-terminal-emulator on debian).
Please check the i3-sensible-{editor,pager,terminal} scripts and modify them if
necessary. The former two provide fallbacks in case $PAGER or $EDITOR is not
set (which might be more common than you think, because they have to be set in
~/.xsession, not in the shell configuration!) while the latter tries to launch
a terminal emulator. The scripts are most prominently used in i3-nagbar, which
alerts the user when the configuration is broken for some reason. Also,
i3-sensible-terminal is used in the default configuration.
On debian, this looks like this:
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.
# Compilation
$(MAKE) TERM_EMU=x-terminal-emulator
$(MAKE) -C man
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 youre unfamiliar:
# Installation
$(MAKE) DESTDIR=$(CURDIR)/debian/i3-wm/ install
mkdir -p $(CURDIR)/debian/i3-wm/usr/share/man/man1
cp man/*.1 $(CURDIR)/debian/i3-wm/usr/share/man/man1
$ mkdir -p build && cd build
$ meson setup
$ 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
@@ -33,10 +37,8 @@ config with the users preferred modifier and should be started on the first
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 http://michael.stapelberg.de/Kontakt, scroll down to bottom),
contact me using the same address in jabber or ask on our IRC channel:
(#i3 on irc.twice-irc.de).
hesitate to contact me. I will help you out. Please see
https://i3wm.org/contact/
Thanks again for your efforts,
Michael

15
README.md Normal file
View File

@@ -0,0 +1,15 @@
![Logo](docs/logo-30.png) i3: A tiling window manager
=====================================================
[![Build Status](https://github.com/i3/i3/actions/workflows/main.yml/badge.svg)](https://github.com/i3/i3/actions/workflows/main.yml)
[![Issue Stats](https://img.shields.io/github/issues/i3/i3.svg)](https://github.com/i3/i3/issues)
[![Pull Request Stats](https://img.shields.io/github/issues-pr/i3/i3.svg)](https://github.com/i3/i3/pulls)
[![Packages](https://repology.org/badge/latest-versions/i3.svg)](https://repology.org/metapackage/i3/versions)
[![Packages](https://repology.org/badge/tiny-repos/i3.svg)](https://repology.org/metapackage/i3/versions)
i3 is a tiling window manager for X11.
For more information about i3, please see [the project's website](https://i3wm.org/) and [online documentation](https://i3wm.org/docs/).
For information about contributing to i3, please see [CONTRIBUTING.md](.github/CONTRIBUTING.md).

View File

@@ -1,135 +0,0 @@
┌────────────────────────────┐
│ Release notes for i3 v4.0 │
└────────────────────────────┘
This is the first release of the new major version of i3, v4.0. It has been a
long time since v3.ε was released (over one year). A lot has been happening
since then, we made 736 commits compare that to the total number of 1664
commits for i3.
The reason for the high number of commits and long time for this release is the
big refactoring we have been doing. Instead of using several lists and a table
as data structures, we now use a single tree of containers. These containers
represent invisible entities like your X11 root window, your different monitors
and workspaces, but also visible entities like actual windows.
Using a tree has made a lot of things cleaner and easier in the code *and* in
the user interface. Admittedly though, you will probably need a day or two to
get used to a few more advanced movement commands if you are used to v3.ε right
now.
┌────────────────────────────┐
│ New features │
└────────────────────────────┘
• In addition to the proper flex/bison based parser for the config file
introduced in 3.δ, we now also have a flex/bison parser for commands. What
this means is that we can have more human-readable, beautiful command names
instead of cryptic commands like 'f' for fullscreen or 'mh' for move left.
In fact, the commands for the aforementioned functions *are* 'fullscreen'
and 'move left'!
• You can now chain commands using ';' (a semicolon). One example for that is
'workspace 3 ; exec /usr/bin/urxvt' to switch to a new workspace and open a
terminal.
• You can specify which windows should be affected by your command by using
different criteria. A good example is '[class="Firefox"] kill' to get rid
of all Firefox windows.
• As the configuration file needs new commands (and a few options are
obsolete), you need to change it. To make this process a little bit easier
for you, this release comes with the script i3-migrate-config-to-v4. Just
run it on your current config file and it will spit out a v4 config file to
stdout. To make things even better, i3 automatically detects v3 config files
and calls that script, so you never end up with a non-working config :).
• Similarly to the criteria when using commands, we now have a 'for_window'
configuration directive, which lets you automatically apply certain commands
to certain windows. Use it to set border styles per window, for example with
'for_window [class="XTerm"] border 1pixel'.
• Since dock clients (like dzen2) are now part of the layout tree (as opposed
to a custom data structure as before), it was easy to implement top and
bottom dock areas. Programs which properly specify the dock hint get placed
on the edge of the screen they request. i3bar has the -dtop and -dbottom
parameters, for example.
• The internal workspace bar is obsolete. Use i3bar instead.
• Resizing now works between all windows!
• Fullscreen now works for everything!
• Floating now works for everything!
• Your layout is now preserved when doing an inplace restart.
• When you have an error in your config file, a new program called i3-nagbar
will tell you so. It offers you two buttons: One to view the error in your
$PAGER and one to edit your config in your $EDITOR.
• The default config used key symbols (like 'bind Mod1+f fullscreen') instead
of key codes. If you use a non-qwerty layout, the program i3-config-wizard
can create a key symbol based config file based on your current layout. You
can also chose between Windows (Mod4) and Alt (Mod1) as your default
modifier. i3-config-wizard will automatically be started as long as you
dont have a configuration file for i3.
• Custom X cursor themes are now supported.
• The RandR backend now respects the primary output.
• A wrong 'font' configuration in your config file will no longer make i3
exit. Instead, it will fall back to a different font and tell you about the
error in its log.
• The default split direction (whether a new window gets placed right next to
the current one or below the current one) is now automatically set to
horizontal if you have a monitor that is wider than high or vertical if you
a monitor which is higher than wide. This works great with rotated monitors.
• Sockets and temporary files are now placed in XDG_RUNTIME_DIR, if set (this
is used on systemd based systems).
• Tools like i3bar, i3-msg etc. use the I3_SOCKET_PATH property which is set
to the X11 root window, so you dont have to configure your socket path
anywhere.
• The kill command kills single windows by default now. To kill a whole
application, use 'kill client'.
• IPC: Commands can now have custom replies. When the parser encounters an
error, a proper error reply is sent.
• There is now an 'exec_always' configuration directive which works like
'exec' but will also be run when restarting.
┌────────────────────────────┐
│ Future features │
└────────────────────────────┘
Our plans were big but our time and manpower is limited. Therefore, the
following features did not make it into this release. However, the foundation
is now in place and implementing them is possible, so stay tuned!
• Saving/Restoring specific parts of your layout
• Session saving
• Sticky windows
┌────────────────────────────┐
│ Thanks! │
└────────────────────────────┘
Thanks for testing, bugfixes, discussions and everything I forgot go out to:
aniou, artoj, badboy, cloud, cradle, David Coppa, dbp, dothebart, eeemsi,
eelvex, f8l, fernando, jan, jimdigriz, jon, julien, kacper, ktosiek,
lexszero, litemotiv, lourens, madroach, marcus, merovius, mike, mirko, mseed,
mxf, phnom, quaec, rogutes, sardemff7, smartass, thepub, tiago, tucos,
woddf2, xpt, ys
-- Michael Stapelberg, 2011-07-31

62
RELEASE-NOTES-4.24 Normal file
View File

@@ -0,0 +1,62 @@
┌──────────────────────────────┐
│ Release notes for i3 v4.24 │
└──────────────────────────────┘
This is i3 v4.24. This version is considered stable. All users of i3 are
strongly encouraged to upgrade.
Aside from a number of bug fixes and detail improvements, the tiling drag
feature has been extended to allow swapping containers with the mouse.
See the swap_modifier in the userguide:
https://i3wm.org/docs/userguide.html
┌────────────────────────────┐
│ Changes in i3 v4.24 │
└────────────────────────────┘
• docs/userguide: add note to default_border about title bar in stacked/tabbed
• docs/userguide: fix focus output next example
• docs/hacking-howto: update build instructions
• docs/testsuite: update instructions
• docs/ipc: update section on IPC socket location
• docs/ipc: describe workspace events in more detail
• i3-sensible-terminal: add rio
• i3bar: use short-form text on a per-block basis
• reap zombie children when starting
• do not grab mouse pointer when executing bindings
• tiling drag: swap containers with the mouse
• disable automatic v3-to-v4 migration script
• pass _NET_WM_STATE_MAXIMIZED_{HORZ, VERT} (fixes tab bar in Google Chrome)
• avoid creating redundant containers when switching between layouts
• deprecate smart_borders in favour of hide_edge_borders smart/smart_no_gaps
• float windows of type _NET_WM_WINDOW_TYPE_NOTIFICATION by default
• add “popup_during_fullscreen all”
• mark fullscreen windows as maximized
• support multiple _NET_WM_STATE changes in one ClientMessage
• fix size_t format specifiers on 32-bit systems
┌────────────────────────────┐
│ Bugfixes │
└────────────────────────────┘
• i3bar: fix clicks when horizontal padding is used
• consider workspace_auto_back_and_forth in focus workspace
• workspace next/prev: do not skip identically numbered workspaces
• make order of numbered workspace consistent with non-numbered
• fix crash with focus output and command criteria matching scratchpad window
• fix crash when reloading config with invalid criteria
• fix error log related crash
┌────────────────────────────┐
│ Thanks! │
└────────────────────────────┘
Thanks for testing, bugfixes, discussions and everything I forgot go out to:
a-kenji, Alessandro Vinciguerra, Bimba Laszlo, colona_, Eddie Lebow, Harimbola
Santatra, Junicchi, Malix, Nikolay Nechaev, Orestis Floros, rsgowman,
sethpollen, Seth Pollen, systec-awe, Tasos Sahanidis, Theo Buehler, Wesley
Schwengle, Yonas Yanfa, yuvallangerontheroad
-- Michael Stapelberg, 2024-11-06

7
TODO
View File

@@ -1,7 +0,0 @@
Please see http://i3.zekjur.net/ for our bugtracker.
Some old notes, just to not lose them:
* was passiert, wenn zwei fenster fullscreen wollen auf dem selben workspace?
* OpenOffice
* funktioniert xinerama etc. mit --below? insbesondere das fokus-verschieben in andere screens

121
common.mk
View File

@@ -1,121 +0,0 @@
UNAME=$(shell uname)
DEBUG=1
COVERAGE=0
INSTALL=install
ifndef PREFIX
PREFIX=/usr
endif
ifndef SYSCONFDIR
ifeq ($(PREFIX),/usr)
SYSCONFDIR=/etc
else
SYSCONFDIR=$(PREFIX)/etc
endif
endif
TERM_EMU=xterm
# The escaping is absurd, but we need to escape for shell, sed, make, define
GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f $(TOPDIR)/.git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' $(TOPDIR)/.git/HEAD || echo 'unknown'))"
VERSION:=$(shell git describe --tags --abbrev=0)
ifeq ($(shell which pkg-config 2>/dev/null 1>/dev/null || echo 1),1)
$(error "pkg-config was not found")
endif
# An easier way to get CFLAGS and LDFLAGS falling back in case there's
# no pkg-config support for certain libraries
cflags_for_lib = $(shell pkg-config --silence-errors --cflags $(1))
ldflags_for_lib = $(shell pkg-config --exists $(1) && pkg-config --libs $(1) || echo -l$(2))
CFLAGS += -std=c99
CFLAGS += -pipe
CFLAGS += -Wall
# unused-function, unused-label, unused-variable are turned on by -Wall
# We dont want unused-parameter because of the use of many callbacks
CFLAGS += -Wunused-value
CFLAGS += -Iinclude
CFLAGS += $(call cflags_for_lib, xcb-keysyms)
ifeq ($(shell pkg-config --exists xcb-util || echo 1),1)
CPPFLAGS += -DXCB_COMPAT
CFLAGS += $(call cflags_for_lib, xcb-atom)
CFLAGS += $(call cflags_for_lib, xcb-aux)
else
CFLAGS += $(call cflags_for_lib, xcb-util)
endif
CFLAGS += $(call cflags_for_lib, xcb-icccm)
CFLAGS += $(call cflags_for_lib, xcb-xinerama)
CFLAGS += $(call cflags_for_lib, xcb-randr)
CFLAGS += $(call cflags_for_lib, xcb)
CFLAGS += $(call cflags_for_lib, xcursor)
CFLAGS += $(call cflags_for_lib, x11)
CFLAGS += $(call cflags_for_lib, yajl)
CFLAGS += $(call cflags_for_lib, libev)
CPPFLAGS += -DI3_VERSION=\"${GIT_VERSION}\"
CPPFLAGS += -DSYSCONFDIR=\"${SYSCONFDIR}\"
CPPFLAGS += -DTERM_EMU=\"$(TERM_EMU)\"
LIBS += -lm
LIBS += $(call ldflags_for_lib, xcb-event, xcb-event)
LIBS += $(call ldflags_for_lib, xcb-keysyms, xcb-keysyms)
ifeq ($(shell pkg-config --exists xcb-util || echo 1),1)
LIBS += $(call ldflags_for_lib, xcb-atom, xcb-atom)
LIBS += $(call ldflags_for_lib, xcb-aux, xcb-aux)
else
LIBS += $(call ldflags_for_lib, xcb-util)
endif
LIBS += $(call ldflags_for_lib, xcb-icccm, xcb-icccm)
LIBS += $(call ldflags_for_lib, xcb-xinerama, xcb-xinerama)
LIBS += $(call ldflags_for_lib, xcb-randr, xcb-randr)
LIBS += $(call ldflags_for_lib, xcb, xcb)
LIBS += $(call ldflags_for_lib, xcursor, Xcursor)
LIBS += $(call ldflags_for_lib, x11, X11)
LIBS += $(call ldflags_for_lib, yajl, yajl)
LIBS += $(call ldflags_for_lib, libev, ev)
ifeq ($(UNAME),NetBSD)
# We need -idirafter instead of -I to prefer the systems iconv over GNU libiconv
CFLAGS += -idirafter /usr/pkg/include
LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib
endif
ifeq ($(UNAME),OpenBSD)
CFLAGS += -I${X11BASE}/include
LIBS += -liconv
LDFLAGS += -L${X11BASE}/lib
endif
ifeq ($(UNAME),FreeBSD)
LIBS += -liconv
endif
ifeq ($(UNAME),Darwin)
LIBS += -liconv
endif
# Fallback for libyajl 1 which did not include yajl_version.h. We need
# YAJL_MAJOR from that file to decide which code path should be used.
CFLAGS += -idirafter yajl-fallback
ifneq (,$(filter Linux GNU GNU/%, $(UNAME)))
CPPFLAGS += -D_GNU_SOURCE
endif
ifeq ($(DEBUG),1)
# Extended debugging flags, macros shall be available in gcc
CFLAGS += -gdwarf-2
CFLAGS += -g3
else
CFLAGS += -O2
CFLAGS += -freorder-blocks-and-partition
endif
ifeq ($(COVERAGE),1)
CFLAGS += -fprofile-arcs -ftest-coverage
LIBS += -lgcov
endif
# Dont print command lines which are run
.SILENT:
# Always remake the following targets
.PHONY: install clean dist distclean

620
contrib/banner.svg Normal file
View File

@@ -0,0 +1,620 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="7086.6138"
height="2622.0471"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.48.1 r9760"
sodipodi:docname="banner.pdf"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs4">
<linearGradient
id="linearGradient3750">
<stop
style="stop-color:#17273b;stop-opacity:1;"
offset="0"
id="stop3752" />
<stop
id="stop4356"
offset="0.41666666"
style="stop-color:#008cd4;stop-opacity:0.78039217;" />
<stop
style="stop-color:#6eb5de;stop-opacity:0.69803923;"
offset="0.87847221"
id="stop4358" />
<stop
style="stop-color:#88bfe5;stop-opacity:0.61960787;"
offset="1"
id="stop3754" />
</linearGradient>
<inkscape:perspective
id="perspective3661"
inkscape:persp3d-origin="750.50629 : 505.26732 : 1"
inkscape:vp_z="683.5728 : 1230.5721 : 1"
inkscape:vp_y="0 : 1946.8917 : 0"
inkscape:vp_x="-526.84957 : 2.2065866e-13 : 0"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3284">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3286" />
<stop
style="stop-color:#ffffff;stop-opacity:0.7518248;"
offset="1"
id="stop3288" />
</linearGradient>
<linearGradient
id="linearGradient3278">
<stop
id="stop3280"
offset="0"
style="stop-color:#33bff7;stop-opacity:0.38039216;" />
<stop
id="stop3282"
offset="1"
style="stop-color:#2d446b;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3272">
<stop
id="stop3274"
offset="0"
style="stop-color:#2596f6;stop-opacity:0.38039216;" />
<stop
id="stop3276"
offset="1"
style="stop-color:#2d446b;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3266">
<stop
id="stop3268"
offset="0"
style="stop-color:#189fff;stop-opacity:0.38039216;" />
<stop
id="stop3270"
offset="1"
style="stop-color:#010b2b;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3244">
<stop
id="stop3246"
offset="0"
style="stop-color:#419bff;stop-opacity:1;" />
<stop
id="stop3248"
offset="1"
style="stop-color:#002359;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3159">
<stop
style="stop-color:#33bff7;stop-opacity:0.38039216;"
offset="0"
id="stop3161" />
<stop
style="stop-color:#2d446b;stop-opacity:1;"
offset="1"
id="stop3163" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-526.84957 : 2.9848654e-13 : 0"
inkscape:vp_y="1.192088e-13 : 1946.8917 : 0"
inkscape:vp_z="680.54236 : 1232.3792 : 1"
inkscape:persp3d-origin="730.30325 : 937.39936 : 1"
id="perspective10" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3244"
id="radialGradient3256"
cx="344.73471"
cy="77.263504"
fx="344.73471"
fy="77.263504"
r="196.15704"
gradientTransform="matrix(-1.39796,-0.05336032,0.08355111,-2.1889079,820.20461,272.08319)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3159"
id="radialGradient3264"
cx="140.3363"
cy="300.27451"
fx="140.3363"
fy="300.27451"
r="206.15704"
gradientTransform="matrix(0.6771172,-0.6830119,1.1802789,1.1700925,-161.83993,77.639162)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3290"
cx="267.50388"
cy="337.12692"
fx="267.50388"
fy="337.12692"
r="77.845421"
gradientTransform="matrix(1,0,0,0.7430849,0,86.613009)"
gradientUnits="userSpaceOnUse" />
<inkscape:perspective
id="perspective3373"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 526.18109 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3211">
<stop
id="stop3213"
offset="0"
style="stop-color: rgb(0, 160, 255); stop-opacity: 1;" />
<stop
id="stop3215"
offset="1"
style="stop-color: rgb(0, 37, 255); stop-opacity: 1;" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3406"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="13.396228"
id="feGaussianBlur3408" />
</filter>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3416"
cx="119.96373"
cy="229.28981"
fx="119.96373"
fy="229.28981"
r="203.19508"
gradientTransform="matrix(0.7210805,2.1168143,-1.4722239,0.5015047,347.53034,-320.94088)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3266"
id="radialGradient3423"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(9.0785365,-9.2630105,16.085822,15.212343,-6979.1531,-2584.4202)"
cx="351.15485"
cy="372.06332"
fx="351.15485"
fy="372.06332"
r="163.57143" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3734"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7210805,2.1168143,-1.4722239,0.5015047,347.53034,-320.94088)"
cx="119.96373"
cy="229.28981"
fx="119.96373"
fy="229.28981"
r="203.19508" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3736"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7210805,2.1168143,-1.4722239,0.5015047,347.53034,-320.94088)"
cx="119.96373"
cy="229.28981"
fx="119.96373"
fy="229.28981"
r="203.19508" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient3758"
cx="390.69662"
cy="258.92429"
fx="390.69662"
fy="258.92429"
r="32.03125"
gradientTransform="matrix(4.0292425,-5.5974184,5.1695404,3.721239,-2510.9809,1613.1551)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient3760"
cx="59.046589"
cy="248.2272"
fx="59.046589"
fy="248.2272"
r="197.15625"
gradientTransform="matrix(1.7105919,-0.04370519,0.03334715,1.3051856,-58.593126,-250.18318)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient3762"
cx="192.64008"
cy="282.40387"
fx="192.64008"
fy="282.40387"
r="133.09375"
gradientTransform="matrix(1.0081228,0.4493093,-1.0529321,2.3624813,273.13721,-455.12138)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient4344"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(5.7478532,-0.5889281,0.4834745,4.7186431,-260.98332,-919.446)"
cx="24"
cy="280.45392"
fx="24"
fy="280.45392"
r="65.0625" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="linearGradient4354"
x1="-125.59599"
y1="-100.47679"
x2="-5.2882538"
y2="-100.47679"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.062500002"
inkscape:cx="2861.2881"
inkscape:cy="656.52996"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="956"
inkscape:window-height="1018"
inkscape:window-x="2560"
inkscape:window-y="162"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-maximized="0"
units="cm" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:contributor>
<cc:Agent>
<dc:title>yellowiscool, farvardin</dc:title>
</cc:Agent>
</dc:contributor>
<dc:creator>
<cc:Agent>
<dc:title>steckdenis</dc:title>
</cc:Agent>
</dc:creator>
<dc:description>Logo for i3 - an improved tiling window manager: http://i3.zekjur.net/</dc:description>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="fond"
style="display:none"
transform="translate(-39.157291,2258.4378)">
<rect
style="opacity:0.87000002;fill:#5599ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:60;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect3241"
width="330"
height="313.5"
x="39"
y="103.86218" />
</g>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(-39.157291,2258.4378)">
<rect
style="fill:#2e2e2e;fill-opacity:1;stroke:none"
id="rect3834"
width="7229.6289"
height="2725.7007"
x="37.157291"
y="-2261.1418" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:155.6656189;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3836"
width="2380.248"
height="2290.5771"
x="507.66498"
y="-2114.5522" />
<rect
style="fill:url(#radialGradient3423);fill-opacity:1;fill-rule:nonzero;stroke:none"
id="rect2383"
width="2558.9255"
height="2445.6987"
x="407.12625"
y="-2192.6528" />
<path
style="opacity:0.09583333;fill:#ffffff;fill-opacity:1;stroke:none"
d="m 413.86349,-2192.5867 c -15.25265,33.2522 -2.32827,78.5617 -6.30947,116.6372 1.72096,380.4493 3.44192,760.8985 5.16287,1141.34766 93.88235,82.98568 229.27384,70.38365 345.4922,86.49033 423.97831,27.2898 850.31151,28.61862 1272.94371,-19.4116 269.6865,-27.22552 539.3778,-69.20434 799.6418,-145.93839 66.2578,-22.2482 149.4887,-73.1004 135.2925,-153.3025 0,-341.9409 0,-683.8819 0,-1025.8227 -850.7413,0 -1701.4825,0 -2552.22361,0 z"
id="path3221"
inkscape:connector-curvature="0" />
<g
transform="matrix(2.6849003,-2.6961195,2.6961195,2.6849003,536.88627,-838.56295)"
style="opacity:0.5;fill:#000000;fill-opacity:1;filter:url(#filter3406)"
id="g3394">
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="M 412.75,98.59375 C 396.19379,98.835333 382.96319,112.44354 383.1875,129 c 0,0 -10e-6,87.25107 0,196.3125 0,23.30736 -12.11655,39.13192 -38.21875,53.46875 -26.1022,14.33683 -64.97276,22.875 -103.875,22.875 -38.90224,0 -77.7728,-8.53817 -103.875,-22.875 C 111.11655,364.44442 99,348.61986 99,325.3125 c 0,-54.37333 0.441249,-103.35555 0.65625,-138.875 0.1075,-17.75973 0.177008,-32.11577 0.09375,-42.34375 -0.04163,-5.11399 -0.129499,-9.10767 -0.28125,-12.46875 -0.07588,-1.68054 -0.136902,-3.05581 -0.40625,-5.25 -0.134674,-1.09709 -0.168072,-2.2122 -1,-5.1875 C 97.646536,119.69985 97.275733,117.79087 94.875,113.75 92.474267,109.70913 84.912085,98.999943 69,99 59.653467,98.879464 50.78473,103.12192 45.013008,110.47443 39.241286,117.82694 37.226064,127.44941 39.5625,136.5 c 0.06318,2.03091 0.15684,4.32729 0.1875,8.09375 0.07765,9.5394 0.0133,23.81477 -0.09375,41.5 C 39.442151,221.46421 39,270.62442 39,325.3125 c -10e-7,47.58256 30.913445,84.95437 69.34375,106.0625 38.43031,21.10813 85.6089,30.28125 132.75,30.28125 47.1411,0 94.31969,-9.17312 132.75,-30.28125 38.43031,-21.10813 69.34375,-58.47994 69.34375,-106.0625 -10e-6,-109.06142 0,-196.3125 0,-196.3125 0.10978,-8.10283 -3.06279,-15.9055 -8.79582,-21.63265 -5.73304,-5.72715 -13.53896,-8.891699 -21.64168,-8.7736 l 0,0 z"
id="path3396"
inkscape:connector-curvature="0" />
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="M 239.5625,99.5 C 223.00629,99.741583 209.77569,113.34979 210,129.90625 L 210,350 c -0.15301,10.81908 5.53126,20.88244 14.87619,26.33663 9.34492,5.45419 20.9027,5.45419 30.24762,0 C 264.46874,370.88244 270.15301,360.81908 270,350 l 0,-220.09375 c 0.10978,-8.10283 -3.06279,-15.9055 -8.79582,-21.63265 -5.73304,-5.72715 -13.53896,-8.891699 -21.64168,-8.7736 l 0,0 z"
id="path3398"
inkscape:connector-curvature="0" />
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:1;stroke-width:60;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path3400"
sodipodi:cx="70"
sodipodi:cy="40"
sodipodi:rx="30"
sodipodi:ry="30"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
transform="translate(0,-10)" />
<path
transform="translate(170,-10)"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
sodipodi:ry="30"
sodipodi:rx="30"
sodipodi:cy="40"
sodipodi:cx="70"
id="path3402"
style="fill:#000000;fill-opacity:1;stroke-width:60;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:1;stroke-width:60;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path3404"
sodipodi:cx="70"
sodipodi:cy="40"
sodipodi:rx="30"
sodipodi:ry="30"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
transform="translate(345,-10)" />
</g>
<text
xml:space="preserve"
style="font-size:110.96224976px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#3a8ecd;fill-opacity:1;stroke:none;font-family:Union;-inkscape-font-specification:Union"
x="3376.4146"
y="-1172.4049"
id="text3058"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3060"
x="3376.4146"
y="-1172.4049"
style="font-size:1141.3260498px;font-weight:bold;fill:#3a8ecd;fill-opacity:1;-inkscape-font-specification:Union Bold">i3</tspan></text>
<text
xml:space="preserve"
style="font-size:110.96224976px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Union;-inkscape-font-specification:Union"
x="3400.1733"
y="-565.84204"
id="text3062"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3064"
x="3400.1733"
y="-565.84204"
style="font-size:570.6630249px;fill:#ffffff;fill-opacity:1">improved</tspan><tspan
sodipodi:role="line"
x="3400.1733"
y="147.48674"
style="font-size:570.6630249px;fill:#ffffff;fill-opacity:1"
id="tspan3063">tiling wm</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="tiling"
style="display:none"
transform="translate(-39.157291,2258.4378)">
<rect
y="106.6479"
x="42.85714"
height="308.57144"
width="322.85715"
id="rect3247"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3253"
width="212.07706"
height="98.216858"
x="42.85096"
y="218.0385" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3257"
width="110.75323"
height="70.943619"
x="254.94135"
y="274.26196" />
<rect
y="218.02481"
x="254.93958"
height="56.235466"
width="110.76914"
id="rect3259"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
y="345.25272"
x="254.91608"
height="69.955116"
width="110.78036"
id="rect3255"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3249"
width="106.87583"
height="111.69163"
x="42.849949"
y="106.32091" />
<rect
y="106.45182"
x="149.72185"
height="111.57816"
width="105.18911"
id="rect3261"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3263"
width="110.786"
height="111.57211"
x="254.91632"
y="106.45485" />
<rect
y="316.22876"
x="42.847878"
height="98.979958"
width="212.0791"
id="rect3251"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
</g>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="tiling2"
style="display:inline"
transform="translate(-39.157291,2258.4378)">
<rect
y="-2192.6528"
x="407.12625"
height="2445.6987"
width="2558.9255"
id="rect3244"
style="fill:none;stroke:#000000;stroke-width:7.92587519;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
<rect
style="fill:none;stroke:#000000;stroke-width:7.92587519;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
id="rect3246"
width="2558.9255"
height="2445.6987"
x="407.12625"
y="-2192.6528" />
<path
style="fill:none;stroke:#000000;stroke-width:7.92587519;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;display:inline"
d="m 1516.7488,-2192.653 0,2445.6988 0,-2445.6988 z"
id="path73"
sodipodi:nodetypes="ccc"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccc"
id="path3254"
d="m 1513.2638,-1393.8379 -1102.65249,0 1102.65249,0 z"
style="fill:none;stroke:#000000;stroke-width:7.92587519;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:7.92587519;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 1513.2638,-553.69513 -1102.65249,0 1102.65249,0 z"
id="path3256"
sodipodi:nodetypes="ccc"
inkscape:connector-curvature="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="I3"
style="display:inline"
transform="translate(-39.157291,2258.4378)">
<path
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:60;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 1910.8996,-1686.6719 c -43.8006,45.2862 -42.6341,117.4941 2.6064,161.3419 0,0 235.2392,234.2605 529.282,527.07952 62.8393,62.57796 72.9725,137.7329 41.5446,246.60061 -31.428,108.86761 -112.7716,236.59139 -217.2204,341.47644 -104.4485,104.88515 -231.8323,186.76064 -340.5677,218.64229 -108.7357,31.88176 -183.9323,22.06207 -246.7717,-40.51589 -146.597,-145.98708 -277.4742,-278.68913 -372.6616,-374.63493 -47.5938,-47.97291 -86.1127,-86.70483 -113.9122,-113.94145 -13.8996,-13.61834 -24.903,-24.10409 -34.3723,-32.71913 -4.7346,-4.30745 -8.6064,-7.83547 -15.2454,-13.00042 -3.3194,-2.58251 -6.4155,-5.48637 -16.671,-11.23181 -5.1277,-2.87267 -11.2701,-6.9983 -28.6106,-11.375 -17.3403,-4.37678 -66.5173,-12.74127 -109.2395,30.15978 -25.41947,24.87572 -37.79297,60.17755 -33.46619,95.47948 4.32669,35.30205 24.85939,66.57063 55.53399,84.57122 5.6452,5.28257 12.088,11.19556 22.3251,21.22547 25.9279,25.40294 64.2432,63.90443 111.6373,111.67611 94.7881,95.54346 226.1427,228.72579 373.5883,375.557869 128.2883,127.754376 312.0468,144.747557 472.1383,97.808209 160.0916,-46.939459 311.4932,-149.509768 438.0623,-276.607698 126.5694,-127.09813 228.5073,-278.92621 274.7788,-439.21204 46.2715,-160.28596 28.5121,-343.97193 -99.7762,-471.72633 -294.0426,-292.819 -529.282,-527.0795 -529.282,-527.0795 -21.5513,-22.0513 -51.1063,-34.4471 -81.9399,-34.3669 -30.8338,0.079 -60.324,12.6292 -81.7604,34.7922 l 0,0 z"
id="path2405"
inkscape:connector-curvature="0" />
<path
style="opacity:0.87000002;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
d="m 1448.3517,-1217.3044 c -43.8005,45.2861 -42.6341,117.494 2.6065,161.3418 l 593.3989,590.92975 c 28.7587,29.46065 71.1525,41.15432 110.9479,30.60322 39.7953,-10.551 70.8268,-41.71214 81.2117,-81.55118 10.3852,-39.83905 -1.4851,-82.18356 -31.0655,-110.81923 l -593.399,-590.92976 c -21.5515,-22.0513 -51.1064,-34.447 -81.9402,-34.367 -30.8336,0.079 -60.3238,12.6293 -81.7603,34.7924 l 0,0 z"
id="path3179"
inkscape:connector-curvature="0" />
<path
sodipodi:type="arc"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:124.98213196;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3181"
sodipodi:cx="70"
sodipodi:cy="40"
sodipodi:rx="30"
sodipodi:ry="30"
d="m 100,40 a 30,30 0 1 1 -60,0 30,30 0 1 1 60,0 z"
transform="matrix(2.6849003,-2.6961195,2.6961195,2.6849003,509.92508,-865.41186)" />
<path
transform="matrix(2.6849003,-2.6961195,2.6961195,2.6849003,966.35812,-1323.7522)"
d="m 100,40 a 30,30 0 1 1 -60,0 30,30 0 1 1 60,0 z"
sodipodi:ry="30"
sodipodi:rx="30"
sodipodi:cy="40"
sodipodi:cx="70"
id="path3183"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:124.98213196;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:124.98213196;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3185"
sodipodi:cx="70"
sodipodi:cy="40"
sodipodi:rx="30"
sodipodi:ry="30"
d="m 100,40 a 30,30 0 1 1 -60,0 30,30 0 1 1 60,0 z"
transform="matrix(2.6849003,-2.6961195,2.6961195,2.6849003,1436.2157,-1795.5732)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 27 KiB

152
contrib/dump-asy.pl Executable file
View File

@@ -0,0 +1,152 @@
#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
use strict;
use warnings;
use Data::Dumper;
use Getopt::Long;
use Pod::Usage;
use AnyEvent::I3;
use File::Temp;
use File::Spec;
use File::Basename;
use v5.10;
use IPC::Cmd qw[can_run];
my %options = (
gv => 1,
save => undef,
help => 0,
);
my $result = GetOptions(
"gv!" => \$options{gv},
"save=s" => \$options{save},
"help|?" => \$options{help},
);
pod2usage(-verbose => 2, -exitcode => 0) if $options{help};
# prerequisites check so we can be specific about failures caused
# by not having these tools in the path
can_run('asy') or die 'Please install asymptote';
can_run('gv') or die 'Please install gv' unless !$options{gv};
my $i3 = i3();
my $tree = $i3->get_tree->recv;
my $tmp = File::Temp->new(UNLINK => 0, SUFFIX => '.asy');
say $tmp "import drawtree;";
say $tmp "treeLevelStep = 2cm;";
sub dump_node {
my ($n, $parent) = @_;
my $o = ($n->{orientation} eq 'none' ? "u" : ($n->{orientation} eq 'horizontal' ? "h" : "v"));
my $w = (defined($n->{window}) ? $n->{window} : "N");
my $na = ($n->{name} or ($n->{type} eq "floating_con" ? "[Floating con]" : "[Empty]"));
$na =~ s/#/\\#/g;
$na =~ s/\$/\\\$/g;
$na =~ s/&/\\&/g;
$na =~ s/_/\\_/g;
$na =~ s/~/\\textasciitilde{}/g;
my $type = 'leaf';
if (!defined($n->{window})) {
$type = $n->{layout};
}
my $marks = $n->{marks} ? ' [' . join('][', @{$n->{marks}}) . ']' : '';
my $name = qq|``$na'' ($type)$marks|;
print $tmp "TreeNode n" . $n->{id} . " = makeNode(";
print $tmp "n" . $parent->{id} . ", " if defined($parent);
print $tmp "\"" . $name . "\");\n";
dump_node($_, $n) for @{$n->{nodes}};
dump_node($_, $n) for @{$n->{floating_nodes}};
}
sub find_node_with_name {
my ($node, $name) = @_;
return $node if ($node->{name} eq $name);
for my $child (@{$node->{nodes}}) {
my $res = find_node_with_name($child, $name);
return $res if defined($res);
}
return undef;
}
my $start = shift;
my $root;
if ($start) {
# Find the specified node in the tree
$root = find_node_with_name($tree, $start);
} else {
$root = $tree;
}
dump_node($root);
say $tmp "draw(n" . $root->{id} . ", (0, 0));";
close($tmp);
my $rep = "$tmp";
$rep =~ s/asy$/eps/;
if ($options{gv}) {
my $tmp_dir = dirname($rep);
$options{save} = File::Spec->rel2abs($options{save}) if $options{save};
chdir($tmp_dir);
} else {
$rep = basename($rep); # Output in current dir.
}
system("asy $tmp"); # Create the .eps file.
system("gv --scale=-1000 --noresize --widgetless $rep") if $options{gv};
if ($options{save}) {
system("mv $rep ${options{save}}");
} elsif ($options{gv}) {
system("rm $rep");
}
system("rm $tmp");
__END__
=head1 NAME
dump-asy.pl - Render the layout tree using asymptote
=head1 SYNOPSIS
dump-asy.pl [workspace]
=head1 EXAMPLE
Render the entire tree, run:
./dump-asy.pl
Render the tree starting from the node with the specified name, run:
./dump-asy.pl 'name'
Render the entire tree, save in file 'file.eps' and show using gv, run:
./dump-asy.pl --save file.eps
=head1 OPTIONS
=over 8
=item B<--gv>
=item B<--no-gv>
Enable or disable showing the result through gv. If disabled, an .eps file will
be saved in the current working directory. Enabled by default.
=item B<--save>
Save result using the specified file-name. If omitted, no file will be saved
when using '--gv' or a random name will be used when using '--no-gv'.
=back

View File

@@ -19,7 +19,7 @@ $window->signal_connect('delete_event' => sub { Gtk2->main_quit; });
my $tree_store = Gtk2::TreeStore->new(qw/Glib::String/, qw/Glib::String/, qw/Glib::String/, qw/Glib::String/, qw/Glib::String/, qw/Glib::String/, qw/Glib::String/, qw/Glib::String/);
my $i3 = i3("/tmp/nestedcons");
my $i3 = i3();
my $tree_view = Gtk2::TreeView->new($tree_store);

View File

@@ -167,19 +167,28 @@ sub output_change {
sub update_output {
my $dzen_bg = "#111111";
my $out;
my $previous_output;
for my $name (keys %{$outputs}) {
my $width = $outputs->{$name}->{rect}->{width};
$previous_output = undef;
$out = qq|^pa(;2)|;
for my $ws (@{$workspaces}) {
next if $ws->{output} ne $name and !$show_all;
# Display a separator if we are on a different output now
if (defined($previous_output) and
($ws->{output} ne $previous_output)) {
$out .= qq|^fg(#900000)^ib(1)\|^ib(0)^p(+4)|;
}
$previous_output = $ws->{output};
my ($bg, $fg) = qw(333333 888888);
($bg, $fg) = qw(4c7899 ffffff) if $ws->{visible};
($bg, $fg) = qw(900000 ffffff) if $ws->{urgent};
my $cmd = q|i3-msg "| . $ws->{num} . q|"|;
my $cmd = q|i3-msg "workspace | . $ws->{name} . q|"|;
my $name = $ws->{name};
# Begin the clickable area
@@ -223,7 +232,12 @@ $stdin = AnyEvent->io(
fh => \*STDIN,
poll => 'r',
cb => sub {
chomp (my $line = <STDIN>);
my $line = <STDIN>;
if (!defined($line)) {
undef $stdin;
return;
}
chomp($line);
$last_line = $line;
update_output();
});

View File

@@ -0,0 +1,56 @@
#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
# © 2012 Michael Stapelberg
# Licensed under BSD license, see https://github.com/i3/i3/blob/next/LICENSE
#
# Append this line to your i3 config file:
# exec_always ~/per-workspace-layout.pl
#
# Then, change the %layouts hash like you want your workspaces to be set up.
# This script requires i3 >= v4.4 for the extended workspace event.
use strict;
use warnings;
use AnyEvent;
use AnyEvent::I3;
use v5.10;
use utf8;
my %layouts = (
'4' => 'tabbed',
'5' => 'stacked',
);
my $i3 = i3();
die "Could not connect to i3: $!" unless $i3->connect->recv();
die "Could not subscribe to the workspace event: $!" unless
$i3->subscribe({
workspace => sub {
my ($msg) = @_;
return unless $msg->{change} eq 'focus';
die "Your version of i3 is too old. You need >= v4.4"
unless exists($msg->{current});
my $ws = $msg->{current};
# If the workspace already has children, dont change the layout.
return unless scalar @{$ws->{nodes}} == 0;
my $name = $ws->{name};
my $con_id = $ws->{id};
return unless exists $layouts{$name};
$i3->command(qq|[con_id="$con_id"] layout | . $layouts{$name});
},
_error => sub {
my ($msg) = @_;
say "AnyEvent::I3 error: $msg";
say "Exiting.";
exit 1;
},
})->recv->{success};
# Run forever.
AnyEvent->condvar->recv

View File

@@ -0,0 +1,23 @@
#!/bin/sh
# © 2012 Han Boetes <han@mijncomputer.nl> (see also: LICENSE)
YEAR=`date "+%Y"`
weblog=$(mktemp)
zcat $(find /var/log/lighttpd/build.i3wm.org -type f -name "access.log.*.gz" | sort | tail -5) > $weblog
# this will match the latest logfile, which is not yet gzipped
find /var/log/lighttpd/build.i3wm.org/log$YEAR -type f \! -name "access.log.*.gz" -exec cat '{}' \; >> $weblog
cat /var/log/lighttpd/build.i3wm.org/access.log >> $weblog
gitlog=$(mktemp)
# create a git output logfile. Only keep the first 6 chars of the release hash
git log -150 --pretty=' %h %s' next > $gitlog
awk '/i3-wm_.*\.deb/ {print $7}' $weblog|awk -F'/' '{print $NF}'|awk -F'_' '{print $2 }'|awk -F'-' '{print $NF}' |cut -c 2-8|sort |uniq -c | while read line; do
set -- $line
# $1 is the number of downloads, $2 is the release md5sum
sed -i "/$2/s|^ |$(printf '%3i' $1) d/l |" $gitlog
done
cat $gitlog
rm $gitlog
rm $weblog

Binary file not shown.

View File

@@ -0,0 +1,645 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="269.29132"
height="187.79527"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.48.1 r9760"
sodipodi:docname="sticker_stickma_black.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1"
inkscape:export-filename="/home/michael/i3/sticker.png"
inkscape:export-xdpi="116.12904"
inkscape:export-ydpi="116.12904">
<defs
id="defs4">
<linearGradient
id="linearGradient3750">
<stop
style="stop-color:#17273b;stop-opacity:1;"
offset="0"
id="stop3752" />
<stop
id="stop4356"
offset="0.41666666"
style="stop-color:#008cd4;stop-opacity:0.78039217;" />
<stop
style="stop-color:#6eb5de;stop-opacity:0.69803923;"
offset="0.87847221"
id="stop4358" />
<stop
style="stop-color:#88bfe5;stop-opacity:0.61960787;"
offset="1"
id="stop3754" />
</linearGradient>
<inkscape:perspective
id="perspective3661"
inkscape:persp3d-origin="750.50629 : 505.26732 : 1"
inkscape:vp_z="683.5728 : 1230.5721 : 1"
inkscape:vp_y="0 : 1946.8917 : 0"
inkscape:vp_x="-526.84957 : 2.2065866e-13 : 0"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3284">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3286" />
<stop
style="stop-color:#ffffff;stop-opacity:0.7518248;"
offset="1"
id="stop3288" />
</linearGradient>
<linearGradient
id="linearGradient3278">
<stop
id="stop3280"
offset="0"
style="stop-color:#33bff7;stop-opacity:0.38039216;" />
<stop
id="stop3282"
offset="1"
style="stop-color:#2d446b;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3272">
<stop
id="stop3274"
offset="0"
style="stop-color:#2596f6;stop-opacity:0.38039216;" />
<stop
id="stop3276"
offset="1"
style="stop-color:#2d446b;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3266">
<stop
id="stop3268"
offset="0"
style="stop-color:#189fff;stop-opacity:0.38039216;" />
<stop
id="stop3270"
offset="1"
style="stop-color:#010b2b;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3244">
<stop
id="stop3246"
offset="0"
style="stop-color:#419bff;stop-opacity:1;" />
<stop
id="stop3248"
offset="1"
style="stop-color:#002359;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3159">
<stop
style="stop-color:#33bff7;stop-opacity:0.38039216;"
offset="0"
id="stop3161" />
<stop
style="stop-color:#2d446b;stop-opacity:1;"
offset="1"
id="stop3163" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-526.84957 : 2.9848654e-13 : 0"
inkscape:vp_y="1.192088e-13 : 1946.8917 : 0"
inkscape:vp_z="680.54236 : 1232.3792 : 1"
inkscape:persp3d-origin="730.30325 : 937.39936 : 1"
id="perspective10" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3244"
id="radialGradient3256"
cx="344.73471"
cy="77.263504"
fx="344.73471"
fy="77.263504"
r="196.15704"
gradientTransform="matrix(-1.39796,-0.05336032,0.08355111,-2.1889079,820.20461,272.08319)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3159"
id="radialGradient3264"
cx="140.3363"
cy="300.27451"
fx="140.3363"
fy="300.27451"
r="206.15704"
gradientTransform="matrix(0.6771172,-0.6830119,1.1802789,1.1700925,-161.83993,77.639162)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3290"
cx="267.50388"
cy="337.12692"
fx="267.50388"
fy="337.12692"
r="77.845421"
gradientTransform="matrix(1,0,0,0.7430849,0,86.613009)"
gradientUnits="userSpaceOnUse" />
<inkscape:perspective
id="perspective3373"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 526.18109 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3211">
<stop
id="stop3213"
offset="0"
style="stop-color: rgb(0, 160, 255); stop-opacity: 1;" />
<stop
id="stop3215"
offset="1"
style="stop-color: rgb(0, 37, 255); stop-opacity: 1;" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3406"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="13.396228"
id="feGaussianBlur3408" />
</filter>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3416"
cx="119.96373"
cy="229.28981"
fx="119.96373"
fy="229.28981"
r="203.19508"
gradientTransform="matrix(0.7210805,2.1168143,-1.4722239,0.5015047,347.53034,-320.94088)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3734"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7210805,2.1168143,-1.4722239,0.5015047,347.53034,-320.94088)"
cx="119.96373"
cy="229.28981"
fx="119.96373"
fy="229.28981"
r="203.19508" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3284"
id="radialGradient3736"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7210805,2.1168143,-1.4722239,0.5015047,347.53034,-320.94088)"
cx="119.96373"
cy="229.28981"
fx="119.96373"
fy="229.28981"
r="203.19508" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient3758"
cx="390.69662"
cy="258.92429"
fx="390.69662"
fy="258.92429"
r="32.03125"
gradientTransform="matrix(4.0292425,-5.5974184,5.1695404,3.721239,-2510.9809,1613.1551)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient3760"
cx="59.046589"
cy="248.2272"
fx="59.046589"
fy="248.2272"
r="197.15625"
gradientTransform="matrix(1.7105919,-0.04370519,0.03334715,1.3051856,-58.593126,-250.18318)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient3762"
cx="192.64008"
cy="282.40387"
fx="192.64008"
fy="282.40387"
r="133.09375"
gradientTransform="matrix(1.0081228,0.4493093,-1.0529321,2.3624813,273.13721,-455.12138)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="radialGradient4344"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(5.7478532,-0.5889281,0.4834745,4.7186431,-260.98332,-919.446)"
cx="24"
cy="280.45392"
fx="24"
fy="280.45392"
r="65.0625" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3750"
id="linearGradient4354"
x1="-125.59599"
y1="-100.47679"
x2="-5.2882538"
y2="-100.47679"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3266"
id="radialGradient3721"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1454302,-1.1687051,2.0295327,1.9193266,-924.0626,56.219022)"
cx="351.15485"
cy="372.06332"
fx="351.15485"
fy="372.06332"
r="163.57143" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3266"
id="radialGradient3303"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.54985655,-0.5425676,0.97426436,0.89104123,-423.22152,225.74786)"
cx="351.15485"
cy="372.06332"
fx="351.15485"
fy="372.06332"
r="163.57143" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.632258"
inkscape:cx="136.32251"
inkscape:cy="106.81637"
inkscape:document-units="px"
inkscape:current-layer="layer3"
showgrid="false"
inkscape:window-width="1208"
inkscape:window-height="1089"
inkscape:window-x="2308"
inkscape:window-y="90"
inkscape:window-maximized="0"
units="mm" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:contributor>
<cc:Agent>
<dc:title>yellowiscool, farvardin</dc:title>
</cc:Agent>
</dc:contributor>
<dc:creator>
<cc:Agent>
<dc:title>steckdenis</dc:title>
</cc:Agent>
</dc:creator>
<dc:description>Logo for i3 - an improved tiling window manager: http://i3.zekjur.net/</dc:description>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="fond"
style="display:none"
transform="translate(-7.8571396,-226.42406)">
<rect
style="opacity:0.87000002;fill:#5599ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:60;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect3241"
width="330"
height="313.5"
x="39"
y="103.86218" />
</g>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(-7.8571396,-226.42406)" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="tiling"
style="display:none"
transform="translate(-7.8571396,-226.42406)">
<rect
y="106.6479"
x="42.85714"
height="308.57144"
width="322.85715"
id="rect3247"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3253"
width="212.07706"
height="98.216858"
x="42.85096"
y="218.0385" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3257"
width="110.75323"
height="70.943619"
x="254.94135"
y="274.26196" />
<rect
y="218.02481"
x="254.93958"
height="56.235466"
width="110.76914"
id="rect3259"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
y="345.25272"
x="254.91608"
height="69.955116"
width="110.78036"
id="rect3255"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3249"
width="106.87583"
height="111.69163"
x="42.849949"
y="106.32091" />
<rect
y="106.45182"
x="149.72185"
height="111.57816"
width="105.18911"
id="rect3261"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3263"
width="110.786"
height="111.57211"
x="254.91632"
y="106.45485" />
<rect
y="316.22876"
x="42.847878"
height="98.979958"
width="212.0791"
id="rect3251"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
</g>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="tiling2"
style="display:inline"
transform="translate(-7.8571396,-226.42406)" />
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="I3"
style="display:inline"
transform="translate(-7.8571396,-226.42406)">
<rect
style="fill:#000000;fill-opacity:1;stroke:none"
id="rect4331"
width="300.32974"
height="228.87383"
x="-15.04335"
y="-28.721518"
transform="translate(7.8571396,226.42406)" />
<text
xml:space="preserve"
style="font-size:11.90824985999999974px;font-style:normal;font-weight:normal;fill:#0b5bb4;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="191.96429"
y="287.08801"
id="text2939"
transform="scale(1.0168712,0.98340872)"><tspan
sodipodi:role="line"
x="191.96429"
y="287.08801"
style="font-size:48px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#0b5bb4;fill-opacity:1;font-family:Georgia;-inkscape-font-specification:Georgia Bold"
id="tspan2951">i3</tspan></text>
<text
xml:space="preserve"
style="font-size:11.90824985999999974px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="212.13477"
y="327.17087"
id="text2943"
transform="scale(1.0168712,0.98340872)"><tspan
sodipodi:role="line"
id="tspan2945"
x="212.13477"
y="327.17087"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Georgia;-inkscape-font-specification:Georgia;fill:#ffffff;fill-opacity:1">improved</tspan><tspan
sodipodi:role="line"
x="212.13477"
y="349.67087"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Georgia;-inkscape-font-specification:Georgia;fill:#ffffff;fill-opacity:1"
id="tspan3835">tiling wm</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none"
id="rect4329"
width="145.562"
height="134.577"
x="23.920139"
y="253.03334" />
<g
id="g3837"
transform="matrix(0.93634729,0,0,0.93634729,1.5366196,20.389339)">
<rect
y="248.69504"
x="24.140676"
height="143.2533"
width="154.98553"
id="rect2383"
style="fill:url(#radialGradient3303);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<path
id="path3221"
d="m 24.548726,248.69894 c -0.923802,1.94771 -0.141016,4.60164 -0.382144,6.83186 0.104234,22.28427 0.208466,44.56854 0.312698,66.85282 5.686139,4.86076 13.886347,4.12262 20.925306,5.06603 25.678942,1.59846 51.500522,1.6763 77.097934,-1.13701 16.33402,-1.59469 32.66831,-4.05353 48.43162,-8.54811 4.01303,-1.30316 9.05404,-4.28177 8.19421,-8.97949 0,-20.02869 0,-40.0574 0,-60.0861 -51.52654,0 -103.053082,0 -154.579624,0 z"
style="opacity:0.09583333;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
inkscape:connector-curvature="0" />
<g
id="g3394"
style="opacity:0.5;fill:#000000;fill-opacity:1;display:inline;filter:url(#filter3406)"
transform="matrix(0.16261542,-0.15792135,0.16329493,0.15726421,31.999803,328.00895)">
<path
id="path3396"
d="M 412.75,98.59375 C 396.19379,98.835333 382.96319,112.44354 383.1875,129 c 0,0 -10e-6,87.25107 0,196.3125 0,23.30736 -12.11655,39.13192 -38.21875,53.46875 -26.1022,14.33683 -64.97276,22.875 -103.875,22.875 -38.90224,0 -77.7728,-8.53817 -103.875,-22.875 C 111.11655,364.44442 99,348.61986 99,325.3125 c 0,-54.37333 0.441249,-103.35555 0.65625,-138.875 0.1075,-17.75973 0.177008,-32.11577 0.09375,-42.34375 -0.04163,-5.11399 -0.129499,-9.10767 -0.28125,-12.46875 -0.07588,-1.68054 -0.136902,-3.05581 -0.40625,-5.25 -0.134674,-1.09709 -0.168072,-2.2122 -1,-5.1875 C 97.646536,119.69985 97.275733,117.79087 94.875,113.75 92.474267,109.70913 84.912085,98.999943 69,99 59.653467,98.879464 50.78473,103.12192 45.013008,110.47443 39.241286,117.82694 37.226064,127.44941 39.5625,136.5 c 0.06318,2.03091 0.15684,4.32729 0.1875,8.09375 0.07765,9.5394 0.0133,23.81477 -0.09375,41.5 C 39.442151,221.46421 39,270.62442 39,325.3125 c -10e-7,47.58256 30.913445,84.95437 69.34375,106.0625 38.43031,21.10813 85.6089,30.28125 132.75,30.28125 47.1411,0 94.31969,-9.17312 132.75,-30.28125 38.43031,-21.10813 69.34375,-58.47994 69.34375,-106.0625 -10e-6,-109.06142 0,-196.3125 0,-196.3125 0.10978,-8.10283 -3.06279,-15.9055 -8.79582,-21.63265 -5.73304,-5.72715 -13.53896,-8.891699 -21.64168,-8.7736 l 0,0 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path3398"
d="M 239.5625,99.5 C 223.00629,99.741583 209.77569,113.34979 210,129.90625 L 210,350 c -0.15301,10.81908 5.53126,20.88244 14.87619,26.33663 9.34492,5.45419 20.9027,5.45419 30.24762,0 C 264.46874,370.88244 270.15301,360.81908 270,350 l 0,-220.09375 c 0.10978,-8.10283 -3.06279,-15.9055 -8.79582,-21.63265 -5.73304,-5.72715 -13.53896,-8.891699 -21.64168,-8.7736 l 0,0 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" />
<path
transform="translate(0,-10)"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
sodipodi:ry="30"
sodipodi:rx="30"
sodipodi:cy="40"
sodipodi:cx="70"
id="path3400"
style="fill:#000000;fill-opacity:1;stroke-width:60;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:1;stroke-width:60;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path3402"
sodipodi:cx="70"
sodipodi:cy="40"
sodipodi:rx="30"
sodipodi:ry="30"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
transform="translate(170,-10)" />
<path
transform="translate(345,-10)"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
sodipodi:ry="30"
sodipodi:rx="30"
sodipodi:cy="40"
sodipodi:cx="70"
id="path3404"
style="fill:#000000;fill-opacity:1;stroke-width:60;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
sodipodi:type="arc" />
</g>
<rect
style="fill:none;stroke:#000000;stroke-width:0.47207919;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
id="rect3244"
width="154.98553"
height="143.2533"
x="24.140676"
y="248.69504" />
<rect
y="248.69504"
x="24.140676"
height="143.2533"
width="154.98553"
id="rect3246"
style="fill:none;stroke:#000000;stroke-width:0.47207919;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
<path
sodipodi:nodetypes="ccc"
id="path2929"
d="m 91.346794,248.69506 0,143.2533 0,-143.2533 z"
style="fill:none;stroke:#000000;stroke-width:0.47207919;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;display:inline"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.47207919;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 91.135721,295.48452 -66.783968,0 66.783968,0 z"
id="path3254"
sodipodi:nodetypes="ccc"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccc"
id="path3256"
d="m 91.135721,344.69467 -66.783968,0 66.783968,0 z"
style="fill:none;stroke:#000000;stroke-width:0.47207919;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<path
id="path2405"
d="m 115.21918,278.33218 c -2.65284,2.65258 -2.58219,6.88205 0.15787,9.45037 0,0 14.24765,13.72146 32.05684,30.87293 3.80597,3.6654 4.4197,8.0675 2.51621,14.44427 -1.90349,6.37677 -6.8302,13.85801 -13.15631,20.0015 -6.3261,6.1435 -14.04129,10.93924 -20.62704,12.80667 -6.58576,1.86742 -11.14017,1.29224 -14.94614,-2.37317 -8.87889,-8.55098 -16.805682,-16.32381 -22.570867,-21.9437 -2.882591,-2.80994 -5.215552,-5.07861 -6.899273,-6.67397 -0.841858,-0.79767 -1.508291,-1.41185 -2.08182,-1.91647 -0.28676,-0.25231 -0.521261,-0.45895 -0.92336,-0.76148 -0.201047,-0.15126 -0.388572,-0.32135 -1.00971,-0.65789 -0.310564,-0.16827 -0.682588,-0.40991 -1.732842,-0.66627 -1.050249,-0.25636 -4.028733,-0.7463 -6.616274,1.76657 -1.539573,1.45705 -2.288993,3.5248 -2.026936,5.59257 0.262055,2.06777 1.505651,3.89928 3.363508,4.95364 0.34191,0.30941 0.732128,0.65576 1.352158,1.24325 1.570361,1.48794 3.890994,3.74311 6.761491,6.54126 5.741001,5.59633 13.69671,13.3973 22.626998,21.99777 7.769995,7.48303 18.899617,8.47839 28.595837,5.72898 9.69621,-2.74941 18.86609,-8.75732 26.53197,-16.20191 7.66587,-7.44459 13.83992,-16.3377 16.64242,-25.72621 2.80251,-9.38852 1.72689,-20.14767 -6.0431,-27.63069 -17.80917,-17.15146 -32.05684,-30.87293 -32.05684,-30.87293 -1.3053,-1.29162 -3.09534,-2.01769 -4.96283,-2.013 -1.8675,0.005 -3.65363,0.73975 -4.95196,2.03791 l 0,0 z"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:60;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<path
id="path3179"
d="m 87.204209,305.82471 c -2.652845,2.65256 -2.582201,6.88205 0.157868,9.45036 l 35.940193,34.61287 c 1.74182,1.72562 4.30946,2.41055 6.71973,1.79255 2.41027,-0.61802 4.28975,-2.44325 4.91873,-4.77676 0.62899,-2.3335 -0.0899,-4.81377 -1.88154,-6.49106 L 97.119,305.7998 c -1.305296,-1.29163 -3.095344,-2.01769 -4.962836,-2.013 -1.867498,0.005 -3.653612,0.73974 -4.951955,2.03791 l 0,0 z"
style="opacity:0.87000002;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
inkscape:connector-curvature="0" />
<path
transform="matrix(0.16261542,-0.15792135,0.16329493,0.15726421,30.366855,326.43631)"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
sodipodi:ry="30"
sodipodi:rx="30"
sodipodi:cy="40"
sodipodi:cx="70"
id="path3181"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:124.98213196;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:124.98213196;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3183"
sodipodi:cx="70"
sodipodi:cy="40"
sodipodi:rx="30"
sodipodi:ry="30"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
transform="matrix(0.16261542,-0.15792135,0.16329493,0.15726421,58.011475,299.58968)" />
<path
transform="matrix(0.16261542,-0.15792135,0.16329493,0.15726421,86.469174,271.95344)"
d="M 100,40 C 100,56.568542 86.568542,70 70,70 53.431458,70 40,56.568542 40,40 40,23.431458 53.431458,10 70,10 c 16.568542,0 30,13.431458 30,30 z"
sodipodi:ry="30"
sodipodi:rx="30"
sodipodi:cy="40"
sodipodi:cx="70"
id="path3185"
style="opacity:0.87000002;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:124.98213196;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
</g>
<text
xml:space="preserve"
style="font-size:13.28640651999999989px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Trebuchet MS;-inkscape-font-specification:Trebuchet MS"
x="215.76903"
y="383.70779"
id="text3067"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3069"
x="215.76903"
y="383.70779"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:#ffffff;fill-opacity:1">i3wm.org</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

29
contrib/trivial-bar-script.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
# vim:ts=4:sw=4:expandtab
# © 2012 Michael Stapelberg, Public Domain
# This script is a trivial shell script to send your own output to i3bar while
# using the JSON protocol.
#
# It is ugly and that is inherent to using JSON with shell scripts. You
# _really_ should not do that. See i3status or i3statuss contrib/ directory
# for examples of how to handle the output in higher-level languages.
#
# This example is purely for illustration of the protocol. DO NOT USE IT IN THE
# REAL WORLD.
# Send the header so that i3bar knows we want to use JSON:
echo '{ "version": 1 }'
# Begin the endless array.
echo '['
# We send an empty first array of blocks to make the loop simpler:
echo '[]'
# Now send blocks with information forever:
while :;
do
echo ",[{\"name\":\"time\",\"full_text\":\"$(date)\"}]"
sleep 1
done

476
debian/changelog vendored
View File

@@ -1,3 +1,477 @@
i3-wm (4.24-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Wed, 06 Nov 2024 18:34:06 +0100
i3-wm (4.23-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 29 Oct 2023 15:42:11 +0100
i3-wm (4.22-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 02 Jan 2023 09:46:22 +0100
i3-wm (4.21.2-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 24 Oct 2022 21:22:36 +0200
i3-wm (4.21.1-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 24 Oct 2022 21:22:36 +0200
i3-wm (4.21-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Wed, 21 Sep 2022 18:14:14 +0200
i3-wm (4.20.1-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Wed, 03 Nov 2021 09:22:48 +0100
i3-wm (4.20-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sat, 27 Feb 2021 10:32:17 +0100
i3-wm (4.19.2-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sat, 27 Feb 2021 10:32:17 +0100
i3-wm (4.19-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 19 Oct 2020 22:48:30 +0200
i3-wm (4.18.3-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 19 Oct 2020 22:48:30 +0200
i3-wm (4.18.2-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 26 Jul 2020 10:24:46 +0200
i3-wm (4.18.1-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Wed, 22 Apr 2020 09:04:42 +0200
i3-wm (4.18-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 17 Feb 2020 18:25:47 +0100
i3-wm (4.17.1-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Fri, 30 Aug 2019 23:06:40 +0200
i3-wm (4.17-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sat, 03 Aug 2019 15:14:28 +0200
i3-wm (4.16.1-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 27 Jan 2019 16:45:11 +0100
i3-wm (4.16-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 04 Nov 2018 14:47:25 +0100
i3-wm (4.15-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sat, 10 Mar 2018 17:27:26 +0100
i3-wm (4.14.1-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 24 Sep 2017 19:21:15 +0200
i3-wm (4.14-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Mon, 04 Sep 2017 07:53:16 +0200
i3-wm (4.13-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Tue, 08 Nov 2016 19:02:16 +0100
i3-wm (4.12-2) unstable; urgency=medium
* Override lintian warning desktop-entry-contains-unknown-key for
DesktopNames, gdm needs that key.
* Remove i3-wm.menu to conform to the tech-ctte decision on #741573.
-- Michael Stapelberg <stapelberg@debian.org> Fri, 01 Apr 2016 15:51:23 +0200
i3-wm (4.12-1) unstable; urgency=medium
* New upstream release.
* Move to debhelper 9
* Bump Standards-Version to 3.9.7 (no changes necessary)
* debian/watch: verify signature, use https
* Enable full hardening
-- Michael Stapelberg <stapelberg@debian.org> Sun, 06 Mar 2016 14:20:38 +0100
i3-wm (4.11-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Wed, 30 Sep 2015 08:50:13 +0200
i3-wm (4.10.4-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Tue, 08 Sep 2015 09:15:45 +0200
i3-wm (4.10.3-1) unstable; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Thu, 30 Jul 2015 21:51:27 +0200
i3-wm (4.10.2-2) unstable; urgency=medium
* New upstream release.
* experimental to unstable because i3-wm 4.10.2-1 was only in experimental
due to the freeze.
-- Michael Stapelberg <stapelberg@debian.org> Fri, 01 May 2015 20:21:18 +0200
i3-wm (4.10.2-1) experimental; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Thu, 16 Apr 2015 09:02:53 +0200
i3-wm (4.10.1-1) experimental; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 29 Mar 2015 18:54:07 +0200
i3-wm (4.10-1) experimental; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 29 Mar 2015 17:46:09 +0200
i3-wm (4.9.1-1) experimental; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sat, 07 Mar 2015 20:01:46 +0100
i3-wm (4.9-1) experimental; urgency=medium
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sat, 28 Feb 2015 14:53:34 +0100
i3-wm (4.8-2) unstable; urgency=medium
* Backport two bugfixes:
- backport-dpi-fix.patch (Closes: #778460)
- backport-i3bar-tray-fix.patch (Closes: #778461)
-- Michael Stapelberg <stapelberg@debian.org> Sun, 15 Feb 2015 13:24:42 +0100
i3-wm (4.8-1) unstable; urgency=medium
* New upstream release.
* Bump standards-version to 3.9.5 (no changes necessary)
-- Michael Stapelberg <stapelberg@debian.org> Sun, 15 Jun 2014 19:15:29 +0200
i3-wm (4.7.2-1) unstable; urgency=low
* New upstream release. (Closes: #736396)
-- Michael Stapelberg <stapelberg@debian.org> Thu, 23 Jan 2014 23:03:03 +0100
i3-wm (4.7.1-1) unstable; urgency=low
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Tue, 21 Jan 2014 19:29:34 +0100
i3-wm (4.7-1) unstable; urgency=low
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Sun, 22 Dec 2013 21:19:02 +0100
i3-wm (4.6-1) unstable; urgency=low
* New upstream release.
-- Michael Stapelberg <stapelberg@debian.org> Wed, 07 Aug 2013 20:53:26 +0200
i3-wm (4.5.1-2) unstable; urgency=low
* experimental to unstable because i3-wm 4.5.1 was only in experimental due
to the freeze.
* bump standards-version to 3.9.4 (no changes necessary)
-- Michael Stapelberg <stapelberg@debian.org> Tue, 14 May 2013 20:48:16 +0200
i3-wm (4.5.1-1) experimental; urgency=low
* New upstream release
-- Michael Stapelberg <stapelberg@debian.org> Mon, 18 Mar 2013 22:50:12 +0100
i3-wm (4.5-1) experimental; urgency=low
* New upstream release
-- Michael Stapelberg <stapelberg@debian.org> Tue, 12 Mar 2013 13:51:04 +0100
i3-wm (4.4-1) experimental; urgency=low
* New upstream release
-- Michael Stapelberg <stapelberg@debian.org> Tue, 11 Dec 2012 22:52:56 +0100
i3-wm (4.3-1) experimental; urgency=low
* New upstream release
-- Michael Stapelberg <stapelberg@debian.org> Wed, 19 Sep 2012 18:13:40 +0200
i3-wm (4.2-1) unstable; urgency=low
* New upstream release
-- Michael Stapelberg <stapelberg@debian.org> Wed, 25 Apr 2012 23:19:44 +0200
i3-wm (4.1.2-3) unstable; urgency=low
* Disable generation of docs/refcard.pdf (Closes: #666363)
* Add debian/i3-wm.menu (Closes: #664697)
* Bump standards-version to 3.9.3 (no changes needed)
* Fix 'section' field of the i3-wm source package to 'x11'
* Email change: Michael Stapelberg -> stapelberg@debian.org
-- Michael Stapelberg <stapelberg@debian.org> Thu, 12 Apr 2012 16:09:58 +0200
i3-wm (4.1.2-2) unstable; urgency=low
* Rebuild against libyajl and libxcb from unstable
-- Michael Stapelberg <michael@stapelberg.de> Fri, 27 Jan 2012 19:50:29 +0000
i3-wm (4.1.2-1) unstable; urgency=low
* Bugfix: Dont lose focus on fullscreen windows when another window gets
moved to that workspace
* Bugfix: Open new windows in the correct place when assignments match
* Bugfix: Fix assignments of floating windows to (yet) unused workspaces
* Bugfix: Either use SetInputFocus *or* send WM_TAKE_FOCUS, not both
* Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients
* Bugfix: Setup the _NET_SUPPORTING_WM_CHECK atom in a standards-compliant
way
* Bugfix: Only ignore EnterNotify events after UnmapNotifies from managed
windows
* Bugfix: Force a new sequence number after UnmapNotify
* Bugfix: Position floating windows exactly where their geometry specified
* Bugfix: Fix coordinates when the rect of an output changes
-- Michael Stapelberg <michael@stapelberg.de> Fri, 27 Jan 2012 19:04:28 +0000
i3-wm (4.1.1-1) unstable; urgency=low
* Re-add build-arch/build-indep targets to debian/rules (Closes: #648613)
* Create a secure temp path instead of a predictable one
* ipc: set CLOEXEC on client file descriptors
* Fix prototype in include/xcursor.h
* Bugfix: Skip dock clients when handling FocusIn events
* Bugfix: Fix fullscreen with floating windows
* Bugfix: Fix startup when RandR is not present
* Bugfix: Retain window position and size when changing floating border
* Bugfix: Disallow focusing dock clients via criteria
* Bugfix: Dont create a workspace named 'back_and_forth' on startup
* Bugfix: Fix wrong focus in complex tabbed/stacked layouts
* Bugfix: Fix resizing for (e.g.) v-split containers in h-split containers
* Bugfix: Fix 'resize' command in nested containers
* Bugfix: Dont set the _NET_WM_WORKAREA hint at all
* Bugfix: Skip leading whitespace in variable assignments
* Bugfix: Make resizing of tiling windows with floating_modifier use absolute
coordinates
* Bugfix: Make resizing work when pressing floating_modifier + right mouse
button on window decorations
* Bugfix: Fix setting the same mark repeatedly on different windows
* Bugfix: Disallow focusing other windows when in fullscreen mode
* Bugfix: Ignore ConfigureRequests with out-of-bound coordinates
* Bugfix: Correctly check boundaries and reassign floating windows when
moving
* Bugfix: Dont close workspace when there are still floating windows on it
-- Michael Stapelberg <michael@stapelberg.de> Sat, 24 Dec 2011 16:23:55 +0100
i3-wm (4.1-1) unstable; urgency=low
* Switch to dpkg-source 3.0 (quilt) and compat level 7
* Implement system tray support in i3bar (for NetworkManager, Skype, …)
* i3bar is now configurable in the i3 configfile
* Implement support for PCRE regular expressions in criteria
* Implement a new assign syntax which uses criteria
* Sort named workspaces whose name starts with a number accordingly
* Warn on duplicate bindings for the same key
* Restrict 'resize' command to left/right for horizontal containers, up/down
for vertical containers
* Implement support for startup notifications (cursor will change to 'watch',
started applications show up on the workspace they have been launched on)
* Implement the GET_MARKS IPC request to get all marks
* Implement the new_float config option (border style for floating windows)
* Implement passing IPC sockets to i3 (systemd-style socket activation)
* Implement the 'move output' command to move containers to a specific output
* Implement focus switching for floating windows
* Implement the window_role criterion (for matching multi-window apps)
* Implement a force_xinerama configuration directive
* Implement the --get-socketpath, useful for scripts using the IPC interface
* Implement the 'move workspace next' and 'move workspace prev' commands
* Implement the 'workspace back_and_forth' command and related configuration
option
* Implement the move command for floating windows
* i3 will now handle arbitrary text arguments by sending them as an IPC
command, like i3-msg: 'i3 reload' or 'i3 move workspace 3'
* Introduce the i3-sensible-{pager,editor,terminal} scripts to execute
$PAGER, $EDITOR or an available terminal emulator
* i3-input: implement -F (format) option
* Bugfix: Preserve marks when restarting
* Bugfix: Correctly free old assignments when reloading
* Bugfix: Fix flickering when moving floating windows between monitors
* Bugfix: Correctly handle ConfigureRequests for floating windows in a
multi-monitor environment.
* Bugfix: Fix size of floating windows with X11 borders
* Bugfix: Always adjust floating window position when moving to another
output
* Bugfix: Avoid out-of-bounds coordinates when moving floating windows
* Bugfix: Dont steal focus when a window gets destroyed
* Bugfix: Correctly split key/value when parsing variables
* Bugfix: Correctly revert focus to other floating windows when closing a
floating window
* Bugfix: Dont leak the error logfile file descriptor
* Bugfix: Dont steal focus when a window opens on an invisible workspace due
to assignments
* Bugfix: Fix handling of Mode_switch in i3-input
* Bugfix: Close invisible workspaces when they become empty
* Bugfix: Dont invoke interactive resizing when clicking on the decoration
of a split container with more than one child (switch focus instead)
* Bugfix: Make named workspace assignments work again
* Bugfix: RandR: Correctly keep focus on the focused workspace when an output
disappears
* Bugfix: Insert container at the correct position on workspace level when
workspace_layout == default
-- Michael Stapelberg <michael@stapelberg.de> Fri, 11 Nov 2011 21:28:15 +0000
i3-wm (4.0.2-1) unstable; urgency=low
* i3-config-wizard: handle mouse button clicks on <win> and <alt> texts
* i3-config-wizard: check the modifier mapping to decide whether to use Mod1
or Mod4
* migrate-config: use \s, be a bit more whitespace tolerant
* userguide: s/mod+h/mod+s for stacking
* userguide: provide the default colors in the colors example
* userguide: document force_focus_wrapping directive
* userguide: properly document the resize command
* userguide: properly document command chaining and criteria
* Bugfix: Correctly bind on multiple keycodes if a symbol has more than one
* Bugfix: Allow multiple criteria in 'for_window'
* Bugfix: Ensure a minimum size when using the 'resize' command
* Bugfix: Start on the first named workspace, not always on '1'
* Bugfix: Fix resize command with direction != up for floating windows
* Bugfix: Correctly set the _NET_CLIENT_LIST_STACKING hint (chromium tabbar)
* Bugfix: 'workspace <next|prev>' now takes all outputs into account
* Bugfix: i3-wsbar: make workspace names clickable again
* Bugfix: i3-wsbar: correctly handle EOF on stdin
* Bugfix: i3-wsbar: display a separator between workspaces of each output
* Bugfix: Correctly handle the 'instance' criterion (WM_CLASS)
* Bugfix: Use correct format string in load_layout (fixes crash in restart)
* Bugfix: Fix border rendering (border lines were "cutting" through)
* Bugfix: Raise floating windows immediately when dragging/resizing
* Bugfix: Make focus switching work across outputs again
* Bugfix: migration-script: handle resize top/bottom correctly
* Bugfix: Fix focus issue when moving containers to workspaces
* Bugfix: Warp cursor when changing outputs again
* Bugfix: i3bar: fix switching to workspaces with extremely long names
* Bugfix: i3bar: fix switching to workspaces "next" and "prev"
* Bugfix: i3bar: Correctly allocate pixmap for statuslines which are longer
than the screen
* Bugfix: i3bar: set statusline = NULL on EOF / SIGCHLD
* Bugfix: Correctly initialize the verbose flag
* Bugfix: Dont start with workspace 'next' when the command 'workspace next'
is bound in the config file
* Bugfix: Set focus to where the mouse pointer is when starting
* Bugfix: Dont change focus when assigned windows start on invisible
workspaces
* Bugfix: Dont use absolute paths for exec in the config file
* Bugfix: Fix crash when using 'focus mode_toggle' on an empty workspace
* Bugfix: Make the 'resize' command work inside tabbed/stacked cons
* Bugfix: Correctly place floating windows on their appropriate output
* Bugfix: Fix coordinates when moving a floating window to a different output
* Bugfix: Correctly keep focus when moving non-leaf windows
* Bugfix: Accept '\t' in the set command
* Bugfix: Only consider tiling windows when attaching tiling windows to a
workspace
* Bugfix: Correctly render containers when a split container is focused
* Bugfix: Correctly recognize duplicate workspace assignments
* Bugfix: Re-enable X11 Eventmask *after* pushing all the X11 changes
* Bugfix: Fix focus stealing with assignments of floating windows
* Bugfix: Re-implement reconfiguring height of dock windows
* Bugfix: IPC: return name_json if available
* Bugfix: Make 'floating enable' check for dock windows
-- Michael Stapelberg <michael@stapelberg.de> Sun, 28 Aug 2011 19:07:43 +0200
i3-wm (4.0.1-1) unstable; urgency=low
* Fix the build process of i3bar (Closes: #636274)
* Fix the build process on Mac OS X
* i3-config-wizard: also start i3bar in the keycode config template
* userguide: Remove the obsolete bar.* colors
* userguide: Use i3bar instead of dzen2 in the 'exec' example
-- Michael Stapelberg <michael@stapelberg.de> Mon, 01 Aug 2011 23:31:06 +0200
i3-wm (4.0-1) unstable; urgency=low
* In addition to the proper flex/bison based parser for the config file
@@ -189,7 +663,7 @@ i3-wm (3.d-bf1-1) unstable; urgency=low
* Bugfix: Resize client after updating base_width/base_height
* Bugfix: Force render containers after setting the client active
* Bugfix: Fix two problems in resizing floating windows with right mouse
* Bugfix: Use more precise floating point arithmetics
* Bugfix: Use more precise floating point arithmetic
* Bugfix: Correctly place new windows below fullscreen windows
-- Michael Stapelberg <michael@stapelberg.de> Mon, 21 Dec 2009 22:33:02 +0100

2
debian/compat vendored
View File

@@ -1 +1 @@
6
10

65
debian/control vendored
View File

@@ -1,38 +1,55 @@
Source: i3-wm
Section: utils
Section: x11
Priority: extra
Maintainer: Michael Stapelberg <michael@stapelberg.de>
DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 6), libx11-dev, libxcb-util0-dev (>= 0.3.8), libxcb-keysyms1-dev, libxcb-xinerama0-dev (>= 1.1), libxcb-randr0-dev, libxcb-icccm4-dev, libxcursor-dev, asciidoc (>= 8.4.4), xmlto, docbook-xml, pkg-config, libev-dev, flex, bison, libyajl-dev, perl, texlive-latex-base, texlive-latex-recommended, texlive-latex-extra
Standards-Version: 3.9.2
Homepage: http://i3wm.org/
Maintainer: Michael Stapelberg <stapelberg@debian.org>
Build-Depends: debhelper (>= 10),
meson,
libx11-dev,
libxcb-util0-dev (>= 0.3.8),
libxcb-keysyms1-dev,
libxcb-xinerama0-dev (>= 1.1),
libxcb-randr0-dev,
libxcb-icccm4-dev,
libxcb-cursor-dev,
libxcb-xrm-dev,
libxcb-xkb-dev,
libxcb-shape0-dev,
libxkbcommon-dev (>= 0.4.0),
libxkbcommon-x11-dev (>= 0.4.0),
asciidoc (>= 8.4.4),
xmlto,
docbook-xml,
pkg-config,
libev-dev (>= 1:4.04),
libyajl-dev (>= 2.0.4),
libpcre2-dev,
libstartup-notification0-dev (>= 0.10),
libcairo2-dev (>= 1.14.4),
libpango1.0-dev,
libpod-simple-perl
Standards-Version: 3.9.8
Homepage: https://i3wm.org/
Package: i3
Architecture: any
Section: x11
Depends: i3-wm, ${misc:Depends}
Recommends: i3lock, dwm-tools, i3status
Depends: i3-wm (=${binary:Version}), ${misc:Depends}
Recommends: i3lock (>= 2.2), suckless-tools, i3status (>= 2.3), dunst
Description: metapackage (i3 window manager, screen locker, menu, statusbar)
This metapackage installs the i3 window manager (i3-wm), the i3lock screen
locker (slightly improved version of slock), dwm-tools which contains dmenu
and i3status, which displays useful information about your system in
combination with dzen2. These are all the tools you need to use the i3 window
manager efficiently.
locker, i3status (for system information) and suckless-tools (for dmenu).
These are all the tools you need to use the i3 window manager efficiently.
Package: i3-wm
Architecture: any
Section: x11
Depends: ${shlibs:Depends}, ${misc:Depends}, x11-utils
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
Provides: x-window-manager
Suggests: rxvt-unicode | x-terminal-emulator
Recommends: xfonts-base, libanyevent-i3-perl, libanyevent-perl, libipc-run-perl
Description: an improved dynamic tiling window manager
Key features of i3 are correct implementation of Xinerama (workspaces are
assigned to virtual screens, i3 does the right thing when attaching new
monitors), XrandR support (not done yet), horizontal and vertical columns
(think of a table) in tiling. Also, special focus is on writing clean,
readable and well documented code. i3 uses xcb for asynchronous
communication with X11, and has several measures to be very fast.
Recommends: xfonts-base, fonts-dejavu-core, libanyevent-i3-perl (>= 0.12), libjson-xs-perl, rxvt-unicode | x-terminal-emulator
Description: improved tiling window manager
Key features of i3 are good documentation, reasonable defaults (changeable in
a simple configuration file) and good multi-monitor support. The user
interface is designed for power users and emphasizes keyboard usage. i3 uses
XCB for asynchronous communication with X11 and aims to be fast and
light-weight.
.
Please be aware i3 is primarily targeted at advanced users and developers.

65
debian/copyright vendored
View File

@@ -1,30 +1,41 @@
This Debian package is based on a tarball downloaded from
http://i3wm.org/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: i3
Upstream-Contact: Michael Stapelberg <michael@i3wm.org>
Source: https://i3wm.org/
Copyright: (C) 2009-2011 Michael Stapelberg <michael+i3 at stapelberg dot de>
All rights reserved.
Files: *
Copyright: 2009 Michael Stapelberg
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Files: debian/*
Copyright: 2009 Michael Stapelberg
License: BSD-3-clause
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* 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, i3 nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
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 OWNER 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.
License: BSD-3-clause
Copyright: © 2009 Michael Stapelberg <michael at i3wm dot org>
All rights reserved.
.
Redistribution and use in source and binary forms, with or without
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.
.
* 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, i3 nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
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 OWNER 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.

16
debian/i3-wm.docs vendored
View File

@@ -1,16 +0,0 @@
docs/debugging.html
docs/hacking-howto.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/stacklimit.png
docs/ipc.html
docs/multi-monitor.html
docs/wsbar.html
docs/wsbar.png
docs/keyboard-layer1.png
docs/keyboard-layer2.png

7
debian/i3-wm.install vendored Normal file
View File

@@ -0,0 +1,7 @@
debian/tmp/etc
debian/tmp/usr
contrib/dump-asy.pl usr/share/doc/i3-wm/examples/
contrib/gtk-tree-watch.pl usr/share/doc/i3-wm/examples/
contrib/i3-wsbar usr/share/doc/i3-wm/examples/
contrib/per-workspace-layout.pl usr/share/doc/i3-wm/examples/
contrib/trivial-bar-script.sh usr/share/doc/i3-wm/examples/

1
debian/i3-wm.links vendored Normal file
View File

@@ -0,0 +1 @@
usr/share/man/man1/i3.1.gz usr/share/man/man1/i3-with-shmlog.1.gz

85
debian/rules vendored
View File

@@ -1,76 +1,21 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# vi: ts=8 sw=8 noet
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export V:=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
config.status: configure
dh_testdir
touch $@
override_dh_installchangelogs:
dh_installchangelogs RELEASE-NOTES-*
build:
dh_testdir
# Add here commands to compile the package.
$(MAKE)
$(MAKE) -C man
$(MAKE) -C docs
touch $@
clean:
dh_testdir
dh_testroot
rm -f build
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/i3-wm
$(MAKE) DESTDIR=$(CURDIR)/debian/i3-wm/ install
mkdir -p $(CURDIR)/debian/i3-wm/usr/share/man/man1
cp man/i3.1 $(CURDIR)/debian/i3-wm/usr/share/man/man1
cp man/i3-msg.1 $(CURDIR)/debian/i3-wm/usr/share/man/man1
cp man/i3-input.1 $(CURDIR)/debian/i3-wm/usr/share/man/man1
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installdebconf
dh_installinit
dh_installman
dh_installwm
dh_link
override_dh_strip:
dh_strip --dbg-package=i3-wm-dbg
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
override_dh_auto_test:
# TODO: enable tests
override_dh_auto_configure:
# Set -Ddocdir; the default is /usr/share/doc/i3
dh_auto_configure -- -Ddocdir=/usr/share/doc/i3-wm -Dmans=true
%:
dh $@ --buildsystem=meson

56
debian/upstream/signing-key.asc vendored Normal file
View File

@@ -0,0 +1,56 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBEoVG4cBEADX2160pBoUf2vSWKbUa8soEMscBFjmb/NajCxwX/BlD1sVNyDm
twZ74CNPS7X5GgNQoXCzkm7v18zOpON69/pwQ0C4T4P+dvewaDzi2+4/bZsXSor1
mA3C9lHcKDbpH7jHkN2AbMnY3Z4LD46LA1qfCISAAKtx1h4peBF6Xhu743dKXrBa
zg/TEJwWIWSyPKgIhur95yebD/Tws+gWlOfBKkF1v1PA+5sPmC8LyK5Rd1n9Sg1D
j//4sWl8A4EwM4QUzSliZME775klV4mOBGbsTnhNjCymgDiXVNjoWdEIHoNfDsut
E2czgSwsSrSPls/Kl1KuHyBiOWi4dl6MFaypcuSNEVNi5K+oJ7gmX/sy/TlF5Ofw
KoBEPrcvulVT8aAM3azMfb/Fgo+GcEEYljV1yvSg7jSjCHxXgMyh/yMfZcPkwajp
fNE5D7WAXgygpolM9dLIOBemDJxwWr0G7uhXNv3vSHpuUheb2REaJJwWHw1IuCmn
gigD5mebQWRSmbEl66ygOFkps9FEq6KSmbHkj7dIrSVmK5DtQRRI5fMPI+E+atul
Lnpgm/R2p2yvPKoS/pr9mwvKIf9F5C20wm1iAaGW1pTDSIl2y2ZpzcJIyS+jhyCX
3d6D7FNEFlI2p9Tnbt9aE04ASLlZFGjxNWweU8zAkNOr1MyPTiWrYtsCtwARAQAB
tCpNaWNoYWVsIFN0YXBlbGJlcmcgPG1pY2hhZWxAc3RhcGVsYmVyZy5kZT6JAkAE
EwEKACoCGy8CHgECF4AFCwkIBwMFFQoJCAsFFgIDAQACGQEFAlNdKVoFCRKuD04A
CgkQTnFg7UrI7h1HYw//R7WBr/MrqevbaB6Uh7Koy3rN1GqXXY7L4kQAO1XSrmC9
IQ/giwg7+655tDWq4cAjefiBWRv0I1WWqZwdgUGwfhzW20DBx2sPkGKZ29pcvU/k
LuMyWs49o2lcsb4cQqgDpH/uzi22fc4BhO91o/uZYOAXrrSlLuzkCa1SDCRymwdw
lIXIXktROd+r6Fpc1FAinOQgn5BQjf7gbSZSlqBLeYZdR+qSxZWufrhsVUy03nVx
mF9hc/aTFNYZHHHh0yFzYfBKisqsuwJW94uW80xw17HoBMSb10eNGEq5xWqh4Owu
8heJePlcoh2F5JnO6cFWoz1bHCZGjeeIm0OdPJXTLDQdcA5Hy4K3ADidqW0y+Iza
Wbs3TpLprLw91LaPcwzZf+vzRgsQCwPKODjhcetEaYGIKweCkNQRQCW6wEl7kRAw
/eG1wdn4YfEcnCz4ye1MW67au3omvBy41BNmGb20rEc9JIQ37HhAJy5MwuguuO1Z
xZWyu3fV39YLwvsa8EYFPb/DOUTmSCBCyvfTOCEC94Vl2kcPXicIpaRnCFZNqVEJ
FAMKY/tSVjPsBEXTFx3aiX3am4CCtc8R95z2DrYtW5UU/yA5o6lDnfRX6Smdl620
kTM/gFEgAI8+x56XsWJ/CnG//EbgKMy8u2u5y7x1SdpZFxLf722EryF0yPJt+im0
OU1pY2hhZWwgU3RhcGVsYmVyZyAoUkVOVC1BLUdVUlUpIDxtaWNoYWVsQHJlbnQt
YS1ndXJ1LmRlPokCPQQTAQoAJwIbLwIeAQIXgAULCQgHAwUVCgkICwUWAgMBAAUC
U10pWgUJEq4PTgAKCRBOcWDtSsjuHUTREACcBXnZwinxZ8S0DOl2OR7qm8ao4U/n
h71tkJX9klnXYY8KQD54tuGjYjCA+UvTOX7c0Rzj3WijgyRxefmOhPQzkk/zUheH
bsaYSbj2mCvA/IkMRe6G0+wyFU5ydssLVApx/+bwdL3CiIoFPwyHMgWPjYuijIts
UMbq7jtnF26l7O0GSY5uHSUQb7caz+Mu0CcF95h3oxRxHVAhHIMtwzkilbjbshEf
nxDH5L0s2hT0amkEB2jw3US2v+YrThk0ZQPoB+tgNLL2Li7yAuwbaEaK37aDTtkX
NdFiAwcOHrLhlD0SnNya4nEVwgnCu5B9f+OwalPq3a0+G394L+a+XHWWwXc6MlFz
WhzAMeE1uFJfbIIGEL/Q3URBbhIUf0xsZEagsjNExgYtJY5XJRitgyxPwAuxusia
VhfTmbr3Mr5yu7QEt1oACq3j0bNr7hzcPk+ckHYbsSvuoo21Ef5vhQetXpAzrot/
+62c7i1xcAvY7MVBT2f/7BC4cYvLXALhcvLAabzOcD8lBPEIBkxgJj42EckEzFzC
c9s5htWdhWYIAIIdIOxZejxfRiTvujg5CaJo+Fg/BL4TTlBgjU7ASzMQBfos3cII
F8O9Yc+W04uMyG9QPqk//rIUFdKgUyd4tzXkQrJs7Jom7duxJPpr5dDMLqTwINL5
LBBKw/lpA/nAkLQqTWljaGFlbCBTdGFwZWxiZXJnIDxzdGFwZWxiZXJnQGRlYmlh
bi5vcmc+iQI9BBMBCgAnAhsvBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheABQJTXSla
BQkSrg9OAAoJEE5xYO1KyO4dGBkP/353sh8feSyxJNXMdgAfe+okYE4B9iWS2zRy
GAEGKyliaMWDJLRhT4ln1glr05pFoy52Hxe4+NBpSYuZ9NV390HRmPxbFaUvHs74
HPkuABxy2XKH94IS1nrb+fleR00w0rLEin4aW3mtwKDHCJtNUW0/DNtC7Uz028SL
9TftaqJrsf+paTFJkZF0ShJ2A6XFxwlvBiVz4f2UDEi7GQuAaYI5V5ZosWIAxdYG
631tKf1EU9YtjPYdBk3YF4Q44AhVbe478Ji24Of0G/l+dGFRzbdARNayBwegJoMu
djXQrPfR1jNVSaw65/AinbbtadlULSTrvhoD6ommGeU6fQS3WtNBbF4T5SuNRBeK
QhWuLSOllmjWfERaj6omg8GXd1rctIFnUhT/dl6bmhooMPRUW1DNxVzqd7UFnqXE
+CaJ7cGfI/9/MITTG32QpjkVeowOcuoZ+qLoOu7dBbagDaEn8T6yFCLACyf9LGBm
MC9bNSGsMRCFV33N/PbVcgf6M0z46d0ysPgGiR5MX1O6CQkJGrwolfA5sK3VIsyp
PaCCHpAuPdEiWB57WleURqCIGWV2ccElyA4M4auDGt1SSNl0NfWu8vde6wNIPir/
DBqh1265QLrLS239UT0u5hYE5hkfiKP2dzgWKh9NT9xm2Dyjjv/PaqWlVedvsVIp
VRx/oRxr
=1n/p
-----END PGP PUBLIC KEY BLOCK-----

3
debian/watch vendored
View File

@@ -1,2 +1,3 @@
version=3
http://i3wm.org/downloads/ /downloads/i3-(.*)\.tar\.bz2
opts=pgpsigurlmangle=s/$/.asc/ \
https://i3wm.org/downloads/ /downloads/i3-(.*)\.tar\.bz2

View File

@@ -160,7 +160,7 @@ powered by \LaTeX, of course}
die X-Session noch\\
\texttt{DISPLAY=:1 urxvt \&}
\item Debugger, strace, logfiles, core-dumps aktivieren\\
(Siehe auch \url{http://i3.zekjur.net/docs/debugging.html})
(Siehe auch \url{http://i3wm.org/docs/debugging.html})
\end{list}
\end{slide}
@@ -498,7 +498,7 @@ int handle_transient_for(void *data, xcb_connection_t *conn,
\begin{slide}{exit(0);}
\begin{list}{$\bullet$}{\itemsep=1em}
\item git-webinterface: \url{http://code.stapelberg.de/git/i3}
\item Website: \url{http://i3.zekjur.net}
\item Website: \url{http://i3wm.org}
\item IRC: \#i3 auf irc.twice-irc.de
\item xcb: \url{http://xcb.freedesktop.org/}
\item 50-Zeilen-WM: \url{http://incise.org/tinywm.html}

View File

@@ -1,26 +0,0 @@
all: hacking-howto.html debugging.html userguide.html ipc.html multi-monitor.html wsbar.html refcard.pdf
hacking-howto.html: hacking-howto
asciidoc -a toc -n $<
debugging.html: debugging
asciidoc -n $<
userguide.html: userguide
asciidoc -a toc -n $<
ipc.html: ipc
asciidoc -a toc -n $<
multi-monitor.html: multi-monitor
asciidoc -a toc -n $<
wsbar.html: wsbar
asciidoc -a toc -n $<
refcard.pdf: refcard.tex
pdflatex refcard.tex && pdflatex refcard.tex
clean:
find . -regex ".*\.\(aux\|out\|log\|toc\|bm\|pdf\|dvi\|log\|html\)" -exec rm '{}' \;

View File

@@ -29,7 +29,7 @@
add_ignore_event, xcb_intern_atom, xcb_intern_atom_reply, fprintf, printf, free, load_configuration,%
XInternAtom, exit, strlen}}
}{}
\title{i3 - an improved dynamic tiling window manager}
\title{i3 - an improved tiling window manager}
\author{sECuRE beim NoName e.V.\\
~\\
powered by \LaTeX, of course}
@@ -215,7 +215,7 @@ for (int c = 0; c < 10; c++) {
\begin{slide}{Mehr infos}
\begin{list}{$\bullet$}{\itemsep=1em}
\item git-webinterface: \url{http://code.stapelberg.de/git/i3}
\item Website: \url{http://i3.zekjur.net}
\item Website: \url{http://i3wm.org}
\item IRC: \#i3 auf irc.twice-irc.de
\end{list}
\end{slide}

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

662
docs/asciidoc-git.conf Normal file
View File

@@ -0,0 +1,662 @@
#
# xhtml11.conf
#
# Asciidoc configuration file.
# xhtml11 backend, generates XHTML 1.1 conformant markup.
#
[miscellaneous]
outfilesuffix=.html
[attributes]
basebackend=html
basebackend-html=
basebackend-xhtml11=
[replacements2]
# Line break.
(?m)^(.*)\s\+$=\1<br />
[replacements]
ifdef::asciidoc7compatible[]
# Superscripts.
\^(.+?)\^=<sup>\1</sup>
# Subscripts.
~(.+?)~=<sub>\1</sub>
endif::asciidoc7compatible[]
[ruler-blockmacro]
<hr />
[pagebreak-blockmacro]
<div style="page-break-after:always"></div>
[blockdef-pass]
asciimath-style=template="asciimathblock",subs=[]
latexmath-style=template="latexmathblock",subs=[]
[macros]
# math macros.
# Special characters are escaped in HTML math markup.
(?su)[\\]?(?P<name>asciimath|latexmath):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[specialcharacters]
(?u)^(?P<name>asciimath|latexmath)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#[specialcharacters]
[asciimath-inlinemacro]
`{passtext}`
[asciimath-blockmacro]
<div class="mathblock{role? {role}}"{id? id="{id}"}>
<div class="content">
<div class="title">{title}</div>
`{passtext}`
</div></div>
[asciimathblock]
<div class="mathblock{role? {role}}"{id? id="{id}"}>
<div class="content">
<div class="title">{title}</div>
`|`
</div></div>
[latexmath-inlinemacro]
{passtext}
[latexmath-blockmacro]
<div class="mathblock{role? {role}}"{id? id="{id}"}>
<div class="content">
<div class="title">{title}</div>
{passtext}
</div></div>
[latexmathblock]
<div class="mathblock{role? {role}}"{id? id="{id}"}>
<div class="content">
<div class="title">{title}</div>
|
</div></div>
[image-inlinemacro]
<span class="image{role? {role}}">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"} />
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"} src="data:image/{eval:os.path.splitext('{target}')[1][1:]};base64,
{data-uri#}{sys3:python -uc "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join("{indir={outdir}}","{imagesdir=}","{target}")}"}" />
{link#}</a>
</span>
[image-blockmacro]
<div class="imageblock{style? {style}}{role? {role}}"{id? id="{id}"}{align? style="text-align:{align};"}{float? style="float:{float};"}>
<div class="content">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"} />
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"} src="data:image/{eval:os.path.splitext('{target}')[1][1:]};base64,
{data-uri#}{sys:python -uc "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join("{indir={outdir}}","{imagesdir=}","{target}")}"}" />
{link#}</a>
</div>
<div class="title">{caption={figure-caption} {counter:figure-number}. }{title}</div>
</div>
[unfloat-blockmacro]
<div style="clear:both;"></div>
[indexterm-inlinemacro]
# Index term.
{empty}
[indexterm2-inlinemacro]
# Index term.
# Single entry index term that is visible in the primary text flow.
{1}
[footnote-inlinemacro]
# footnote:[<text>].
<span class="footnote"><br />[{0}]<br /></span>
[footnoteref-inlinemacro]
# footnoteref:[<id>], create reference to footnote.
{2%}<span class="footnoteref"><br /><a href="#_footnote_{1}">[{1}]</a><br /></span>
# footnoteref:[<id>,<text>], create footnote with ID.
{2#}<span class="footnote" id="_footnote_{1}"><br />[{2}]<br /></span>
[callout-inlinemacro]
ifndef::icons[]
<b>&lt;{index}&gt;</b>
endif::icons[]
ifdef::icons[]
ifndef::data-uri[]
<img src="{icon={iconsdir}/callouts/{index}.png}" alt="{index}" />
endif::data-uri[]
ifdef::data-uri[]
<img alt="{index}" src="data:image/png;base64,
{sys:python -uc "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join("{indir={outdir}}","{icon={iconsdir}/callouts/{index}.png}")}"}" />
endif::data-uri[]
endif::icons[]
# Comment line macros.
[comment-inlinemacro]
{showcomments#}<br /><span class="comment">{passtext}</span><br />
[comment-blockmacro]
{showcomments#}<p><span class="comment">{passtext}</span></p>
[literal-inlinemacro]
# Inline literal.
<tt>{passtext}</tt>
# List tags.
[listtags-bulleted]
list=<div class="ulist{style? {style}}{compact-option? compact}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<ul>|</ul></div>
item=<li>|</li>
text=<p>|</p>
[listtags-numbered]
# The start attribute is not valid XHTML 1.1 but all browsers support it.
list=<div class="olist{style? {style}}{compact-option? compact}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<ol class="{style}"{start? start="{start}"}>|</ol></div>
item=<li>|</li>
text=<p>|</p>
[listtags-labeled]
list=<div class="dlist{compact-option? compact}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<dl>|</dl></div>
entry=
label=
term=<dt class="hdlist1{strong-option? strong}">|</dt>
item=<dd>|</dd>
text=<p>|</p>
[listtags-horizontal]
list=<div class="hdlist{compact-option? compact}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<table>{labelwidth?<col width="{labelwidth}%" />}{itemwidth?<col width="{itemwidth}%" />}|</table></div>
label=<td class="hdlist1{strong-option? strong}">|</td>
term=|<br />
entry=<tr>|</tr>
item=<td class="hdlist2">|</td>
text=<p style="margin-top: 0;">|</p>
[listtags-qanda]
list=<div class="qlist{style? {style}}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<ol>|</ol></div>
entry=<li>|</li>
label=
term=<p><em>|</em></p>
item=
text=<p>|</p>
[listtags-callout]
ifndef::icons[]
list=<div class="colist{style? {style}}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<ol>|</ol></div>
item=<li>|</li>
text=<p>|</p>
endif::icons[]
ifdef::icons[]
list=<div class="colist{style? {style}}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<table>|</table></div>
ifndef::data-uri[]
item=<tr><td><img src="{iconsdir}/callouts/{listindex}.png" alt="{listindex}" /></td><td>|</td></tr>
endif::data-uri[]
ifdef::data-uri[]
item=<tr><td><img alt="{listindex}" src="data:image/png;base64, {sys:python -uc "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join("{indir={outdir}}","{icon={iconsdir}/callouts/{listindex}.png}")}"}" /></td><td>|</td></tr>
endif::data-uri[]
text=|
endif::icons[]
[listtags-glossary]
list=<div class="dlist{style? {style}}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<dl>|</dl></div>
label=
entry=
term=<dt>|</dt>
item=<dd>|</dd>
text=<p>|</p>
[listtags-bibliography]
list=<div class="ulist{style? {style}}{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<ul>|</ul></div>
item=<li>|</li>
text=<p>|</p>
[tags]
# Quoted text.
emphasis=<em>{1?<span class="{1}">}|{1?</span>}</em>
strong=<strong>{1?<span class="{1}">}|{1?</span>}</strong>
monospaced=<tt>{1?<span class="{1}">}|{1?</span>}</tt>
singlequoted={lsquo}{1?<span class="{1}">}|{1?</span>}{rsquo}
doublequoted={ldquo}{1?<span class="{1}">}|{1?</span>}{rdquo}
unquoted={1?<span class="{1}">}|{1?</span>}
superscript=<sup>{1?<span class="{1}">}|{1?</span>}</sup>
subscript=<sub>{1?<span class="{1}">}|{1?</span>}</sub>
ifdef::deprecated-quotes[]
# Override with deprecated quote attributes.
emphasis={role?<span class="{role}">}<em{1,2,3? style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?"}>|</em>{role?</span>}
strong={role?<span class="{role}">}<strong{1,2,3? style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?"}>|</strong>{role?</span>}
monospaced={role?<span class="{role}">}<tt{1,2,3? style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?"}>|</tt>{role?</span>}
singlequoted={role?<span class="{role}">}{1,2,3?<span style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?">}{amp}#8216;|{amp}#8217;{1,2,3?</span>}{role?</span>}
doublequoted={role?<span class="{role}">}{1,2,3?<span style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?">}{amp}#8220;|{amp}#8221;{1,2,3?</span>}{role?</span>}
unquoted={role?<span class="{role}">}{1,2,3?<span style="{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}">}|{1,2,3?</span>}{role?</span>}
superscript={role?<span class="{role}">}<sup{1,2,3? style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?"}>|</sup>{role?</span>}
subscript={role?<span class="{role}">}<sub{1,2,3? style="}{1?color:{1};}{2?background-color:{2};}{3?font-size:{3}em;}{1,2,3?"}>|</sub>{role?</span>}
endif::deprecated-quotes[]
# Inline macros
[http-inlinemacro]
<a href="{name}:{target}">{0={name}:{target}}</a>
[https-inlinemacro]
<a href="{name}:{target}">{0={name}:{target}}</a>
[ftp-inlinemacro]
<a href="{name}:{target}">{0={name}:{target}}</a>
[file-inlinemacro]
<a href="{name}:{target}">{0={name}:{target}}</a>
[irc-inlinemacro]
<a href="{name}:{target}">{0={name}:{target}}</a>
[mailto-inlinemacro]
<a href="mailto:{target}">{0={target}}</a>
[link-inlinemacro]
<a href="{target}">{0={target}}</a>
[callto-inlinemacro]
<a href="{name}:{target}">{0={target}}</a>
# anchor:id[text]
[anchor-inlinemacro]
<a id="{target}"></a>
# [[id,text]]
[anchor2-inlinemacro]
<a id="{1}"></a>
# [[[id]]]
[anchor3-inlinemacro]
<a id="{1}"></a>[{1}]
# xref:id[text]
[xref-inlinemacro]
<a href="#{target}">{0=[{target}]}</a>
# <<id,text>>
[xref2-inlinemacro]
<a href="#{1}">{2=[{1}]}</a>
# Special word substitution.
[emphasizedwords]
<em>{words}</em>
[monospacedwords]
<tt>{words}</tt>
[strongwords]
<strong>{words}</strong>
# Paragraph substitution.
[paragraph]
<div class="paragraph{role? {role}}"{id? id="{id}"}>{title?<div class="title">{title}</div>}<p>
|
</p></div>
[admonitionparagraph]
template::[admonitionblock]
# Delimited blocks.
[listingblock]
<div class="listingblock{role? {role}}"{id? id="{id}"}>
<div class="title">{caption=}{title}</div>
<div class="content">
<pre><tt>
|
</tt></pre>
</div></div>
[literalblock]
<div class="literalblock{role? {role}}"{id? id="{id}"}>
<div class="title">{title}</div>
<div class="content">
<pre><tt>
|
</tt></pre>
</div></div>
[sidebarblock]
<div class="sidebarblock{role? {role}}"{id? id="{id}"}>
<div class="content">
<div class="title">{title}</div>
|
</div></div>
[openblock]
<div class="openblock{role? {role}}"{id? id="{id}"}>
<div class="title">{title}</div>
<div class="content">
|
</div></div>
[partintroblock]
template::[openblock]
[abstractblock]
template::[quoteblock]
[quoteblock]
<div class="quoteblock{role? {role}}"{id? id="{id}"}>
<div class="title">{title}</div>
<div class="content">
|
</div>
<div class="attribution">
<em>{citetitle}</em>{attribution?<br />}
&#8212; {attribution}
</div></div>
[verseblock]
<div class="verseblock{role? {role}}"{id? id="{id}"}>
<div class="title">{title}</div>
<pre class="content">
|
</pre>
<div class="attribution">
<em>{citetitle}</em>{attribution?<br />}
&#8212; {attribution}
</div></div>
[exampleblock]
<div class="exampleblock{role? {role}}"{id? id="{id}"}>
<div class="title">{caption={example-caption} {counter:example-number}. }{title}</div>
<div class="content">
|
</div></div>
[admonitionblock]
<div class="admonitionblock{role? {role}}"{id? id="{id}"}>
<table><tr>
<td class="icon">
{data-uri%}{icons#}<img src="{icon={iconsdir}/{name}.png}" alt="{caption}" />
{data-uri#}{icons#}<img alt="{caption}" src="data:image/png;base64,
{data-uri#}{icons#}{sys:python -uc "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join("{indir={outdir}}","{icon={iconsdir}/{name}.png}")}"}" />
{icons%}<div class="title">{caption}</div>
</td>
<td class="content">
<div class="title">{title}</div>
|
</td>
</tr></table>
</div>
# Tables.
[tabletags-default]
colspec=<col{autowidth-option! width="{colpcwidth}%"} />
bodyrow=<tr>|</tr>
headdata=<th {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}" valign="{valign}">|</th>
bodydata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}" valign="{valign}">|</td>
paragraph=<p class="table">|</p>
[tabletags-header]
paragraph=<p class="table header">|</p>
[tabletags-emphasis]
paragraph=<p class="table"><em>|</em></p>
[tabletags-strong]
paragraph=<p class="table"><strong>|</strong></p>
[tabletags-monospaced]
paragraph=<p class="table"><tt>|</tt></p>
[tabletags-verse]
bodydata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}" valign="{valign}"><div class="verse">|</div></td>
paragraph=
[tabletags-literal]
bodydata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}" valign="{valign}"><div class="literal"><pre><tt>|</tt></pre></div></td>
paragraph=
[tabletags-asciidoc]
bodydata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}" valign="{valign}"><div>|</div></td>
paragraph=
[table]
<div class="tableblock{role? {role}}"{id? id="{id}"}>
<table rules="{grid=all}"
style="margin-left:{align@left:0}{align@center|right:auto}; margin-right:{align@left|center:auto}{align@right:0};"
style="float:{float};"
{autowidth-option%}width="{tablepcwidth}%"
{autowidth-option#}{width#width="{tablepcwidth}%"}
frame="{frame%border}"
frame="{frame@topbot:hsides}{frame@all:border}{frame@none:void}{frame@sides:vsides}"
cellspacing="0" cellpadding="4">
<caption class="title">{caption={table-caption} {counter:table-number}. }{title}</caption>
{colspecs}
{headrows#}<thead>
{headrows}
{headrows#}</thead>
{footrows#}<tfoot>
{footrows}
{footrows#}</tfoot>
<tbody>
{bodyrows}
</tbody>
</table>
</div>
#--------------------------------------------------------------------
# Deprecated old table definitions.
#
[miscellaneous]
# Screen width in pixels.
pagewidth=800
pageunits=
[old_tabledef-default]
template=old_table
colspec=<col width="{colwidth}{pageunits}" />
bodyrow=<tr>|</tr>
headdata=<th align="{colalign}">|</th>
footdata=<td align="{colalign}">|</td>
bodydata=<td align="{colalign}">|</td>
[old_table]
<div class="tableblock"{id? id="{id}"}>
<table rules="{grid=none}"
frame="{frame%hsides}"
frame="{frame@topbot:hsides}{frame@all:border}{frame@none:void}{frame@sides:vsides}"
cellspacing="0" cellpadding="4">
<caption class="title">{caption={table-caption}}{title}</caption>
{colspecs}
{headrows#}<thead>
{headrows}
{headrows#}</thead>
{footrows#}<tfoot>
{footrows}
{footrows#}</tfoot>
<tbody valign="top">
{bodyrows}
</tbody>
</table>
</div>
# End of deprecated old table definitions.
#--------------------------------------------------------------------
[floatingtitle]
<h{level@0:1}{level@1:2}{level@2:3}{level@3:4}{level@4:5}{id? id="{id}"} class="float">{title}</h{level@0:1}{level@1:2}{level@2:3}{level@3:4}{level@4:5}>
[preamble]
# Untitled elements between header and first section title.
<div id="preamble">
<div class="sectionbody">
|
</div>
</div>
# Document sections.
[sect0]
<h1{id? id="{id}"}>{title}</h1>
|
[sect1]
<div class="sect1{style? {style}}{role? {role}}">
<h2{id? id="{id}"}>{numbered?{sectnum} }{title}</h2>
<div class="sectionbody">
|
</div>
</div>
[sect2]
<div class="sect2{style? {style}}{role? {role}}">
<h3{id? id="{id}"}>{numbered?{sectnum} }{title}</h3>
|
</div>
[sect3]
<div class="sect3{style? {style}}{role? {role}}">
<h4{id? id="{id}"}>{numbered?{sectnum} }{title}</h4>
|
</div>
[sect4]
<div class="sect4{style? {style}}{role? {role}}">
<h5{id? id="{id}"}>{title}</h5>
|
</div>
[appendix]
<div class="sect1{style? {style}}{role? {role}}">
<h2{id? id="{id}"}>{numbered?{sectnum} }{appendix-caption} {counter:appendix-number:A}: {title}</h2>
<div class="sectionbody">
|
</div>
</div>
[toc]
<div id="toc">
<div id="toctitle">{toc-title}</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
[header]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="{lang=en}">
<head>
<link rel="icon" type="image/png" href="/favicon.png">
<meta http-equiv="Content-Type" content="{quirks=application/xhtml+xml}{quirks?text/html}; charset={encoding}" />
<meta name="generator" content="AsciiDoc {asciidoc-version}" />
<meta name="description" content="{description}" />
<meta name="keywords" content="{keywords}" />
<title>i3: {title}</title>
{title%}<title>i3: {doctitle=}</title>
<link rel="stylesheet" href="{stylesdir=.}/style.css" type="text/css" />
ifdef::linkcss[]
<link rel="stylesheet" href="{stylesdir=.}/{theme={backend}}.css" type="text/css" />
{doctype-manpage}<link rel="stylesheet" href="{stylesdir=.}/{theme={backend}}-manpage.css" type="text/css" />
ifdef::quirks[]
<link rel="stylesheet" href="{stylesdir=.}/{theme={backend}}-quirks.css" type="text/css" />
endif::quirks[]
<link rel="stylesheet" href="{stylesdir=.}/{stylesheet}" type="text/css" />
ifdef::pygments[<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css" />]
endif::linkcss[]
ifndef::linkcss[]
<style type="text/css">
include1::{stylesdir=./stylesheets}/{theme={backend}}.css[]
ifdef::doctype-manpage[]
include1::{stylesdir=./stylesheets}/{theme={backend}}-manpage.css[]
endif::doctype-manpage[]
ifdef::quirks[]
include1::{stylesdir=./stylesheets}/{theme={backend}}-quirks.css[]
endif::quirks[]
include1::{stylesheet}[]
ifdef::pygments[]
include1::{stylesdir=./stylesheets}/pygments.css[]
endif::pygments[]
</style>
endif::linkcss[]
ifndef::disable-javascript[]
ifdef::linkcss[]
<script type="text/javascript">
# Escape as CDATA to pass validators.
/*<![CDATA[*/
document.addEventListener("DOMContentLoaded", function()\{asciidoc.footnotes();{toc? asciidoc.toc({toclevels});}\}, false);
/*]]>*/
</script>
<script type="text/javascript" src="{scriptsdir=.}/asciidoc-xhtml11.js"></script>
endif::linkcss[]
ifndef::linkcss[]
<script type="text/javascript">
# Escape as CDATA to pass validators.
/*<![CDATA[*/
document.addEventListener("DOMContentLoaded", function()\{asciidoc.footnotes();{toc? asciidoc.toc({toclevels});}\}, false);
include1::{scriptsdir=./javascripts}/asciidoc-xhtml11.js[]
/*]]>*/
</script>
endif::linkcss[]
endif::disable-javascript[]
ifdef::asciimath[]
ifdef::linkcss[]
<script type="text/javascript" src="{scriptsdir=.}/ASCIIMathML.js"></script>
endif::linkcss[]
ifndef::linkcss[]
<script type="text/javascript">
# Escape as CDATA to pass validators.
/*<![CDATA[*/
include1::{scriptsdir=./javascripts}/ASCIIMathML.js[]
/*]]>*/
</script>
endif::linkcss[]
endif::asciimath[]
ifdef::latexmath[]
ifdef::linkcss[]
<script type="text/javascript" src="{scriptsdir=.}/LaTeXMathML.js"></script>
endif::linkcss[]
ifndef::linkcss[]
<script type="text/javascript">
# Escape as CDATA to pass validators.
/*<![CDATA[*/
include1::{scriptsdir=./javascripts}/LaTeXMathML.js[]
/*]]>*/
</script>
endif::linkcss[]
endif::latexmath[]
{docinfo1,docinfo2#}{include:{docdir}/docinfo.html}
{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html}
</head>
<body class="{doctype}"{max-width? style="max-width:{max-width}"}>
<div id="main">
<a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>
<ul id="nav">
<li style=" background-color: #FFD000; font-size: 2em;padding: 0.25em;-webkit-border-radius: 0.25em;border: 4px dashed black;color: #000000;">latest git docs</li>
</ul>
<br style="clear: both">
<div id="content">
# Article, book header.
ifndef::doctype-manpage[]
<div id="header">
ifndef::notitle[<h1>{doctitle}</h1>]
ifdef::doctitle[]
<span id="author">{author}</span><br />
<span id="email"><tt>&lt;<a href="mailto:{email}">{email}</a>&gt;</tt></span><br />
<span id="revnumber">version {revnumber}{revdate?,}</span>
<span id="revdate">{revdate}</span>
<br /><span id="revremark">{revremark}</span>
endif::doctitle[]
ifdef::toc[{template:toc}]
</div>
endif::doctype-manpage[]
# Man page header.
ifdef::doctype-manpage[]
<div id="header">
<h1>
{doctitle} Manual Page
</h1>
ifdef::toc[{template:toc}]
<h2>{manname-title}</h2>
<div class="sectionbody">
<p>{manname} -
{manpurpose}
</p>
</div>
</div>
endif::doctype-manpage[]
[footer]
</div>
{disable-javascript%<div id="footnotes"><hr /></div>}
<div id="footer" lang="de">
© 2009 Michael Stapelberg, <a href="https://i3wm.org/impress.html">Impressum</a>
</div>
</body>
</html>
ifdef::doctype-manpage[]
[synopsis]
template::[sect1]
endif::doctype-manpage[]
ifdef::quirks[]
include::{backend}-quirks.conf[]
endif::quirks[]

19
docs/bigpicture.asy Normal file
View File

@@ -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));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

View File

@@ -1,111 +1,178 @@
Debugging i3: How To
====================
Michael Stapelberg <michael+i3@stapelberg.de>
July 2011
Michael Stapelberg <michael@i3wm.org>
January 2014
This document describes how to debug i3 suitably for sending us useful bug
reports, even if you have no clue of C programming.
This document describes how to debug i3 to send us useful bug
reports, even if you have no knowledge of C programming.
First of all: Thank you for being interested in debugging i3. It really means
Thank you for being interested in debugging i3. It really means
something to us to get your bug fixed. If you have any questions about the
debugging and/or need further help, do not hesitate to contact us!
process and/or need further help, do not hesitate to contact us!
== Verify you are using i3 ≥ 4.10
Only the latest major version of i3 is supported. To verify which version
you are running, use:
---------------
$ i3 --moreversion 2>&- || i3 --version
Binary i3 version: 4.7 (2013-12-22, branch "tags/4.7")
Running i3 version: 4.7-84-gac74a63 (2014-01-01, branch "next") (pid 1995)
---------------
Your version can look like this:
4.7 (release version)::
You are using a release version. In many cases, bugs are already
fixed in the development version of i3. Even if the bug is not a known fixed
one, we will still ask you to reproduce your error with the most recent
development version of i3. Therefore, please upgrade to a development version
if you can.
4.7-85-g9c15b95 (development version)::
Your version is 85 commits newer than 4.7, and the git revision of your
version is +9c15b95+. Go to https://github.com/i3/i3/commits/next and see if
the most recent commit starts with the same revision. If so, you are using the
latest version.
Development versions of i3 have logging enabled by default and are compiled
with debug symbols.
== Enabling logging
i3 logs useful information to stdout. To have a clearly defined place where log
files will be saved, you should redirect stdout and stderr in your
+~/.xsession+. While youre at it, putting each run of i3 in a separate log
file with date/time in its filename is a good idea to not get confused about
the different log files later on.
If you are using a development version (see previous section), you dont need
to do anything -- skip to section 3.
--------------------------------------------------------------------
exec /usr/bin/i3 >~/i3log-$(date +'%F-%k-%M-%S') 2>&1
--------------------------------------------------------------------
If you are using a release version with a custom +~/.xsession+ (or xinitrc)
file, execute i3 with a line like this:
To enable verbose output and all levels of debug output (required when
attaching logfiles to bugreports), add the parameters +-V -d all+, like this:
----------------------------------
# Use 25 MiB of RAM for debug logs
exec i3 --shmlog-size=26214400
----------------------------------
--------------------------------------------------------------------
exec /usr/bin/i3 -V -d all >~/i3log-$(date +'%F-%k-%M-%S') 2>&1
--------------------------------------------------------------------
If you are *NOT* using an +~/.xsession+ file but you just chose "i3" from the
list of sessions in your desktop manager (gdm, lxdm, …), edit
+/usr/share/xsessions/i3.desktop+ and replace the +Exec=i3+ line with:
== Enabling core dumps
------------------------------
Exec=i3 --shmlog-size=26214400
------------------------------
When i3 crashes, often you have the chance of getting a 'core dump' (an image
of the memory of the i3 process which can be loaded into a debugger). To get a
core dump, you have to make sure that the user limit for core dump files is set
high enough. Many systems ship with a default value which even forbids core
dumps completely. To disable the limit completely and thus enable core dumps,
use the following command (in your +~/.xsession+, before starting i3):
If you cannot restart i3 for some reason, you can enable debug logging on the
fly:
-------------------
ulimit -c unlimited
-------------------
---------------------------------------
i3-msg 'debuglog on; shmlog on; reload'
---------------------------------------
Furthermore, to easily recognize core dumps and allow multiple of them, you
should set a custom core dump filename pattern, using a command like the
following:
== Reproducing the problem
---------------------------------------------
sudo sysctl -w kernel.core_pattern=core.%e.%p
---------------------------------------------
Before submitting an issue, please make sure to close down on the problem as
much as you can yourself. Here are some steps you should consider:
This will generate files which have the executables file name (%e) and the
process id (%p) in it. You can save this setting across reboots using
+/etc/sysctl.conf+.
* Find a deterministic, reliable way to reproduce the problem and provide it
with your bug report.
* Try using the default i3 config to reproduce the problem. If the issue does
not appear with the default config, gradually adapt it to track down what
change(s) to the config introduce the problem.
* Reproduce the problem with a minimal setup, i.e., only use as few applications,
windows and steps as necessary.
* In addition, try to stick to applications that are common and, even more
importantly, free / open source.
* Before obtaining the log file, restart i3 in-place, execute the steps to
reproduce the problem and then save the logs. This keeps the log file as
small as possible and necessary.
== Compiling with debug symbols
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.
To actually get useful core dumps, you should make sure that your version of i3
is compiled with debug symbols, that is, that the symbols are not stripped
during the build process. You can check whether your executable contains
symbols by issuing the following command:
== Obtaining the debug logfile
----------------
file $(which i3)
----------------
[CAUTION]
================================================================================
Logs may contain sensitive information, so please inspect the log before
submitting it. Logs may be viewed by anyone, once posted. If you choose to
redact the log, make an effort not to discard information which may be relevant
to the issue you are reporting.
The best way to avoid submitting such information is to only run the necessary
steps to reproduce the behavior when saving the log file. This will also make
analyzing the log file easier.
================================================================================
No matter whether i3 misbehaved in some way without crashing or whether it just
crashed, the logfile provides all information necessary to debug the problem.
To upload a compressed version of the logfile (for a bugreport), use:
-------------------------------------------------------------------------------
DISPLAY=:0 i3-dump-log | bzip2 -c | curl --data-binary @- https://logs.i3wm.org
-------------------------------------------------------------------------------
This command does not depend on i3 (it also works while i3 displays
the crash dialog), but it requires a working X11 connection.
After running it, you will get a URL to the logfile. Please include that URL in
your bug report.
== On crashes: Obtaining a backtrace
When i3 crashes, it will display a dialog stating “i3 just crashed”, offering
you to save a backtrace to a text file.
To actually get useful backtraces, you should make sure that your version of i3
is compiled with debug symbols:
You should get an output like this:
------------------------------------------------------------------------------
$ file `which i3`
/usr/bin/i3: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
------------------------------------------------------------------------------
Notice the +not stripped+, which is the important part. If you have a version
which is stripped, please have a look if your distribution provides debug
which is stripped, please check whether your distribution provides debug
symbols (package +i3-wm-dbg+ on Debian for example) or if you can turn off
stripping. If nothing helps, please build i3 from source.
== Generating a backtrace
Once you have made sure that your i3 is compiled with debug symbols and the C
debugger +gdb+ is installed on your machine, you can let i3 generate a
backtrace in the crash dialog.
Once you have made sure that your i3 is compiled with debug symbols and that
core dumps are enabled, you can start making sense out of the core dumps.
After pressing "b" in the crash dialog, you will get a file called
+/tmp/i3-backtrace.%d.%d.txt+ where the first +%d+ is replaced by i3s process
id (PID) and the second one is incremented each time you generate a backtrace,
starting at 0.
Because the core dump depends on the original executable (and its debug
symbols), please do this as soon as you encounter the problem. If you
re-compile i3, your core dump might be useless afterwards.
In Linux, if the backtrace just says +No stack.+, that's because gdb does not
have necessary permissions to attach to a running process. You can fix that by
running from a terminal (you can open a new tty, e.g. with ctrl-alt-F2):
Please install +gdb+, a debugger for C. No worries, you dont need to learn it
now. Start gdb using the following command (replacing the actual name of the
core dump of course):
---------------------------------------------------------------------
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
---------------------------------------------------------------------
----------------------------
gdb $(which i3) core.i3.3849
----------------------------
Afterwards, try re-generating the stack trace. Note that this setting re-sets
after reboot, see more info at
https://www.kernel.org/doc/Documentation/security/Yama.txt.
Then, generate a backtrace using:
== Debugging i3bar
--------------
backtrace full
--------------
To debug i3bar problems, use the +--verbose+ commandline parameter,
or add +verbose yes+ to all +bar {}+ blocks in your i3
config, reload your config and then restart all i3bar instances like this:
== Sending bug reports/debugging on IRC
---------------------------------------------------------------------
$ i3 reload
$ killall i3bar
$ for c in $(i3-msg -t get_bar_config | python -c \
'import json,sys;print("\n".join(json.load(sys.stdin)))'); do \
(i3bar --bar_id=$c >i3bar.$c.log 2>&1) & \
done;
---------------------------------------------------------------------
When sending bug reports, please paste the relevant part of the log (if in
doubt, please send us rather too much information than too less) and the whole
backtrace (if there was a core dump).
When debugging with us in IRC, be prepared to use a so called nopaste service
such as http://nopaste.info or http://pastebin.com because pasting large
amounts of text in IRC sometimes leads to incomplete lines (servers have line
length limitations) or flood kicks.
There will now be +i3bar.*.log+ files in your current directory that you can provide
in your bug report.

BIN
docs/gaps1920.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

File diff suppressed because it is too large Load Diff

98
docs/i3-pod2html Executable file
View File

@@ -0,0 +1,98 @@
#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
use strict;
use warnings;
use Pod::Simple::HTML;
use Getopt::Long;
use v5.10;
my $stylesurl = '';
GetOptions("stylesurl=s" => \$stylesurl)
or die "parsing flags";
$Pod::Simple::HTML::Tagmap{'Verbatim'} = '<pre><tt>';
$Pod::Simple::HTML::Tagmap{'VerbatimFormatted'} = '<pre><tt>';
$Pod::Simple::HTML::Tagmap{'/Verbatim'} = '</tt></pre>';
$Pod::Simple::HTML::Tagmap{'/VerbatimFormatted'} = '</tt></pre>';
if (@ARGV < 2) {
say STDERR "Syntax: i3-pod2html <pod-input-path> <html-output-path>";
exit 1;
}
open(my $in, '<', $ARGV[0]) or die "Couldnt open $ARGV[0] for reading: $!\n";
open(my $out, '>', $ARGV[1]) or die "Couldnt open $ARGV[1] for writing: $!\n";
my $parser = Pod::Simple::HTML->new();
$parser->index(1);
if ($stylesurl ne '') {
$parser->html_header_before_title(
<<EOF
<!doctype html>
<html lang="en">
<head>
<link rel="icon" type="image/png" href="/favicon.png">
<meta charset="utf-8">
<meta name="generator" content="Pod::Simple::HTML">
<meta name="description" content="i3 Perl documentation">
<link rel="stylesheet" href="$stylesurl/style.css" type="text/css" />
<style type="text/css">
.pod pre {
background: #333;
border: 1px solid #555;
border-left: 5px solid #555;
padding: 0.5em;
padding-left: 0;
padding-right: 0.5em;
white-space: pre;
color: white;
}
.pod ul {
list-style-type: none;
}
.pod li {
margin-bottom: 0 !important;
}
tt {
font-family: 'Droid Sans Mono', sans-serif;
font-size: inherit;
}
.pod h1 a, .pod h2 a, .pod h3 a, .pod h4 a {
text-decoration: none;
color: white;
}
</style>
<title>
EOF
);
}
$parser->html_header_after_title(
<<'EOF'
</title>
</head>
<body>
<div id="main">
<a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>
<ul id="nav">
<li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>
<li><a href="/screenshots">Screens</a></li>
<li><a href="https://www.github.com/i3/i3/discussions">Get Help</a></li>
<li><a href="/contact">Contact</a></li>
<li><a href="https://bugs.i3wm.org/">Bugs</a></li>
</ul>
<br style="clear: both">
<div id="content" class="pod">
<h1>i3 Perl documentation</h1>
EOF
);
$parser->output_fh($out);
$parser->parse_file($in);

BIN
docs/i3-sync-working.dia Normal file

Binary file not shown.

BIN
docs/i3-sync-working.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/i3-sync.dia Normal file

Binary file not shown.

BIN
docs/i3-sync.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

287
docs/i3bar-protocol Normal file
View File

@@ -0,0 +1,287 @@
i3bar input protocol
====================
Michael Stapelberg <michael@i3wm.org>
August 2012
This document explains the protocol in which i3bar expects its input. It
provides support for colors, urgency, shortening and easy manipulation.
== Rationale for choosing JSON
Before describing the protocol, lets cover why JSON is a building block of
this protocol.
1. Other bar display programs such as dzen2 or xmobar are using in-band
signaling: they recognize certain sequences (like ^fg(#330000) in your input
text). We would like to avoid that and separate information from
meta-information. By information, we mean the actual output, like the IP
address of your ethernet adapter and by meta-information, we mean in which
color it should be displayed right now.
2. It is easy to write a simple script which manipulates part(s) of the input.
Each block of information (like a block for the disk space indicator, a block
for the current IP address, etc.) can be identified specifically and modified
in whichever way you like.
3. It remains easy to write a simple script which just suffixes (or prefixes) a
status line input, because tools like i3status will output their JSON in
such a way that each line array will be terminated by a newline. Therefore,
you are not required to use a streaming JSON parser, but you can use any
JSON parser and write your script in any programming language. In fact, you
can decide to not bother with the JSON parsing at all and just inject your
output at a specific position (beginning or end).
4. Relying on JSON does not introduce any new dependencies. In fact, the IPC
interface of i3 also uses JSON, therefore i3bar already depends on JSON.
The only point against using JSON is computational complexity. If that really
bothers you, just use the plain text input format (which i3bar will continue to
support).
== The protocol
The first message of the protocol is a header block, which contains (at least)
the version of the protocol to be used. In case there are significant changes
(not only additions), the version will be incremented. i3bar will still
understand the old protocol version, but in order to use the new one, you need
to provide the correct version. The header block is terminated by a newline and
consists of a single JSON hash:
*Minimal example*:
------------------------------
{ "version": 1 }
------------------------------
*All features example*:
------------------------------
{ "version": 1, "stop_signal": 10, "cont_signal": 12, "click_events": true }
------------------------------
(Note that before i3 v4.3 the precise format had to be +{"version":1}+,
byte-for-byte.)
What follows is an infinite array (so it should be parsed by a streaming JSON
parser, but as described above you can go for a simpler solution), whose
elements are one array per status line. A status line is one unit of
information which should be displayed at a time. i3bar will not display any
input until the status line is complete. In each status line, every block will
be represented by a JSON hash:
*Example*:
------
[
[
{
"full_text": "E: 10.0.0.1 (1000 Mbit/s)",
"color": "#00ff00"
},
{
"full_text": "2012-01-05 20:00:01"
}
],
[
{
"full_text": "E: 10.0.0.1 (1000 Mbit/s)",
"color": "#00ff00"
},
{
"full_text": "2012-01-05 20:00:02"
}
],
------
Please note that this example was pretty printed for human consumption.
i3status and others will output single statuslines in one line, separated by
\n.
You can find an example of a shell script which can be used as your
+status_command+ in the bar configuration at
https://github.com/i3/i3/blob/next/contrib/trivial-bar-script.sh
=== Header in detail
version::
The version number (as an integer) of the i3bar protocol you will use.
stop_signal::
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.
The default value (if none is specified) is SIGCONT.
click_events::
If specified and true i3bar will write an infinite array (same as above)
to your stdin.
=== Blocks in detail
full_text::
The +full_text+ will be displayed by i3bar on the status line. This is the
only required key. If +full_text+ is an empty string, the block will be
skipped.
short_text::
Where appropriate, the +short_text+ (string) entry should also be
provided. It will be used in case the status line needs to be shortened
because it uses more space than your screen provides. For example, when
displaying an IPv6 address, the prefix is usually (!) more relevant
than the suffix, because the latter stays constant when using autoconf,
while the prefix changes. When displaying the date, the time is more
important than the date (it is more likely that you know which day it
is than what time it is).
color::
To make the current state of the information easy to spot, colors can
be used. For example, the wireless block could be displayed in red
(using the +color+ (string) entry) if the card is not associated with
any network and in green or yellow (depending on the signal strength)
when it is associated.
Colors are specified in hex (like in HTML), starting with a leading
hash sign. For example, +#ff0000+ means red.
background::
Overrides the background color for this particular block.
border::
Overrides the border color for this particular block.
border_top::
Defines the width (in pixels) of the top border of this block. Defaults
to 1.
border_right::
Defines the width (in pixels) of the right border of this block. Defaults
to 1.
border_bottom::
Defines the width (in pixels) of the bottom border of this block. Defaults
to 1.
border_left::
Defines the width (in pixels) of the left border of this block. Defaults
to 1.
min_width::
The minimum width (in pixels) of the block. If the content of the
+full_text+ key take less space than the specified min_width, the block
will be padded to the left and/or the right side, according to the +align+
key. This is useful when you want to prevent the whole status line to shift
when value take more or less space between each iteration.
The value can also be a string. In this case, the width of the text given
by +min_width+ determines the minimum width of the block. This is useful
when you want to set a sensible minimum width regardless of which font you
are using, and at what particular size.
align::
Align text on the +center+, +right+ or +left+ (default) of the block, when
the minimum width of the latter, specified by the +min_width+ key, is not
reached.
name and instance::
Every block should have a unique +name+ (string) entry so that it can
be easily identified in scripts which process the output. i3bar
completely ignores the name and instance fields. Make sure to also
specify an +instance+ (string) entry where appropriate. For example,
the user can have multiple disk space blocks for multiple mount points.
urgent::
A boolean which specifies whether the current value is urgent. Examples
are battery charge values below 1 percent or no more available disk
space (for non-root users). The presentation of urgency is up to i3bar.
separator::
A boolean which specifies whether a separator line should be drawn
after this block. The default is true, meaning the separator line will
be drawn. Note that if you disable the separator line, there will still
be a gap after the block, unless you also use +separator_block_width+.
separator_block_width::
The amount of pixels to leave blank after the block. In the middle of
this gap, a separator line will be drawn unless +separator+ is
disabled. Normally, you want to set this to an odd value (the default
is 9 pixels), since the separator line is drawn in the middle.
markup::
A string that indicates how the text of the block should be parsed. Set to
+"pango"+ to use https://developer.gnome.org/pango/1.46/[Pango markup].
Set to +"none"+ to not use any markup (default). Pango markup only works
if you use a pango font.
If you want to put in your own entries into a block, prefix the key with an
underscore (_). i3bar will ignore all keys it doesnt understand, and prefixing
them with an underscore makes it clear in every script that they are not part
of the i3bar protocol.
*Example*:
------------------------------------------
{
"full_text": "E: 10.0.0.1 (1000 Mbit/s)",
"_ethernet_vendor": "Intel"
}
------------------------------------------
In the following example, the longest (widest) possible value of the block is
used to set the minimum width:
------------------------------------------
{
"full_text": "CPU 4%",
"min_width": "CPU 100%",
"align": "left"
}
------------------------------------------
An example of a block which uses all possible entries follows:
*Example*:
------------------------------------------
{
"full_text": "E: 10.0.0.1 (1000 Mbit/s)",
"short_text": "10.0.0.1",
"color": "#00ff00",
"background": "#1c1c1c",
"border": "#ee0000",
"border_top": 1,
"border_right": 0,
"border_bottom": 3,
"border_left": 1,
"min_width": 300,
"align": "right",
"urgent": false,
"name": "ethernet",
"instance": "eth0",
"separator": true,
"separator_block_width": 9,
"markup": "none"
}
------------------------------------------
=== Click events
If enabled i3bar will send you notifications if the user clicks on a block and
looks like this:
name::
Name of the block, if set
instance::
Instance of the block, if set
x, y::
X11 root window coordinates where the click occurred
button::
X11 button ID (for example 1 to 3 for left/middle/right mouse button)
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::
An array of the modifiers active when the click occurred. The order in which
modifiers are listed is not guaranteed.
*Example*:
------------------------------------------
{
"name": "ethernet",
"instance": "eth0",
"button": 1,
"modifiers": ["Shift", "Mod1"],
"x": 1925,
"y": 1400,
"relative_x": 12,
"relative_y": 8,
"output_x": 5,
"output_y": 1400,
"width": 50,
"height": 22
}
------------------------------------------

View File

@@ -0,0 +1,184 @@
i3bar workspace buttons protocol
================================
This document explains the protocol in which i3bar expects input for
configuring workspace buttons. This feature is available since i3 version 4.23.
The program defined by the +workspace_command+ configuration option for i3bar can
modify the workspace buttons displayed by i3bar. The command should constantly
print in its standard output a stream of messages following the protocol
defined in this page.
If you are looking for the status line protocol instead, see https://i3wm.org/docs/i3bar-protocol.html.
== The protocol
Each message should be a newline-delimited JSON array. The array is in the same
format as the +GET_WORKSPACES+ ipc event, see
https://i3wm.org/docs/ipc.html#_workspaces_reply.
As an example, this is the output of the +i3-msg -t get_workspaces+ command:
------------------------------
[
{
"id": 94131549984064,
"num": 1,
"name": "1",
"visible": false,
"focused": false,
"output": "HDMI-A-0",
"urgent": false
},
{
"id": 94131550477584,
"num": 2,
"name": "2",
"visible": true,
"focused": true,
"output": "HDMI-A-0",
"urgent": false
},
{
"id": 94131550452704,
"num": 3,
"name": "3:some workspace",
"visible": false,
"focused": false,
"output": "HDMI-A-0",
"urgent": false
}
]
------------------------------
Please note that this example was pretty printed for human consumption, with
the +"rect"+ field removed. Workspace button commands should output each array
in one line.
Each element in the array represents a workspace. i3bar creates one workspace
button for each element in the array. The order of these buttons is the same as
the order of the elements in the array.
In general, we recommend subscribing to the +workspace+ and +output+
https://i3wm.org/docs/ipc.html#_workspace_event[events],
fetching the current workspace information with +GET_WORKSPACES+, modifying the
JSON array in the response according to your needs and then printing it to the
standard output. However, you are free to build a new message from the ground
up.
=== Workspace objects in detail
The documentation of +GET_WORKSPACES+ should be sufficient to understand the
meaning of each property but here we provide extra notes for each property and
its meaning with respect to i3bar.
All properties but +name+ are optional.
id (integer)::
If it is included it will be used to switch to that workspace when you
click the corresponding button. If it's not provided, the +name+ will be
used. You can use the +id+ field to present workspaces under a modified
name.
num (integer)::
The only use of a workspace's number is if the +strip_workspace_numbers+
setting is enabled.
name (string)::
The only required property. If an +id+ is provided you can freely change
the +name+ as you wish, effectively renaming the buttons of i3bar.
visible (boolean)::
Defaults to +false+ if not included. +focused+ takes precedence over it,
however +visible+ is important for more than one monitor.
focused (boolean)::
Defaults to +false+ if not included. Generally, exactly one of the
workspaces should be +focused+. If not, no button will have the
+focused_workspace+ color.
urgent (boolean)::
Defaults to +false+ if not included.
rect (map)::
Not used by i3bar but will be ignored.
output (string)::
Defaults to the primary output if not included.
== Examples
These example scripts require the https://stedolan.github.io/jq/[jq] utility to
be installed but otherwise just use the standard +i3-msg+ utility included with
i3. However, you can write your own scripts in your preferred language, with
the help of one of the
https://i3wm.org/docs/ipc.html#_see_also_existing_libraries[pre-existing i3
libraries]
=== Base configuration
------------------------------
bar {
workspace_command /path/to/your/script.sh
}
------------------------------
=== Re-create the default behaviour of i3bar
Not very useful by itself but this will be the basic building block of all the
following scripts. This one does not require +jq+.
------------------------------
#!/bin/sh
i3-msg -t subscribe -m '["workspace", "output"]' | {
# Initially print the current workspaces before we receive any events. This
# avoids having an empty bar when starting up.
i3-msg -t get_workspaces;
# Then, while we receive events, update the workspace information.
while read EVENT; do i3-msg -t get_workspaces; done;
}
------------------------------
=== Hide workspace named +foo+ unless if it is focused.
------------------------------
#!/bin/sh
i3-msg -t subscribe -m '["workspace", "output"]' | {
i3-msg -t get_workspaces;
while read EVENT; do i3-msg -t get_workspaces; done;
} | jq --unbuffered -c '[ .[] | select(.name != "foo" or .focused) ]'
------------------------------
Important! Make sure you use the +--unbuffered+ flag with +jq+, otherwise you
might not get the changes in real-time but whenever they are flushed, which
might mean that you are getting an empty bar until enough events are written.
=== Show empty workspaces +foo+ and +bar+ on LVDS1 even if they do not exist at the moment.
------------------------------
#!/bin/sh
i3-msg -t subscribe -m '["workspace", "output"]' | {
i3-msg -t get_workspaces;
while read EVENT; do i3-msg -t get_workspaces; done;
} | jq --unbuffered -c '
def fake_ws(name): {
name: name,
output: "LVDS1",
};
. + [ fake_ws("foo"), fake_ws("bar") ] | unique_by(.name)
'
------------------------------
=== Sort workspaces in reverse alphanumeric order
------------------------------
#!/bin/sh
i3-msg -t subscribe -m '["workspace", "output"]' | {
i3-msg -t get_workspaces;
while read EVENT; do i3-msg -t get_workspaces; done;
} | jq --unbuffered -c 'sort_by(.name) | reverse'
------------------------------
=== Append "foo" to the name of each workspace
------------------------------
#!/bin/sh
i3-msg -t subscribe -m '["workspace", "output"]' | {
i3-msg -t get_workspaces;
while read EVENT; do i3-msg -t get_workspaces; done;
} | jq --unbuffered -c '[ .[] | .name |= . + " foo" ]'
------------------------------

932
docs/ipc

File diff suppressed because it is too large Load Diff

263
docs/layout-saving Normal file
View File

@@ -0,0 +1,263 @@
Layout saving in i3
===================
Michael Stapelberg <michael@i3wm.org>
April 2014
Layout saving/restoring is a feature that was introduced in i3 v4.8.
Layout saving/restoring allows you to load a JSON layout file so that you can
have a base layout to start working with after powering on your computer.
Dynamic use-cases also come to mind: if you frequently (but not always!) need a
grid layout of terminals with ping/traceroute commands to diagnose network
issues, you can easily automate opening these windows in just the right layout.
== Saving the layout
You can save the layout of either a single workspace or an entire output (e.g.
LVDS1). Of course, you can repeat this step multiple times if you want to
save/restore multiple workspaces/outputs.
+i3-save-tree(1)+ is a tool to save the layout. It will print a JSON
representation of i3s internal layout data structures to stdout. Typically,
you may want to take a quick look at the output, then save it to a file and
tweak it a little bit:
---------------------------------------------------
i3-save-tree --workspace 1 > ~/.i3/workspace-1.json
---------------------------------------------------
Please note that the output of +i3-save-tree(1)+ is *NOT useful* until you
manually modify it — you need to tell i3 how to match/distinguish windows (for
example based on their WM_CLASS, title, etc.). By default, all the different
window properties are included in the output, but commented out. This is partly
to avoid relying on heuristics and partly to make you aware how i3 works so
that you can easily solve layout restoring problems.
How to modify the file manually is described in <<EditingLayoutFiles>>.
== Restoring the layout
After restoring the example layout from <<EditingLayoutFiles>>, i3 will open
placeholder windows for all the windows that were specified in the layout file.
You can recognize the placeholder windows by the watch symbol
footnote:[Depending on the font you are using, a placeholder symbol may show up
instead of the watch symbol.] in the center of the window, and by the swallow
criteria specification at the top of the window:
image:layout-saving-1.png["Restored layout",width=400,link="layout-saving-1.png"]
When an application opens a window that matches the specified swallow criteria,
it will be placed in the corresponding placeholder window. We say it gets
*swallowed* by the placeholder container, hence the term.
Note: Swallowing windows into unsatisfied placeholder windows takes precedence
over
link:https://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces[assignment
rules]. For example, if you assign all Emacs windows to workspace 1 in your i3
configuration file, but there is a placeholder window on workspace 2 which
matches Emacs as well, your newly started Emacs window will end up in the
placeholder window on workspace 2.
The placeholder windows are just regular windows, so feel free to move them
around or close them, for example.
=== append_layout command
The +append_layout+ command is used to load a layout file into i3. It accepts a
path (relative to i3s current working directory or absolute) to a JSON file.
*Syntax*:
--------------------------------------------------------------------------------
append_layout <path>
--------------------------------------------------------------------------------
*Examples*:
--------------------------------------------------------------------------------
# From a terminal or script:
i3-msg "workspace 1; append_layout /home/michael/.i3/workspace-1.json"
# In your i3 configuration file, you can autostart i3-msg like this:
# (Note that those lines will quickly become long, so typically you would store
# them in a script with proper indentation.)
exec --no-startup-id "i3-msg 'workspace 1; append_layout /home/michael/.i3/workspace-1.json'"
--------------------------------------------------------------------------------
== Editing layout files
[[EditingLayoutFiles]]
=== Anatomy of a layout file
Here is an example layout file that well discuss:
--------------------------------------------------------------------------------
{
// splitv split container with 2 children
"layout": "splitv",
"percent": 0.4,
"type": "con",
"nodes": [
{
"border": "none",
"name": "irssi",
"percent": 0.5,
"type": "con",
"swallows": [
{
"class": "^URxvt$",
"instance": "^irssi$"
}
]
},
{
// stacked split container with 2 children
"layout": "stacked",
"percent": 0.5,
"type": "con",
"nodes": [
{
"name": "notmuch",
"percent": 0.5,
"type": "con",
"swallows": [
{
"class": "^Emacs$",
"instance": "^notmuch$"
}
]
},
{
"name": "midna: ~",
"percent": 0.5,
"type": "con"
}
]
}
]
}
{
// stacked split container with 1 children
"layout": "stacked",
"percent": 0.6,
"type": "con",
"nodes": [
{
"name": "chrome",
"type": "con",
"swallows": [
{
"class": "^Google-chrome$"
}
]
}
]
}
--------------------------------------------------------------------------------
In this layout, the screen is divided into two columns. In the left column,
which covers 40% of the screen, there is a terminal emulator running irssi on
the top, and a stacked split container with an Emacs window and a terminal
emulator on the bottom. In the right column, there is a stacked container with
a Chrome window:
image:layout-saving-1.png["Restored layout",width=400,link="layout-saving-1.png"]
The structure of this JSON file looks a lot like the +TREE+ reply, see
https://build.i3wm.org/docs/ipc.html#_tree_reply for documentation on that. Some
properties are excluded because they are not relevant when restoring a layout.
Most importantly, look at the "swallows" section of each window. This is where
you need to be more or less specific. As an example, remember the section about
the Emacs window:
--------------------------------------------------------------------------------
"swallows": [
{
"class": "^Emacs$",
"instance": "^notmuch$"
}
]
--------------------------------------------------------------------------------
Here you can see that i3 will require both the class and the instance to match.
Therefore, if you just start Emacs via dmenu, it will not get swallowed by that
container. Only if you start Emacs with the proper instance name (+emacs24
--name notmuch+), it will get swallowed.
You can match on "class", "instance", "window_role", "title" and "machine". All
values are case-sensitive regular expressions (PCRE). Use +xprop(1)+ and click
into a window to see its properties:
--------------------------------------------------------------------------------
$ xprop
WM_WINDOW_ROLE(STRING) = "gimp-toolbox-color-dialog"
WM_CLASS(STRING) = "gimp-2.8", "Gimp-2.8"
_NET_WM_NAME(UTF8_STRING) = "Change Foreground Color"
--------------------------------------------------------------------------------
The first part of +WM_CLASS+ is the "instance" (gimp-2.8 in this case), the
second part is the "class" (Gimp-2.8 in this case). "title" matches against
+_NET_WM_NAME+ and "window_role" matches against +WM_WINDOW_ROLE+.
In general, you should try to be as specific as possible in your swallow
criteria. Try to use criteria that match one window and only one window, to
have a reliable startup procedure.
If you specify multiple swallow criteria, the placeholder will be replaced by
the window which matches any of the criteria. As an example:
--------------------------------------------------------------------------------
// Matches either Emacs or Gvim, whichever one is started first.
"swallows": [
{"class": "^Emacs$"},
{"class": "^Gvim$"}
]
--------------------------------------------------------------------------------
=== JSON standard non-compliance
A layout file as generated by +i3-save-tree(1)+ is not strictly valid JSON:
1. Layout files contain multiple “JSON texts” at the top level. The JSON
standard doesn't prohibit this, but in practice most JSON parsers only
allow precisely one “text” per document/file, and will mark multiple texts
as invalid JSON.
2. Layout files contain comments which are not allowed by the JSON standard,
but are understood by many parsers.
Both of these deviations from the norm are to make manual editing by humans
easier. In case you are writing a more elaborate tool for manipulating these
layouts, you can either use a JSON parser that supports these deviations (for
example libyajl), transform the layout file to a JSON-conforming file, or
link:https://github.com/i3/i3/blob/next/.github/CONTRIBUTING.md[submit a patch]
to make +i3-save-tree(1)+ optionally output standard-conforming JSON.
== Troubleshooting
=== Restoring a vertically split workspace
When using +i3-save-tree+ with the +--workspace+ switch, only the *contents* of
the workspace will be dumped. This means that properties of the workspace
itself will be lost.
This is relevant for, e.g., a vertically split container as the base container of
a workspace. Since the split mode is a property of the workspace, it will not be
stored. In this case, you will have to manually wrap your layout in such a
container:
--------------------------------------------------------------------------------
// vim:ts=4:sw=4:et
{
// this is a manually added container to restore the vertical split
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
// the dumped workspace layout goes here
]
}
--------------------------------------------------------------------------------

BIN
docs/layout-saving-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/logo-30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -1,21 +1,24 @@
The multi-monitor situation
===========================
Michael Stapelberg <michael+i3@stapelberg.de>
March 2010
Michael Stapelberg <michael@i3wm.org>
April 2013
…or: oh no, I have an nVidia graphics card!
Please upgrade your nVidia driver to version 302.17 or newer and i3 will just
work. This document is kept around for historic reasons only.
== The quick fix
If you are using the nVidia binary graphics driver (also known as 'blob')
you need to use the +--force-xinerama+ flag (in your .xsession) when starting
i3, like so:
before version 302.17, you need to use the +--force-xinerama+ flag (in your
.xsession) when starting i3, like so:
.Example:
----------------------------------------------
exec i3 --force-xinerama -V >>~/.i3/i3log 2>&1
----------------------------------------------
…or use +force_xinerama yes+ in your configuration file.
== The explanation
Starting with version 3.ε, i3 uses the RandR (Rotate and Resize) API instead
@@ -50,9 +53,13 @@ these are two screens).
For this very reason, we decided to implement the following workaround: As
long as the nVidia driver does not support RandR, an option called
+--force-xinerama+ is available in i3. This option gets the list of screens
*once* when starting, and never updates it. As the nVidia driver cannot do
dynamic configuration anyways, this is not a big deal.
+--force-xinerama+ is available in i3 (alternatively, you can use the
+force_xinerama+ configuration file directive). This option gets the list of
screens *once* when starting, and never updates it. As the nVidia driver cannot
do dynamic configuration anyways, this is not a big deal.
Also note that your output names are not descriptive (like +HDMI1+) when using
Xinerama, instead they are counted up, starting at 0: +xinerama-0+, +xinerama-1+, …
== See also

198
docs/refcard.html Normal file
View File

@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>i3 Reference Card</title>
<link rel="stylesheet" href="refcard_style.css" />
<style type="text/css">
* { margin: 0; padding: 0; vertical-align: middle; }
html { font-family: LinuxLibertine, Linux Libertine O, Linux Libertine, serif; font-size: 15px; /* column-count: 3; column-gap: 10px; -moz-column-count: 3; -moz-column-gap: 10px; -webkit-column-count: 3; -webkit-column-gap: 10px; */ }
body > div { display: inline-block; width: 33%; margin: 0.25%; vertical-align: top; }
body > div:first-child { margin-left: 0; }
body > div:last-child { margin-right: 0; }
#logo { float: left; width: 40px; margin: 7px; }
header { font-size: 1.1em; text-align: center; }
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: 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; }
table { width: 100%; }
.i3mod { width: 15px; }
td:last-child { text-align: right; }
.ref { font-size: 0.8em; }
#copyright { margin: 20px 0 15px; font-size: 0.7em; text-align: center; }
#licence { max-width: 70%; margin: 3px auto; font-size: 0.6em; text-align: right; }
</style>
<style type="text/css" media="print">
html { font-size: 13px; }
</style>
</head>
<body><div>
<header>
<img id="logo" src="logo-30.png" alt="" />
<h1>i3 Reference Card</h1>
<a href="https://i3wm.org/docs/userguide.html">https://i3wm.org/docs/userguide.html</a>
<p>
Throughout this guide, the i3 logo will be used to refer to the configured modifier.
This is the <kbd></kbd> key (<code>Mod1</code>) by default,
with super/<kbd></kbd> (<code>Mod4</code>) being a popular alternative.
</p>
</header>
<section>
<h2>Basics</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd>
<td>open new terminal
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>j</kbd>
<td>focus left
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>k</kbd>
<td>focus down
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>l</kbd>
<td>focus up
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>;</kbd>
<td>focus right
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd>
<td>toggle focus mode
</table>
</section>
<section>
<h2>Moving windows</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>j</kbd>
<td>move window left
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>k</kbd>
<td>move window down
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>l</kbd>
<td>move window up
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>;</kbd>
<td>move window right
</table>
</section>
</div><div>
<section>
<h2>Modifying windows</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>f</kbd>
<td>toggle fullscreen
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>v</kbd>
<td>split a window vertically
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>h</kbd>
<td>split a window horizontally
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>r</kbd>
<td>resize mode
</table>
<p class="ref">Look at the “Resizing containers / windows” section of the user guide.</p>
</section>
<section>
<h2>Changing the container layout</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>e</kbd>
<td>default
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>s</kbd>
<td>stacking
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>w</kbd>
<td>tabbed
</table>
</section>
<section>
<h2>Floating</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd></kbd>
<td>toggle floating
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd>
<td>drag floating
</table>
</section>
<section>
<h2>Using workspaces</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>0</kbd>-<kbd>9</kbd>
<td>switch to another workspace
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>0</kbd>-<kbd>9</kbd>
<td>move a window to another workspace
</table>
</section>
</div><div>
<section>
<h2>Opening applications / Closing windows</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd>d</kbd>
<td>open application launcher (dmenu)
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>q</kbd>
<td>kill a window
</table>
</section>
<section>
<h2>Restart / Exit</h2>
<table>
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>c</kbd>
<td>reload the configuration file
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>r</kbd>
<td>restart i3 inplace
<tr>
<td><img class="i3mod" src="logo-30.png" alt="" /> + <kbd></kbd> + <kbd>e</kbd>
<td>exit i3
</section>
</table>
<!-- footer -->
<p id="copyright">
Copyright © 2012, Michael Stapelberg
<br />
All rights reserved
<br />
Designed by Zeus Panchenko, updated by Moritz Bandemer
</p>
<p id="licence">
Permission is granted to copy, distribute and/or modify this document provided
the copyright notice and this permission notice are preserved on all copies.
</p>
</div></body>
</html>

View File

@@ -1,107 +0,0 @@
\documentclass[10pt,a4,landscape]{article}
% \usepackage[cam,a4,center,info,]{crop} % frame
\usepackage[height=20cm,width=25.7cm,noheadfoot,landscape]{geometry} % A4 - 210<31>297 mm
\usepackage[T1]{fontenc}
\usepackage{multicol}
\usepackage{color}
\usepackage{url}
\usepackage{lastpage}
\usepackage{hyperref}
\hypersetup{
pdftitle={i3 Reference Card},
pdfauthor={\textcopyright\ Zeus Panchenko},
pdfkeywords={i3, refcard},
pdfsubject={based on http://i3.zekjur.net/docs/userguide.html},
pdfpagemode={FullScreen}}
\definecolor{lightgray}{gray}{0.7}
\pagestyle{empty}
\setlength{\parindent}{0in}
\setlength{\columnseprule}{0.5pt}
\setlength{\columnsep}{20pt}
\newcommand{\RefCardTitle}[2]
{\centering{\Large{\textbf{i3 Reference Card (#1/#2)\\
{\scriptsize{\url{http://i3.zekjur.net/docs/userguide.html}}}}}}
\vspace{1mm}}
\newcommand{\RefCardSec}[1] {\vspace{2mm} \raggedright {\vspace{0.5mm}
\colorbox{lightgray} {\makebox[0.31\textwidth][l]
{\Large{\textsc{\textsf{\textbf{\color{black}#1}}}}}}
\vspace{0.5mm}}}
\newcommand{\RefCardRow}[2] {\normalsize{\textbf{\texttt{#1}}}
\hspace{\stretch{1}} \raggedleft{\small{\textnormal{#2}}} \\}
\begin{document}
\centering
\begin{multicols}{3}
\RefCardTitle{\thepage}{\pageref{LastPage}}
\RefCardSec{Moving around}
\RefCardRow{Mod1+Enter}{open new terminal}
\RefCardRow{Mod1+j}{focus (left)}
\RefCardRow{Mod1+k}{focus (down)}
\RefCardRow{Mod1+l}{focus (up)}
\RefCardRow{Mod1+;}{focus (right)}
\RefCardRow{Mod1+Shift+j}{move window (left)}
\RefCardRow{Mod1+Shift+k}{move window (down)}
\RefCardRow{Mod1+Shift+l}{move window (up)}
\RefCardRow{Mod1+Shift+;}{move window (right)}
\RefCardRow{Mod1+Control+j}{snap (left)}
\RefCardRow{Mod1+Control+k}{snap (down)}
\RefCardRow{Mod1+Control+l}{snap (up)}
\RefCardRow{Mod1+Control+;}{snap (right)}
\RefCardRow{Mod1+Shift+q}{kill a window}
\RefCardRow{Mod1+Shift+<number>}{move a window to another workspace}
\RefCardSec{Changing container modes}
\RefCardRow{Mod1+e}{default}
\RefCardRow{Mod1+h}{stacking}
\RefCardRow{Mod1+w}{tabbed}
\RefCardRow{Mod1+Shift+f}{global fullscreen}
\RefCardRow{Mod1+f}{toggle fullscreen}
\RefCardRow{Mod1+Shift+Space}{toggle floating}
\RefCardRow{Mod1+<Mouse>}{drag floating}
\RefCardSec{Opening other applications}
\RefCardRow{Mod1+v}{open application launcher (dmenu)}
\RefCardSec{Using workspaces}
\RefCardRow{Mod1+<number>}{switch to another workspace}
\RefCardSec{Restarting i3 inplace}
\RefCardRow{Mod1+Shift+r}{restart i3 inplace}
\RefCardSec{Exiting i3}
\RefCardRow{Mod1+Shift+e}{exit i3}
\vspace{1cm}
\tiny{
\begin{center}
Copyright \copyright 2009, Michael Stapelberg \\
All rights reserved. \\
Designed by Zeus Panchenko
\end{center}
Permission is granted to copy, distribute and/or modify this
document provided the copyright notice and this permission
notice are preserved on all copies.}
\end{multicols}
\end{document}

45
docs/refcard_style.css Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

View File

@@ -0,0 +1,146 @@
% vim:ts=4:sw=4:expandtab
% © 2012 Michael Stapelberg
%
% use xelatex %<
%
\documentclass[xetex,serif,compress]{beamer}
\usepackage{fontspec}
\usepackage{xunicode} % Unicode extras!
\usepackage{xltxtra} % Fixes
\usepackage{listings}
\setmainfont{Trebuchet MS}
\setmonofont{Inconsolata}
\usetheme{default}
\setbeamertemplate{frametitle}{
\color{black}
\vspace*{0.5cm}
\hspace*{0.25cm}
\textbf{\insertframetitle}
\par
}
% Hide the navigation icons at the bottom of the page
\setbeamertemplate{navigation symbols}{}
% No margins on any side
\setbeamersize{text margin left=0cm,text margin right=0cm}
\begin{document}
% slide with bullet points
\newcommand{\mslide}[2]{
\begin{frame}{#1}
\begin{center}
\begin{list}{$\bullet$}{\itemsep=1em}
#2
\end{list}
\end{center}
\end{frame}
}
\frame{
\begin{center}
\vspace{1.5cm}
{\huge i3}\\
{\large improved tiling window manager}\\
\vspace{3cm}
Michael Stapelberg\\
\vspace{0.5cm}
2012-01-25\\
\end{center}
}
\begin{frame}{}
\begin{center}
\huge
"Interesting, what is this?"
\vspace*{1cm}
vs.
\vspace*{1cm}
"What?! \textbf{Another} window manager?"
\end{center}
\end{frame}
\begin{frame}{}
% talk about the difference between a desktop environment and a window manager:
% a desktop environment (like GNOME, KDE, Xfce) is a collection of
% programs, libraries (including a graphical toolkit) and configuration.
% it usually aims for a coherent look and feel and comes with a number of
% tools (g*, like gedit, geeqie, …)
% One of the programs of a DE is a window manager.
\begin{figure}
\includegraphics[width=0.97\textwidth]{Ubuntu_Linux_Jaunty_screenshot.png}
% source: http://en.wikipedia.org/wiki/File:Ubuntu_Linux_Jaunty_screenshot.png
\end{figure}
\end{frame}
\begin{frame}{}
\begin{center}
% compare this to a screenshot of i3:
% notice the little amount of toolbars.
% notice the lack of fancy window decorations
% notice the absence of a desktop.
% instead, you get to use the full screen.
\begin{figure}
\includegraphics[width=0.97\textwidth]{TdilE.jpg}
% source: jrd in #i3
\end{figure}
\end{center}
\end{frame}
\mslide{i3: history and features}{
\item started from scratch in february 2009
\item successor* to wmii, which we couldnt hack
\item clean, readable, documented code. and documentation
\item proper multi-monitor support, utf-8 clean
\item fast and lightweight, aimed at power users
}
% live demo here, just like at FrOSCon
% include: the docs, with the keyboard layout
% include: the configuration file
\mslide{Inter-process communication}{
\item UNIX socket, JSON for serialization
\item i3-msg (C), AnyEvent::I3 (Perl), i3-ipc (Ruby), i3ipc (Python)
\item send any command, like \texttt{floating enable}
\item receive events (like focus change)
\item access the layout tree (!)
}
% demo: change a workspace
% demo: testsuite
\mslide{Example workflows}{
\item Urgency hint
\item Scratchpad
\item Web development (browser, editor, syslog)
\item Coding (C): two editors (code, test), quickly opening docs
}
\mslide{i3 in numbers}{
\item 3149 commits by 39 different people
\item > 600 tickets (about 60 open)
\item about 10.000 SLOC (mostly C, a bit of Perl)
\item testsuite: > 1000 test instructions in 96 files
\item conservative guess of > 1000 users
}
\mslide{Thanks for your attention}{
\item See \url{http://www.i3wm.org/} for everything
\item Ubuntu: upgrade to our repository: \url{http://i3wm.org/docs/repositories.html}
\item Debian: upgrade to the version in Debian testing
\item Any questions?
\item (pictures Creative Commons Attribution-Share Alike 3.0 Unported)
}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

View File

@@ -0,0 +1,146 @@
% vim:ts=4:sw=4:expandtab
% © 2012 Michael Stapelberg
%
% use xelatex %<
%
\documentclass[xetex,serif,compress]{beamer}
\usepackage{fontspec}
\usepackage{xunicode} % Unicode extras!
\usepackage{xltxtra} % Fixes
\usepackage{listings}
\setmainfont{Trebuchet MS}
\setmonofont{Inconsolata}
\usetheme{default}
\setbeamertemplate{frametitle}{
\color{black}
\vspace*{0.5cm}
\hspace*{0.25cm}
\textbf{\insertframetitle}
\par
}
% Hide the navigation icons at the bottom of the page
\setbeamertemplate{navigation symbols}{}
% No margins on any side
\setbeamersize{text margin left=0cm,text margin right=0cm}
\begin{document}
% slide with bullet points
\newcommand{\mslide}[2]{
\begin{frame}{#1}
\begin{center}
\begin{list}{$\bullet$}{\itemsep=1em}
#2
\end{list}
\end{center}
\end{frame}
}
\frame{
\begin{center}
\vspace{1.5cm}
{\huge i3}\\
{\large improved tiling window manager}\\
\vspace{3cm}
Michael Stapelberg\\
\vspace{0.5cm}
2012-03-16\\
\end{center}
}
\begin{frame}{}
\begin{center}
\huge
„Oh, interessant…“
\vspace*{1cm}
oder
\vspace*{1cm}
„Was?! \textbf{Noch ein} window manager?“
\end{center}
\end{frame}
\begin{frame}{}
% talk about the difference between a desktop environment and a window manager:
% a desktop environment (like GNOME, KDE, Xfce) is a collection of
% programs, libraries (including a graphical toolkit) and configuration.
% it usually aims for a coherent look and feel and comes with a number of
% tools (g*, like gedit, geeqie, …)
% One of the programs of a DE is a window manager.
\begin{figure}
\includegraphics[width=0.97\textwidth]{Ubuntu_Linux_Jaunty_screenshot.png}
% source: http://en.wikipedia.org/wiki/File:Ubuntu_Linux_Jaunty_screenshot.png
\end{figure}
\end{frame}
\begin{frame}{}
\begin{center}
% compare this to a screenshot of i3:
% notice the little amount of toolbars.
% notice the lack of fancy window decorations
% notice the absence of a desktop.
% instead, you get to use the full screen.
\begin{figure}
\includegraphics[width=0.97\textwidth]{TdilE.jpg}
% source: jrd in #i3
\end{figure}
\end{center}
\end{frame}
\mslide{i3: Geschichte und Merkmale}{
\item komplett neu geschrieben (Februar 2009)
\item Nachfolger* zu wmii, den wir nicht hacken konnten
\item sauberen, lesbaren, dokumentierten Code. und Dokumentation
\item ordentlichen Multi-Monitor-Unterstützung, UTF-8-Unterstützung
\item schnell und klein, ausgerichtet auf Power-Nutzer
}
% live demo here, just like at FrOSCon
% include: the docs, with the keyboard layout
% include: the configuration file
\mslide{Inter-Prozess-Kommunication}{
\item UNIX-Socket, JSON zur Serialisierung
\item i3-msg (C), AnyEvent::I3 (Perl), i3-ipc (Ruby), i3ipc (Python)
\item beliebige Befehle schicken, wie \texttt{floating enable}
\item Ereignisse empfangen (z.B. Fokusänderung)
\item Zugriff auf die Layout-Datenstruktur (!)
}
% demo: change a workspace
% demo: testsuite
\mslide{Workflow-Beispiele}{
\item Urgency hint
\item Scratchpad
\item Web-Entwicklung (browser, editor, syslog)
\item Programmieren (C): zwei Editoren (Code, Tests), schnell Doku aufmachen
}
\mslide{i3 in Zahlen}{
\item 3149 Commits von > 40 verschiedenen Leuten
\item > 600 Tickets (ca. 60 offen)
\item ungefähr 10.000 SLOC (größtenteils C, ein bisschen Perl)
\item Testsuite: > 1000 Tests in 96 Dateien
\item vorsichtige Schätzungen von > 1000 Nutzern
}
\mslide{Danke für eure Aufmerksamkeit!}{
\item Auf \url{http://www.i3wm.org/} findet ihr alles
\item Ubuntu: bitte nutze unser Repository: \url{http://i3wm.org/docs/repositories.html}
\item Debian: bitte nutze die Version in testing
\item Fragen?
\item (Bilder: Creative Commons Attribution-Share Alike 3.0 Unported)
}
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

689
docs/testsuite Normal file
View File

@@ -0,0 +1,689 @@
i3 testsuite
============
Michael Stapelberg <michael@i3wm.org>
September 2012
This document explains how the i3 testsuite works, how to use it and extend it.
It is targeted at developers who haven't necessarily done testing before,
or have not used Perl for testing before. In general, the testsuite is not of
interest for end users.
== Introduction
The i3 testsuite is a collection of files which contain testcases for various
i3 features. Some of them test if a certain workflow works correctly (moving
windows, focus behaviour, …). Others are regression tests and contain code
which previously made i3 crash or lead to unexpected behaviour. They then check
if i3 still runs (meaning it did not crash) and if it handled everything
correctly.
The goal of having these tests is to automatically find problems and to
automatically get a feel for whether a change in the source code breaks any
existing feature. After every modification of the i3 sourcecode, the developer
should run the full testsuite. If one of the tests fails, the corresponding
problem should be fixed (or, in some cases, the testcase has to be modified).
For every bugreport, a testcase should be written to test the correct
behaviour. Initially, it will fail, but after fixing the bug, it will pass.
This ensures (or increases the chance) that bugs which have been fixed once
will never be found again.
Also, when implementing a new feature, a testcase might be a good way to be
able to easily test if the feature is working correctly. Many developers will
test manually if everything works. Having a testcase not only helps you with
that, but it will also be useful for every future change.
== Relevant documentation
Apart from this document, you should also have a look at:
1. The "Modern Perl" book:
https://i3wm.org/downloads/modern_perl_a4.pdf
2. The latest Perl documentation of the "i3test" (general testcase setup) and
"i3test::Test" (additional test instructions) modules:
https://build.i3wm.org/docs/lib-i3test.html respectively
https://build.i3wm.org/docs/lib-i3test-test.html
3. The latest documentation on i3s IPC interface:
https://build.i3wm.org/docs/ipc.html
== Implementation
For several reasons, the i3 testsuite has been implemented in Perl:
1. Perl has a long tradition of testing. Every popular/bigger Perl module which
you can find on CPAN will not only come with documentation, but also with
tests. Therefore, the available infrastructure for tests is comprehensive.
See for example the excellent http://search.cpan.org/perldoc?Test::More
and the referenced http://search.cpan.org/perldoc?Test::Tutorial.
2. Perl is widely available and has a well-working package infrastructure.
3. The author is familiar with Perl :).
4. It is a good idea to use a different language for the tests than the
implementation itself.
Please do not start programming language flamewars at this point.
=== Installing the dependencies
As usual with Perl programs, the testsuite ships with a +Makefile.PL+.
This file specifies which Perl modules the testsuite depends on and can be used
to install all of them.
Perl modules are distributed via CPAN, and there is the official, standard CPAN
client, simply called +cpan+. It comes with every Perl installation and can be
used to install the testsuite. Many users prefer to use the more modern
+cpanminus+ instead, though (because it asks no questions and just works):
The tests additionally require +Xephyr(1)+ to run a nested X server. Install
+xserver-xephyr+ on Debian or +xorg-server-xephyr+ on Arch Linux.
.Installing testsuite dependencies using cpanminus
--------------------------------------------------------------------------------
# Install testsuite system-level dependencies. Xvfb is optional but recommended.
$ sudo apt-get install xcb-proto cpanminus xvfb xserver-xephyr
# Install dependencies in ~/perl5 local library
$ cpanm --local-lib=~/perl5 local::lib App::cpanminus Module::Install
# Activate the local library
$ eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
$ cd ~/i3/testcases/
$ cpanm .
$ cd ~/i3/AnyEvent-I3
$ cpanm .
--------------------------------------------------------------------------------
=== Mechanisms
==== Script: complete-run
The testcases are run by a script called +complete-run.pl+. It runs all
testcases by default, but you can be more specific and let it only run one or
more testcases. Also, it takes care of starting up a separate instance of i3
with an appropriate configuration file and creates a folder for each run
containing the appropriate i3 logfile for each testcase. The latest folder can
always be found under the symlink +latest/+. Unless told differently, it will
run the tests on a separate X server instance (using Xephyr).
Xephyr will open a window where you can inspect the running test. By default,
tests are run under Xvfb.
.Example invocation of +complete-run.pl+
---------------------------------------
$ cd ~/i3
$ mkdir -p build
$ meson setup build
$ cd build
$ meson compile
# output omitted because it is very long
$ ./complete-run.pl
# output omitted because it is very long
All tests successful.
Files=78, Tests=734, 27 wallclock secs ( 0.38 usr 0.48 sys + 17.65 cusr 3.21 csys = 21.72 CPU)
Result: PASS
$ ./complete-run.pl t/005-floating.t
Running tests under Xvfb display :99
Starting 1 Xephyr instances, starting at :100...
Rough time estimate for this run: 9.65 seconds
Writing logfile to 'testsuite-2024-05-01-21-33-45-4.23-28-g5834b7e8/complete-run.log'...
[:100] i3/testcases/t/005-floating.t: finished
completed 0 of 1 tests
All tests successful.
Files=1, Tests=13, 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
Result: PASS
The slowest tests are:
i3/testcases/t/005-floating.t with 0.07 seconds
Test output:
[:100] i3/testcases/t/005-floating.t: starting
[:100] i3/testcases/t/005-floating.t: finished
output for i3/testcases/t/005-floating.t:
ok 1 - An object of class 'X11::XCB::Window' isa 'X11::XCB::Window'
ok 2 - Window is mapped
ok 3 - i3 raised the width to 75
ok 4 - i3 raised the height to 50
ok 5 - i3 did not map it to (0x0)
ok 6 - An object of class 'X11::XCB::Window' isa 'X11::XCB::Window'
ok 7 - i3 let the width at 80
ok 8 - i3 let the height at 90
ok 9 - i3 mapped it to x=20
ok 10 - i3 mapped it to y=20
ok 11 - An object of class 'X11::XCB::Window' isa 'X11::XCB::Window'
ok 12 - i3 let the width at 80
ok 13 - i3 let the height at 90
1..13
$ less latest/i3-log-for-005-floating.t
----------------------------------------
If your attempt to run the tests with a bare call to ./complete-run.pl fails, try this:
---------------------------------------------------
$ ./complete-run.pl --parallel=1 --keep-xserver-output
---------------------------------------------------
This will show the output of Xephyr, which is the X server implementation we
use for testing.
===== ninja command: +ninja test+
+ninja test+ runs the i3 testsuite.
You can still use ./complete-run.pl to get the interactive progress output.
.Example invocation of +ninja test+
---------------------------------------
$ cd ~/i3
$ mkdir -p build
$ meson setup build
$ cd build
$ ninja test
[1/102] Generating config.h with a custom command
[1/2] Running all tests.
1/1 complete-run OK 34.39s
Ok: 1
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Full log written to i3/build/meson-logs/testlog.txt
$ less latest/complete-run.log
----------------------------------------
==== Coverage testing
Coverage testing is possible with +lcov+, the front-end for GCC's coverage
testing tool +gcov+. The testcases can generate a nice html report that tells
you which functions and lines were covered during a run of the tests. You can
use this tool to judge how effective your tests are.
To use test coverage tools, first compile with coverage enabled.
---------------------------------------------------
COVERAGE=1 make
---------------------------------------------------
Then run the tests with the +--coverage-testing+ flag.
---------------------------------------------------
./complete-run.pl --coverage-testing
---------------------------------------------------
Then open +latest/i3-coverage/index.html+ in your web browser.
==== IPC interface
The testsuite makes extensive use of the IPC (Inter-Process Communication)
interface which i3 provides. It is used for the startup process of i3, for
terminating it cleanly and (most importantly) for modifying and getting the
current state (layout tree).
See [https://i3wm.org/docs/ipc.html] for documentation on the IPC interface.
==== X11::XCB
In order to open new windows, change attributes, get events, etc., the
testsuite uses X11::XCB, a new (and quite specific to i3 at the moment) Perl
module which uses the XCB protocol description to generate Perl bindings to
X11. They work in a very similar way to libxcb (which i3 uses) and provide
relatively high-level interfaces (objects such as +X11::XCB::Window+) as well as
access to the low-level interface, which is very useful when testing a window
manager.
=== Filesystem structure
In the git root of i3, the testcases live in the folder +testcases+. This
folder contains the +complete-run.pl+ and a base configuration file which will
be used for the tests. The different testcases (their file extension is .t, not
.pl) themselves can be found in the conventionally named subfolder +t+:
.Filesystem structure
--------------------------------------------
├── testcases
│   ├── complete-run.pl
│   ├── i3-test.config
│   ├── lib
│   │   ├── i3test.pm
│   │   ├── SocketActivation.pm
│   │   └── StartXDummy.pm
│   ├── t
│   │   ├── 00-load.t
│   │   ├── 01-tile.t
│   │   ├── 02-fullscreen.t
│   │   ├── ...
│   │   ├── omitted for brevity
│   │   ├── ...
│   │   └── 74-regress-focus-toggle.t
--------------------------------------------
== Anatomy of a testcase
Learning by example is definitely a good strategy when you are wondering how to
write a testcase. Let's take +t/11-goto.t+ as an easy example and go through it
step by step:
.t/11-goto.t: Boilerplate
----------------------
#!perl
# vim:ts=4:sw=4:expandtab
use i3test;
use File::Temp;
my $x = X11::XCB::Connection->new;
-----------------------
This is what we call boilerplate. It exists at the top of every test file (to
some extent). The first line is the shebang, which specifies that this file is
a Perl script. The second line contains VIM specific settings on how to
edit/format this file (use spaces instead of tabs, indent using 4 spaces).
Afterwards, the +i3test+ module is used. This module contains i3 testsuite
specific functions which you are strongly encouraged to use. They make writing
testcases a lot easier and will make it easier for other people to read your
tests.
The next line uses the +File::Temp+ module. This is specific to this testcase,
because it needs to generate a temporary name during the test. Many testcases
use only the +i3test+ module.
The last line opens a connection to X11. You might or might not need this in
your testcase, depending on whether you are going to open windows (etc.) or
only use i3 commands.
.t/11-goto.t: Setup
----------------------
my $tmp = fresh_workspace;
cmd 'split h';
----------------------
The first line calls i3test's +fresh_workspace+ function which looks for a
currently unused workspace, switches to it, and returns its name. The variable
+$tmp+ will end up having a value such as +"/tmp/87kBVcHbA9"+. Note that this
is not (necessarily) a valid path, it's just a random workspace name.
So, now that we are on a new workspace, we ensure that the workspace uses
horizontal orientation by issuing the +split h+ command (see the i3 User's
Guide for a list of commands). This is not strictly necessary, but good style.
In general, the +cmd+ function executes the specified i3 command by using the
IPC interface and returns once i3 acknowledged the command.
.t/11-goto.t: Setup
----------------------
#####################################################################
# Create two windows and make sure focus switching works
#####################################################################
my $top = open_window($x);
my $mid = open_window($x);
my $bottom = open_window($x);
----------------------
In every major section of a testcase, you should put a comment like the one
above. This makes it immediately clear how the file is structured.
The +open_window+ function opens a standard window, which will then be put into
tiling mode by i3. If you want a floating window, use the
+open_floating_window+ function. These functions accept the same parameters as
+X11::XCB::Window->new+, see the i3test documentation at TODO.
.t/11-goto.t: Helper function
----------------------
#
# Returns the input focus after sending the given command to i3 via IPC
# and syncing with i3
#
sub focus_after {
my $msg = shift;
cmd $msg;
sync_with_i3 $x;
return $x->input_focus;
}
----------------------
This section defines a helper function which will be used over and over in this
testcase. If you have code which gets executed more than once or twice
(depending on the length of your test, use your best judgement), please put it
in a function. Tests should be short, concise and clear.
The +focus_after+ function executes a command and returns the X11 focus after
the command was executed. The +sync_with_i3+ command makes sure that i3 could
push its state to X11. See <<i3_sync>> to learn how this works exactly.
.t/11-goto.t: Test assumptions
----------------------
$focus = $x->input_focus;
is($focus, $bottom->id, "Latest window focused");
$focus = focus_after('focus left');
is($focus, $mid->id, "Middle window focused");
----------------------
Now, we run the first two real tests. They use +Test::More+'s +is+ function,
which compares two values and prints the differences if they are not the same.
After the arguments, we supply a short comment to indicate what we are testing
here. This makes it vastly more easy for the developer to spot which testcase
is the problem in case one fails.
The first test checks that the most recently opened window is focused.
Afterwards, the command +focus left+ is issued and it is verified that the
middle window now has focus.
Note that this is not a comprehensive test of the +focus+ command -- we would
have to test wrapping, focus when using a more complex layout, focusing the
parent/child containers, etc. But that is not the point of this testcase.
Instead, we just want to know if +$x->input_focus+ corresponds with what we are
expecting. If not, something is completely wrong with the test environment and
this trivial test will fail.
.t/11-goto.t: Test that the feature does not work (yet)
----------------------
#####################################################################
# Now goto a mark which does not exist
#####################################################################
my $random_mark = mktemp('mark.XXXXXX');
$focus = focus_after(qq|[con_mark="$random_mark"] focus|);
is($focus, $mid->id, "focus unchanged");
----------------------
Syntax hint: The qq keyword is the interpolating quote operator. It lets you
chose a quote character (in this case the +|+ character, a pipe). This makes
having double quotes in our string easy.
In this new major section, a random mark (mark is an identifier for a window,
see "VIM-like marks" in the i3 Users Guide) will be generated. Afterwards, we
test that trying to focus that mark will not do anything. This is important: Do
not only test that using a feature has the expected outcome, but also test that
using it without properly initializing it does no harm. This command could for
example have changed focus anyways (a bug) or crash i3 (obviously a bug).
.t/11-goto.t: Test that the feature does work
----------------------
cmd "mark $random_mark";
$focus = focus_after('focus left');
is($focus, $top->id, "Top window focused");
$focus = focus_after(qq|[con_mark="$random_mark"] focus|);
is($focus, $mid->id, "goto worked");
----------------------
Remember: Focus was on the middle window (we verified that earlier in "Test
assumptions"). We now mark the middle window with our randomly generated mark.
Afterwards, we switch focus away from the middle window to be able to tell if
focusing it via its mark will work. If the test works, the goto command seems
to be working.
.t/11-goto.t: Test corner case
----------------------
# check that we can specify multiple criteria
$focus = focus_after('focus left');
is($focus, $top->id, "Top window focused");
$focus = focus_after(qq|[con_mark="$random_mark" con_mark="$random_mark"] focus|);
is($focus, $mid->id, "goto worked");
----------------------
Now we test the same feature, but specifying the mark twice in the command.
This should have no effect, but lets be sure: test it and see if things go
wrong.
.t/11-goto.t: Test second code path
----------------------
#####################################################################
# Check whether the focus command will switch to a different
# workspace if necessary
#####################################################################
my $tmp2 = fresh_workspace;
is(focused_ws(), $tmp2, 'tmp2 now focused');
cmd qq|[con_mark="$random_mark"] focus|;
is(focused_ws(), $tmp, 'tmp now focused');
----------------------
This part of the test checks that focusing windows by mark works across
workspaces. It uses i3test's +focused_ws+ function to get the current
workspace.
.t/11-goto.t: Test second code path
----------------------
done_testing;
----------------------
The end of every testcase has to contain the +done_testing+ line. This tells
+complete-run.pl+ that the test was finished successfully. If it does not
occur, the test might have crashed during execution -- some of the reasons why
that could happen are bugs in the used modules, bugs in the testcase itself or
an i3 crash resulting in the testcase being unable to communicate with i3 via
IPC anymore.
[[i3_sync]]
== Appendix A: The I3_SYNC protocol
Consider the following situation: You open two windows in your testcase, then
you use +focus left+ and want to verify that the X11 focus has been updated
properly. Sounds simple, right? Lets assume you use this straight-forward
implementation:
.Racey focus testcase
-----------
my $left = open_window($x);
my $right = open_window($x);
cmd 'focus left';
is($x->input_focus, $left->id, 'left window focused');
----------
However, the test fails. Sometimes. Apparently, there is a race condition in
your test. If you think about it, this is because you are using two different
pieces of software: You tell i3 to update focus, i3 confirms that, and then you
ask X11 to give you the current focus. There is a certain time that the X11
server needs to process the requests from i3. If the testcase's request for the
input focus is processed before i3's requests, the test will fail.
image::i3-sync.png["Diagram of the race condition", title="Diagram of the race condition"]
One way to "solve" this would be to add +sleep 0.5;+ after the +cmd+ call.
After 0.5 seconds it should be safe to assume that focus has been updated,
right?
In practice, this usually works. However, it has several problems:
1. This is obviously not a clean solution, but a workaround. Ugly.
2. On very slow machines, this might not work. Unlikely, but in different
situations (a delay to wait for i3 to startup) the necessary time is much
harder to guess, even for fast machines.
3. This *wastes a lot of time*. Usually, your computer is much faster than 0.5s
to update the status. However, sometimes, it might take 0.4s, so we cant
make it +sleep 0.1+.
To illustrate how grave the problem with wasting time actually is: Before
removing all sleeps from the testsuite, a typical run using 4 separate X
servers took around 50 seconds on my machine. After removing all the sleeps,
we achieved times of about 25 seconds. This is very significant and influences
the way you think about tests -- the faster they are, the more likely you are
to check whether everything still works quite often (which you should).
What I am trying to say is: Delays adds up quickly and make the test suite
less robust.
The real solution for this problem is a mechanism which I call "the i3 sync
protocol". The idea is to send a request (which does not modify state) via X11
to i3 which will then be answered, again via X11. Because this answer is
generated via an X11 request, it will be sent to the X11 server *after* all
previous requests. Thus, you can be sure that by the time you receive the reply,
all other events have been dealt with by i3 (and, more importantly, X11).
image::i3-sync-working.png["Diagram of the i3 sync solution", title="Diagram of the i3 sync solution"]
=== Implementation details
The client which wants to sync with i3 initiates the protocol by sending a
ClientMessage to the X11 root window:
.Send ClientMessage
-------------------
# Generate a ClientMessage, see xcb_client_message_t
my $msg = pack "CCSLLLLLLL",
CLIENT_MESSAGE, # response_type
32, # format
0, # sequence
$root, # destination window
$x->atom(name => 'I3_SYNC')->id,
$_sync_window->id, # data[0]: our own window id
$myrnd, # data[1]: a random value to identify the request
0,
0,
0;
# Send it to the root window -- since i3 uses the SubstructureRedirect
# event mask, it will get the ClientMessage.
$x->send_event(0, $root, EVENT_MASK_SUBSTRUCTURE_REDIRECT, $msg);
-------------------
i3 will then reply with the same ClientMessage, sent to the window specified in
+data[0]+. In the reply, +data[0]+ and +data[1]+ are exactly the same as in the
request. You should use a random value in +data[1]+ and check that you received
the same one when getting the reply.
== Appendix B: The sync IPC command
The above I3_SYNC protocol allows to synchronise with i3. However, it is not
enough for tests that also involve i3bar: There might still be messages from
i3bar in-flight even after synchronising with i3. Thus, there also exists a sync
IPC command, that is however not meant to be used directly. Instead, i3bar uses
it for implementing the I3_SYNC protocol.
The intended usage works like this:
1. You send an I3_SYNC message to i3bar's window. See <<i3_sync>>.
2. i3bar sends a SYNC IPC command to i3 with payload
+{"window":your-window-here,"rnd":your-random-value}+.
3. i3 reacts to this IPC command as if it received an I3_SYNC request via X11.
This protocol is used, for example, in t/525-i3bar-mouse-bindings.t: A mouse
button press on i3bar is triggered. i3bar reacts to this by sending IPC commands
to i3.
The necessary synchronisation is achieved by sending an I3_SYNC event to i3bar:
Because i3bar reacts with a sync IPC command to i3, all previous IPC commands from
i3bar will be handled first. Because i3 reacts via X11, all previous X11
requests from i3 will be handled by the X11 server first.
The actual test also has to sync with i3 first due to how X11 handling works.
For more details, refer to the documentation for +XAllowEvents+ with mode
+ReplayPointer+.
== Appendix C: Socket activation
Socket activation is a mechanism which was made popular by systemd, an init
replacement. It basically describes creating a listening socket before starting
a program. systemd will invoke the program only when an actual connection to
the socket is made, hence the term socket activation.
The interesting part of this (in the i3 context) is that you can very precisely
detect when the program is ready (finished its initialization).
=== Preparing the listening socket
+complete-run.pl+ will create a listening UNIX socket which it will then pass
to i3. This socket will be used by i3 as an additional IPC socket, just like
the one it will create on its own. Passing the socket happens implicitly
because children will inherit the parents sockets when fork()ing and sockets
will continue to exist after an exec() call (unless CLOEXEC is set of course).
The only explicit things +complete-run.pl+ has to do is setting the +LISTEN_FDS+
environment variable to the number of sockets which exist (1 in our case) and
setting the +LISTEN_PID+ environment variable to the current process ID. Both
variables are necessary so that the program (i3) knows how many sockets it
should use and if the environment variable is actually intended for it. i3 will
then start looking for sockets at file descriptor 3 (since 0, 1 and 2 are used
for stdin, stdout and stderr, respectively).
The actual Perl code which sets up the socket, fork()s, makes sure the socket
has file descriptor 3 and sets up the environment variables follows (shortened
a bit):
.Setup socket and environment
-----------------------------
my $socket = IO::Socket::UNIX->new(
Listen => 1,
Local => $args{unix_socket_path},
);
my $pid = fork;
if ($pid == 0) {
$ENV{LISTEN_PID} = $$;
$ENV{LISTEN_FDS} = 1;
# Only pass file descriptors 0 (stdin), 1 (stdout),
# 2 (stderr) and 3 (socket) to the child.
$^F = 3;
# If the socket does not use file descriptor 3 by chance
# already, we close fd 3 and dup2() the socket to 3.
if (fileno($socket) != 3) {
POSIX::close(3);
POSIX::dup2(fileno($socket), 3);
}
exec "/usr/bin/i3";
}
-----------------------------
=== Waiting for a reply
In the parent process, we want to know when i3 is ready to answer our IPC
requests and handle our windows. Therefore, after forking, we immediately close
the listening socket (i3 will handle this side of the socket) and connect to it
(remember, we are talking about a named UNIX socket) as a client. This connect
call will immediately succeed because the kernel buffers it. Then, we send a
request (of type GET_TREE, but that is not really relevant). Writing data to
the socket will also succeed immediately because, again, the kernel buffers it
(only up to a certain amount of data of course).
Afterwards, we just blockingly wait until we get an answer. In the child
process, i3 will setup the listening socket in its event loop. Immediately
after actually starting the event loop, it will notice a new client connecting
(the parent process) and handle its request. Since all initialization has been
completed successfully by the time the event loop is entered, we can now assume
that i3 is ready.
=== Timing and conclusion
A beautiful feature of this mechanism is that it does not depend on timing. It
does not matter when the child process gets CPU time or when the parent process
gets CPU time. On heavily loaded machines (or machines with multiple CPUs,
cores or unreliable schedulers), this makes waiting for i3 much more robust.
Before using socket activation, we typically used a +sleep(1)+ and hoped that
i3 was initialized by that time. Of course, this breaks on some (slow)
computers and wastes a lot of time on faster computers. By using socket
activation, we decreased the total amount of time necessary to run all tests
(72 files at the time of writing) from > 100 seconds to 16 seconds. This makes
it significantly more attractive to run the test suite more often (or at all)
during development.
An alternative approach to using socket activation is polling for the existence
of the IPC socket and connecting to it. While this might be slightly easier to
implement, it wastes CPU time and is considerably uglier than this solution
:). After all, +lib/SocketActivation.pm+ contains only 54 SLOC.

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1,18 @@
External workspace bars
=======================
Michael Stapelberg <michael+i3@stapelberg.de>
May 2010
Michael Stapelberg <michael@i3wm.org>
April 2013
This document describes why the internal workspace bar is minimal and how an
external workspace bar can be used. It explains the concepts using +i3-wsbar+
as the reference implementation.
i3 comes with i3bar by default, a simple bar that is sufficient for most users.
In case you are unhappy with it, this document explains how to use a different,
external workspace bar. Note that we do not provide support for external
programs.
== Internal and external bars
The internal workspace bar of i3 is meant to be a reasonable default so that
you can use i3 without having too much hassle when setting it up. It is quite
simple and intended to stay this way. So, there is no way to display your own
information in this bar (unlike dwm, wmii, awesome, …).
We chose not to implement such a mechanism because that would be duplicating
already existing functionality of tools such as dzen2, xmobar and similar.
Instead, you should disable the internal bar and use an external workspace bar
(which communicates with i3 through its IPC interface).
simple and intended to stay this way.
== dock mode
@@ -25,10 +20,10 @@ You typically want to see the same workspace bar on every workspace on a
specific screen. Also, you dont want to place the workspace bar somewhere
in your layout by hand. This is where dock mode comes in: When a program sets
the appropriate hint (_NET_WM_WINDOW_TYPE_DOCK), it will be managed in dock
mode by i3. That means it will be placed at the bottom of the screen (while
other edges of the screen are possible in the NetWM standard, this is not yet
implemented in i3), it will not overlap any other window and it will be on
every workspace for the specific screen it was placed on initially.
mode by i3. That means it will be placed at the bottom or top of the screen
(while other edges of the screen are possible in the NetWM standard, this is
not yet implemented in i3), it will not overlap any other window and it will be
on every workspace for the specific screen it was placed on initially.
== The IPC interface
@@ -37,8 +32,8 @@ provide the bar program with the current workspaces and output (as in VGA-1,
LVDS-1, …) configuration. In the other direction, the program has to be able
to switch to specific workspaces.
By default, the IPC interface is enabled and places its UNIX socket in
+~/.i3/ipc.sock+.
By default, the IPC interface is enabled and you can get the path to the socket
by calling +i3 --get-socketpath+.
To learn more about the protocol which is used for IPC, see +docs/ipc+.
@@ -49,17 +44,17 @@ external workspace bar implementation needs to make sure that when you change
the resolution of any of your screens (or enable/disable an output), the bars
will be adjusted properly.
== i3-wsbar, the reference implementation
== i3-wsbar, an example implementation
Please keep in mind that +i3-wsbar+ is just a reference implementation. It is
shipped with i3 to have a reasonable default. Thus, +i3-wsbar+ is designed to
work well with dzen2 and there are no plans to make it more generic.
+i3-wsbar+ used to be the reference implementation before we had +i3bar+.
Nowadays, it is not shipped with release tarballs, but you can still get it at
https://github.com/i3/i3/blob/next/contrib/i3-wsbar
=== The big picture
The most common reason to use an external workspace bar is to integrate system
information such as what +i3status+ provides into the workspace bar (to save
screen space). So, we have +i3status+ or a similar program, which only provides
information such as what +i3status+ or +conky+ provide into the workspace bar.
So, we have +i3status+ or a similar program, which only provides
text output (formatted in some way). To display this text nicely on the screen,
there are programs such as dzen2, xmobar and similar. We will stick to dzen2
from here on. So, we have the output of i3status, which needs to go into dzen2
@@ -89,6 +84,3 @@ To actually get a benefit, you want to give +i3-wsbar+ some input:
------------------------------------------
i3status | i3-wsbar -c "dzen2 -x %x -dock"
------------------------------------------
It is recommended to place the above command in your i3 configuration file
to start it automatically with i3.

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
# renders the layout tree using asymptote
use strict;
use warnings;
use Data::Dumper;
use AnyEvent::I3;
use File::Temp;
use v5.10;
my $i3 = i3("/tmp/nestedcons");
my $tree = $i3->get_tree->recv;
my $tmp = File::Temp->new(UNLINK => 0, SUFFIX => '.asy');
say $tmp "import drawtree;";
say $tmp "treeLevelStep = 2cm;";
sub dump_node {
my ($n, $parent) = @_;
my $o = ($n->{orientation} eq 'none' ? "u" : ($n->{orientation} eq 'horizontal' ? "h" : "v"));
my $w = (defined($n->{window}) ? $n->{window} : "N");
my $na = $n->{name};
$na =~ s/#/\\#/g;
my $name = "($na, $o, $w)";
print $tmp "TreeNode n" . $n->{id} . " = makeNode(";
print $tmp "n" . $parent->{id} . ", " if defined($parent);
print $tmp "\"" . $name . "\");\n";
dump_node($_, $n) for @{$n->{nodes}};
}
dump_node($tree);
say $tmp "draw(n" . $tree->{id} . ", (0, 0));";
close($tmp);
my $rep = "$tmp";
$rep =~ s/asy$/eps/;
system("cd /tmp && asy $tmp && gv $rep && rm $rep");

214
etc/config Normal file
View File

@@ -0,0 +1,214 @@
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up l
set $down k
set $left j
set $right semicolon
# use Mouse+Mod1 to drag floating windows to their wanted position
floating_modifier Mod1
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym Mod1+Return exec i3-sensible-terminal
# kill focused window
bindsym Mod1+Shift+q kill
# start dmenu (a program launcher)
bindsym Mod1+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindsym Mod1+d exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym Mod1+$left focus left
bindsym Mod1+$down focus down
bindsym Mod1+$up focus up
bindsym Mod1+$right focus right
# alternatively, you can use the cursor keys:
bindsym Mod1+Left focus left
bindsym Mod1+Down focus down
bindsym Mod1+Up focus up
bindsym Mod1+Right focus right
# move focused window
bindsym Mod1+Shift+$left move left
bindsym Mod1+Shift+$down move down
bindsym Mod1+Shift+$up move up
bindsym Mod1+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+Right move right
# split in horizontal orientation
bindsym Mod1+h split h
# split in vertical orientation
bindsym Mod1+v split v
# enter fullscreen mode for the focused container
bindsym Mod1+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym Mod1+s layout stacking
bindsym Mod1+w layout tabbed
bindsym Mod1+e layout toggle split
# toggle tiling / floating
bindsym Mod1+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym Mod1+space focus mode_toggle
# focus the parent container
bindsym Mod1+a focus parent
# focus the child container
#bindsym Mod1+d focus child
# move the currently focused window to the scratchpad
bindsym Mod1+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym Mod1+minus scratchpad show
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym Mod1+1 workspace number $ws1
bindsym Mod1+2 workspace number $ws2
bindsym Mod1+3 workspace number $ws3
bindsym Mod1+4 workspace number $ws4
bindsym Mod1+5 workspace number $ws5
bindsym Mod1+6 workspace number $ws6
bindsym Mod1+7 workspace number $ws7
bindsym Mod1+8 workspace number $ws8
bindsym Mod1+9 workspace number $ws9
bindsym Mod1+0 workspace number $ws10
# move focused container to workspace
bindsym Mod1+Shift+1 move container to workspace number $ws1
bindsym Mod1+Shift+2 move container to workspace number $ws2
bindsym Mod1+Shift+3 move container to workspace number $ws3
bindsym Mod1+Shift+4 move container to workspace number $ws4
bindsym Mod1+Shift+5 move container to workspace number $ws5
bindsym Mod1+Shift+6 move container to workspace number $ws6
bindsym Mod1+Shift+7 move container to workspace number $ws7
bindsym Mod1+Shift+8 move container to workspace number $ws8
bindsym Mod1+Shift+9 move container to workspace number $ws9
bindsym Mod1+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym Mod1+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod1+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or Mod1+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym Mod1+r mode "default"
}
bindsym Mod1+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config if set) or
# ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
exec i3-config-wizard

189
etc/config.keycodes Normal file
View File

@@ -0,0 +1,189 @@
# WARNING
# WARNING: This configuration file is a template for the i3-config-wizard to
# WARNING: generate a config which uses keysyms in your current layout. It does
# WARNING: not get loaded by i3. Please do not change it.
# WARNING
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindcode $mod+36 exec i3-sensible-terminal
# kill focused window
bindcode $mod+Shift+24 kill
# start dmenu (a program launcher)
bindcode $mod+40 exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindcode $mod+44 focus left
bindcode $mod+45 focus down
bindcode $mod+46 focus up
bindcode $mod+47 focus right
# alternatively, you can use the cursor keys:
bindcode $mod+113 focus left
bindcode $mod+116 focus down
bindcode $mod+111 focus up
bindcode $mod+114 focus right
# move focused window
bindcode $mod+Shift+44 move left
bindcode $mod+Shift+45 move down
bindcode $mod+Shift+46 move up
bindcode $mod+Shift+47 move right
# alternatively, you can use the cursor keys:
bindcode $mod+Shift+113 move left
bindcode $mod+Shift+116 move down
bindcode $mod+Shift+111 move up
bindcode $mod+Shift+114 move right
# split in horizontal orientation
bindcode $mod+43 split h
# split in vertical orientation
bindcode $mod+55 split v
# enter fullscreen mode for the focused container
bindcode $mod+41 fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindcode $mod+39 layout stacking
bindcode $mod+25 layout tabbed
bindcode $mod+26 layout toggle split
# toggle tiling / floating
bindcode $mod+Shift+65 floating toggle
# change focus between tiling / floating windows
bindcode $mod+65 focus mode_toggle
# focus the parent container
bindcode $mod+38 focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindcode $mod+10 workspace number $ws1
bindcode $mod+11 workspace number $ws2
bindcode $mod+12 workspace number $ws3
bindcode $mod+13 workspace number $ws4
bindcode $mod+14 workspace number $ws5
bindcode $mod+15 workspace number $ws6
bindcode $mod+16 workspace number $ws7
bindcode $mod+17 workspace number $ws8
bindcode $mod+18 workspace number $ws9
bindcode $mod+19 workspace number $ws10
# move focused container to workspace
bindcode $mod+Shift+10 move container to workspace number $ws1
bindcode $mod+Shift+11 move container to workspace number $ws2
bindcode $mod+Shift+12 move container to workspace number $ws3
bindcode $mod+Shift+13 move container to workspace number $ws4
bindcode $mod+Shift+14 move container to workspace number $ws5
bindcode $mod+Shift+15 move container to workspace number $ws6
bindcode $mod+Shift+16 move container to workspace number $ws7
bindcode $mod+Shift+17 move container to workspace number $ws8
bindcode $mod+Shift+18 move container to workspace number $ws9
bindcode $mod+Shift+19 move container to workspace number $ws10
# reload the configuration file
bindcode $mod+Shift+54 reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindcode $mod+Shift+27 restart
# exit i3 (logs you out of your X session)
bindcode $mod+Shift+26 exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindcode 44 resize shrink width 10 px or 10 ppt
bindcode 45 resize grow height 10 px or 10 ppt
bindcode 46 resize shrink height 10 px or 10 ppt
bindcode 47 resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindcode 113 resize shrink width 10 px or 10 ppt
bindcode 116 resize grow height 10 px or 10 ppt
bindcode 111 resize shrink height 10 px or 10 ppt
bindcode 114 resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindcode 36 mode "default"
bindcode 9 mode "default"
bindcode $mod+27 mode "default"
}
bindcode $mod+27 mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}

251
generate-command-parser.pl Executable file
View File

@@ -0,0 +1,251 @@
#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
#
# i3 - an improved tiling window manager
# © 2009 Michael Stapelberg and contributors (see also: LICENSE)
#
# generate-command-parser.pl: script to generate parts of the command parser
# from its specification file parser-specs/commands.spec.
#
# Requires only perl >= 5.10, no modules.
use strict;
use warnings;
use Data::Dumper;
use Getopt::Long;
use v5.10;
my $input = '';
my $prefix = '';
my $result = GetOptions(
'input=s' => \$input,
'prefix=s' => \$prefix
);
die qq|Input file "$input" does not exist!| unless -e $input;
# reads in a whole file
sub slurp {
open my $fh, '<', shift;
local $/;
<$fh>;
}
# Stores the different states.
my %states;
my @raw_lines = split("\n", slurp($input));
my @lines;
# XXX: In the future, we might switch to a different way of parsing this. The
# parser is in many ways not good — one obvious one is that it is hand-crafted
# without a good reason, also it preprocesses lines and forgets about line
# numbers. Luckily, this is just an implementation detail and the specification
# for the i3 command parser is in-tree (not user input).
# -- michael, 2012-01-12
# First step of preprocessing:
# Join token definitions which are spread over multiple lines.
for my $line (@raw_lines) {
next if $line =~ /^\s*#/ || $line =~ /^\s*$/;
if ($line =~ /^\s+->/) {
# This is a continued token definition, append this line to the
# previous one.
$lines[$#lines] = $lines[$#lines] . $line;
} else {
push @lines, $line;
next;
}
}
# First step: We build up the data structure containing all states and their
# token rules.
my $current_state;
for my $line (@lines) {
if (my ($state) = ($line =~ /^state ([A-Z0-9_]+):$/)) {
#say "got a new state: $state";
$current_state = $state;
} else {
# Must be a token definition:
# [identifier = ] <tokens> -> <action>
#say "token definition: $line";
my ($identifier, $tokens, $action) =
($line =~ /
^\s* # skip leading whitespace
([a-z_]+ \s* = \s*|) # optional identifier
(.*?) -> \s* # token
(.*) # optional action
/x);
# Cleanup the identifier (if any).
$identifier =~ s/^\s*(\S+)\s*=\s*$/$1/g;
# The default action is to stay in the current state.
$action = $current_state if length($action) == 0;
#say "identifier = *$identifier*, token = *$tokens*, action = *$action*";
for my $token (split(',', $tokens)) {
# Cleanup trailing/leading whitespace.
$token =~ s/^\s*//g;
$token =~ s/\s*$//g;
my $store_token = {
token => $token,
identifier => $identifier,
next_state => $action,
};
if (exists $states{$current_state}) {
push @{$states{$current_state}}, $store_token;
} else {
$states{$current_state} = [ $store_token ];
}
}
}
}
# Second step: Generate the enum values for all states.
# It is important to keep the order the same, so we store the keys once.
# We sort descendingly by length to be able to replace occurrences of the state
# name even when one states name is included in another ones (like FOR_WINDOW
# is in FOR_WINDOW_COMMAND).
my @keys = sort { (length($b) <=> length($a)) or ($a cmp $b) } keys %states;
open(my $enumfh, '>', "GENERATED_${prefix}_enums.h");
my %statenum;
say $enumfh '#pragma once';
say $enumfh 'typedef enum {';
my $cnt = 0;
for my $state (@keys, '__CALL') {
say $enumfh ',' if $cnt > 0;
print $enumfh " $state = $cnt";
$statenum{$state} = $cnt;
$cnt++;
}
say $enumfh "\n} cmdp_state;";
close($enumfh);
# Third step: Generate the call function.
open(my $callfh, '>', "GENERATED_${prefix}_call.h");
my $resultname = uc(substr($prefix, 0, 1)) . substr($prefix, 1) . 'ResultIR';
say $callfh '#pragma once';
say $callfh "static void GENERATED_call(Match *current_match, struct stack *stack, const int call_identifier, struct $resultname *result) {";
say $callfh ' switch (call_identifier) {';
my $call_id = 0;
for my $state (@keys) {
my $tokens = $states{$state};
for my $token (@$tokens) {
next unless $token->{next_state} =~ /^call /;
my ($cmd) = ($token->{next_state} =~ /^call (.*)/);
my ($next_state) = ($cmd =~ /; ([A-Z_]+)$/);
$cmd =~ s/; ([A-Z_]+)$//;
# Go back to the INITIAL state unless told otherwise.
$next_state ||= 'INITIAL';
my $fmt = $cmd;
# Replace the references to identified literals (like $workspace) with
# calls to get_string(). Also replaces state names (like FOR_WINDOW)
# with their ID (useful for cfg_criteria_init(FOR_WINDOW) e.g.).
$cmd =~ s/$_/$statenum{$_}/g for @keys;
$cmd =~ s/\$([a-z_]+)/get_string(stack, "$1")/g;
$cmd =~ s/\&([a-z_]+)/get_long(stack, "$1")/g;
# For debugging/testing, we print the call using printf() and thus need
# to generate a format string. The format uses %d for <number>s,
# literal numbers or state IDs and %s for NULL, <string>s and literal
# strings.
# remove the function name temporarily, so that the following
# replacements only apply to the arguments.
my ($funcname) = ($fmt =~ /^(.+)\(/);
$fmt =~ s/^$funcname//;
$fmt =~ s/$_/%d/g for @keys;
$fmt =~ s/\$([a-z_]+)/%s/g;
$fmt =~ s/\&([a-z_]+)/%ld/g;
$fmt =~ s/"([a-z0-9_]+)"/%s/g;
$fmt =~ s/(?:-?|\b)[0-9]+\b/%d/g;
$fmt = $funcname . $fmt;
say $callfh " case $call_id:";
say $callfh " result->next_state = $next_state;";
say $callfh '#ifndef TEST_PARSER';
my $real_cmd = $cmd;
if ($real_cmd =~ /\(\)/) {
$real_cmd =~ s/\(/(current_match, result/;
} else {
$real_cmd =~ s/\(/(current_match, result, /;
}
say $callfh " $real_cmd;";
say $callfh '#else';
# debug
$cmd =~ s/[^(]+\(//;
$cmd =~ s/\)$//;
$cmd = ", $cmd" if length($cmd) > 0;
$cmd =~ s/, NULL//g;
say $callfh qq| fprintf(stderr, "$fmt\\n"$cmd);|;
# The cfg_criteria functions have side-effects which are important for
# testing. They are implemented as stubs in the test parser code.
if ($real_cmd =~ /^cfg_criteria/) {
say $callfh qq| $real_cmd;|;
}
say $callfh '#endif';
say $callfh " break;";
$token->{next_state} = "call $call_id";
$call_id++;
}
}
say $callfh ' default:';
say $callfh ' printf("BUG in the parser. state = %d\n", call_identifier);';
say $callfh ' assert(false);';
say $callfh ' }';
say $callfh '}';
close($callfh);
# Fourth step: Generate the token datastructures.
open(my $tokfh, '>', "GENERATED_${prefix}_tokens.h");
say $tokfh '#pragma once';
for my $state (@keys) {
my $tokens = $states{$state};
say $tokfh 'static cmdp_token tokens_' . $state . '[' . scalar @$tokens . '] = {';
for my $token (@$tokens) {
my $call_identifier = 0;
my $token_name = $token->{token};
if ($token_name =~ /^'/) {
# To make the C code simpler, we leave out the trailing single
# quote of the literal. We can do strdup(literal + 1); then :).
$token_name =~ s/'$//;
}
# Escape double quotes:
$token_name =~ s,",\\",g;
my $next_state = $token->{next_state};
if ($next_state =~ /^call /) {
($call_identifier) = ($next_state =~ /^call ([0-9]+)$/);
$next_state = '__CALL';
}
my $identifier;
# Set $identifier to NULL if there is no identifier
if ($token->{identifier} eq ""){
$identifier = "NULL"
}
else{
$identifier = qq|"$token->{identifier}"|;
}
say $tokfh qq| { "$token_name", $identifier, $next_state, { $call_identifier } },|;
}
say $tokfh '};';
}
say $tokfh 'static cmdp_token_ptr tokens[' . scalar @keys . '] = {';
for my $state (@keys) {
my $tokens = $states{$state};
say $tokfh ' { tokens_' . $state . ', ' . scalar @$tokens . ' },';
}
say $tokfh '};';
close($tokfh);

View File

@@ -1,42 +0,0 @@
# Default value so one can compile i3-input standalone
TOPDIR=..
include $(TOPDIR)/common.mk
# Depend on the object files of all source-files in src/*.c and on all header files
AUTOGENERATED:=cfgparse.tab.c cfgparse.yy.c
FILES:=$(patsubst %.c,%.o,$(filter-out $(AUTOGENERATED),$(wildcard *.c)))
HEADERS:=$(wildcard *.h)
# Depend on the specific file (.c for each .o) and on all headers
%.o: %.c ${HEADERS}
echo "CC $<"
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
all: i3-config-wizard
i3-config-wizard: cfgparse.y.o cfgparse.yy.o ${FILES}
echo "LINK i3-config-wizard"
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
cfgparse.yy.o: cfgparse.l cfgparse.y.o ${HEADERS}
echo "LEX $<"
flex -i -o$(@:.o=.c) $<
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(@:.o=.c)
cfgparse.y.o: cfgparse.y ${HEADERS}
echo "YACC $<"
bison --debug --verbose -b $(basename $< .y) -d $<
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.y=.tab.c)
install: all
echo "INSTALL"
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -m 0755 i3-config-wizard $(DESTDIR)$(PREFIX)/bin/
clean:
rm -f *.o cfgparse.tab.{c,h} cfgparse.output cfgparse.yy.c
distclean: clean
rm -f i3-config-wizard

View File

@@ -1,6 +0,0 @@
xmacro(_NET_WM_NAME)
xmacro(_NET_WM_WINDOW_TYPE)
xmacro(_NET_WM_WINDOW_TYPE_DIALOG)
xmacro(ATOM)
xmacro(CARDINAL)
xmacro(UTF8_STRING)

View File

@@ -1,105 +0,0 @@
%option nounput
%option noinput
%option noyy_top_state
%option stack
%{
/*
* vim:ts=8:expandtab
*
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include "cfgparse.tab.h"
int yycolumn = 1;
struct context {
int line_number;
char *line_copy;
char *compact_error;
/* These are the same as in YYLTYPE */
int first_column;
int last_column;
};
#define YY_DECL int yylex (struct context *context)
#define YY_USER_ACTION { \
context->first_column = yycolumn; \
context->last_column = yycolumn+yyleng-1; \
yycolumn += yyleng; \
}
%}
EOL (\r?\n)
%s BINDCODE_COND
%s BIND_AWS_COND
%s BIND_A2WS_COND
%x BUFFER_LINE
%%
{
/* This is called when a new line is lexed. We only want the
* first line to match to go into state BUFFER_LINE */
if (context->line_number == 0) {
context->line_number = 1;
BEGIN(INITIAL);
yy_push_state(BUFFER_LINE);
}
}
<BUFFER_LINE>^[^\r\n]*/{EOL}? {
/* save whole line */
context->line_copy = strdup(yytext);
yyless(0);
yy_pop_state();
yy_set_bol(true);
yycolumn = 1;
}
<BIND_A2WS_COND>[^\n]+ { BEGIN(INITIAL); yylval.string = strdup(yytext); return STR; }
[0-9]+ { yylval.number = atoi(yytext); return NUMBER; }
bind { BEGIN(BINDCODE_COND); return TOKBINDCODE; }
bindcode { BEGIN(BINDCODE_COND); return TOKBINDCODE; }
Mod1 { yylval.number = (1 << 3); return MODIFIER; }
Mod2 { yylval.number = (1 << 4); return MODIFIER; }
Mod3 { yylval.number = (1 << 5); return MODIFIER; }
Mod4 { yylval.number = (1 << 6); return MODIFIER; }
Mod5 { yylval.number = (1 << 7); return MODIFIER; }
Mode_switch { yylval.number = (1 << 8); return MODIFIER; }
$mod { yylval.number = (1 << 9); return TOKMODVAR; }
control { return TOKCONTROL; }
ctrl { return TOKCONTROL; }
shift { return TOKSHIFT; }
{EOL} {
if (context->line_copy) {
free(context->line_copy);
context->line_copy = NULL;
}
context->line_number++;
BEGIN(INITIAL);
yy_push_state(BUFFER_LINE);
}
<BINDCODE_COND>[ \t]+ { BEGIN(BIND_AWS_COND); return WHITESPACE; }
<BIND_AWS_COND>[ \t]+ { BEGIN(BIND_A2WS_COND); return WHITESPACE; }
[ \t]+ { return WHITESPACE; }
. { return (int)yytext[0]; }
<<EOF>> {
while (yy_start_stack_ptr > 0)
yy_pop_state();
yyterminate();
}
%%

View File

@@ -1,161 +0,0 @@
%{
/*
* vim:ts=4:sw=4:expandtab
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
extern Display *dpy;
struct context {
int line_number;
char *line_copy;
char *compact_error;
/* These are the same as in YYLTYPE */
int first_column;
int last_column;
char *result;
};
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yylex(struct context *context);
extern int yyparse(void);
extern FILE *yyin;
YY_BUFFER_STATE yy_scan_string(const char *);
static struct context *context;
/* We dont need yydebug for now, as we got decent error messages using
* yyerror(). Should you ever want to extend the parser, it might be handy
* to just comment it in again, so it stays here. */
//int yydebug = 1;
void yyerror(const char *error_message) {
fprintf(stderr, "\n");
fprintf(stderr, "CONFIG: %s\n", error_message);
fprintf(stderr, "CONFIG: line %d:\n",
context->line_number);
fprintf(stderr, "CONFIG: %s\n", context->line_copy);
fprintf(stderr, "CONFIG: ");
for (int c = 1; c <= context->last_column; c++)
if (c >= context->first_column)
fprintf(stderr, "^");
else fprintf(stderr, " ");
fprintf(stderr, "\n");
fprintf(stderr, "\n");
}
int yywrap() {
return 1;
}
char *rewrite_binding(const char *bindingline) {
char *result = NULL;
context = calloc(sizeof(struct context), 1);
yy_scan_string(bindingline);
if (yyparse() != 0) {
fprintf(stderr, "Could not parse configfile\n");
exit(1);
}
result = context->result;
if (context->line_copy)
free(context->line_copy);
free(context);
return result;
}
/* XXX: does not work for combinations of modifiers yet */
static char *modifier_to_string(int modifiers) {
//printf("should convert %d to string\n", modifiers);
if (modifiers == (1 << 3))
return strdup("$mod+");
else if (modifiers == ((1 << 3) | (1 << 0)))
return strdup("$mod+Shift+");
else if (modifiers == (1 << 9))
return strdup("$mod+");
else if (modifiers == ((1 << 9) | (1 << 0)))
return strdup("$mod+Shift+");
else if (modifiers == (1 << 0))
return strdup("Shift+");
else return strdup("");
}
%}
%error-verbose
%lex-param { struct context *context }
%union {
int number;
char *string;
}
%token <number>NUMBER "<number>"
%token <string>STR "<string>"
%token TOKBINDCODE
%token TOKMODVAR "$mod"
%token MODIFIER "<modifier>"
%token TOKCONTROL "control"
%token TOKSHIFT "shift"
%token WHITESPACE "<whitespace>"
%%
lines: /* empty */
| lines WHITESPACE bindcode
| lines error
| lines bindcode
;
bindcode:
TOKBINDCODE WHITESPACE binding_modifiers NUMBER WHITESPACE STR
{
//printf("\tFound keycode binding mod%d with key %d and command %s\n", $<number>3, $4, $<string>6);
int level = 0;
if (($<number>3 & (1 << 0))) {
/* When shift is included, we really need to use the second-level
* symbol (upper-case). The lower-case symbol could be on a
* different key than the upper-case one (unlikely for letters, but
* more likely for special characters). */
level = 1;
}
KeySym sym = XKeycodeToKeysym(dpy, $4, level);
char *str = XKeysymToString(sym);
char *modifiers = modifier_to_string($<number>3);
// TODO: modifier to string
asprintf(&(context->result), "bindsym %s%s %s\n", modifiers, str, $<string>6);
free(modifiers);
}
;
binding_modifiers:
/* NULL */ { $<number>$ = 0; }
| binding_modifier
| binding_modifiers '+' binding_modifier { $<number>$ = $<number>1 | $<number>3; }
| binding_modifiers '+' { $<number>$ = $<number>1; }
;
binding_modifier:
MODIFIER { $<number>$ = $<number>1; }
| TOKMODVAR { $<number>$ = $<number>1; }
| TOKCONTROL { $<number>$ = (1 << 2); }
| TOKSHIFT { $<number>$ = (1 << 0); }
;

View File

@@ -0,0 +1,8 @@
// clang-format off
#define CONFIG_WIZARD_ATOMS_XMACRO \
xmacro(_NET_WM_NAME) \
xmacro(_NET_WM_WINDOW_TYPE) \
xmacro(_NET_WM_WINDOW_TYPE_DIALOG) \
xmacro(ATOM) \
xmacro(CARDINAL) \
xmacro(UTF8_STRING)

Some files were not shown because too many files have changed in this diff Show More