impl autoexec support for a single script file

This commit is contained in:
Zhongheng Liu 2026-04-28 20:40:12 +02:00
commit b35962606d
2 changed files with 17 additions and 1 deletions

View file

@ -84,7 +84,12 @@ pub fn main() !void {
.config = config,
});
defer context.destroy();
if (context.config.autoexec_path) |path| {
std.log.debug("Path: {s}", .{path});
const argv = [_][]const u8{"/bin/sh", "-c", path };
var child = std.process.Child.init(&argv, utils.gpa);
try child.spawn();
}
try run(wl_display, context);
}