################################################################################ # Color handling ################################################################################ if test "$TERM" = "xterm-direct" -o "$COLORTERM" = "truecolor" set -g fish_term24bit 1 end ################################################################################ # Greetings ################################################################################ set fish_greeting "" if test -x $HOME/.local/bin set PATH $PATH $HOME/.local/bin end ################################################################################ # exa ################################################################################ if type -q exa alias ls="exa --git -g" set -gx EXA_COLORS "da=35:uu=33:gu=33" end ################################################################################ # Emacs ################################################################################ alias emacs="emacs -nw" alias gemacs="/usr/bin/emacs" set -gx EDITOR "emacs" set -gx LSP_USE_PLISTS "true" ################################################################################ # Deb maintainer stuff ################################################################################ set -gx DEBFULLNAME "Alexandre Tuleu" set -gx DEBEMAIL "alexandre.tuleu.2005@polytechnique.org" set -gx GPGKEY "5915F6ED256016C6A44E7C907F8AA0EB0F59FF97" set -gx DEBSIGN_KEYID $GPGKEY set -gx DEB_BUILD_OPTIONS "parallel=15" ################################################################################ # Go Lang ################################################################################ if test -x /usr/local/go/bin/go set -gx GOROOT /usr/local/go set -gx GOPATH $HOME/devel/go set PATH $PATH $GOROOT/bin $GOPATH/bin end ################################################################################ # Minicon ################################################################################ export MINICOM="-c on" ################################################################################ # Anaconda / Conda / Mambaforge ################################################################################ set CONDA_PREFIXES mambaforge miniforge3 miniconda3 anaconda3 for prefix in $CONDA_PREFIXES if test -x $HOME/$prefix/bin/conda eval $HOME/$prefix/bin/conda "shell.fish" "hook" $argv | source break end end ################################################################################ # direnv ################################################################################ direnv hook fish | source ################################################################################ # Starship ################################################################################ starship init fish | source ################################################################################ # CUDA ################################################################################ if test -d /usr/local/cuda set PATH $PATH /usr/local/cuda/bin end ################################################################################ # RUST ################################################################################ if test -d $HOME/.cargo/bin set PATH $PATH $HOME/.cargo/bin end ################################################################################ # Colortest ################################################################################ function colortest-truecolors for colnum in (seq 0 76) set r (math round\(255 -\( $colnum \* 255 / 76\)\)) set g (math round\($colnum \* 510 / 76\)) set b (math round\($colnum \* 255 / 76\)) if test $g -gt 255 set g (math 510 - $g) end echo -en "\033[48;2;$r;$g;"$b"m" set r (math 255 - $r) set g (math 255 -$g) set b (math 255 - $b) echo -en "\033[38;2;$r;$g;"$b"m" if test (math $colnum % 2) -eq 1 echo -n "\\" else echo -n "/" end echo -en "\033[0m" end echo "" end