Commit Graph

148 Commits

Author SHA1 Message Date
Isaac Freund
8cb5ca9041
river: fix various fullscreen related bugs 2023-02-28 22:56:12 +01:00
Isaac Freund
be4330288d
river: rework core data structures & transactions 2023-02-28 18:28:17 +01:00
Isaac Freund
a545a06c5b
View: implement borders with scene graph 2023-02-28 14:55:58 +01:00
Isaac Freund
f4a8d6dcc9
Output: use separate scene trees for layers 2023-02-28 14:55:58 +01:00
Isaac Freund
4f0ce8fceb
render: use wlr_scene to render views 2023-02-28 14:55:58 +01:00
Isaac Freund
168756cbe8
render: remove damage tracking
This will be handled by wlr_scene shortly.
2023-02-28 14:55:58 +01:00
Isaac Freund
84abdfaced
command/layout: fix a memory leak 2023-01-12 15:35:31 +01:00
Isaac Freund
09f3f141ae
deps: update to Zig 0.10 2023-01-08 16:21:42 +01:00
MaxVerevkin
030f7efd4f
render: premultiply alpha for user-provided colors
The wlroots rendering API expects colors to be provided with
premultipled alpha but we currently do not parse them as such. This
causes blending with e.g. a transparent border color to be very broken.
2023-01-06 17:14:52 +01:00
alex
86ac0ffd0b river: fix bug in snap down / right
The calculation of view.pending.box.x for snap right should be based on
output_width (not output_height).

The inverse applies to view.pending.box.y for snap down.
2023-01-06 15:19:43 +01:00
Isaac Freund
39104ae9e3
command/spawn-tagmask: apply globally
Currently the spawn-tagmask applies to the currently focused output.
This however means that it is lost if the monitor is unplugged and makes
it hard to set for all outputs.

Change this to make the command apply to all outputs.

This is a breaking change.
2023-01-02 00:58:25 +01:00
Isaac Freund
6a028639b8
Config: use a single xkb keymap for all keyboards
This is nice simplification and allows us to abort startup if the
default xkb configuration (perhaps influenced by XKB_DEFAULT_*
environment variables) is invalid.
2022-12-30 23:20:02 +01:00
Leon Henrik Plickat
5d4c2f2fbd river: fix resize command
In 489a49735 the view.move() call, which is used to keep the view centered after
a resize, was accidentally removed.
2022-12-29 14:56:06 +01:00
Isaac Freund
e18d0d5e1c
flags: automatically prepend '-'
This makes the usage a bit cleaner as the results of the parsing may be
accessed with e.g. ret.flags.version instead of ret.flags.@"-version".
2022-12-28 22:11:14 +01:00
Isaac Freund
2be9ac05d6
command/map: use flags.zig, cleanup 2022-12-28 21:56:42 +01:00
Isaac Freund
0cb6b3f81d
command/keyboard-layout: use flags.zig, cleanup 2022-12-28 20:21:23 +01:00
Leon Henrik Plickat
ad1dbb1180
river: add keyboard-layout command
This allows switching river's keyboard layout at runtime.
2022-12-28 20:20:36 +01:00
Isaac Freund
3141940efb
map-pointer: minor fixes and cleanups 2022-11-25 14:06:31 +01:00
Alexander Courtis
cacc986166
map-pointer: allow running arbitrary commands 2022-11-25 14:05:36 +01:00
tiosgz
49efbfe046
session-lock: handle output unplugging better 2022-11-13 16:45:18 +01:00
Isaac Freund
489a49735a
river: update to wlroots 0.16 2022-11-13 16:16:07 +01:00
Isaac Freund
e35c147cd5
river: refactor keyboard groups implementation
This reduces the impact of keyboard groups on the Keyboard.zig
implementation and otherwise improves consistency with patterns used
elsewhere in rivers code.

There are also two small changes to the riverctl interface:

- keyboard-group-add-keyboard is renamed to keyboard-group-add
- keyboard-group-remove is added to support removing keyboards from a
group.
2022-09-18 15:53:45 +02:00
Leon Henrik Plickat
01f49bbbc1 river: add keyboard groups 2022-09-12 04:12:21 +02:00
Leon Henrik Plickat
844ffce037
river-layout: add user_command_tags event
It is not guaranteed that the next layout_demand event after a user_command
event has the same active tags (for example when there are no views visible).
As an example, a user could trigger a user_command while no views are visible,
then switch to a different tag set which has active views. The active tags of
the previous layout_demand may also be different.

Therefore it is impossible to correctly implement a layout generator which has
user commands apply only to the currently active tag set, which is solved by
this patch.
2022-08-16 13:40:07 +02:00
Isaac Freund
416fdc8d06
layout: only arrange on user command if layout is active 2022-08-15 15:51:40 +02:00
Isaac Freund
1a9cba2aa9
river: fix SIGPIPE handling, cleanup fork/execve
Installing an empty handler does not have the same effect as using
SIG_IGN as the failing write syscall will not return EPIPE.
2022-08-11 12:02:30 +02:00
Isaac Freund
5cce49095a
Seat: refactor InputDevice handling
- The lifetimes of the Keyboard and Switch structs are now directly
tied to the corresponding InputDevice, which has become a field of
those structs.

- Seat capabilities are now properly updated on removing a keyboard.

