Commit graph

68 commits

Author SHA1 Message Date
Bastien Dejean
12edac86fa Reinstate built-in pointer bindings 2016-04-07 18:08:32 +02:00
Bastien Dejean
bfffe8b1c7 Transfer nodes moved via configure requests
Fixes #431.
2016-03-26 14:25:40 +01: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
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
7e5c4f25c3 Initially center the pointer on mon
Fixes #407.
2016-02-26 15:28:42 +01:00
Bastien Dejean
c895ef0f0e Extract geometric functions from helpers.c 2016-02-26 14:22:03 +01:00
Bastien Dejean
87a89ffeac Don't change the index of the primary monitor 2016-02-24 10:55:24 +01:00
Bastien Dejean
dbaa2b377a Sort monitors by natural visual hierarchy
Fixes #405.
2016-02-23 21:19:12 +01:00
Bastien Dejean
b973353a7d Add event: monitor_swap 2016-02-01 11:46:03 +01:00
Bastien Dejean
a8c2468968 Add the --rectangle command the *monitor* domain 2015-12-30 11:36:14 +01:00
Bastien Dejean
4ca21ccb46 Handle preselection feedbacks in query_pointer
Fixes #341.
2015-12-23 22:21:43 +01:00
Bastien Dejean
eb07d2fc06 Generalize window commands to nodes 2015-12-22 19:25:45 +01:00
Campbell Barton
bcbee11cf1 Fix uninitialized member use
update_root is checking m->root with uninitialized memory.
2015-12-15 01:46:31 +11:00
Bastien Dejean
d3166dd399 Add *focused* modifier to desktops and monitors 2015-11-26 20:07:46 +01:00
Bastien Dejean
12c36bc9e2 Consolidate update_monitors
The two functions are mostly equivalent but the short version is more robust:
6d858a0fdb

Thanks to Jurica Vukadin who submitted this patch.

Fixes #321.
2015-11-22 15:03:18 +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
d98c3d17ae Document and homogenize subscriber events 2015-11-09 15:00:47 +01:00
Bastien Dejean
f28f33448f Make a clear distinction between states and flags 2015-11-05 14:00:49 +01:00
Bastien Dejean
2f93d90d3d Add class and instance names to bspwm's windows 2015-10-31 22:19:17 +01:00
Bastien Dejean
dccb5e7be2 Add a few subscriber events 2015-08-01 14:37:15 +02: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
56895ab9ab Implement focus_follows_pointer via enter notify events
The implementation based on a motion recorder had bad side effects.
2015-06-06 18:25:20 +02:00
Bastien Dejean
9dd581faaf Allow subscribers to choose what they listen to 2015-05-09 21:12:19 +02:00
Bastien Dejean
a172aea618 Rewrite the handling of overlapping monitors 2015-04-27 11:03:08 +02:00
Bastien Dejean
f3ca2aac29 Don't try to merge a monitor into NULL 2015-04-26 14:37:30 +02:00
Bastien Dejean
c49bc92d12 Use generic BSD 2-clause license
Fixes #176
2014-10-22 11:53:03 +02:00
Bastien Dejean
b7fa492602 Add setting: pointer_follows_focus 2014-10-22 11:24:51 +02:00
Bastien Dejean
baca7122ab Merge into existing monitors when rectangles are equal 2014-05-05 20:48:45 +02:00
Bastien Dejean
9cbb95c31c Pluralize setting 2014-05-05 11:58:12 +02:00
Bastien Dejean
d2abc2d20e New setting: merge_overlapping_monitors 2014-05-05 11:54:49 +02:00
Bastien Dejean
aca232b23c Don't remove unplugged monitors by default 2014-05-05 11:46:55 +02:00
Bastien Dejean
ab6b6c5e36 Use proper function names 2014-05-05 11:35:06 +02:00
Bastien Dejean
f04da55ab6 New setting: persistent_monitors 2014-04-29 11:50:09 +02:00
Bastien Dejean
764b428d38 The list of monitors must start with the primary monitor 2014-02-07 11:58:11 +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
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
471fd2c7fc Turn {top,right,bottom,left}_padding into desktop settings 2013-12-25 10:06:02 +01:00
Bastien Dejean
7df593f4e8 Handle clients outside of every monitors 2013-11-28 11:32:20 +01:00
Bastien Dejean
1cc2eed330 New setting: remove_disabled_monitor 2013-11-10 12:07:14 +01:00
Steven Allen
c8de8931e3 Handle partially off-screen windows.
If a window is partially off-screen, preserve the off-screen regions.
2013-10-27 10:53:37 -04: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
Steven Allen
344ab2d269 Relatively translate floating clients to the correct monitor 2013-10-26 15:36:05 -04:00
Bastien Dejean
ae1ed3b795 New setting: fit_monitor 2013-10-23 22:20:34 +02:00
Bastien Dejean
dc805f9a6a Consolidate fit_monitor 2013-10-20 20:33:34 +02:00
Bastien Dejean
229d5797dd Simplify fit_monitor 2013-10-20 14:39:01 +02:00
Bastien Dejean
d396210f41 Revert "Initially center floating windows on their monitor"
In fact we can't do that, otherwise floating windows that do specify non
silly initial coordinates would be ignored.
2013-10-19 22:01:40 +02:00
Bastien Dejean
114881d958 Initially center floating windows on their monitor
And simplify fit_monitor along the way.
2013-10-19 21:31:34 +02:00