Commit graph

98 commits

Author SHA1 Message Date
Bastien Dejean
73be87d104 Add the --names option to the query domain
Fixes #562.
2016-11-04 10:28:24 +01:00
Bastien Dejean
ccddf1231d Add node modifier: active 2016-09-22 22:30:38 +02:00
Bastien Dejean
5392a84a40 Provide a way to disable built-in pointer bindings
Fixes #490.
2016-05-21 21:31:14 +02:00
Bastien Dejean
319566e4af Accept an optional reference in all the selectors
Fixes #486.
2016-05-20 11:41:36 +02:00
Bastien Dejean
666af89919 Start with the focused node in @DESKTOP_SEL: 2016-05-20 11:10:19 +02:00
Bastien Dejean
3a27fb66ca Resolve node paths relative to the given reference 2016-05-19 21:26:20 +02:00
Bastien Dejean
cfc69985ea Catch more invalid paths in node_from_desc
For example, `query -N -n @/parent` will now fail.
2016-05-19 21:10:10 +02:00
Bastien Dejean
bc049c1d5f Make the *focused* modifiers less restrictive
Example: `bspc query -N -d '^3' -n .focused` will return the ID of the
focused node of the third desktop.
2016-05-18 21:29:32 +02:00
Bastien Dejean
e471298d0a Add node modifiers: {descendant,ancestor}_of
Fixes #473.
2016-05-09 16:55:31 +02:00
Bastien Dejean
cdc20bbe2a Don't try to skip nodes in query_node_ids_in
Trying to return non-overlapping sub-trees in query_node_ids_in isn't a
good idea after all, because some modifiers aren't compatible with the
idea: if *b* is a descendant of *a*, `a.hidden => b.hidden` is true,
but `a.!automatic => b.!automatic` is false.
2016-05-08 10:21:55 +02:00
Bastien Dejean
f50f1f9b21 Don't confine the DIR descriptor 2016-04-22 12:32:10 +02:00
Bastien Dejean
cd079d2c39 Don't confine the CYCLE_DIR descriptor
Fixes #212.
2016-04-20 21:04:15 +02:00
Bastien Dejean
be7376964c Add node descriptor: pointed
Fixes #456.
2016-04-19 20:49:22 +02:00
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
5d01b48a04 Remove hard-wired node DIR fallback 2016-04-11 17:58:05 +02:00
Bastien Dejean
74f78ccd17 Remove obsolete descriptor 2016-04-11 17:51:24 +02:00
Bastien Dejean
56b543ef2d Add getter for pointer_action<n> 2016-04-10 22:33:02 +02:00
Bastien Dejean
12edac86fa Reinstate built-in pointer bindings 2016-04-07 18:08:32 +02:00
Bastien Dejean
3e60b44c29 Only allow null nodes for the PATH descriptor
Fixes #434.
2016-03-27 10:48:57 +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
b098530201 Zero-pad printed IDs
It seems that people expect all IDs to have the same length (#361).

And the maximum possible ID is 0x1fffffff (cf. the X11 protocol).
2016-03-23 11:24:47 +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
1e3b13465b Fix handling of ID/name frictions
It seems that `resource_base_id` isn't the lower bound of the set of
possible IDs.
2016-03-20 10:38:11 +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
a0aa6dd1fa Make the window ID printf format consistent
Fixes #361.
2016-01-04 15:17:47 +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
28e4fe6e9b Start parsing modifiers after the last colon
Fixes #347.
2015-12-26 21:22:24 +01:00
Bastien Dejean
eb07d2fc06 Generalize window commands to nodes 2015-12-22 19:25:45 +01:00
Bastien Dejean
98e30c5fc2 Reject invalid modifiers 2015-11-29 18:57:52 +01:00
Bastien Dejean
8d7850a096 Remove non-significant characters from JSON output 2015-11-28 10:40:30 +01:00
Bastien Dejean
d3166dd399 Add *focused* modifier to desktops and monitors 2015-11-26 20:07:46 +01:00
Bastien Dejean
512e9044e3 Allow modifiers on every selector 2015-11-25 13:59:56 +01:00
Bastien Dejean
f758829169 Regularize the layer modifiers 2015-11-23 10:40:10 +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
1482ef007b Fix *[!]occupied* modifier 2015-11-17 11:35:40 +01:00
Bastien Dejean
b18cae7ab4 Use field designators when initializing structures 2015-11-17 11:18:21 +01:00
Bastien Dejean
c493835829 Prevent potential memory leak 2015-11-17 11:13:25 +01:00
Bastien Dejean
26cf449414 Make the modifier notation compact and uniform
We want to avoid irregular notations: STATES and FLAGS should translate
directly into modifiers.
2015-11-17 11:02:06 +01:00
Bastien Dejean
f28f33448f Make a clear distinction between states and flags 2015-11-05 14:00:49 +01:00
Bastien Dejean
26f3f45084 Add extensive documentation for the new modifiers 2015-10-27 21:48:19 +01:00
Bastien Dejean
65bc79f0c0 Add a few selector modifiers 2015-10-27 21:26:09 +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
Joseph Lansdowne
85f90c51f2 add new selector modifier: unfocused 2015-01-04 19:53:18 +00:00
Bastien Dejean
c49bc92d12 Use generic BSD 2-clause license
Fixes #176
2014-10-22 11:53:03 +02:00
Bastien Dejean
0a462d1246 Check if directional focus fallback matches 2014-07-24 21:52:34 +02:00
Bastien Dejean
4907ddc382 Handle NULL node ref. in node_matches 2014-07-18 18:59:16 +02:00
Bastien Dejean
da38f30c32 Don't return NULL nodes in node_from_desc 2014-03-13 21:57:59 +01:00
Bastien Dejean
da84c486ab Replace deprecated index function
http://pubs.opengroup.org/onlinepubs/009695399/functions/index.html
2014-03-13 21:30:34 +01:00