From fbc558f01ebc6904bf5a5783dcbb3162c7bfd179 Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Thu, 14 Aug 2025 19:27:36 +0530 Subject: [PATCH] feat: Added stuff --- home/apps/zed.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/home/apps/zed.nix b/home/apps/zed.nix index 19b20d88..0830a7a5 100644 --- a/home/apps/zed.nix +++ b/home/apps/zed.nix @@ -2,8 +2,7 @@ pkgs, lib, ... -}: -{ +}: { home.packages = with pkgs; [ nixd nil @@ -124,37 +123,44 @@ }; theme = "Catppuccin Mocha"; }; - userTasks = [ + userTasks = let + zed = + if pkgs.stdenv.isDarwin + then "zed" + else "${lib.getExe pkgs.zed-editor}"; + tv = "${lib.getExe pkgs.television}"; + yazi = "${lib.getExe pkgs.yazi}"; + in [ { label = "file_finder"; - command = "${lib.getExe pkgs.zed-editor} \"$(${lib.getExe pkgs.television} files)\""; + command = "${zed} \"$(${tv} files)\""; hide = "always"; allow_concurrent_runs = true; use_new_terminal = true; } { label = "live_grep"; - command = "${lib.getExe pkgs.television} text | read -alz res; and ${lib.getExe pkgs.zed-editor} $res"; + command = "${tv} text | read -alz res; and ${zed} $res"; hide = "always"; allow_concurrent_runs = false; use_new_terminal = false; shell = { with_arguments = { program = "fish"; - args = [ "--no-config" ]; + args = ["--no-config"]; }; }; } { label = "file_manager"; - command = "${lib.getExe pkgs.yazi} --chooser-file /dev/stdout | read -alz res;and ${lib.getExe pkgs.zed-editor} $res"; + command = "${yazi} --chooser-file /dev/stdout | read -alz res;and ${zed} $res"; hide = "always"; allow_concurrent_runs = false; use_new_terminal = false; shell = { with_arguments = { program = "fish"; - args = [ "--no-config" ]; + args = ["--no-config"]; }; }; }