Commit Graph

193 Commits

Author SHA1 Message Date
033cad47bf build: update to Zig 0.12 2024-05-20 11:35:36 +02:00
bed50f0dd2 command/swap: fix cursor warp on focus change 2024-05-14 23:37:10 +02:00
5fbf174c36 input: prevent duplicate input configs 2024-04-23 22:38:18 +10:00
3e306ecfbf river: raise the file descriptor limit 2024-04-08 16:24:51 +02:00
12de175e11 command/map: add note about upstream xkbcommon fix 2024-03-24 11:46:07 +01:00
b77b42f0d6 command/focus-view: add -skip-floating 2024-03-22 12:37:18 +01:00
aadb92dc0b Layout: eliminate "self" naming convention 2024-03-14 12:02:32 +01:00
4e48d68485 View: restore to previous output on reconnect 2024-03-14 11:07:15 +01:00
d71bebc032 command/attach-modes: above and below options 2024-03-05 17:53:16 +01:00
0cb7c49cc3 command/input: add map-to-output 2024-02-23 12:22:42 +01:00
9b2d99fa79 rules: fix assertion failure
If a view that is currently being destroyed is matched by a newly added
rule river crashes due to an assertion failure.

Fix this and add another assertion to make this precondition more
visible to the users of RuleList.match().
2024-02-21 13:37:39 +01:00
b34e1c6ebd command/map: remove references to locked mods
These have never created functional mappings as far as I'm aware.
2024-02-19 18:23:17 +01:00
a7b174ccf4 command/input: cleanup memory manangement a bit 2024-02-19 18:07:56 +01:00
931b6268e7 command/input: support globs 2024-02-19 18:07:45 +01:00
0cae415a93 refactor input configuration 2024-02-14 14:54:36 +01:00
93b8bbc2fd command/zoom: always warp cursor if configured
Focus may not actually change here so seat.focus() may not automatically
warp the cursor.  Nevertheless, a cursor warp seems to be what users
expect with `set-cursor-warp on-focus` configured, especially in
combination with focus-follows-cursor.
2024-02-10 12:00:14 +01:00
69a51cadb4 attach-mode: code/documentation style tweaks 2024-01-13 12:36:20 -06:00
6a71fc65b0 attach-mode: implement after <N> 2024-01-13 12:29:09 -06:00
dd9933b6a1 keyboard-groups: use globber for identifier matching 2024-01-07 12:37:03 -06:00
540ca043df Keyboard: fix mapping XF86ScreenSaver 2024-01-06 20:36:53 -06:00
927dceb071 keyboard: add the ability to load layout from file 2023-11-09 13:23:07 +01:00
c4fe1e1a3f rules: rename "tag" action to "tags"
This rule action accepts and assigns a set of 32 tags represented as a
32 bit integer just like all of river's other commands handling tags.

Using the singular here is potentially misleading and is also
inconsistent with set-view-tags, etc. which all use the plural.

Sorry about the breaking change for those who use master branch, ideally
I would have caught this before merging but at least I noticed before a
release.

This commit also does a bit of internal refactoring/cleanup of the rules
system.
2023-11-08 11:33:27 +01:00
2b463c9e4d river: add fullscreen rule
This commit adds a fullscreen rule for configuring
whether the view should be drawn fullscreen on start up.

The actions "fullscreen" and "no-fullscreen" map to the two
possible state of a view and semantically operate on the same
rule list. The behavior of adding, deleting and listing rules
follows that of float and ssd.
2023-11-08 00:46:56 -05:00
a0ea456ab2 river: add position and dimensions rules
This commit adds position and dimensions rules for configuring
the initial position and dimensions of views.

When a view is not matched by any position rules, it is centered
in the avaliable output space matching the current behavior. If
the provided position rule places the view outside of the output,
the view's position is clamped to the output bounds (with respect
to borders).

When a view is not matched by any dimensions rules, no default
dimensions is set by the server. If the provided dimensions rule
exceeds the minimum or maximum width/height constraints of the view,
the view's width/height is clamped to the constraints.

