]> git.lizzy.rs Git - bspwm.git/log
bspwm.git
3 years agoDon't store the split direction's csq as a string
Emanuele Torre [Thu, 30 Jul 2020 01:04:30 +0000 (03:04 +0200)]
Don't store the split direction's csq as a string

3 years agoRevert "Escape shell chars in the erc arguments"
Bastien Dejean [Fri, 31 Jul 2020 07:45:59 +0000 (09:45 +0200)]
Revert "Escape shell chars in the erc arguments"

This reverts commit 7a7b17ba280ae0c37cac2fd0c1f309421c6f2a73.

3 years agoEscape shell characters in the erc arguments
Bastien Dejean [Thu, 30 Jul 2020 08:38:45 +0000 (10:38 +0200)]
Escape shell characters in the erc arguments

Since `eval "$4"` is frequently used within the external rules command,
we want to avoid the possibility of unwanted code execution.

Fixes #1162.
Closes #1161.

3 years agoRemove redundant tests
Bastien Dejean [Tue, 28 Jul 2020 16:28:44 +0000 (18:28 +0200)]
Remove redundant tests

3 years agoGeneralize a few node descriptors
Bastien Dejean [Tue, 28 Jul 2020 09:14:28 +0000 (11:14 +0200)]
Generalize a few node descriptors

- `next` and `prev` might now return any node in the context of a
  depth-first in-order tree traversal.
- `biggest`, `smallest` and `pointed` now return leaves instead of
  windows. In particular, `pointed` can now be used to get the id of a
  pointed receptacle.

Fixes #1113.

3 years agoPass a *run level* argument to `bspwmrc`
Bastien Dejean [Mon, 27 Jul 2020 16:36:08 +0000 (18:36 +0200)]
Pass a *run level* argument to `bspwmrc`

Fixes #1158.

3 years agoMake the example `bspwmrc`s restart friendly
SeerLite [Mon, 27 Jul 2020 04:31:41 +0000 (00:31 -0400)]
Make the example `bspwmrc`s restart friendly

3 years agoCatch descriptor-free incompatibilities in queries
Bastien Dejean [Sun, 26 Jul 2020 19:37:18 +0000 (21:37 +0200)]
Catch descriptor-free incompatibilities in queries

3 years agoHonor all the descriptor-free constraints
Bastien Dejean [Sun, 26 Jul 2020 19:19:37 +0000 (21:19 +0200)]
Honor all the descriptor-free constraints

Fixes #1094.

3 years agoRevert "Transfer sticky nodes in `move_client`"
Bastien Dejean [Sun, 26 Jul 2020 18:42:21 +0000 (20:42 +0200)]
Revert "Transfer sticky nodes in `move_client`"

This is unnecessary since we're transferring to the active desktop of
the destination monitor.

So #1098 should in fact be fixed by 5df311b12c06dca86f8e5a56ee522bd48d2178bc.

3 years agoHonor hidden nodes in `set_{floating,fullscreen}`
Bastien Dejean [Sun, 26 Jul 2020 18:28:03 +0000 (20:28 +0200)]
Honor hidden nodes in `set_{floating,fullscreen}`

Fixes #1110.

3 years agoReset some of the reference fields in query -{M,D}
Bastien Dejean [Sun, 26 Jul 2020 17:28:43 +0000 (19:28 +0200)]
Reset some of the reference fields in query -{M,D}

Fixes #1111.

3 years agoTransfer sticky nodes in `move_client`
Bastien Dejean [Sun, 26 Jul 2020 16:18:31 +0000 (18:18 +0200)]
Transfer sticky nodes in `move_client`

Fixes #1098.

3 years agoUpdate the monitor's sticky count on unlink/insert
Bastien Dejean [Sun, 26 Jul 2020 15:57:20 +0000 (17:57 +0200)]
Update the monitor's sticky count on unlink/insert

3 years agoDon't try to find the ancestors of NULL
Bastien Dejean [Sun, 26 Jul 2020 13:34:37 +0000 (15:34 +0200)]
Don't try to find the ancestors of NULL

Fixes #1089.

3 years agoEscape single asterisks
Emanuele Torre [Sun, 26 Jul 2020 12:35:20 +0000 (14:35 +0200)]
Escape single asterisks

