mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2025-01-06 01:23:39 +01:00
switch to nushell
This commit is contained in:
parent
bbabd015e7
commit
e50f057de4
5 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
[main]
|
||||
opener = xdg-open;
|
||||
shell = /usr/bin/fish -c;
|
||||
shell = <% opt.system "which nu" %> -c;
|
||||
theme = catppuccin-mocha;
|
||||
show-hidden = true;
|
||||
mouse-support = true;
|
|
@ -3,7 +3,7 @@ local opts = {}
|
|||
opts.mzteinit_entries = {
|
||||
{ key = "z", label = "river", cmd = { cg.opt.system "which mzteriver" } },
|
||||
{ key = "h", label = "hyprland", cmd = { "Hyprland" } },
|
||||
{ key = "s", label = "shell", cmd = { "fish" } },
|
||||
{ key = "s", label = "shell", cmd = { "nu" } },
|
||||
{ key = "l", label = "logout", cmd = { "!quit" } },
|
||||
{ key = "p", label = "shutdown", cmd = { "systemctl", "poweroff" }, quit = true },
|
||||
{ key = "r", label = "reboot", cmd = { "systemctl", "reboot" }, quit = true },
|
||||
|
|
|
@ -13,7 +13,7 @@ pub fn initOptions() !void {
|
|||
var buf: [512]u8 = undefined;
|
||||
|
||||
// Shell (defaults to mzteinit since that's my login shell)
|
||||
try opt("fish").setLog("shell", .both);
|
||||
try opt("nu").setLog("shell", .both);
|
||||
|
||||
try cmd("syntax on");
|
||||
|
||||
|
|
|
@ -41,12 +41,12 @@ pub fn populateEnvironment(env: *std.process.EnvMap) !bool {
|
|||
try env.put(kv[0], try std.fmt.bufPrint(&sbuf, "{s}/{s}", .{ home, kv[1] }));
|
||||
}
|
||||
|
||||
// set shell to fish to prevent anything from defaulting to mzteinit
|
||||
if (try util.findInPath(alloc, "fish")) |fish| {
|
||||
// set shell to nu to prevent anything from defaulting to mzteinit
|
||||
if (try util.findInPath(alloc, "nu")) |fish| {
|
||||
defer alloc.free(fish);
|
||||
try env.put("SHELL", fish);
|
||||
} else {
|
||||
log.warn("fish not found! setting $SHELL to /bin/sh", .{});
|
||||
log.warn("nu not found! setting $SHELL to /bin/sh", .{});
|
||||
try env.put("SHELL", "/bin/sh");
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ fn tryMain() !void {
|
|||
if (env_map.data.get("MZTEINIT")) |_| {
|
||||
try stdout.writer().writeAll("mzteinit running already, starting shell\n");
|
||||
try stdout.flush();
|
||||
var child = std.ChildProcess.init(launch_cmd orelse &.{"fish"}, alloc);
|
||||
var child = std.ChildProcess.init(launch_cmd orelse &.{"nu"}, alloc);
|
||||
_ = try child.spawnAndWait();
|
||||
return;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue