diff --git a/.aliases b/.aliases index ae7f094..a11ce71 100644 --- a/.aliases +++ b/.aliases @@ -5,6 +5,7 @@ alias vim="nvim" alias pro="cd ~/Documents/Projects" alias doc="cd ~/Documents" +alias int="cd ~/Documents/cours/licence/L3/stage/pasteur/project/" export templates_dir="~/Documents/Projects/templates" alias new.td='copier "$templates_dir/latex/td.template"' diff --git a/.loadenv.sh b/.loadenv.sh index b1257d3..24bf567 100644 --- a/.loadenv.sh +++ b/.loadenv.sh @@ -2,8 +2,24 @@ export LUA_PATH='/usr/share/lua/5.4/?.lua;/usr/share/lua/5.4/?/init.lua;/usr/lib export LUA_CPATH='/usr/lib64/lua/5.4/?.so;/usr/lib64/lua/5.4/loadall.so;./?.so;/home/sortion/.luarocks/lib/lua/5.4/?.so;/usr/lib/lua/5.4/?.so' export PATH='/home/sortion/.luarocks/bin:/home/sortion/.julia/bin:/home/sortion/.nvm/versions/node/v17.9.1/bin:/home/sortion/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/opt/quarto/quarto-1.2.335/bin:/home/sortion/.local/bin:/home/sortion/bin:/home/sortion/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/home/sortion/.antigen/bundles/zsh-users/zsh-syntax-highlighting:/home/sortion/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/home/sortion/Documents/cours/tools/bin/' -if [[ -d ~/.texmf ]]; -then - export TEXMFHOME=~/.texmf -fi +export TEXMFHOME=~/.texmf + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/home/sortion/.local/share/mambaforge/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/home/sortion/.local/share/mambaforge/etc/profile.d/conda.sh" ]; then + . "/home/sortion/.local/share/mambaforge/etc/profile.d/conda.sh" + else + export PATH="/home/sortion/.local/share/mambaforge/bin:$PATH" + fi +fi +unset __conda_setup + +if [ -f "/home/sortion/.local/share/mambaforge/etc/profile.d/mamba.sh" ]; then + . "/home/sortion/.local/share/mambaforge/etc/profile.d/mamba.sh" +fi +# <<< conda initialize <<< diff --git a/.zshrc b/.zshrc index 6ba48c5..b87f565 100644 --- a/.zshrc +++ b/.zshrc @@ -14,6 +14,8 @@ antigen theme ys antigen bundle zsh-users/zsh-syntax-highlighting +antigen bundle zsh-users/zsh-completions + antigen bundle git antigen apply diff --git a/Makefile b/Makefile index f9beb7e..75b1892 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,9 @@ all: pull install pull: git pull -install: antigen source dotmatrix +install: antigen source fish -source: +source: fishcfg cp ~/.dotfiles/.aliases ~/.aliases cp ~/.dotfiles/.zshrc ~/.zshrc cp ~/.dotfiles/.loadenv.sh ~/.loadenv.sh @@ -13,7 +13,11 @@ source: cp ~/.dotfiles/.gitconfig ~/.gitconfig cp ~/.dotfiles/.latexmkrc ~/.latexmkrc +fishcfg: + mkdir -p ~/.config/fish + cp ./fish/config.fish ~/.config/fish/config.fish + cp starship.toml ~/.config/starship.toml + antigen: git clone https://github.com/zsh-users/antigen.git - diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..11be1f0 --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,38 @@ +function fish_greeting + fortune +end + +function !! + set var (history | head -n 1) + if test $argv + if test $argv = sudo #; or "any other command you want to prepend" + eval $argv $var + else + eval $var $argv + end + else + eval $var + end +end + +set path_append "/home/sortion/.luarocks/bin:/home/sortion/.julia/bin:/home/sortion/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/opt/quarto/quarto-1.2.335/bin:/home/sortion/.local/bin::/home/sortion/Documents/cours/tools/bin/" +for path in (string split ":" $path_append) + fish_add_path $path +end + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +if test -f /home/sortion/.local/share/mambaforge/bin/conda + eval /home/sortion/.local/share/mambaforge/bin/conda "shell.fish" hook $argv | source +end + +if test -f "/home/sortion/.local/share/mambaforge/etc/fish/conf.d/mamba.fish" + source "/home/sortion/.local/share/mambaforge/etc/fish/conf.d/mamba.fish" +end +# <<< conda initialize << + +function __conda_add_prompt +end # Avoid conda prompt + + +starship init fish | source diff --git a/starship.toml b/starship.toml new file mode 100644 index 0000000..893e049 --- /dev/null +++ b/starship.toml @@ -0,0 +1,52 @@ +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$fill $conda$python\ +$line_break\ +$character""" + +[directory] +style = "bright-blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vimcmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$symbol$virtualenv]($style) " +style = "bright-black" + +[conda] +format = '[$symbol$environment](bright-green) ' + +[fill] +symbol = " "