Isaac Freund
c474be1537
build: require wlroots version 0.17.2
...
This fixes a crash that users have hit fairly often in the wild using
Xwayland and allows us to remove an ugly workaround for another issue.
2024-03-11 19:14:37 +01:00
LordMZTE
6692656c00
river: clear up docs on -c parameter
...
This makes the --help message clearly mention that the default init
executable is overidden.
2024-02-19 18:19:06 +01:00
Hugo Machet
7f1f9152f2
river: add -no-xwayland cli flag
...
Add a cli flag to disable xwayland at runtime even if river has been
built with xwayland support.
2024-02-19 17:27:25 +01:00
Isaac Freund
62dbe34bda
river: fix -log-level filtering
...
This has been broken since the Zig 0.11.0 upgrade it seems.
2024-01-11 17:10:26 -06:00
Isaac Freund
f6c434c7a7
river: log version during startup
2024-01-10 17:32:35 -06:00
Isaac Freund
3aba3abbcd
build: require at least wlroots 0.17.1
...
There are enough bugs fixed in 0.17.1 which are relevant to river that I
think it's worthwhile to refuse to compile against 0.17.1.
2024-01-01 22:55:15 -06:00
Isaac Freund
2e586c7061
build: update to Zig 0.11.0
2023-10-16 16:27:03 +02:00
Isaac Freund
2c0c606596
flags: further cleanup after Zig 0.10
...
Long live the self hosted compiler!
2023-01-08 17:01:14 +01:00
Isaac Freund
09f3f141ae
deps: update to Zig 0.10
2023-01-08 16:21:42 +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
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
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
shironeko
600fd2e73c
river: ignore SIGPIPE to avoid weird exits
...
When river or wlroots write to a closed socket it could generate SIGPIPE
causing the whole desktop to seemingly "crash" with no error log of any
kind. So we ignore the SIGPIPE and just let the write fail with EPIPE to
be handled normally.
2022-08-10 20:44:22 -04:00
Leon Henrik Plickat
37da205be0
river: error out if default init is not executable
2022-06-06 21:53:55 +02:00
Hugo Machet
da59632cea
code: Cleanup use of std library for consistancy
2022-02-08 12:02:05 +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
Isaac Freund
c1d985ac29
build: update to zig version 0.9.0
2021-12-24 05:28:14 +00:00
Isaac Freund
c3370afa3d
common/flags: make argFlag() return a slice
...
We always pass the result of this to mem.span() currently, no need for
the code duplication.
2021-12-15 17:09:45 +01:00
Isaac Freund
69d1453741
build: fix trailing newline in version string
2021-11-02 23:54:44 +01:00
Isaac Freund
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
Isaac Freund
734521560b
river: add custom wlroots log handler
...
This makes river's log output more consistent and will allow
filtering by the wlroots scope in the future.
2021-07-25 01:22:36 +02:00
Isaac Freund
c26d18647b
river: simplify log levels exposed to the user
2021-07-24 20:45:58 +02:00
Isaac Freund
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
Isaac Freund
a5a505ecba
common: remove support for positional arguments
...
This is currently unused and I don't like the approach anymore
regardless. If/when we need positional arguments (probably when
implementing the upcoming river-control protocol in rivertile)
they should be handled separately from flags.
This commit also improves the CLI error reporting to always print the
usage string if invalid arguments were passed.
2021-07-24 18:29:48 +02:00
Isaac Freund
f6fa3425de
river: use common CLI arg parsing code
...
This makes river's main() function quite a bit cleaner.
2021-07-24 16:44:11 +02:00
novakane
32d35cdf91
Add -version flag to river, riverctl and rivertile
2021-07-24 14:14:53 +00:00
Isaac Freund
0063c722e5
river: remove system /etc dir from init search paths
...
A true "default" config doesn't make sense for river. Everyone who uses
river seriously will customize their init script. Futhermore, the
current behavior of embedding the install path of the default system
config in the river binary is complex and prone to breaking.
2021-07-17 16:04:51 +02:00
Isaac Freund
505639432e
Revert "build: assert wlroots version at comptime"
...
zig-wlroots now has this assert built in
This reverts commit 3392b21aa8
.
2021-06-24 20:21:07 +02:00
Isaac Freund
3392b21aa8
build: assert wlroots version at comptime
...
This will prevent people compiling river against the wrong wlroots
version and wondering why it crashes.
2021-06-24 19:34:15 +02:00
Isaac Freund
c0a2286847
code: update to zig 0.8.0
2021-06-05 17:29:58 +00:00
Isaac Freund
271b1563a8
river: make server a global variable
2021-05-13 14:25:34 +02:00
Isaac Freund
33fb7725c5
river: send SIGTERM to init command process group
...
Run the init command in a new process group and send SIGTERM to the
entire group on exit. Without doing this, only the sh invocation used
for the `sh -c` would receive SIGTERM.
This is particularly useful when starting a per-session server manager
as the init command.
2021-04-20 18:27:03 +02:00
foxfromabyss
98d51f6d24
Use std.log instead of log.zig
2021-02-08 18:35:11 +01:00
Alex Mohr
75588a553c
build: derive default config path from install prefix
...
- Add `default_config_path` build option for the river executable
2021-01-01 23:23:44 +01:00
Isaac Freund
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
Isaac Freund
f1e5f1aacb
style: fix zig fmt regression
...
CI works now so this shouldn't happen again
2020-11-21 11:53:37 +01:00
Marten Ringwelski
7d0014cd38
code: Set wlroots loglevel based on -l flag
2020-11-19 21:18:43 +01:00
Leon Henrik Plickat
1626203c44
Add default config location
2020-11-18 15:15:22 +01:00
Isaac Freund
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
Isaac Freund
27b666dbba
code: update to zig master in prep for 0.7.0
...
This commit makes the minimal necessary changes to get things working,
there are further changes which can be made to take advantage of new
features.
2020-10-02 20:34:24 +02:00
Isaac Freund
56df9176b3
server: handle SIGINT/SIGTERM with wl_event_loop
...
This is cleaner than having a separate signal handler and should be more
consistent/reliable.
2020-08-01 17:27:49 +02:00
Isaac Freund
54b09c4ae9
server: use fork/execve for startup command
...
std.ChildProcess leaks an fd currently and is more complex than what we
need anyways.
2020-08-01 13:40:41 +02:00
Isaac Freund
43bcce9afe
code: fix a pair of leaks
2020-07-17 16:01:35 +02:00
Isaac Freund
3752a7879b
server: send SIGTERM to startup process on exit
2020-07-05 15:44:21 +02:00
Isaac Freund
9dd18c6373
server: exit cleanly on SIGINT and SIGTERM
2020-07-05 14:49:34 +02:00
Isaac Freund
8fc045b445
code: clean up server init
2020-06-26 00:07:02 +02:00
Isaac Freund
12d34d4ded
bikeshed: rename util.allocator to util.gpa
...
This is less typing and more clear. A definite win.
2020-06-19 14:32:30 +02:00
Isaac Freund
0efc04508b
cli: allow setting log level with '-l' flag
2020-06-17 02:01:07 +02:00
Isaac Freund
d74323bbbf
code: improve logging functions
...
this implements a modified version of the logging interface proposed
here: https://github.com/ziglang/zig/pull/5348
2020-06-17 01:31:38 +02:00
Isaac Freund
c5de1641dc
code: create util.allocator and use globally
...
river is not a library and passing a general purpose allocators around
everywhere does not make sense and leads to ugly code. This does not
prevent us from using local arenas if they are fitting.
2020-06-16 22:48:08 +02:00