78 lines
1.9 KiB
Fish
78 lines
1.9 KiB
Fish
set fish_greeting
|
|
set fish_emoji_width 2
|
|
|
|
fish_add_path $HOME/.cargo/bin
|
|
fish_add_path $HOME/bin
|
|
|
|
## Nix
|
|
set -gx LOCALE_ARCHIVE /usr/lib/locale/locale-archive
|
|
set -gx NIX_REMOTE daemon
|
|
fish_add_path $HOME/.nix-profile/bin
|
|
|
|
if status is-interactive
|
|
|
|
## Pager
|
|
set -gx LESS "--mouse --wheel-lines=1 -nRXF"
|
|
set -gx LESSCOLORIZER bat
|
|
set -gx LESSOPEN "|lesspipe.sh %s"
|
|
set -gx PAGER bat
|
|
set -gx BAT_PAGER "less -r"
|
|
|
|
## OpenTelemetry
|
|
set -gx OTEL_EXPORTER_OTLP_ENDPOINT https://otel.aarn.shelman.io
|
|
set -gx OTEL_RESOURCE_ATTRIBUTES instance=dln-dev
|
|
set -gx OTEL_LOG_LEVEL debug
|
|
|
|
## Utilities
|
|
|
|
set -gx EDITOR (which nvim)
|
|
set -gx VISUAL $EDITOR
|
|
set -gx SUDO_EDITOR $EDITOR
|
|
|
|
|
|
|
|
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 --no-sort --color=fg:248,bg+:16,fg+:49,pointer:49,border:49 --border=rounded --layout=reverse '--bind=ctrl-g:become(br -f --conf ~/.config/broot/select.toml $(git rev-parse --show-toplevel 2>/dev/null || pwd))')
|
|
[ -n "$_dir" ] && pushd $_dir >>/dev/null
|
|
commandline -f repaint
|
|
end
|
|
bind \cg jump
|
|
|
|
bind \c_ 'do something'
|
|
bind \ee 'br $(git rev-parse --show-toplevel 2>/dev/null || pwd)'
|
|
bind \eg gitui
|
|
|
|
|
|
## Kubernetes
|
|
fish_add_path $HOME/.krew/bin
|
|
# function kubectl --wraps kubectl
|
|
# command kubecolor $argv
|
|
# end
|
|
|
|
## History
|
|
|
|
# FIXME: how to use autin history for these?
|
|
bind \cn history-prefix-search-forward
|
|
bind \cp history-prefix-search-backward
|
|
# bind \cP _atuin_bind_up
|
|
bind \cJ forward-char
|
|
|
|
atuin init fish | source
|
|
end
|
|
|
|
## Direnv
|
|
direnv hook fish | source
|