diff --git a/home/modules/shell/config.nu b/home/modules/shell/config.nu index a650974..10355b6 100644 --- a/home/modules/shell/config.nu +++ b/home/modules/shell/config.nu @@ -1,4 +1,4 @@ -if "ZELLIJ" in $env == false { +if not ("ZELLIJ" in $env) { zellij exit } @@ -22,7 +22,7 @@ def --env fzf-cd [] { } } -def --env fzf-nvim [] { +def --env fzf-edit [] { let file = (fd -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left) if $file != null and $file != "" { ^$env.EDITOR $file @@ -38,7 +38,7 @@ $env.config.keybindings = ($env.config.keybindings | append { }) $env.config.keybindings = ($env.config.keybindings | append { - name: "fzf-nvim" + name: "fzf-edit" modifier: "control" keycode: "char_e" mode: "emacs" diff --git a/home/modules/shell/shell.nix b/home/modules/shell/shell.nix index c981061..e9127fe 100644 --- a/home/modules/shell/shell.nix +++ b/home/modules/shell/shell.nix @@ -50,30 +50,21 @@ enableNushellIntegration = true; enableTransience = true; settings = { - format = "\${custom.shell_nix}\${custom.shell_normal} $directory\n$character\n"; + format = "\${custom.shell_nix}\${custom.shell_normal}$directory\n$character"; - # Prompt character — nix-shell pink on error doubles as a hint, - # but full conditional colouring isn't possible in the character module. character = { success_symbol = "[~>](#92D4FE)"; error_symbol = "[~>](#D81E5B)"; - }; - - # Transient prompt (static colour — Starship can't conditionally - # change it based on env vars without a full custom module) - transient_prompt = { - format = "[~> ](#92D4FE)"; + format = "$symbol "; }; directory = { - # Leading icon + path + powerline closing arrow format = "[ $path ](bg:#303C68 fg:white)[](fg:#303C68)"; truncation_length = 1; truncate_to_repo = false; }; custom = { - # Shown only inside a nix-shell shell_nix = { description = "Nix shell indicator"; command = "echo"; @@ -81,8 +72,6 @@ format = "[ nix-shell ](bg:#D81E5B fg:white)[](fg:#D81E5B)"; shell = ["bash" "--noprofile" "--norc"]; }; - - # Shown when NOT in a nix-shell shell_normal = { description = "Current shell indicator"; command = "echo"; @@ -93,7 +82,6 @@ }; }; }; - gtk.enable = true; qt.enable = true;