Add keybind to spawn alacritty instance
This commit is contained in:
@ -111,6 +111,13 @@ pub const Server = struct {
|
||||
c.XKB_KEY_Escape => c.wl_display_terminate(self.wl_display),
|
||||
c.XKB_KEY_j => self.root.focusNextView(),
|
||||
c.XKB_KEY_k => self.root.focusPrevView(),
|
||||
c.XKB_KEY_Return => {
|
||||
// Spawn an instance of alacritty
|
||||
// const argv = [_][]const u8{ "/bin/sh", "-c", "WAYLAND_DEBUG=1 alacritty" };
|
||||
const argv = [_][]const u8{ "/bin/sh", "-c", "alacritty" };
|
||||
const child = std.ChildProcess.init(&argv, std.heap.c_allocator) catch unreachable;
|
||||
std.ChildProcess.spawn(child) catch unreachable;
|
||||
},
|
||||
else => return false,
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user