Commit graph

236 commits

Author SHA1 Message Date
Bastien Dejean
dc98ea2cf1 Fix vacant state propagation target in insert_node 2013-11-16 21:53:03 +01:00
Bastien Dejean
a50f05fb34 Add missing newline in PRINTF 2013-11-16 16:49:50 +01:00
Bastien Dejean
c989aa7efc Merge translate_position and translate_client
- Expand `underlying_monitor` into `monitor_from_client` to avoid
  passing a NULL pointer to `translate_client`.
- Remove the `fit_monitor` setting (use the `--center` rule effect
  instead).
- Don't remap a window in it's last location (node invisibility would be
  the proper way to do this).
- Call `translate_client` after configure requests.
2013-10-27 11:25:34 +01:00
Bastien Dejean
c3e8de4ad5 Revert "Keep a focused sticky window focused"
This reverts commit 887bad7707.
2013-10-24 22:05:06 +02:00
Bastien Dejean
ae1ed3b795 New setting: fit_monitor 2013-10-23 22:20:34 +02:00
Bastien Dejean
f05adfde8f Fix circulate_leaves 2013-10-21 19:03:10 +02:00
Bastien Dejean
dc805f9a6a Consolidate fit_monitor 2013-10-20 20:33:34 +02:00
Bastien Dejean
dc575c74b8 A fullscreen window can't be unfocused 2013-10-19 17:52:29 +02:00
Bastien Dejean
6c51d8e3da Merge stack and stack_under 2013-10-19 17:46:28 +02:00
Bastien Dejean
887bad7707 Keep a focused sticky window focused 2013-10-19 11:30:54 +02: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
fc041e8ba1 Remove obsolete chunk of code 2013-10-10 18:25:34 +02:00
Bastien Dejean
6bc128554e Implement frames 2013-10-10 18:24:21 +02:00
Bastien Dejean
95da6eaa27 Always update null focus pointer on insertion 2013-10-09 14:46:32 +02:00
Bastien Dejean
98c2b6c1e5 Fix clang warnings 2013-10-08 23:14:06 +02:00
Bastien Dejean
15695c066b Add copyright header 2013-10-08 21:05:56 +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
c5d4c6577d Handle _NET_WM_STATE more carefully
After all, it seems (see spectrwm) that the window manager should
maintain that property.
2013-10-07 11:41:54 +02:00
Bastien Dejean
0d1ad5177e Consider the target monitor, not the focused one 2013-10-06 18:50:15 +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
a7b42fad6e A vacant node can be visible 2013-10-06 10:20:37 +02:00
Bastien Dejean
a75979be62 Implement tags 2013-10-05 22:32:40 +02:00
Bastien Dejean
d653f1cb70 Use consistent function names 2013-10-02 11:01:21 +02:00
Bastien Dejean
58f7e5656a Consolidate transfer_node 2013-10-02 10:50:29 +02:00
Bastien Dejean
8f95e5102f Update node coordinates after swap/transplant 2013-10-01 20:45:27 +02:00
Bastien Dejean
c6ceca7683 Support _NET_WM_STATE_STICKY client message 2013-10-01 19:34:38 +02:00
Bastien Dejean
ce25529e5c Implement sticky windows 2013-10-01 18:04:18 +02:00
Bastien Dejean
f2a578de2b Make the window border width a desktop setting 2013-10-01 14:15:50 +02:00
Bastien Dejean
399b98345b Maintain the fullscreen state whenever possible 2013-10-01 11:35:14 +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
30eb9598b8 Extract pointer functions from events.c 2013-09-25 18:00:01 +02:00
Bastien Dejean
c026b3baa1 New setting: growth_factor 2013-09-23 10:53:21 +02:00
Bastien Dejean
80caab4445 Make sure strings are null-terminated 2013-09-21 12:39:59 +02:00
Bastien Dejean
0d1a111432 Clear input focus when focusing a NULL node 2013-09-20 21:13:13 +02:00
Bastien Dejean
3dda8e7f6f Move a few functions from tree to desktop/monitor 2013-09-20 11:57:09 +02:00
Bastien Dejean
85f67b2164 Remove a few useless header inclusion via deheader 2013-09-19 15:38:22 +02:00
Bastien Dejean
d168e919e3 Split types.c into {monitor,desktop,history}.c 2013-09-19 15:02:49 +02:00
Bastien Dejean
a0b9199df5 Stack in terms of relative actions
This rewrite is based on a TODO comment for the *stack_refresh*
function of *awesome*:
    It might be worth stopping to restack everyone and only stack `c'
    relatively to the first matching in the list.

And on the concept of relative stacking (via XDG_CONFIG_WINDOW_SIBLING).

Additionally the `adaptative_raise` setting was removed because it
became obsolete when the choice was made of not raising windows when
focusing via `focus_follows_pointer`.

Windows of type *desktop* are now supported (but not managed).
2013-09-12 16:26:01 +02:00
Bastien Dejean
758f5e6392 *window_gap* is now a desktop setting
The *config* command was generalized to handle desktop and monitor
settings.
2013-09-11 21:19:59 +02:00
Bastien Dejean
111680a48b Add a --rotate option to the window command 2013-08-27 23:48:50 +02:00
Bastien Dejean
7c07fc4be3 Don't try to transplant a node on itself 2013-08-12 23:22:48 +02:00
Bastien Dejean
2cee7ad3a9 Fail when there's no edge in all cases 2013-08-10 19:37:49 +02:00
Bastien Dejean
de1aa71a37 Fix potential leak and null pointer dereference 2013-07-20 21:22:26 +02:00
Bastien Dejean
7606b0bb72 Add new selector modifiers: urgent and nonurgent 2013-07-19 10:13:22 +02:00
Steven Allen
a61f4a32ab Add mode modifier
Allows selecting windows based on their mode (manual/automatic).  This
is useful for duplicating the old shift-can-be-transplant behavior.

    # Usage: squish DIR
    squish() {
        dir=$1
        bspc window -w ${dir}.manual || bspc window -s ${dir}
    }
2013-07-14 15:48:08 -04:00
Bastien Dejean
1ec141fecf Don't skip matching monitors 2013-07-14 11:09:17 +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