Position and dimensions rules have no effect if a view is started
fullscreen or is not floating. A view must be matched by a float
rule in order for them to take effect.
2023-11-08 00:46:55 -05:00
bf4154007d river: add outputs rule 2023-10-19 12:58:11 +02:00
206bb2e713 river: make RuleList return deleted items 2023-10-19 01:21:52 +02:00
d73ef51c89 riverctl: rule-{add,del}: reorder parameters
Previous order was (action, conditions, action argument), current is
(conditions, action, action argument). The old one was an expansion of
(action, conditions), which itself most likely came from the separate
<action>-filter-add commands. On the other hand, the new order keeps
action and its argument together and is in line with the logical flow
(check conditions, apply action).

On shell completions: only bash absolutely needed to be updated. fish
and zsh slightly misbehave regardless of the order.
2023-10-16 17:04:40 +00:00
2e586c7061 build: update to Zig 0.11.0 2023-10-16 16:27:03 +02:00
4726a6b0f1 Root: migrate {all,active}_outputs to wl.list
As discussed with ifreund on irc. This avoids extra allocation in case
of all_outputs and confusion in case of active_outputs (because with the
Output embedded in the Node, i thought its value was copied instead of
its pointer).
2023-08-13 11:10:46 +00:00
57186fced3 Root: rename field outputs to active_outputs
Although this list only including active outputs was already documented,
making this explicit in its name reduces confusion and debugging
overhead.
2023-08-13 11:06:25 +00:00
bbd21c1637 river: update some comments
Mostly stuff not reflecting renames, plus a few if-then comma errors i
noticed.
2023-08-03 10:52:16 +00:00
c16628c7f5 river: fix spatial direction focusing / swapping 2023-07-11 01:11:40 +02:00
b35d779122 river: focus-view and swap by spatial direction 2023-07-09 23:20:06 +02:00
5ce2ca1bc0 river: fix crash when trying to add tag rule without tag argument 2023-07-02 19:21:52 +02:00
0b142bd16b river: add tags rule 2023-06-28 15:38:32 +02:00
a98de941d0 river: change order of colums in list-rules command
This will make it easier to extend the command later for new rules
2023-06-27 10:47:44 +02:00
9b5ea39580 river: allow settings child type of RuleList 2023-06-27 10:44:28 +02:00
b369815070 command/send-to-output: add -current-tags flag 2023-03-25 14:32:31 +01:00
b2b2c9ed13 river: add rules system
This is a breaking change and replaces the previous
csd-filter-add/remove and float-filter-add/remove commands.

See the riverctl(1) man page for documentation on the new system.
2023-03-12 16:44:19 +01:00
05eac54b07 xdg-decoration: clean up implementation
We now send some protocol errors that wlroots 0.16 is missing [1].
This also allows us to access the xdg decoration from a view, which will
be necessary for some future changes.

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4051
2023-03-10 18:49:30 +01:00
83fe764fcd View: only send configures through transactions
This reduces the number of separate configure events sent to clients
through better batching and is also more correct.
2023-03-01 20:44:13 +01:00
bf759c7c57 View: clamp to output on exiting float/fullscreen 2023-03-01 17:13:14 +01:00
50513390ce View: move borders state to State struct
This state affects rendering, so it should pass through the transaction
system like the rest.
2023-03-01 16:12:27 +01:00
6411c71151 Root: centralize focus(null) calls in applyPending() 2023-03-01 10:49:44 +01:00
07154720fa csd-filter-add/remove: add missing applyPending()
A transaction is now necessary to update border state.
2023-02-28 23:00:02 +01:00
8cb5ca9041 river: fix various fullscreen related bugs 2023-02-28 22:56:12 +01:00
be4330288d river: rework core data structures & transactions 2023-02-28 18:28:17 +01:00
a545a06c5b View: implement borders with scene graph 2023-02-28 14:55:58 +01:00
f4a8d6dcc9 Output: use separate scene trees for layers 2023-02-28 14:55:58 +01:00
4f0ce8fceb render: use wlr_scene to render views 2023-02-28 14:55:58 +01:00