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
Isaac Freund
072dd575aa
Add support for running a command on startup
2020-06-01 19:43:21 +02:00
Isaac Freund
939beef168
Split river and riverctl directories
2020-06-01 15:56:50 +02:00