Commit graph

62 commits

Author SHA1 Message Date
Bastien Dejean
83a54fea51 Restore/dump monitors and desktops pointers as IDs 2016-04-16 20:50:53 +02:00
Bastien Dejean
331cc9e2d5 Add node flag: hidden
Fixes #229.
2016-04-16 18:13:31 +02:00
Bastien Dejean
12edac86fa Reinstate built-in pointer bindings 2016-04-07 18:08:32 +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
ebad909ed1 Fail verbosely
Along the way, we also fixed the handling of the `*_padding`,
`window_gap` and `border_width` settings. The previous behavior was the
result of a bad decision (9fed780), as a response to #141. Many issues
followed: #143, #158, #260, etc. We now handle those settings as
intuitively as possible.

We also fixed a potential segfault in `cmd_node`, triggered by `bspc
node -d`[sic].

Fixes #402 #252.
2016-03-21 14:28:04 +01:00
Bastien Dejean
9ae96ebdcd Add IDs to desktops and monitors
There's no constraints on desktop and monitor names, therefore, using a
desktop or monitor name as descriptor is ambiguous.

We put an end to this ambiguity by introducing desktop and monitor IDs.

`bspc query -{M,D}` now yields IDs instead of names.

Fixes #397.
2016-03-16 15:15:27 +01:00
Bastien Dejean
2120dc366d Don't add a monitor without desktops 2016-02-23 21:16:46 +01:00
Bastien Dejean
dcc13f7e56 Skip unmapped windows in query_pointer
Fixes #353.
2015-12-31 19:08:35 +01:00
Bastien Dejean
2db4613ac2 Restore primary monitor in restore_tree 2015-12-31 12:34:24 +01:00
Bastien Dejean
18d90521f3 Don't try to restore the state from zero tokens
Fixes #352.
2015-12-31 12:06:59 +01:00
Bastien Dejean
eb07d2fc06 Generalize window commands to nodes 2015-12-22 19:25:45 +01:00
Steven Allen
e434521fc3 Avoid rare memory leak.
Technically, a user could pass invalid JSON with duplicate keys to
restore and trigger a memory leak.
2015-12-20 11:29:55 -08:00
Bastien Dejean
11ca847bf6 Fix false positives in keyeq 2015-12-13 20:46:12 +01:00
Bastien Dejean
0d985477c6 Fix off-by-one token pointer in restore_tree 2015-12-05 19:33:09 +01:00
Bastien Dejean
ad8c102fa5 Fix num_clients restore format 2015-11-22 22:01:30 +01:00
Bastien Dejean
5e9c8e068f Use JSON as the output format of query -T
It is now easy to access any attribute by piping the output of
`query -T` to a JSON extractor/filter.

E.g.:
	bspc query -T -d DESKTOP_SEL | jq -r .layout

And it also makes `restore -T` more robust.
2015-11-22 14:41:00 +01:00
Bastien Dejean
9c29c0892e Handle fullscreen state birth rotation
Fixes #319.
2015-11-19 15:08:54 +01:00
Bastien Dejean
e8ee82c3a4 Fix discrepancy between query and restore format
This was a regression introduced by f28f334.
2015-11-12 14:03:37 +01:00
Bastien Dejean
d98c3d17ae Document and homogenize subscriber events 2015-11-09 15:00:47 +01:00
Bastien Dejean
6fb04695d1 Restore the tiled rectangles of nodes and clients 2015-11-07 15:14:00 +01:00
Bastien Dejean
f28f33448f Make a clear distinction between states and flags 2015-11-05 14:00:49 +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
639763c906 Reinstate the motion recorder for FFP
Because many clients (e.g. termite) prevent us (maybe unknowingly) from
capturing motion events on their windows, we're forced to create a
window for this sole purpose.

Grabbing the pointer isn't an option, because it forces us to consider
some of the enter notify events we should be ignoring.
2015-06-12 22:05:22 +02:00
Bastien Dejean
36decdad62 Propagate FFP_MASK 2015-06-11 09:58:05 +02:00
Bastien Dejean
c49bc92d12 Use generic BSD 2-clause license
Fixes #176
2014-10-22 11:53:03 +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
7cbcc64e7d Fix *restore* regression introduced by c231e8c
The lines of the output of `query -T` are now indented using tabs.

Hence, `restore_tree`'s *level* variable is now equal to the number of tabs.
2014-01-19 14:58:32 +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
edcb1f9aec Show window instance names in the output of query -T 2014-01-04 11:07:20 +01:00
Bastien Dejean
0073eff5dc Simply treat transient windows as floating windows
http://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR
2013-12-29 19:53:42 +01:00
Bastien Dejean
b972f0abbd Provide padding settings for monitors
If a padding space is requested for a status bar, it concerns the
underlying monitor.
2013-12-28 10:30:49 +01:00
Bastien Dejean
6561ab1c48 Refresh header dependencies 2013-12-28 00:09:10 +01:00
Bastien Dejean
48e0043f84 Implement the pseudo-tiled window state 2013-12-27 14:23:25 +01:00
Bastien Dejean
e0b6cd3cd4 *Frames* are unnecessary
The padding settings are sufficient for this.
2013-12-27 10:43:37 +01:00
Bastien Dejean
471fd2c7fc Turn {top,right,bottom,left}_padding into desktop settings 2013-12-25 10:06:02 +01:00
Bastien Dejean
5e037978dd Don't reset *num_clients* in *restore_tree* 2013-12-19 18:52:59 +01:00
Bastien Dejean
948b8046f7 Externalize rules 2013-11-05 20:09:24 +01:00
Bastien Dejean
de94ecb267 Add a floating state to desktops
Modifying the floating state of a desktop doesn't change the floating
state of the existing windows.
2013-11-03 23:01:31 +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
e89143b919 Refresh header dependencies 2013-10-11 10:07:51 +02:00
Bastien Dejean
6bc128554e Implement frames 2013-10-10 18:24:21 +02:00
Bastien Dejean
15695c066b Add copyright header 2013-10-08 21:05:56 +02:00
Bastien Dejean
35e9927ed9 Make sticky windows stick to their monitor 2013-10-06 16:58:02 +02:00
Bastien Dejean
86def769f7 Fix clang warnings 2013-10-06 10:50:30 +02:00
Bastien Dejean
a75979be62 Implement tags 2013-10-05 22:32:40 +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