Commit Graph

1284 Commits

Author SHA1 Message Date
d47be3b592 deps: update to latest zig-wayland 2022-05-11 18:02:32 +02:00
d5c915e3cb idle-inhibit: implement protocol 2022-05-11 14:14:01 +02:00
90b37645cf ci: make wget output non verbose
This still prints errors, but doesn't print progress bars or other
superfluous information.
2022-05-01 19:03:32 +02:00
56fcab6ee9 Switch: register destroy listener 2022-04-30 18:20:29 +02:00
8da2de3738 input: fix typo in natural-scroll 2022-04-30 12:26:48 +02:00
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
8f59075bc5 completions: fish: new completions for the ‘hide-cursor’ command 2022-04-20 20:33:55 +02:00
3979dd5cf9 completions: bash: new completions for the ‘hide-cursor’ command 2022-04-20 20:33:50 +02:00
790de95726 completions: zsh: new completions for the ‘hide-cursor’ command 2022-04-20 19:00:26 +02:00
e0246c0410 Cursor: Don't passthrough() on update if hidden
Currently when the surface under the hidden cursor changes, we
passthrough() which results in the cursor being made visible and giving
pointer focus to the surface under the cursor if any. Obviously this is
not desirable as the cursor is supposed to remain hidden until moved.
This added check prevents this.
2022-04-19 11:10:53 +02:00
a8491eb13e command/hide-cursor: fix crash on missing option 2022-04-14 20:39:35 +02:00
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
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
ae349b0ce4 layer-shell: fix overflow with large bottom margin 2022-03-28 12:11:28 +02:00
aa684aa936 ci: Fix builds manifests
Remove `.git` suffix from river repo in `sources` section as the
suffix make the ci only clone the repo. Without the suffix the ci
checkout the correct commit to build river.

We don't need to remove the suffix from others sources as cloning
the repo and checkout the tag version we want is enough.
2022-03-06 12:01:27 +01:00
adf6e1f19d layer-shell: allow surfaces larger than the output
The motivation for this change is to simplify the implementation
and remove a massive footgun that is currently present and causing
UB/crashes. If a layer surface is destroyed in arrangeLayers() then
the code in LayerSurface.handleCommit() after the arrangeLayers()
call accesses free'd memory. This is of course possible to fix,
but it's far simpler to loosen up the protocol implementation a bit.

The new implementation is also in line with what sway and the new
wlroots layer shell helper do and is perfectly valid according to
the protocol.
2022-03-05 14:25:20 +01:00
c4c0bece59 docs: fix typo in river(1) man page 2022-03-05 12:24:38 +01:00
81ba188df0 view: stop enforcing custom minimum size
I have encountered a crash (failing assert) if a view specified a fixed
size less than this minimum, and according to ifreund this behavior was
planned to be removed, anyway.
2022-03-02 20:14:27 +00:00
238c39379d doc: Add additional style rule to CONTRIBUTING.md 2022-03-02 15:34:51 +01:00
7b4c9c39ee DragIcon: Properly initialize if already mapped 2022-02-26 16:54:48 +01:00
1c1be3e0bb rivertile: use u31s to remove most @intCast()s 2022-02-26 16:19:15 +01:00
e857631936 rivertile: Use saturating arithmetics to prevent over-/underflow when using user defined values 2022-02-26 16:19:15 +01:00
e67a9423a8 rivertile: properly validate -main-ratio flag 2022-02-21 10:26:10 +01:00
d7d0c3cfb9 ci: Update to zig 0.9.1 2022-02-17 19:41:26 +02:00
89433073d6 command: Remove allocator arg 2022-02-08 13:53:52 +01:00
da59632cea code: Cleanup use of std library for consistancy 2022-02-08 12:02:05 +01:00
995ae99be5 Mode: Use ArrayListUnmanaged to save memory 2022-02-08 11:56:24 +01:00
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
eb8f10a494 ci: Add sourcehut builds
- alpine (musl)
- archlinux (glibc)
- freebsd
2022-02-05 22:34:07 +01:00
422cd3e01f input: Improve input device name format
The name now includes the type, for the case of a physical device
advertising more than one logical device.
2022-02-05 18:52:46 +01:00
53f84b76f3 input: keep applying input configs after first match
Device identifiers aren't so unique after all
2022-02-05 18:52:16 +01:00
147d9c2f90 View: use last set fullscreen state in applyPending()
This avoids a race where the fullscreen set is e.g. set then unset
before the transaction has been completed and the current state has
been updated.
2022-02-05 00:08:21 +01:00
be870e058d View: fix/simplify logic in applyPending()
In particular, this fixes a crash that can happen if a client is made
non-fullscreen and then, while that transaction is ongoing, made
fullscreen again.
2022-02-03 21:23:02 +01:00
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
214ad65b72 Cursor: update image if needed on xcursor theme change 2022-01-29 15:40:29 +01:00
363efd3e79 ci: run on 0.1.x branch 2022-01-29 13:48:50 +01:00
1e3ea826c0 wlr-output-management: simplify implementation
Notably, we no longer call both wlr_output_test and wlr_output_commit
when applying an output config, which seems to fix or workaround an
occasional crash since updating to wlroots 0.15.0.
2022-01-28 23:28:00 +01:00
745fe82947 layer-shell: center when opposing anchors are set
Currently river will place the surface at the top or left edge if
opposing anchors are set without a 0 width/height. Instead, center
the surface between the anchors.
2022-01-25 00:11:20 +01:00
b716e262cd XdgPopup: remove commit listener on destroy if mapped
Since the destroy() function may be called by river while the popup is
mapped, we must handle this case.
2022-01-23 20:37:37 +01:00
20ca8a2051 docs: fix typo in river(1) man page 2022-01-23 12:09:27 +01:00
e13650864c docs: Fix typo in readme 2022-01-23 12:07:34 +01:00
a782c6a6f2 Xwayland: Handle minimize request
Fix X11 clients getting stuck minimized, and displaying a black screen
after they lose focus.
2022-01-18 16:14:33 +01:00
0116dfe96e command/map: Warn users on keybinding overwritten 2022-01-17 18:19:39 +01:00
f6b1632af2 example/init: Use Alt/Super aliases 2022-01-17 13:15:15 +01:00
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
0bdf348883 rivertile: Use saturating addition 2022-01-15 00:45:11 +01:00
c9fd8b3f37 XdgPopup: fix unconstrain from box coords
We currently don't properly handle xdg surface geometry of the parent,
which causes popups to render partially off-screen in some cases.

GTK4 clients such as easyeffects seem to trigger this issue reliably.
2022-01-12 14:50:55 +01:00
0c3a581f54 contrib: add desktop file 2022-01-08 15:37:47 +09:00
a340a605a4 Cursor: remove minor outdated workaround
Since Zig 0.9 @tagName() and other similar builtins return 0 terminated
data.
2022-01-05 18:13:08 +01:00
1c515759b4 Seat: do a better job of cleaning up listeners
I thought this should be fine as river won't yield to the event loop
when Seat.deinit() is called before the wlroots seat is destroyed, but
a segfault on exit has been reported with a stack trace mentioning
wlr_seat_destroy(). Let's hope this clears that up.
2022-01-02 19:46:18 +00:00