dotfiles/.config/fish/config.fish

55 lines
1.1 KiB
Fish
Raw Normal View History

2024-03-25 22:57:04 +01:00
set fish_greeting
fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/bin
2024-03-26 20:28:34 +01:00
## Nix
export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
export NIX_REMOTE=daemon
fish_add_path $HOME/.nix-profile/bin
2024-03-25 22:57:04 +01:00
if status is-interactive
2024-03-26 20:28:34 +01:00
## Pager
2024-03-26 00:41:11 +01:00
export LESS="--mouse --wheel-lines=1 -nRXF"
export LESSCOLORIZER="bat"
export LESSOPEN="|lesspipe.sh %s"
export PAGER="bat"
export BAT_PAGER="less -r"
2024-03-25 22:57:04 +01:00
## Utilities
function tree
eza --tree --color=always $argv | bat --wrap=never
end
function rg --wraps rg --description 'ripgrep with bat'
/usr/bin/rg --color=always $argv | bat --wrap=never
end
## Directory jumping with frecency
function fre_after_cd --on-variable PWD
fre --add "$PWD"
end
function jump
set _dir $(fre --sorted | fzf-tmux --no-sort -p 90%,40% -y 0)
[ -n "$_dir" ] && pushd $_dir >>/dev/null
commandline -f repaint
end
bind \cg jump
2024-03-26 00:41:11 +01:00
## Kubernetes
fish_add_path $HOME/.krew/bin
2024-03-26 20:28:34 +01:00
alias kubectl=kubecolor
2024-03-25 22:57:04 +01:00
## History
atuin init fish | source
end
## Direnv
direnv hook fish | source