3 years agoPort BSPWM to gcc10
Emanuele Torre [Wed, 27 May 2020 01:18:10 +0000 (03:18 +0200)]
Port BSPWM to gcc10

GCC10 enables -fno-common by default.
This patch allows building BSPWM with -fno-common enabled.

Fixes #1119.

3 years agoMove get_color_pixel() from helpers.h to bspwm.h
Emanuele Torre [Tue, 26 May 2020 21:17:59 +0000 (23:17 +0200)]
Move get_color_pixel() from helpers.h to bspwm.h

3 years agoFix a few typos
Emanuele Torre [Sat, 20 Jun 2020 03:46:38 +0000 (05:46 +0200)]
Fix a few typos

3 years agoAmend typo in manpage
Jason Nader [Sat, 30 May 2020 14:28:51 +0000 (23:28 +0900)]
Amend typo in manpage

3 years agoRemove dead subscribers early
Justinien Bouron [Mon, 25 May 2020 07:51:15 +0000 (00:51 -0700)]
Remove dead subscribers early

Fix bug in which "dead" subscribers would not be removed right away and would
consume resources *and* file descriptors which could lead to the bspwm process
running out of available file descriptors and not being able to accept new
incoming connections.

When a process subscribes to bspwm events (i.e. `bspc subscribe <event>`), bspwm
keeps some state about this subscriber such as the file descriptor in which to
write the events and which events are requested by the subscriber.

When a subscriber dies (i.e. the `bspc subscribe ...` process is killed) bspwm
does not know it right away. Instead, on the next event being logged, if bspwm
encounters an error when trying to write() into the file descriptor associated
to a subscriber bspwm will consider this subscriber dead and remove it from the
linked list (which will also close() the file descriptor of the subscriber).
This is done in the put_status() function defined in subscribe.c.

This means that bspwm keeps file descriptors on potentially closed streams for
some time.
Normally this is ok, because events are generated often (when focusing nodes,
switching desktop, etc ...), therefore those "dead" file descriptors are not
kept around for too long.
However, during a period of inactivity (i.e. the user is not actively using the
computer or never switching nodes or desktops) those file descriptors can be
kept for a long time.
This is especially problematic in the following scenario:
    1. User leaves the machine idle.
    2. A "churn" of subscribers happens, where subscribers come and go.
    3. Since the machine is idle, no events are happening and the file
       descriptor of all dead subscribers are not closed.
    4. bspwm consumes more and more file descriptors as new subscribers are
       created.
    5. At some point bspwm has too many opened file descriptors and cannot
       accepts new incoming connections. The accept() syscall in the mainloop
       fails (returning EMFILE) and bspwm is stuck in an infinite loop, not
       being able to serve new request. At this point bspwm needs to be killed
       and restarted.

