Swap bindngs for send to top and start terminal
This commit is contained in:
parent
a2901c90ba
commit
e55d40ab10
1 changed files with 15 additions and 15 deletions
|
@ -112,16 +112,6 @@ pub const Server = struct {
|
||||||
// This function assumes the proper modifier is held down.
|
// This function assumes the proper modifier is held down.
|
||||||
if (modifiers & @intCast(u32, c.WLR_MODIFIER_SHIFT) != 0) {
|
if (modifiers & @intCast(u32, c.WLR_MODIFIER_SHIFT) != 0) {
|
||||||
switch (sym) {
|
switch (sym) {
|
||||||
c.XKB_KEY_Return => {
|
|
||||||
if (self.root.focused_view) |current_focus| {
|
|
||||||
const node = @fieldParentPtr(std.TailQueue(View).Node, "data", current_focus);
|
|
||||||
if (node != self.root.views.first) {
|
|
||||||
self.root.views.remove(node);
|
|
||||||
self.root.views.prepend(node);
|
|
||||||
self.root.arrange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
c.XKB_KEY_H => {
|
c.XKB_KEY_H => {
|
||||||
if (self.root.master_count < self.root.views.len) {
|
if (self.root.master_count < self.root.views.len) {
|
||||||
self.root.master_count += 1;
|
self.root.master_count += 1;
|
||||||
|
@ -134,6 +124,13 @@ pub const Server = struct {
|
||||||
self.root.arrange();
|
self.root.arrange();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
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,
|
else => return false,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -154,11 +151,14 @@ pub const Server = struct {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
c.XKB_KEY_Return => {
|
c.XKB_KEY_Return => {
|
||||||
// Spawn an instance of alacritty
|
if (self.root.focused_view) |current_focus| {
|
||||||
// const argv = [_][]const u8{ "/bin/sh", "-c", "WAYLAND_DEBUG=1 alacritty" };
|
const node = @fieldParentPtr(std.TailQueue(View).Node, "data", current_focus);
|
||||||
const argv = [_][]const u8{ "/bin/sh", "-c", "alacritty" };
|
if (node != self.root.views.first) {
|
||||||
const child = std.ChildProcess.init(&argv, std.heap.c_allocator) catch unreachable;
|
self.root.views.remove(node);
|
||||||
std.ChildProcess.spawn(child) catch unreachable;
|
self.root.views.prepend(node);
|
||||||
|
self.root.arrange();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
else => return false,
|
else => return false,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue