.dotfiles/private_dot_config/fish/config.fish
tombdf 72b8e700ec
Update .config/chezmoi/chezmoi.toml
Update .config/fish/config.fish
Update scripts/shells.sh
Update utils/helpers.sh
Update utils/packages
2024-12-20 02:57:31 +01:00

78 lines
2.7 KiB
Fish

set fish_greeting
# Plugins installation and configuration
# The fish_inclusion variable is used to avoid multiple inclusions of the plugins
# because of the fish configuration file being sourced every time fisher is called
# Everything related to the plugins must be in the if block
if not set -q fish_inclusion
set -U fish_inclusion 1
function install_fisher_plugin
set -l plugin_path $argv[1]
set -l plugin_name $argv[2]
if not test -e $plugin_path
if test $plugin_name = "jorgebucaran/fisher"
# Install Fisher
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install $plugin_name
else
fisher install $plugin_name
end
end
end
install_fisher_plugin ~/.config/fish/functions/fisher.fish jorgebucaran/fisher
install_fisher_plugin ~/.config/fish/functions/theme_gruvbox.fish jomik/fish-gruvbox # Gruvbox theme for bg and fg
install_fisher_plugin ~/.config/fish/conf.d/gruvbox.fish sujaybokil/fish-gruvbox # Gruvbox theme for syntax highlighting
install_fisher_plugin ~/.config/fish/conf.d/autopair.fish jorgebucaran/autopair.fish
install_fisher_plugin ~/.config/fish/conf.d/sponge.fish meaningful-ooo/sponge
install_fisher_plugin ~/.config/fish/conf.d/abbr_tips.fish gazorby/fish-abbreviation-tips
install_fisher_plugin ~/.config/fish/conf.d/venv.fish nakulj/auto-venv
install_fisher_plugin ~/.config/fish/conf.d/color-manual.fish goranmoomin/fish-color-manual
theme_gruvbox dark soft
set sponge_regex_patterns '^\s+.*'
set sponge_allow_previously_successful true
set -eU fish_inclusion
end
# Set the ssh agent
if not pgrep ssh-agent > /dev/null
eval (ssh-agent -c | string split ';')
end
set -x SSH_AUTH_SOCK (ssh-agent -s | grep -oP '(?<=SSH_AUTH_SOCK=)[^;]+')
# Set the ssh keys
if [ -f ~/.ssh/id_ed25519 ]; and not ssh-add -l | grep -q id_ed25519
ssh-add ~/.ssh/id_ed25519 > /dev/null 2>&1
end
if [ -f ~/.ssh/hexasec ]; and not ssh-add -l | grep -q hexasec
ssh-add ~/.ssh/hexasec > /dev/null 2>&1
end
# Set personal aliases
# For a full list of active aliases, run `alias`.
alias ls='lsd'
alias ll='ls -alF'
alias rm='rip'
alias cat='bat'
alias grep='rg'
alias find='fd -H'
alias sed='sd'
alias c='clear'
alias prolog='~/.config/scryer-prolog/target/release/scryer-prolog' # À remplacer par prolog='scryer-prolog'
alias csc='sudo cytech-site-change'
alias quit='exit'
alias compresse='echo "tar -cv [nomDuFichieràCompresser] -f [nomArchive].tar"'
alias maj='~/./miseajour.sh'
alias vi=(which vim)
alias vim='nvim'
# Set the Oh-My-Posh prompt
oh-my-posh init fish --config $HOME/.config/ohmyposh/prompt.json | source
# Allow zoxide to work and to replace cd
zoxide init --cmd cd fish | source