Compare commits

...

3 Commits

Author SHA1 Message Date
Samuel Ortion 8f91a8163b feat: Add lp-mouse, and amended latexmkrc 2023-08-16 08:41:12 +02:00
Samuel Ortion 3b8ce96db1 feat: Switch to emacs as main editor 2023-08-10 19:45:10 +02:00
Samuel Ortion 610698b3c3 Add nvm 2023-07-29 14:49:27 +02:00
7 changed files with 108 additions and 31 deletions

View File

@ -1,21 +1,32 @@
alias o="evince2"
alias o="xdg-open"
alias pro="cd ~/Documents/Projects"
alias doc="cd ~/Documents"
alias vim="nvim"
alias activenv="mamba activate hic2023py3.11"
alias int="cd ~/Documents/cours/licence/L3/stage/pasteur/projects/"
alias blog="cd ~/Documents/Projects/myself/log/"
alias cours="cd ~/Documents/cours/master/M1/S1/"
alias int="cd ~/Documents/cours/licence/L3/stage/pasteur/project/"
# Print field name from header with the field rank
csv_fields() {
local delimiter
delimiter="${2:-\t}"
local file
file="${1}"
head -n 1 "${file}" | tr "${delimiter}" "\n" | awk '{print NR, $0}'
}
alias edit="$VISUAL"
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/'"
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";
}
colorinvert() { convert "$1" -channel RGB -negate "$(echo $1 | sed 's/\./-inv\./')"
colorinvert() {
convert "$1" -channel RGB -negate "$(echo $1 | sed 's/\./-inv\./')"
}

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "liquidprompt/lp-mouse"]
path = liquidprompt/lp-mouse
url = git@github.com:UncleSamulus/lp-mouse.git

View File

@ -1,24 +1,72 @@
# Minted
&set_tex_cmds( '-shell-escape %O '
. '\'\PassOptionsToPackage{outputdir={%Y}}{minted}\input{%S}\''
);
$hash_calc_ignore_pattern{aux} =
'^\\\\gdef\\\\minted@oldcachelist\{,'
. '|^\s*default\.pygstyle,'
. '|^\s*[[:xdigit:]]+\.pygtex';
$pdflatex = 'lualatex -shell-escape -file-line-error -interaction=nonstopmode -synctex=1 -output-directory=build %O %S | texlogsieve';
$aux_dir = 'build';
$pdflatex =
'lualatex -shell-escape -file-line-error -interaction=nonstopmode -synctex=1 -output-directory=build %O '
. '\'\PassOptionsToPackage{outputdir=build}{minted}\input{%S}\''
. '| texlogsieve';
$aux_dir = 'build';
$bibtex_use = 2;
# Amend cleaned extensions
$clean_ext .= " fdb_latexmk run.xml synctex.gz";
# Make latexmk quiet
$latexmk_silent = 1;
# Makeglossaries
add_cus_dep('acn', 'acr', 0, 'makeglossaries');
add_cus_dep('glo', 'gls', 0, 'makeglossaries');
add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' );
add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
$clean_ext .= " acr acn alg glo gls glg";
sub makeglossaries {
my ($base_name, $path) = fileparse( $_[0] );
my ( $base_name, $path ) = fileparse( $_[0] );
my @args = ( "-q", "-d", $path, $base_name );
if ($silent) { unshift @args, "-q"; }
return system "makeglossaries", "-d", $path, $base_name;
}
return system "makeglossaries", "-d", $path, $base_name;
}
sub biber {
my ( $base_name, $path ) = fileparse( $_[0] );
my @args = ( "--output-directory", $path, $base_name );
return system "biber", @args;
}
$silent = 1; # This adds "-interaction batchmode"
$silence_logfile_warnings = 1;
END {
local $?; # do not override previous exit status
if ( -s "$root_filename.blg" and open my $bibfile,
'<', "$root_filename.blg" )
{
print("**********************\n");
print("bibtex/biber messages:\n");
while ( my $line = <$bibfile> ) {
if ( $line =~ /You.ve used/ ) {
last;
}
else {
print($line);
}
}
close($bibfile);
}
if ( -s "$root_filename.ilg" and open my $indfile,
'<', "$root_filename.ilg" )
{
print("*************************\n");
print("makeindex/xindy messages:\n");
while ( my $line = <$indfile> ) {
print($line);
}
close($indfile);
}
if ( -s "$root_filename.log" ) {
print("***************\n");
print("LaTeX messages:\n");
Run_subst("texlogsieve %R.log");
}
}

