Commit graph

227 commits

Author SHA1 Message Date
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
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
6110b14279 Refocus the focused node in transplant_node 2013-07-12 23:17:32 +02:00
Bastien Dejean
83a17bb63f Don't alter focus when transplanting nodes 2013-07-12 22:37:57 +02:00
Bastien Dejean
9e791903f9 Use the standard abs function 2013-07-12 22:27:09 +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
525c6409e6 Revert "Don't try to focus the focused node"
This reverts commit 92292f834f.

The `n == mon->desk->focus` appears after remove_node, so we can't
return in this case in `focus_node` after all.
2013-06-29 22:05:51 +02:00
Bastien Dejean
c05090ba71 Add missing return statement 2013-06-29 21:50:27 +02:00
Bastien Dejean
92292f834f Don't try to focus the focused node 2013-06-29 21:45:21 +02:00