non important commit

This commit is contained in:
benstrb 2026-03-22 13:52:33 +01:00
parent 7ee5187cf8
commit c76ce3324c

View file

@ -41,71 +41,75 @@
}; };
extraConfig = '' extraConfig = ''
if ("ZELLIJ" not in $env) { if "ZELLIJ" in $env == false {
zellij zellij
exit exit
} else {
if "IN_NIX_SHELL" in $env == false {
fastfetch
}
} }
def c [] { def c [] {
clear clear
fastfetch fastfetch
} }
def rebuild [message?: string] { def rebuild [message?: string] {
cd /home/benag/.nix-config cd /home/benag/.nix-config
let commit_message = if $message != null {$message} else {"non important commit"} let commit_message = if $message != null {$message} else {"non important commit"}
try { try {
git pull git pull
git add . git add .
git commit -m $commit_message git commit -m $commit_message
git push 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
} }
sudo nixos-rebuild switch --flake .#benag
} }
def --env fzf-nvim [] { def --env fzf-cd [] {
let file = (fd -H -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left) 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 $file != null and $file != "" { if $dir != null and $dir != "" {
nvim $file cd $dir
} }
} }
$env.config.keybindings = ($env.config.keybindings | append { def --env fzf-nvim [] {
name: "fzf-cd" let file = (fd -H -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left)
modifier: "control"
keycode: "char_f"
mode: "emacs"
event: [
{
send: "executehostcommand"
cmd: 'fzf-cd'
}
]
})
$env.config.keybindings = ($env.config.keybindings | append { if $file != null and $file != "" {
name: "fzf-nvim" nvim $file
modifier: "control" }
keycode: "char_e" }
mode: "emacs"
event: [ $env.config.keybindings = ($env.config.keybindings | append {
{ name: "fzf-cd"
send: "executehostcommand" modifier: "control"
cmd: 'fzf-nvim' 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'
}
]
})
''; '';
}; };
}; };