Commit graph

105 commits

Author SHA1 Message Date
Bastien Dejean
c79f32540d Fix memory leak in remove_node 2016-05-14 17:43:42 +02:00
Bastien Dejean
0efe4cea32 Don't emit invalid desktop_focus events 2016-05-13 21:27:11 +02:00
Bastien Dejean
e471298d0a Add node modifiers: {descendant,ancestor}_of
Fixes #473.
2016-05-09 16:55:31 +02:00
Bastien Dejean
c32f30aa7e Remove setting: history_aware_focus
The new implementation of the DIR descriptor is based on
[right-window](https://github.com/ntrrgc/right-window).

Fixes #467.
2016-04-28 10:33:30 +02:00
Bastien Dejean
f50f1f9b21 Don't confine the DIR descriptor 2016-04-22 12:32:10 +02:00
Bastien Dejean
57b12d8f47 Remove setting: focus_by_distance
Unfortunately nearest_from_tree is rather useless because it can't skip
vacant or receptacle nodes.

Therefore, *focus_by_distance* is now the default.
2016-04-21 10:45:05 +02:00
Bastien Dejean
cd079d2c39 Don't confine the CYCLE_DIR descriptor
Fixes #212.
2016-04-20 21:04:15 +02:00
Bastien Dejean
e70f826c94 Consolidate focus_follows_pointer
Fixes #454.
2016-04-18 13:54:00 +02:00
Bastien Dejean
331cc9e2d5 Add node flag: hidden
Fixes #229.
2016-04-16 18:13:31 +02:00
Bastien Dejean
e8aa679cd1 Introduce receptacles
A receptacle is an unfocusable empty leaf node.

Receptacles are used for building a tree without creating windows.

Example:

    bspc node -i
    bspc node @/ -p east -i
    bspc node @/2 -p north -i

    bspc rule -a Abc:abc -o node=@/1
    bspc rule -a Ijk:ijk -o node=@/2/1
    bspc rule -a Xyz:xyz -o node=@/2/2

Fixes #259.
2016-03-26 11:47:17 +01:00
Bastien Dejean
4402b6bae6 Don't try to guess the window rectangle
Fixes #394.
2016-02-12 22:49:06 +01:00
Bastien Dejean
eb07d2fc06 Generalize window commands to nodes 2015-12-22 19:25:45 +01:00
Bastien Dejean
9c29c0892e Handle fullscreen state birth rotation
Fixes #319.
2015-11-19 15:08:54 +01:00
Bastien Dejean
d98c3d17ae Document and homogenize subscriber events 2015-11-09 15:00:47 +01:00
Bastien Dejean
22e0f6ce5b Add --activate to window 2015-11-07 12:21:13 +01:00
Bastien Dejean
40cdd64a7b Rewrite the stacking engine
Stacking now involves 3 layers: BELOW, NORMAL and ABOVE.

In each layers, floating windows are stacked above tiled windows.

The *stack* function is now extremely simple: it just inserts an item in
a sorted list, relying on *stack_cmp* to compare clients.

Fullscreen windows are no longer special.
2015-10-26 20:56:56 +01:00
Bastien Dejean
99974912c8 *leaf_monocle*: only consider tiled windows
Fixes #282.
2015-08-07 08:47:24 +02:00
Bastien Dejean
c49bc92d12 Use generic BSD 2-clause license
Fixes #176
2014-10-22 11:53:03 +02:00
Bastien Dejean
1894cc731d Handle client selection in nearest_from_tree 2014-07-28 11:45:00 +02:00
Bastien Dejean
d85d3133f9 Reinstate focus_by_distance setting 2014-07-18 19:21:58 +02:00
Bastien Dejean
d59fadd8ce Turn the *border_width* setting into a desktop/window setting 2014-02-09 14:47:27 +01:00
Bastien Dejean
b9dcab1900 Remove trailing spaces in headers 2014-01-19 14:41:37 +01:00
Bastien Dejean
c231e8cf41 Indentation: convert spaces to tabs
http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/
2014-01-18 16:30:00 +01:00
Bastien Dejean
168ff7968f New desktop option: --equalize 2014-01-04 12:15:42 +01:00
Bastien Dejean
56d17d8572 Update the window border when pseudo-focusing 2013-12-31 18:05:30 +01:00
Bastien Dejean
bc39da7e78 Pull and push edges via window -e DIR ±PIXELS 2013-12-27 14:46:35 +01:00
Bastien Dejean
08e1c85ce0 Remove tags
Tags should generalize desktops.

To accomplish this, the main node attributes: (type, ratio) would have
to become a dictionary: ((tf1, (type1, ratio1)), (tf2, (type2, ratio2),
...). (`tf<n>` being a tag field.).
2013-10-19 10:56:34 +02:00
Bastien Dejean
7334277454 Implement private windows 2013-10-12 21:16:51 +02:00
Bastien Dejean
15695c066b Add copyright header 2013-10-08 21:05:56 +02:00
Bastien Dejean
607e01e41e Decrease the header guards collision chances 2013-10-08 21:02:33 +02:00
Bastien Dejean
759b87bb66 Add the older/newer selectors to all the objects
But also:
- Add a new modifier: `local`.
- Remove useless modifiers.
2013-10-08 17:47:00 +02:00
Bastien Dejean
34b8692796 Use compliant header guard 2013-10-08 11:58:54 +02:00
Bastien Dejean
35e9927ed9 Make sticky windows stick to their monitor 2013-10-06 16:58:02 +02:00
Bastien Dejean
17dc42de3c Handle node visibility in circulate_leaves 2013-10-06 10:42:13 +02:00
Bastien Dejean
a75979be62 Implement tags 2013-10-05 22:32:40 +02:00
Bastien Dejean
8f95e5102f Update node coordinates after swap/transplant 2013-10-01 20:45:27 +02:00
Bastien Dejean
bfded1effc History is global and stacking is independent
The last desktop and monitor are now deduced from the history.

The stacking order is now independent from the history of the focused
nodes: this prevents hacks on both sides.

All windows are now considered in the stacking algorithm: it prevents
tiled windows from one monitor to appear above the floating windows of
another monitor.

Transfered windows are stacked below the windows of the same kind.
2013-10-01 10:48:03 +02:00
Bastien Dejean
c026b3baa1 New setting: growth_factor 2013-09-23 10:53:21 +02:00
Bastien Dejean
3dda8e7f6f Move a few functions from tree to desktop/monitor 2013-09-20 11:57:09 +02:00
Bastien Dejean
d168e919e3 Split types.c into {monitor,desktop,history}.c 2013-09-19 15:02:49 +02:00
Bastien Dejean
111680a48b Add a --rotate option to the window command 2013-08-27 23:48:50 +02:00
Bastien Dejean
7606b0bb72 Add new selector modifiers: urgent and nonurgent 2013-07-19 10:13:22 +02:00
Steven Allen
df89d390ec Apply modifiers to all objects
Window:
 * cycle                - no change
 * direction            - only consider matching nodes
 * last                 - walk history
 * focused              - match or NULL
 * biggest              - find biggest matching

Desktop:
 * cycle                - no change
 * focused              - match or NULL
 * last                 - match or NULL

Monitor:
 * cycle                - no change
 * direction            - only consider matching nodes
 * last                 - match or NULL
 * focused              - match or NULL
2013-07-13 16:40:37 -04:00
Bastien Dejean
64cde67dc2 Remove setting: focus_by_distance
The removal is motivated by the following example:

+-------+-------+
|       |       |
|       |   b   |
|       |       |
|       |_______|
|   a   |       |
|   *   |   c   |
|       |       |
|       |_______|
|       |       |
|       |   d   |
|       |       |
+-------+-------+

Bellow is a summary of the number of steps required to reach *b*, *c* and *d* with *a* as a starting point with the associated mean and variance:

focus_by_distance         steps           mean         variance
---------------------------------------------------------------
  false                   1, 2, 3           2            2/3
  true                    2, 1, 2          5/3           2/9
2013-07-13 22:23:13 +02:00
Bastien Dejean
1f83706ab5 Don't transplant when swapping
The new syntax provides a separate transplantation option.
2013-07-13 09:40:19 +02:00
Bastien Dejean
8fd8521322 Rewrite message handling
The new message syntax:
- Provides 10 commands instead of 60.
- Allows multiple actions to be applied in one call.

The client now returns an non zero exit code when a message fails.

The `is_adjacent` function now handles vacant nodes.
2013-07-12 21:52:02 +02:00
Bastien Dejean
addd537eb8 Prevent node transplantation for circulate 2013-07-02 21:33:33 +02:00
Bastien Dejean
898187238f New message: focus_monitor 2013-06-28 15:16:56 +02:00
Bastien Dejean
dee3902b33 When shifting into manual mode nodes: transplant 2013-06-27 19:41:01 +02:00
Bastien Dejean
4e4d312ba5 New option for cancel: --all 2013-06-27 19:25:55 +02:00