oxidizing
This commit is contained in:
parent
a46356a178
commit
a9eadc52f3
35 changed files with 726 additions and 1223 deletions
46
home/modules/shell/config.nu
Normal file
46
home/modules/shell/config.nu
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
if "ZELLIJ" in $env == false {
|
||||
zellij
|
||||
exit
|
||||
}
|
||||
|
||||
def rebuild [message?: string] {
|
||||
cd /home/maxag/.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 .
|
||||
}
|
||||
|
||||
def --env fzf-cd [] {
|
||||
let dir = (fd -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 --env fzf-nvim [] {
|
||||
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 != "" {
|
||||
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' }]
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue