non important commit

This commit is contained in:
benstrb 2026-03-22 13:35:46 +01:00
parent b6278b7c1a
commit f2452cb1bf

View file

@ -41,71 +41,72 @@
}; };
extraConfig = '' extraConfig = ''
if not ("ZELLIJ" in $env) { if ("ZELLIJ" in $env) {
zellij zellij
exit fastfetch
} exit
}
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 sudo nixos-rebuild switch --flake .#benag
} }
def --env fzf-cd [] { 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) 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 != "" { if $dir != null and $dir != "" {
cd $dir cd $dir
} }
} }
def --env fzf-nvim [] { 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) let file = (fd -H -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left)
if $file != null and $file != "" { if $file != null and $file != "" {
nvim $file nvim $file
} }
} }
$env.config.keybindings = ($env.config.keybindings | append { $env.config.keybindings = ($env.config.keybindings | append {
name: "fzf-cd" name: "fzf-cd"
modifier: "control" modifier: "control"
keycode: "char_f" keycode: "char_f"
mode: "emacs" mode: "emacs"
event: [ event: [
{ {
send: "executehostcommand" send: "executehostcommand"
cmd: 'fzf-cd' cmd: 'fzf-cd'
} }
] ]
}) })
$env.config.keybindings = ($env.config.keybindings | append { $env.config.keybindings = ($env.config.keybindings | append {
name: "fzf-nvim" name: "fzf-nvim"
modifier: "control" modifier: "control"
keycode: "char_e" keycode: "char_e"
mode: "emacs" mode: "emacs"
event: [ event: [
{ {
send: "executehostcommand" send: "executehostcommand"
cmd: 'fzf-nvim' cmd: 'fzf-nvim'
} }
] ]
}) })
''; '';
}; };
}; };