-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
References
- https://git.korhonen.cc/FunctionalHacker/dotfiles/src/branch/sway-systemd/home/.config/sway/conf.d/05-keybinds.conf
- https://git.korhonen.cc/FunctionalHacker/dotfiles/src/branch/sway-systemd/home/.config/sway/scripts/exit.sh
- https://git.korhonen.cc/FunctionalHacker/dotfiles/src/branch/sway-systemd/home/.config/sway/conf.d/04-workspaces.conf#L13
fn swaynag(arena: mem.Allocator, comptime cmd: []const u8) void {
var child: process.Child = .init(&.{
"sh", "-c",
\\cat <<EOF | fzf +s --tac
\\
++ cmd ++
\\EOF
\\
}, arena);
child.stderr_behavior = .Pipe;
child.stdin_behavior = .Pipe;
child.stdout_behavior = .Pipe;
const exec_status = child.spawnAndWait() catch unreachable;
debug.assert(exec_status.Exited == 0);
var stdout: std.ArrayList(u8) = .empty;
var stderr: std.ArrayList(u8) = .empty;
child.collectOutput(arena, &stdout, &stderr, 1024) catch unreachable;
log.info("swaynag:output: {s}\n", .{stdout.items});
log.info("swaynag:error: {s}\n", .{stderr.items});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels