feat: Leon dotfiles

This commit is contained in:
Samuel Ortion 2023-12-02 18:12:17 +01:00
parent ff64f24cc2
commit e74e5623ae
12 changed files with 155 additions and 40 deletions

View File

@ -3,9 +3,10 @@ alias o="xdg-open"
alias pro="cd ~/Documents/Projects"
alias doc="cd ~/Documents"
alias vim="nvim"
alias int="cd ~/Documents/cours/licence/L3/stage/pasteur/projects/"
alias int="cd ~/Documents/course/licence/L3/stage/pasteur/projects/"
alias pdf="latexmk -pdf"
alias blog="cd ~/Documents/Projects/myself/log/"
alias cours="cd ~/Documents/cours/master/M1/S1/"
alias course="cd ~/Documents/course/master/M1/S1/"
# Print field name from header with the field rank
csv_fields() {
@ -18,10 +19,10 @@ csv_fields() {
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"'
export templates_dir="/home/$USER/Documents/Projects/templates"
alias new.td='copier copy --trust "$templates_dir/latex/td.template"'
alias new.cm='copier copy --trust "$templates_dir/latex/cm.template"'
alias new.letter='copier copy --trust "$templates_dir/latex/letter.template"'
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";

12
.bash_profile Normal file
View File

@ -0,0 +1,12 @@
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH

28
.bashrc Normal file
View File

@ -0,0 +1,28 @@
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc

1
.gitignore vendored
View File

@ -1 +1,2 @@
antigen/
.vscode/

View File

@ -5,8 +5,7 @@ $hash_calc_ignore_pattern{aux} =
$pdflatex =
'lualatex -shell-escape -file-line-error -interaction=nonstopmode -synctex=1 -output-directory=build %O '
. '\'\PassOptionsToPackage{outputdir=build}{minted}\input{%S}\''
. '| texlogsieve';
. '\'\PassOptionsToPackage{outputdir=build}{minted}\input{%S}\'';
$aux_dir = 'build';
$bibtex_use = 2;
@ -34,8 +33,8 @@ sub biber {
return system "biber", @args;
}
$silent = 1; # This adds "-interaction batchmode"
$silence_logfile_warnings = 1;
# $silent = 1; # This adds "-interaction batchmode"
# $silence_logfile_warnings = 1;
END {
local $?; # do not override previous exit status

View File

@ -1,4 +1,4 @@
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/:/home/$USER/.local/share/coursier/bin/"
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/:/home/$USER/.local/share/coursier/bin/:/opt/quarto/bin/:/home/$USER/Documents/course/tools/bin/"
# export EDITOR=vim
export ALTERNATE_EDITOR=""
@ -36,3 +36,10 @@ 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 <<<
# Init Guix
if command -v guix &> /dev/null
then
GUIX_PROFILE="$HOME/.config/guix/current"
. "$GUIX_PROFILE/etc/profile"
fi

View File

@ -18,29 +18,3 @@ if [ -x /usr/bin/fortune ] ; then
echo
fi
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

3
.vimrc
View File

@ -1,4 +1,5 @@
" My Own vimrc"
set nocompatible
filetype on
@ -13,6 +14,8 @@ set number
set cursorline
" set cursorcolumn"
set tabstop=4
set expandtab

View File

@ -23,9 +23,6 @@ fish:
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

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# .dotfiles
My dotfiles

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