Compare commits

...

2 Commits

Author SHA1 Message Date
Samuel Ortion 711849c6a3 Add fish 2023-07-08 17:28:12 +02:00
Samuel Ortion f4a015dc6f Introduce starship for kitch prompting 2023-07-06 15:21:23 +02:00
8 changed files with 146 additions and 11 deletions

View File

@ -1,10 +1,9 @@
alias o="evince2"
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"'

22
.aliases.fish Normal file
View File

@ -0,0 +1,22 @@
alias o="evince2"
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"'
alias new.cm='copier "$templates_dir/latex/cm.template"'
alias new.letter='copier "$templates_dir/latex/letter.template"'
alias taquin.sync="rsync -azvu '/home/sortion/Documents/cours/licence/L3/S6/intelligence artificielle/DM/DM2/taquin/' leon.talpa:/home/sortion/Documents/Projects/taquin/ && rsync -azvu leon.talpa:/home/sortion/Documents/Projects/taquin/ '/home/sortion/Documents/cours/licence/L3/S6/intelligence artificielle/DM/DM2/taquin/'"
function pdfcompress
gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile="$2" "$1";
end
function colorinvert
convert "$1" -channel RGB -negate "$(echo $1 | sed 's/\./-inv\./')"
end

View File

@ -1,6 +1,6 @@
[user]
name = Samuel ORTION
email = samuel.ortion@orange.fr
name = Samuel Ortion
email = samuel+git@ortion.fr
[core]
editor = vim
[init]

View File

@ -1,9 +1,25 @@
export LUA_PATH='/usr/share/lua/5.4/?.lua;/usr/share/lua/5.4/?/init.lua;/usr/lib64/lua/5.4/?.lua;/usr/lib64/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/home/sortion/.luarocks/share/lua/5.4/?.lua;/home/sortion/.luarocks/share/lua/5.4/?/init.lua'
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/'
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-1.3.433/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
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 <<<

2
.zshrc
View File

@ -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

View File

@ -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,12 @@ source:
cp ~/.dotfiles/.gitconfig ~/.gitconfig
cp ~/.dotfiles/.latexmkrc ~/.latexmkrc
fishcfg:
mkdir -p ~/.config/fish
cp ./fish/config.fish ~/.config/fish/config.fish
cp ./.aliases.fish ~/.aliases.fish
cp starship.toml ~/.config/starship.toml
antigen:
git clone https://github.com/zsh-users/antigen.git

39
fish/config.fish Normal file
View File

@ -0,0 +1,39 @@
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
source ~/.aliases.fish
starship init fish | source

52
starship.toml Normal file
View File

@ -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 = " "