Commit Graph

29 Commits

Author SHA1 Message Date
2e586c7061 build: update to Zig 0.11.0 2023-10-16 16:27:03 +02:00
93a567ca94 riverctl: Add error messages for failed connections 2023-06-05 20:01:27 +02:00
2c0c606596 flags: further cleanup after Zig 0.10
Long live the self hosted compiler!
2023-01-08 17:01:14 +01:00
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
16cbe5f469 flags: rewrite to allow [:0]const u8 arguments
This also cleans up the code by using @Type(), eliminating the need
for the argFlag() and boolFlag() functions.

Allowing [:0]const u8 arguments makes this parser useful for
river-control commands as well.
2022-12-28 20:21:23 +01:00
d47be3b592 deps: update to latest zig-wayland 2022-05-11 18:02:32 +02:00
da59632cea code: Cleanup use of std library for consistancy 2022-02-08 12:02:05 +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
c1d985ac29 build: update to zig version 0.9.0 2021-12-24 05:28:14 +00:00
69d1453741 build: fix trailing newline in version string 2021-11-02 23:54:44 +01:00
f2cf4b9455 common: use -h instead of -help
This doesn't really matter that much as unrecognized options will still
trigger a help message to be printed, but -h is much more standard so
lets make the predictable choice here while sticking to only single '-'
flags.
2021-11-01 00:34:15 +01:00
23088b800c common: standardize on -help option
Also:

- Check for -help option *before* unknown options
- Use common flags parsing code for riverctl
- Add usage text to riverctl
2021-07-24 19:31:04 +02:00
32d35cdf91 Add -version flag to river, riverctl and rivertile 2021-07-24 14:14:53 +00:00
c0a2286847 code: update to zig 0.8.0 2021-06-05 17:29:58 +00:00
ec2c50b33f deps: update to latest zig-wayland 2021-04-27 12:24:30 +02:00
871fc7c8de river-options: remove protocol
This protocol involves far too much accidental complexity. The original
motivating use-case was to provide a convenient way to send arbitrary
data to layout clients at runtime in order to avoid layout clients
needing to implement their own IPC and do this over a side-channel.
Instead of implementing a quite complex but still rigid options protocol
and storing this state in the compositor, instead we will simply add
events to the layout protocol to support this use case.

Consider the status quo event sequence:

1. send get_option_handle request (riverctl)
2. roundtrip waiting for first event (riverctl)
3. send set_foo_value request (riverctl)
4. receive set_foo_value request (river)
5. send foo_value event to all current handles (river)
6. receive foo_value event (rivertile)
7. send parameters_changed request (rivertile)
8. receive parameters_changed request (river)
9. send layout_demand (river)

And compare with the event sequence after the proposed change:

1. send set_foo_value request (riverctl)
2. receive set_foo_value request (river)
3. send set_foo_value event (river)
4. send layout_demand (river)

This requires *much* less back and forth between the server and clients
and is clearly much simpler.
2021-04-27 00:10:20 +02:00
d08032d685 river-options: rework, bump to v2
Options are now all global but may be overridden per-output. If an
output local value is requested but none has been set, the global value
is provided instead. This makes for much better ergonomics when
configuring layout related options in particular.
2021-04-20 18:27:03 +02:00
e43e58432f riverctl: Do not use std.debug.print() 2021-03-27 12:17:47 +01:00
f99071f1da riverctl: Print error messages instead of error traces for common user mistakes 2021-03-27 12:17:47 +01:00
aeeae92611 riverctl: add mod-option command 2021-02-09 22:53:17 +01:00
a8a70a3b04 riverctl: add -focused-output for option commands
This is more convenient for interactive usage and makes using the same
bindings across multiple outputs easy.
2021-02-07 19:17:31 +01:00
96d460c477 riverctl: improve handling of null string options
Passing an empty string as the value argument for riverctl set-option or
declare-option will set the value to null. The riverctl get-option
command produces no output for both null and empty string values.

This is not perfect as it is unable to distinguish between null and
empty strings through the riverctl CLI. I don't see a better alternative
here however. Forbidding null strings in the river-options protocol
would be one solution, however null strings are useful and more pleasant
to use from code despite being problematic on the CLI.
2021-02-02 18:42:09 +01:00
18bab45d4c riverctl: implement river-options interface
To make this cleaner, introduce some arg-parsing infrastructure that
will useful when porting riverctl to river-control-v2 in the future as
well.
2021-01-18 22:30:52 +01:00
20d804cdb5 code: switch to custom wlroots/libwayland bindings
This is a big step up over @cImport() for ergonomics and type safety.
Nearly all void pointer casts have been eliminated!
2020-12-13 22:53:33 +01:00
f80992e329 meta: make copyright headers more maintainable
- list all files as copyright "The River Developers"
- add an AUTHORS file to acknowledge contributors
2020-11-11 20:33:43 +01:00
a7459026f6 code: port riverctl to zig-wayland 2020-11-02 13:59:59 +01:00
79bb0accac code: improve error handling consistency 2020-06-26 00:59:31 +02:00
f0c3aa3744 river-control: implement protocol changes 2020-06-16 18:27:46 +02:00
939beef168 Split river and riverctl directories 2020-06-01 15:56:50 +02:00