While this could be deemed as unlikely (the maximum number of opened files being
1024 AFAIK (Arch Linux)), it turns out that this exact scenario can happen with
polybar (https://github.com/polybar/polybar) and the bspwm module. When a
laptop connected to an external monitor becomes idle, and the screen saver kicks
in, polybar periodically reloads itself (because of xrandr events) and therefore
periodically kill and re-create a subscriber. Since there is no activity on the
bspwm process, all dead instances of the polybar subscriber are not removed and
bspwm eventually runs out of file descriptors and gets stuck in the infinite
loop while consuming 100% cpu.
(Note: This is not a polybar issue, polybar does the right thing here).

The fix is as follows: In the main loop of bspwm, check for any dead subscribers
and remove them (if any). This is accomplished by a new function declared in
subscribe.h: prune_dead_subscribers().
prune_dead_subscribers() will iterate through the linked list of subscribers and
for each of them will try to call write() on their file descriptor with an empty
buffer (i.e. size == 0). If the write() fails (returns -1) then the subscriber
is declared dead and this function can remove it from the list and close the
associated file descriptor.

3 years agoFix inconsistent WM_CLASS field truncation
Matt Vollrath [Wed, 13 May 2020 20:32:41 +0000 (16:32 -0400)]
Fix inconsistent WM_CLASS field truncation

Fixes #1117

3 years agoAdd WM_NAME rule matching
Matt Vollrath [Tue, 12 May 2020 01:03:02 +0000 (21:03 -0400)]
Add WM_NAME rule matching

4 years agoFix parsing hidden field
Matt Vollrath [Fri, 15 May 2020 04:54:43 +0000 (00:54 -0400)]
Fix parsing hidden field

hidden was always set true if present, use the parsed value instead.

4 years agoAdd node modifiers: `horizontal`, `vertical`
tobias [Mon, 9 Mar 2020 17:48:56 +0000 (18:48 +0100)]
Add node modifiers: `horizontal`, `vertical`

4 years agoAdd node descriptor: `first_ancestor`
tobias [Mon, 9 Mar 2020 17:42:16 +0000 (18:42 +0100)]
Add node descriptor: `first_ancestor`

4 years agoAdd an example that uses intermediate consequences
Bastien Dejean [Mon, 3 Feb 2020 17:41:25 +0000 (18:41 +0100)]
Add an example that uses intermediate consequences

4 years agoAdd community information
Danny Colin [Sat, 1 Feb 2020 20:37:35 +0000 (15:37 -0500)]
Add community information

4 years agoPass `--tags` to `git describe`
Bastien Dejean [Mon, 26 Aug 2019 15:07:49 +0000 (17:07 +0200)]
Pass `--tags` to `git describe`

Fixes #1003.

4 years agoFix GCC warnings
Bastien Dejean [Mon, 19 Aug 2019 14:08:08 +0000 (16:08 +0200)]
Fix GCC warnings

4 years agobspc: Write failure messages to standard error
Bastien Dejean [Mon, 19 Aug 2019 07:42:27 +0000 (09:42 +0200)]
bspc: Write failure messages to standard error

Fixes #999.

4 years agoVersion 0.9.9
Bastien Dejean [Tue, 13 Aug 2019 15:27:55 +0000 (17:27 +0200)]
Version 0.9.9

4 years agoAllocate the right amount of arguments on restart
Bastien Dejean [Mon, 12 Aug 2019 11:45:50 +0000 (13:45 +0200)]
Allocate the right amount of arguments on restart

Fixes #995.

4 years agoHonor `single_monocle` in `set_hidden`
Bastien Dejean [Fri, 2 Aug 2019 10:18:22 +0000 (12:18 +0200)]
Honor `single_monocle` in `set_hidden`

Fixes #990.

4 years agoVersion 0.9.8
Bastien Dejean [Sat, 27 Jul 2019 12:56:47 +0000 (14:56 +0200)]
Version 0.9.8

4 years agoEnforce strict mode of jsmn.
Tobias Stoeckmann [Fri, 12 Jul 2019 18:40:39 +0000 (20:40 +0200)]
Enforce strict mode of jsmn.

If no strict mode of jsmn is enforced, then the correct amount of
json elements would have to be checked to avoid segmentation faults
on malformed state files:

$ echo '{ "focusedMonitorId" }' > malformed-state
$ bspwm -s malformed-state
Segmentation fault
$ _

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 years agoFix infinite loop in `find_closest_node`
Bastien Dejean [Thu, 6 Jun 2019 09:25:32 +0000 (11:25 +0200)]
Fix infinite loop in `find_closest_node`

If `ref->node == NULL` and `ref->desktop->root != NULL` (the reference
desktop contains hidden nodes or/and receptacles), then the ending
condition `n != ref->node` will never be true.

Fixes #977.

5 years agoApply removal adjustments for the spiral a. i. s.
Bastien Dejean [Sun, 12 May 2019 08:27:00 +0000 (10:27 +0200)]
Apply removal adjustments for the spiral a. i. s.

Fixes #966.

5 years agoAdded *marked* flag to report documentation
Xaver Hellauer [Sun, 28 Apr 2019 12:05:36 +0000 (14:05 +0200)]
Added *marked* flag to report documentation

5 years agoRely on the user layout to skip the presel fb
Bastien Dejean [Thu, 18 Apr 2019 15:58:48 +0000 (17:58 +0200)]
Rely on the user layout to skip the presel fb

Fixes #954.

5 years agoFix inconsistencies regarding the user layout
Bastien Dejean [Tue, 5 Mar 2019 08:45:31 +0000 (09:45 +0100)]
Fix inconsistencies regarding the user layout

Fixes #939.

5 years agoVersion 0.9.7
Bastien Dejean [Sun, 24 Feb 2019 08:22:29 +0000 (09:22 +0100)]
Version 0.9.7

5 years agoHonor single_monocle in make_desktop
Bastien Dejean [Tue, 19 Feb 2019 14:33:36 +0000 (15:33 +0100)]
Honor single_monocle in make_desktop

Fixes #929.

5 years agoMention a way to emulate `paddingless_monocle`
Bastien Dejean [Fri, 15 Feb 2019 14:34:36 +0000 (15:34 +0100)]
Mention a way to emulate `paddingless_monocle`

5 years agoVersion 0.9.6
Bastien Dejean [Wed, 13 Feb 2019 10:20:41 +0000 (11:20 +0100)]
Version 0.9.6

5 years agoAlternate auto scheme: Try to find a *full* split
Bastien Dejean [Mon, 11 Feb 2019 16:30:14 +0000 (17:30 +0100)]
Alternate auto scheme: Try to find a *full* split

Fixes #923.

5 years agoAdd .editorconfig
Cosmo Borsky [Tue, 29 Jan 2019 21:28:29 +0000 (16:28 -0500)]
Add .editorconfig

5 years agoHandle `single_monocle` more carefully
Bastien Dejean [Thu, 31 Jan 2019 19:29:10 +0000 (20:29 +0100)]
Handle `single_monocle` more carefully

Closes #919.
Fixes #730.

5 years agoAdd default value for ignore_ewmh_struts
Cosmo Borsky [Wed, 30 Jan 2019 02:38:32 +0000 (21:38 -0500)]
Add default value for ignore_ewmh_struts

5 years agoAdd wm command: --restart
Sam Bazley [Fri, 18 Jan 2019 21:15:20 +0000 (21:15 +0000)]
Add wm command: --restart

Closes #904.

5 years agoFix typo
Bastien Dejean [Tue, 29 Jan 2019 16:59:33 +0000 (17:59 +0100)]
Fix typo

5 years agoAutomatically shrink pseudo-tiled windows
Bastien Dejean [Tue, 29 Jan 2019 16:52:02 +0000 (17:52 +0100)]
Automatically shrink pseudo-tiled windows

Fixes #914.

5 years agoReflect single_monocle layout in report
Leonid Parfentiev [Sat, 26 Jan 2019 14:48:08 +0000 (17:48 +0300)]
Reflect single_monocle layout in report

Fixes #730.

5 years agoAdd setting: presel_feedback
Samuel Tribe [Fri, 23 Nov 2018 14:37:55 +0000 (14:37 +0000)]
Add setting: presel_feedback

5 years agoFix the ordering of the EWMH function calls
Bastien Dejean [Sat, 26 Jan 2019 16:20:54 +0000 (17:20 +0100)]
Fix the ordering of the EWMH function calls

First provide the new list of items, then declare the active item.

Fix #911.

5 years agoRemove unused field
Bastien Dejean [Fri, 25 Jan 2019 16:41:15 +0000 (17:41 +0100)]
Remove unused field

5 years agoAdd `ignore_ewmh_struts` config option
Cosmo Borsky [Fri, 25 Jan 2019 04:52:08 +0000 (23:52 -0500)]
Add `ignore_ewmh_struts` config option

Fixes #906.

5 years agoAdjust nearby ratios when moving a fence
Bastien Dejean [Mon, 21 Jan 2019 11:02:43 +0000 (12:02 +0100)]
Adjust nearby ratios when moving a fence

Fixes #902.

5 years agoRequire the paths to be absolute
Bastien Dejean [Tue, 15 Jan 2019 17:06:48 +0000 (18:06 +0100)]
Require the paths to be absolute

Closes #901.

5 years agoDon't change the client's layer in set_fullscreen
Bastien Dejean [Sun, 6 Jan 2019 11:18:31 +0000 (12:18 +0100)]
Don't change the client's layer in set_fullscreen

Fixes #897.

5 years agoUpdate jsmn library
Bastien Dejean [Thu, 3 Jan 2019 13:57:39 +0000 (14:57 +0100)]
Update jsmn library

5 years agoMake the focused and active modifiers coherent
Bastien Dejean [Fri, 14 Dec 2018 17:10:19 +0000 (18:10 +0100)]
Make the focused and active modifiers coherent

5 years agoAdd automatic insertion scheme: alternate
Bastien Dejean [Wed, 12 Dec 2018 21:35:38 +0000 (22:35 +0100)]
Add automatic insertion scheme: alternate

Fixes #876.
Fixes #878.

5 years agoAlways apply the window border color
Bastien Dejean [Thu, 6 Dec 2018 16:41:41 +0000 (17:41 +0100)]
Always apply the window border color

Fixes #887.

5 years agoDon't honor pointer_follows_focus in apply_layout
Bastien Dejean [Mon, 26 Nov 2018 11:00:17 +0000 (12:00 +0100)]
Don't honor pointer_follows_focus in apply_layout

The assumption here was that, when the focused node's geometry changes,
pointer_follows_focus needs to be taken care of. But we probably don't
want to do that when the pointer is still inside the node despite the
change of geometry. Of course this would also need to be taken care of
in {move,resize}_client, etc.

We chose the simpler approach here: only honor pointer_follows_focus in
focus_node.

Fixes #884.

5 years agoProperly handle sticky nodes in transfer_desktop
Bastien Dejean [Sun, 18 Nov 2018 21:04:55 +0000 (22:04 +0100)]
Properly handle sticky nodes in transfer_desktop

Fixes #865.
Closes #852.

5 years agoAdd setting: removal_adjustment
Bastien Dejean [Wed, 14 Nov 2018 18:17:22 +0000 (19:17 +0100)]
Add setting: removal_adjustment

Fixes #872.

5 years agoDon't crash when class_name is NULL
Bastien Dejean [Mon, 5 Nov 2018 09:29:17 +0000 (10:29 +0100)]
Don't crash when class_name is NULL

Fixes #870.

5 years agoFix potential buffer overflow
Bastien Dejean [Sun, 4 Nov 2018 10:12:39 +0000 (11:12 +0100)]
Fix potential buffer overflow

Fixes #869.

5 years agoMonocle: add cumulative padding settings
Bastien Dejean [Sat, 29 Sep 2018 16:57:05 +0000 (18:57 +0200)]
Monocle: add cumulative padding settings

Fixes #855.

5 years agoDon't try to activate an active desktop
Bastien Dejean [Sun, 9 Sep 2018 16:03:10 +0000 (18:03 +0200)]
Don't try to activate an active desktop

Fixes #844.

5 years agoBe consistent when naming headers
Bastien Dejean [Fri, 31 Aug 2018 09:50:03 +0000 (11:50 +0200)]
Be consistent when naming headers

5 years agoAdd new setting: automatic_scheme
Bastien Dejean [Fri, 31 Aug 2018 09:33:00 +0000 (11:33 +0200)]
Add new setting: automatic_scheme

Fixes #764.

5 years agoExtend the scope of initial_polarity
Bastien Dejean [Wed, 29 Aug 2018 14:53:55 +0000 (16:53 +0200)]
Extend the scope of initial_polarity

Of course, a better approach to avoid all the situations where the
vacant nodes (hidden or in the floating or fullscreen state) get in the
way, would be to take them out of the tree and maintain a list of such
nodes for each desktop.

Fixes #791.

5 years agoPass any input from presel window to window below
Aelspire [Thu, 3 May 2018 12:38:03 +0000 (14:38 +0200)]
Pass any input from presel window to window below

5 years agoMinor fixes to zsh completions
Junak [Mon, 27 Aug 2018 22:44:01 +0000 (01:44 +0300)]
Minor fixes to zsh completions

5 years agoRemove setting: cancel_birth_rotation
Bastien Dejean [Tue, 28 Aug 2018 18:08:19 +0000 (20:08 +0200)]
Remove setting: cancel_birth_rotation

Get rid of this concept once and for all. The layout that result from a
node removal needs to be predictable.

5 years agoAdd new setting: cancel_birth_rotation
Bastien Dejean [Sat, 25 Aug 2018 18:52:44 +0000 (20:52 +0200)]
Add new setting: cancel_birth_rotation

Fixes #832.

5 years agoPostpone events on windows of pending rules
Bastien Dejean [Sun, 22 Jul 2018 19:08:59 +0000 (21:08 +0200)]
Postpone events on windows of pending rules

Fixes #822.

5 years agoUse the focus history as a fallback
Bastien Dejean [Tue, 17 Jul 2018 09:48:21 +0000 (11:48 +0200)]
Use the focus history as a fallback

5 years agosingle_monocle: include receptacles
Bastien Dejean [Tue, 17 Jul 2018 09:26:34 +0000 (11:26 +0200)]
single_monocle: include receptacles

5 years agoGeneralize history_add to handle activation
Bastien Dejean [Wed, 11 Jul 2018 17:57:01 +0000 (19:57 +0200)]
Generalize history_add to handle activation

Fixes #819.

5 years agoAdd missing pipe
Bastien Dejean [Mon, 25 Jun 2018 16:16:38 +0000 (18:16 +0200)]
Add missing pipe

5 years agoAdd node descriptor: `smallest`
Bastien Dejean [Tue, 19 Jun 2018 08:14:09 +0000 (10:14 +0200)]
Add node descriptor: `smallest`

Fixes #815.

6 years agoNODE_SEL: Discard hashes inside a DESKTOP_SEL
Bastien Dejean [Tue, 15 May 2018 13:55:59 +0000 (15:55 +0200)]
NODE_SEL: Discard hashes inside a DESKTOP_SEL

6 years agoProperly handle node references
Bastien Dejean [Mon, 14 May 2018 18:47:48 +0000 (20:47 +0200)]
Properly handle node references

Fixes #804.

6 years agoMention that receptacles can be killed
Bastien Dejean [Wed, 25 Apr 2018 08:33:17 +0000 (10:33 +0200)]
Mention that receptacles can be killed

6 years agoVersion 0.9.5
Bastien Dejean [Sun, 8 Apr 2018 16:57:29 +0000 (18:57 +0200)]
Version 0.9.5

6 years agoPartially revert 0785b39
Bastien Dejean [Tue, 3 Apr 2018 15:51:16 +0000 (17:51 +0200)]
Partially revert 0785b39

Fixes #787.
Fixes #788.
Fixes #783.

6 years agoBetter names
Bastien Dejean [Tue, 3 Apr 2018 15:36:16 +0000 (17:36 +0200)]
Better names

6 years agoResize with relative coordinates by default
Bastien Dejean [Sun, 1 Apr 2018 08:59:17 +0000 (10:59 +0200)]
Resize with relative coordinates by default

Fixes #784.

6 years agoVersion 0.9.4
Bastien Dejean [Wed, 28 Mar 2018 08:34:36 +0000 (10:34 +0200)]
Version 0.9.4

6 years agoUse better defaults
Bastien Dejean [Wed, 28 Mar 2018 08:06:20 +0000 (10:06 +0200)]
Use better defaults

6 years agoAdd setting: ignore_ewmh_fullscreen
Bastien Dejean [Wed, 14 Mar 2018 09:45:02 +0000 (10:45 +0100)]
Add setting: ignore_ewmh_fullscreen

Fixes #343.
Fixes #643.

6 years agoFix missing domain in marked flag usage example
Bastien Dejean [Thu, 8 Mar 2018 11:02:00 +0000 (12:02 +0100)]
Fix missing domain in marked flag usage example

Fixes #778.

6 years agoExpand marked flag definition
Bastien Dejean [Wed, 7 Mar 2018 17:19:11 +0000 (18:19 +0100)]
Expand marked flag definition

6 years agoHandle mapping notify events
Bastien Dejean [Wed, 7 Mar 2018 14:13:06 +0000 (15:13 +0100)]
Handle mapping notify events

Fixes #766.

6 years agoAdd monitor/desktop/node descriptor: `any`
Bastien Dejean [Wed, 7 Mar 2018 13:14:48 +0000 (14:14 +0100)]
Add monitor/desktop/node descriptor: `any`

6 years agoPass selectors by reference
Bastien Dejean [Wed, 7 Mar 2018 12:48:20 +0000 (13:48 +0100)]
Pass selectors by reference

6 years agoFix distance/rank type
Bastien Dejean [Wed, 7 Mar 2018 11:05:36 +0000 (12:05 +0100)]
Fix distance/rank type