dots/.config/fish/config.fish

66 lines
1.5 KiB
Fish

if not status is-interactive
exit
end
# fish
set -gx FISH_CFG $XDG_CONFIG_HOME/fish
set -g fish_greeting
source $FISH_CFG/path.fish
set -gx LANG "en_US.UTF-8"
# xdg
set -gx XDG_CONFIG_HOME "$HOME/.config"
set -gx XDG_CACHE_HOME "$HOME/.cache"
set -gx XDG_DATA_HOME "$HOME/.local/share"
set -gx XDG_STATE_HOME "$HOME/.local/state"
# program
set -gx EDITOR "nvim"
set -gx VISUAL "lite-xl"
set -gx PF_INFO "ascii title os wm editor shell kernel palette"
set -gx BAT_THEME "ansi"
set -gx PNPM_HOME "$HOME/.local/share/pnpm"
set -gx GTK_USE_PORTAL 1
set -gx LITE_SCALE 1.3
set -gx RANGER_LOAD_DEFAULT_RC "FALSE"
# $PATH
source $FISH_CFG/path.fish
# colors
source $FISH_CFG/colors.fish
# bindings
source $FISH_CFG/bindings.fish
# configs
source $FISH_CFG/done_cfg.fish
# abbreviations & aliases
abbr -a paru paru --limit 10
abbr -a projects cd ~/DesktopTemp/RealProjects
abbr -a gc git commit -m
abbr -a ga git add
abbr -a gcl git clone
alias imgcat="wezterm imgcat"
alias dots="git --git-dir=$HOME/.dots --work-tree=$HOME"
alias sudo="doas"
alias ls="ls --color=auto"
function ssh
export TERM=xterm-color
/usr/bin/ssh $argv
export TERM=xterm-kitty
end
function multicd
echo (string repeat -n (math (string length -- $argv[1]) - 1) ../)
end
abbr -a dotdot --regex '^\.\.+$' --position anywhere --function multicd
function last_history_item
echo $history[1]
end
abbr -a !! --position anywhere --function last_history_item
# shell init
eval "$(ssh-agent -c)"
starship init fish | source