Files
home/.config/fish/config.fish
2022-01-20 11:26:37 +01:00

109 lines
3.4 KiB
Fish

################################################################################
# Color handling
################################################################################
if test "$TERM" = "xterm-direct" -o "$COLORTERM" = "truecolor"
set -g fish_term24bit 1
end
################################################################################
# Greetings
################################################################################
set fish_greeting ""
################################################################################
# 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"
################################################################################
# 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"
################################################################################
# Conda
################################################################################
if test -x $HOME/miniconda3/bin/conda
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
eval $HOME/miniconda3/bin/conda "shell.fish" "hook" $argv | source
# <<< conda initialize <<<
end
################################################################################
# direnv
################################################################################
direnv hook fish | source
################################################################################
# Starship
################################################################################
starship init fish | source
################################################################################
# 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