View File

@ -1,8 +1,13 @@
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-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/:/usr/games/'
export PATH="/home/$USER/.luarocks/bin:/home/$USER/.julia/bin:/home/$USER/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/$USER/.local/bin:/home/$USER/bin:/home/$USER/Documents/cours/tools/bin/:/usr/games/:/home/$USER/.config/emacs/bin/:/usr/local/cuda/bin//"
export EDITOR=vim
# export EDITOR=vim
export ALTERNATE_EDITOR=""
export EDITOR="emacsclient -t" # $EDITOR opens in terminal
export VISUAL="emacsclient -fs -c -a emacs" # $VISUAL opens in GUI mode
# nvm
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
export TEXMFHOME=~/.texmf
@ -15,19 +20,19 @@ eval $(thefuck --alias)
# >>> 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)"
__conda_setup="$('/home/$USER/.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"
if [ -f "/home/$USER/.local/share/mambaforge/etc/profile.d/conda.sh" ]; then
. "/home/$USER/.local/share/mambaforge/etc/profile.d/conda.sh"
else
export PATH="/home/sortion/.local/share/mambaforge/bin:$PATH"
export PATH="/home/$USER/.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"
if [ -f "/home/$USER/.local/share/mambaforge/etc/profile.d/mamba.sh" ]; then
. "/home/$USER/.local/share/mambaforge/etc/profile.d/mamba.sh"
fi
# <<< conda initialize <<<

8
.zshrc
View File

@ -1,9 +1,9 @@
autoload antigen
source ~/.aliases
source ~/.loadenv.sh
source ~/.aliases
source ~/.dotfiles/antigen/antigen.zsh
antigen use oh-my-zsh
@ -34,8 +34,12 @@ source ~/.antigen/bundles/nojhan/liquidprompt/liquidprompt
# source ~/.antigen/bundles/nojhan/liquidprompt/themes/powerline/powerline.theme && lp_theme powerline
source ~/.dotfiles/liquidprompt/lp-mouse/preset.conf
source ~/.antigen/bundles/nojhan/lp-dotmatrix/presets/variant-chevron.conf
source ~/.antigen/bundles/nojhan/lp-dotmatrix/presets/colors_green-red.conf
source ~/.antigen/bundles/nojhan/lp-dotmatrix/dotmatrix.theme && lp_theme dotmatrix
# source <(/home/sortion/.cargo/bin/starship init zsh --print-full-init)

View File

@ -3,9 +3,9 @@ all: pull install
pull:
git pull
install: antigen source fish
install: antigen source emacs nvim
source: fishcfg
source: fish
cp ~/.dotfiles/.aliases ~/.aliases
cp ~/.dotfiles/.zshrc ~/.zshrc
cp ~/.dotfiles/.loadenv.sh ~/.loadenv.sh
@ -13,13 +13,18 @@ source: fishcfg
cp ~/.dotfiles/.gitconfig ~/.gitconfig
cp ~/.dotfiles/.latexmkrc ~/.latexmkrc
fishcfg:
fish:
mkdir -p ~/.config/fish
cp ./.config/fish/config.fish ~/.config/fish/config.fish
cp ./.aliases.fish ~/.aliases.fish
cp ./.config/starship.toml ~/.config/starship.toml
nvim:
git clone ssh://gitea@forge.chapril.org:222/sortion/nvim.conf ~/.config/nvim/
emacs:
git clone ssh://gitea@forge.chapril.org:222/sortion/.emacs.d.git ~/.emacs.d/
antigen:
git clone https://github.com/zsh-users/antigen.git

1
liquidprompt/lp-mouse Submodule

@ -0,0 +1 @@
Subproject commit 9cc137a33be56f01a3228971cf263b530c14f9ef