build: install example config to /etc/river/init
This commit is contained in:
parent
ba9df86472
commit
c7bc47d6d4
2 changed files with 15 additions and 0 deletions
|
@ -27,6 +27,14 @@ pub fn build(b: *zbs.Builder) !void {
|
|||
|
||||
const examples = b.option(bool, "examples", "Set to true to build examples") orelse false;
|
||||
|
||||
// Sigh, why are the conventions inconsistent like this.
|
||||
const resolved_prefix = try std.fs.path.resolve(b.allocator, &[_][]const u8{b.install_prefix.?});
|
||||
if (std.mem.eql(u8, resolved_prefix, "/usr")) {
|
||||
b.installFile("example/init", "../etc/river/init");
|
||||
} else {
|
||||
b.installFile("example/init", "etc/river/init");
|
||||
}
|
||||
|
||||
const scanner = ScanProtocolsStep.create(b);
|
||||
scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml");
|
||||
scanner.addProtocolPath("protocol/river-control-unstable-v1.xml");
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is the example configuration file for river(1).
|
||||
#
|
||||
# If you wish to edit this, you will probably want to copy it to
|
||||
# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
|
||||
#
|
||||
# See the riverctl(1) man page for complete documentation
|
||||
|
||||
# Use the "logo" key as the primary modifier
|
||||
mod="Mod4"
|
||||
|
Loading…
Reference in a new issue