Commit graph

40 commits

Author SHA1 Message Date
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
eb07d2fc06 Generalize window commands to nodes 2015-12-22 19:25:45 +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
fc340110e5 Always update EWMH desktop names in monitor -d 2015-10-19 14:52:30 +02:00
hasq
1e2a23f308 fix: update ewhm wm desktops after adding desktop 2015-10-11 16:28:50 +03:00
Bastien Dejean
dccb5e7be2 Add a few subscriber events 2015-08-01 14:37:15 +02:00
Bastien Dejean
9dd581faaf Allow subscribers to choose what they listen to 2015-05-09 21:12:19 +02:00
Bastien Dejean
c49bc92d12 Use generic BSD 2-clause license
Fixes #176
2014-10-22 11:53:03 +02:00
Bastien Dejean
549507db24 Update current EWMH desktop when removing desktops
Because `focus_desktop` will not do it in this case.
2014-08-10 19:34:56 +02:00
Bastien Dejean
aebb6713b4 Provide the layout of the focused desk. of every monitor 2014-07-19 10:32:04 +02:00
Bastien Dejean
85d5b015b1 Reset desktop settings via monitor -d 2014-05-09 20:32:15 +02:00
Bastien Dejean
9fed780fb9 Set the default value of border widths and window gaps via config 2014-05-06 18:24:25 +02: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
471fd2c7fc Turn {top,right,bottom,left}_padding into desktop settings 2013-12-25 10:06:02 +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
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
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
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
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
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
a76c52e3d7 Rename, add or remove desktops with monitor -d 2013-10-01 23:14:57 +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
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
e60e87b12d Cosmetic improvements 2013-09-23 10:40:53 +02:00
Bastien Dejean
80caab4445 Make sure strings are null-terminated 2013-09-21 12:39:59 +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