These changes align with input device refactoring in upstream wlroots
which will make updating to easier 0.16.0.
2022-06-21 16:25:37 +02:00
Isaac Freund
d657dc791b
river-status: add mode event to seat status
This allows clients such as a status bar to display the currently active
mode.
2022-06-01 00:15:09 +02:00
Jackson Abascal
8da2de3738
input: fix typo in natural-scroll 2022-04-30 12:26:48 +02:00
Peter Kaplan
44aaee3a51 command/map: layout-pinned mappings
e.g. `riverctl map -layout 0 normal Super Y spawn foot`

When this mapping is checked against a pressed key, layout 0 will be used to translate the pressed key instead of the currently active layout.

The number denotes to an index of the layouts set with
`XKB_DEFAULT_LAYOUT`.
2022-04-27 18:31:08 +02:00
Peter Kaplan
a8491eb13e command/hide-cursor: fix crash on missing option 2022-04-14 20:39:35 +02:00
Duncan Overbruck
0b8758a422
Cursor: Add a hide-cursor command
From the riverctl.1 man page:

*hide-cursor* *timeout* _timeout_
    Hide the cursor if it wasn't moved in the last _timeout_
    milliseconds until it is moved again.
    The default value is 0, which disables automatically hiding the
    cursor. Show the cursor again on any movement.

*hide-cursor* *when-typing* *enabled*|*disabled*
    Hide the cursor when pressing any non-modifier key. Show the cursor
    again on any movement.
2022-04-14 13:37:31 +02:00
Peter Kaplan
60fdefc3fd
input: add map-switch/unmap-switch commands
This allows running a command on a laptop's lid being opened/closed
or a tablet's button/switch being pressed/toggled.
2022-04-14 12:49:47 +02:00
Hugo Machet
89433073d6 command: Remove allocator arg 2022-02-08 13:53:52 +01:00
Hugo Machet
da59632cea code: Cleanup use of std library for consistancy 2022-02-08 12:02:05 +01:00
Hugo Machet
995ae99be5 Mode: Use ArrayListUnmanaged to save memory 2022-02-08 11:56:24 +01:00
pmkap
ca47b8a54e
command: allow targeting outputs by name
This extends focus-output and send-to-output to allow targeting
outputs by name instead of relative position.
2022-02-06 15:41:40 +01:00
Isaac Freund
79d7775a3d
code: relicense to GPL-3.0-only
I don't need anyone's permission to make this change since
GPL-3.0-or-later is one-way compatible with GPL-3.0-only.
2022-01-31 19:33:22 +01:00
Hugo Machet
0116dfe96e command/map: Warn users on keybinding overwritten 2022-01-17 18:19:39 +01:00
Isaac Freund
f79c784e84
command/map: add Alt/Super as aliases for Mod1/Mod4
I personally made the mistake of using Alt instead of Mod1 when messing
with my config. This change makes things a bit more user
friendly/intuitive.
2022-01-17 12:38:41 +01:00
Isaac Freund
c1d985ac29
build: update to zig version 0.9.0 2021-12-24 05:28:14 +00:00
Isaac Freund
4d19621f1e
river: update to wlroots 0.15.0 2021-12-21 03:18:30 +00:00
Isaac Freund
8757644b2a
docs: standardize on "layout generator"
This is likely more clear than "layout client" to most users.
2021-10-31 22:32:59 +01:00
Isaac Freund
4b0c5acc46
View: fix checks to respect client side move/resize 2021-10-30 12:54:23 +02:00
Isaac Freund
9270a2df08
View: fix unmap/destroy control flow
Currently the view destruction sequence is started as soon as a view
is unmapped. However, this is incorrect as a client may map the view
again instead of destroying it.

Instead, only start the view destruction sequence when the underlying
xdg toplevel or xwayland surface is destroyed.
2021-10-02 14:48:22 +02:00
Peter Rice
81d103d425 river: add send-to-previous-tags command 2021-09-14 22:57:17 +02:00
Ben Fiedler
5f6428bafe river: Allow applying CSD based on window titles
This extends the `csd-filter-add` command to allow matching on window
titles as well, using a `csd-filter-add kind pattern` syntax. The
following kinds are supported:

  * `title`, which matches window titles
  * `app-id`, which matches app ids

Only exact matches are considered.

As an example following configuration applies client-side decorations to
all windows with the title 'asdf with spaces'.

    riverctl csd-filter-add title 'asdf with spaces'
2021-09-07 12:30:53 +00:00
Ben Fiedler
7b97d519b3 river: Fix errdefer in floatFilterAdd 2021-09-06 15:19:11 +00:00
Ben Fiedler
546252aecf river: Allow floating based on window titles
This extends the `float-filter-add` command to allow matching on window
titles as well, using a `float-filter-add kind pattern` syntax. The
following kinds are supported:

  * `title`, which matches window titles
  * `app-id`, which matches app ids

Only exact matches are considered.

As an example following configuration floats all windows with the title
'asdf with spaces'.

    riverctl float-filter-add title 'asdf with spaces'
2021-09-06 12:44:25 +00:00
novakane
e59c2a73d7 river: implement xdg-activation-v1
- add a new "urgent" border color
- add a new event to river-status-unstable-v1

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-08-19 12:58:52 +00:00