.dotfiles/.aliases

35 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

alias o="xdg-open"
2023-07-02 15:53:35 +02:00
2023-12-12 16:49:21 +01:00
alias pdf="latexmk -pdf -gg"
alias pro="cd ~/Documents/Projects"
alias doc="cd ~/Documents"
2023-12-02 18:12:17 +01:00
alias int="cd ~/Documents/course/licence/L3/stage/pasteur/projects/"
alias pdf="latexmk -pdf"
2023-08-10 19:45:10 +02:00
alias blog="cd ~/Documents/Projects/myself/log/"
2023-11-23 13:49:23 +01:00
alias course="cd ~/Documents/course/master/M1/T1/"
2023-08-10 19:45:10 +02:00
# 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"
2023-12-12 16:49:21 +01:00
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"'
2023-07-02 15:53:35 +02:00
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\./')"
2023-07-02 15:53:35 +02:00
}