From b6278b7c1a272e0804de2ccf2622e89b39ad9168 Mon Sep 17 00:00:00 2001 From: benstrb Date: Sun, 22 Mar 2026 13:33:46 +0100 Subject: [PATCH] non important commit --- home/modules/shells.nix | 118 +++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 61 deletions(-) diff --git a/home/modules/shells.nix b/home/modules/shells.nix index a0ebf1e..ed905e6 100644 --- a/home/modules/shells.nix +++ b/home/modules/shells.nix @@ -41,75 +41,71 @@ }; extraConfig = '' - if "ZELLIJ" in $env == false { - zellij - exit - } else { - if "IN_NIX_SHELL" in $env == false { - fastfetch - } - } - - def c [] { - clear - fastfetch + if not ("ZELLIJ" in $env) { + zellij + exit } - def rebuild [message?: string] { - cd /home/benag/.nix-config - let commit_message = if $message != null {$message} else {"non important commit"} - - try { - git pull - git add . - git commit -m $commit_message - git push - } - - sudo nixos-rebuild switch --flake .#benag - } - - def --env fzf-cd [] { - let dir = (fd -H -t d -L . | fzf --reverse --height 40% --border rounded --preview=("eza --color=always --group-directories-first --icons --long {}") --preview-window=border-left) - - if $dir != null and $dir != "" { - cd $dir - } + def c [] { + clear + fastfetch } - def --env fzf-nvim [] { - let file = (fd -H -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left) + def rebuild [message?: string] { + cd /home/benag/.nix-config + let commit_message = if $message != null {$message} else {"non important commit"} - if $file != null and $file != "" { - nvim $file + try { + git pull + git add . + git commit -m $commit_message + git push + } + + sudo nixos-rebuild switch --flake .#benag + } + + def --env fzf-cd [] { + let dir = (fd -H -t d -L . | fzf --reverse --height 40% --border rounded --preview=("eza --color=always --group-directories-first --icons --long {}") --preview-window=border-left) + + if $dir != null and $dir != "" { + cd $dir + } } - } - $env.config.keybindings = ($env.config.keybindings | append { - name: "fzf-cd" - modifier: "control" - keycode: "char_f" - mode: "emacs" - event: [ - { - send: "executehostcommand" - cmd: 'fzf-cd' - } - ] - }) + def --env fzf-nvim [] { + let file = (fd -H -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left) - $env.config.keybindings = ($env.config.keybindings | append { - name: "fzf-nvim" - modifier: "control" - keycode: "char_e" - mode: "emacs" - event: [ - { - send: "executehostcommand" - cmd: 'fzf-nvim' - } - ] - }) + if $file != null and $file != "" { + nvim $file + } + } + + $env.config.keybindings = ($env.config.keybindings | append { + name: "fzf-cd" + modifier: "control" + keycode: "char_f" + mode: "emacs" + event: [ + { + send: "executehostcommand" + cmd: 'fzf-cd' + } + ] + }) + + $env.config.keybindings = ($env.config.keybindings | append { + name: "fzf-nvim" + modifier: "control" + keycode: "char_e" + mode: "emacs" + event: [ + { + send: "executehostcommand" + cmd: 'fzf-nvim' + } + ] + }) ''; }; };