From d7391e35c05c439b3628b07fbd7c18439fc7845c Mon Sep 17 00:00:00 2001 From: Samuel Ortion Date: Sat, 19 Aug 2023 07:20:51 +0200 Subject: [PATCH 1/3] Add scala to path --- .loadenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.loadenv.sh b/.loadenv.sh index 376f7e4..98a9247 100644 --- a/.loadenv.sh +++ b/.loadenv.sh @@ -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//" +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 EDITOR=vim export ALTERNATE_EDITOR="" From e74e5623ae5ff7384ec9c7f1263624df111d101b Mon Sep 17 00:00:00 2001 From: Samuel Ortion Date: Sat, 2 Dec 2023 18:12:17 +0100 Subject: [PATCH 3/3] feat: Leon dotfiles --- .aliases | 13 ++++++------ .bash_profile | 12 +++++++++++ .bashrc | 28 ++++++++++++++++++++++++++ .gitignore | 1 + .latexmkrc | 7 +++---- .loadenv.sh | 9 ++++++++- .profile | 26 ------------------------ .vimrc | 3 +++ Makefile | 3 --- README.md | 2 ++ fish/config.fish | 39 ++++++++++++++++++++++++++++++++++++ starship.toml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 155 insertions(+), 40 deletions(-) create mode 100644 .bash_profile create mode 100644 .bashrc create mode 100644 README.md create mode 100644 fish/config.fish create mode 100644 starship.toml diff --git a/.aliases b/.aliases index 6426d02..0999900 100644 --- a/.aliases +++ b/.aliases @@ -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"; diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..fee7c10 --- /dev/null +++ b/.bash_profile @@ -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 \ No newline at end of file diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..b95ddec --- /dev/null +++ b/.bashrc @@ -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 + diff --git a/.gitignore b/.gitignore index e922891..f4cfece 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ antigen/ +.vscode/ diff --git a/.latexmkrc b/.latexmkrc index ad341c4..384a37a 100644 --- a/.latexmkrc +++ b/.latexmkrc @@ -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 diff --git a/.loadenv.sh b/.loadenv.sh index 98a9247..d204d1f 100644 --- a/.loadenv.sh +++ b/.loadenv.sh @@ -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 diff --git a/.profile b/.profile index 1279183..a8b47ec 100644 --- a/.profile +++ b/.profile @@ -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 diff --git a/.vimrc b/.vimrc index 85e61e5..444e1ac 100644 --- a/.vimrc +++ b/.vimrc @@ -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 diff --git a/Makefile b/Makefile index 6dfd420..67533b3 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..6a819db --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# .dotfiles +My dotfiles diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..1fa06b7 --- /dev/null +++ b/fish/config.fish @@ -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 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 = " "