Commit graph

217 commits

Author SHA1 Message Date
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
Bastien Dejean
4bcb9886f9 Don't call update_current to set the input focus 2013-06-29 21:09:56 +02:00
Bastien Dejean
bc9e991541 Consolidate monitor_focus_fallback handling 2013-06-28 19:41:14 +02:00
Bastien Dejean
898187238f New message: focus_monitor 2013-06-28 15:16:56 +02:00
Bastien Dejean
216c2b7f68 Transplant within swap_nodes 2013-06-28 11:56:30 +02:00
Bastien Dejean
bbc9fa5662 Skip non tiled windows in find_biggest 2013-06-27 23:04:20 +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
Bastien Dejean
a6e90f472a Make split mode and direction local 2013-06-27 17:26:52 +02:00
Bastien Dejean
994235d172 Handle insertion at non focused nodes 2013-06-27 17:11:30 +02:00
Bastien Dejean
d2b3ebc459 Honor history_aware_focus for shift 2013-06-25 12:41:59 +02:00