diff --git a/docs/bash.html b/docs/bash.html index 8c17f6e..7126106 100644 --- a/docs/bash.html +++ b/docs/bash.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Bash Configuration @@ -43,6 +43,7 @@
  • One letter aliases
  • Neovim
  • Magit
  • +
  • Homelab Relative
  • Vim-like
  • Print each PATH entry on a separate line
  • @@ -75,6 +76,7 @@
  • Use Ripgrep for FZF
  • Goland
  • Latex Path
  • +
  • Bitwarden Session
  • Path
  • @@ -94,7 +96,7 @@

    What does that do?

    -
    [[ $- != *i* ]] && return
    +
    [[ $- != *i* ]] && return
     
    @@ -104,7 +106,7 @@

    Bash Completion

    -
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
    +
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
     
    @@ -114,8 +116,8 @@

    Ignore case for autocompletion

    -
    bind "set completion-ignore-case on"
    -bind "set show-all-if-ambiguous on"
    +
    bind "set completion-ignore-case on"
    +bind "set show-all-if-ambiguous on"
     
    @@ -125,9 +127,9 @@ bind "set show-all-if-ambiguous on"

    Use Color

    -
    use_color=true
    -alias ls='ls -hN --color=auto --group-directories-first'
    -alias grep='grep --colour=auto'
    +
    use_color=true
    +alias ls='ls -hN --color=auto --group-directories-first'
    +alias grep='grep --colour=auto'
     
    @@ -141,38 +143,38 @@ dircolors –print-database uses its own built-in database instead of using

    -
    safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
    -match_lhs=""
    -[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
    -[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
    -[[ -z ${match_lhs}    ]] \
    -  && type -P dircolors >/dev/null \
    -  && match_lhs=$(dircolors --print-database)
    -[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
    +
    safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
    +match_lhs=""
    +[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
    +[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
    +[[ -z ${match_lhs}    ]] \
    +  && type -P dircolors >/dev/null \
    +  && match_lhs=$(dircolors --print-database)
    +[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
     
    -if ${use_color} ; then
    -  # Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
    -  if type -P dircolors >/dev/null ; then
    -    if [[ -f ~/.dir_colors ]] ; then
    -      eval $(dircolors -b ~/.dir_colors)
    -    elif [[ -f /etc/DIR_COLORS ]] ; then
    -      eval $(dircolors -b /etc/DIR_COLORS)
    -    fi
    -  fi
    +if ${use_color} ; then
    +  # Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
    +  if type -P dircolors >/dev/null ; then
    +    if [[ -f ~/.dir_colors ]] ; then
    +      eval $(dircolors -b ~/.dir_colors)
    +    elif [[ -f /etc/DIR_COLORS ]] ; then
    +      eval $(dircolors -b /etc/DIR_COLORS)
    +    fi
    +  fi
     
    -  if [[ ${EUID} == 0 ]] ; then
    -    PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
    -  else
    -    PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
    -  fi
    -else
    -  if [[ ${EUID} == 0 ]] ; then
    -    # show root@ when we don't have colors
    -    PS1='\u@\h \W \$ '
    -  else
    -    PS1='\u@\h \w \$ '
    -  fi
    -fi
    +  if [[ ${EUID} == 0 ]] ; then
    +    PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
    +  else
    +    PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
    +  fi
    +else
    +  if [[ ${EUID} == 0 ]] ; then
    +    # show root@ when we don't have colors
    +    PS1='\u@\h \W \$ '
    +  else
    +    PS1='\u@\h \w \$ '
    +  fi
    +fi
     
    @@ -182,22 +184,22 @@ fi

    Some config

    -
    unset use_color safe_term match_lhs sh
    +
    unset use_color safe_term match_lhs sh
     
    -xhost +local:root > /dev/null 2>&1
    +xhost +local:root > /dev/null 2>&1
     
    -complete -cf sudo
    +complete -cf sudo
     
    -# Line wrap on window resize
    -shopt -s checkwinsize
    +# Line wrap on window resize
    +shopt -s checkwinsize
     
    -shopt -s expand_aliases
    +shopt -s expand_aliases
     
    -# Auto "cd" when entering just a path
    -shopt -s autocd
    +# Auto "cd" when entering just a path
    +shopt -s autocd
     
    -# Enable history appending instead of overwriting
    -shopt -s histappend
    +# Enable history appending instead of overwriting
    +shopt -s histappend
     
    @@ -207,7 +209,7 @@ shopt -s histappend

    Prompt

    -
    export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
    +
    export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
     
    @@ -217,12 +219,12 @@ shopt -s histappend

    SSH Agent

    -
    # if ! pgrep -u "$USER" ssh-agent > /dev/null; then
    -#     ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
    -# fi
    -# if [[ ! "$SSH_AUTH_SOCK" ]]; then
    -#     eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
    -# fi
    +
    # if ! pgrep -u "$USER" ssh-agent > /dev/null; then
    +#     ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
    +# fi
    +# if [[ ! "$SSH_AUTH_SOCK" ]]; then
    +#     eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
    +# fi
     
    @@ -232,8 +234,8 @@ shopt -s histappend

    Rebind up and down arrow keys to search through bash history

    -
    bind '"\e[A": history-search-backward'
    -bind '"\e[B": history-search-forward'
    +
    bind '"\e[A": history-search-backward'
    +bind '"\e[B": history-search-forward'
     
    @@ -247,11 +249,11 @@ bind '"\e[B": history-search-forward'

    Better defaults for some commands

    -
    alias cp="cp -i"     # confirm before overwriting something
    -alias df='df -h'     # human-readable sizes
    -alias free='free -m' # show sizes in MB
    -alias mutt="neomutt"
    -alias tmux='tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf'
    +
    alias cp="cp -i"     # confirm before overwriting something
    +alias df='df -h'     # human-readable sizes
    +alias free='free -m' # show sizes in MB
    +alias mutt="neomutt"
    +alias tmux='tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf'
     
    @@ -261,15 +263,15 @@ alias tmux='tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf'

    One letter aliases

    -
    alias r="ranger"
    -alias t="tmux"
    -alias v="nvim"
    -alias sv='sudo -E nvim'
    -alias g="git"
    -alias m="neomutt"
    -alias y="yadm"
    -alias o="xdg-open"
    -alias x="sxiv -ft *"
    +
    alias r="ranger"
    +alias t="tmux"
    +alias v="nvim"
    +alias sv='sudo -E nvim'
    +alias g="git"
    +alias m="neomutt"
    +alias y="yadm"
    +alias o="xdg-open"
    +alias x="sxiv -ft *"
     
    @@ -279,7 +281,7 @@ alias x="sxiv -ft *"

    Neovim

    -
    command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Use neovim for vim if present.
    +
    command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Use neovim for vim if present.
     
    @@ -289,8 +291,18 @@ alias x="sxiv -ft *"

    Magit

    -
    # alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)'"
    -alias magit="nvim -c MagitOnly"
    +
    # alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)'"
    +alias magit="nvim -c MagitOnly"
    +
    +
    +
    + + +
    +

    Homelab Relative

    +
    +
    +
    alias dlab="aria2p --port 6800 --host http://dl.tdehaeze.xyz --secret $(pass dl.tdehaeze.xyz/tdehaeze | sed -n 1p)"
     
    @@ -300,8 +312,8 @@ alias magit="nvim -c MagitOnly"

    Vim-like

    -
    alias :q=exit
    -alias :e=nvim
    +
    alias :q=exit
    +alias :e=nvim
     
    @@ -311,7 +323,7 @@ alias :e=nvim

    Print each PATH entry on a separate line

    -
    alias path='echo -e ${PATH//:/\\n}'
    +
    alias path='echo -e ${PATH//:/\\n}'
     
    @@ -326,32 +338,32 @@ alias :e=nvim

    Display colors

    -
    colors() {
    -    local fgc bgc vals seq0
    +
    colors() {
    +    local fgc bgc vals seq0
     
    -    printf "Color escapes are %s\n" '\e[${value};...;${value}m'
    -    printf "Values 30..37 are \e[33mforeground colors\e[m\n"
    -    printf "Values 40..47 are \e[43mbackground colors\e[m\n"
    -    printf "Value  1 gives a  \e[1mbold-faced look\e[m\n\n"
    +    printf "Color escapes are %s\n" '\e[${value};...;${value}m'
    +    printf "Values 30..37 are \e[33mforeground colors\e[m\n"
    +    printf "Values 40..47 are \e[43mbackground colors\e[m\n"
    +    printf "Value  1 gives a  \e[1mbold-faced look\e[m\n\n"
     
    -    # foreground colors
    -    for fgc in {30..37}; do
    -        # background colors
    -        for bgc in {40..47}; do
    -            fgc=${fgc#37} # white
    -            bgc=${bgc#40} # black
    +    # foreground colors
    +    for fgc in {30..37}; do
    +        # background colors
    +        for bgc in {40..47}; do
    +            fgc=${fgc#37} # white
    +            bgc=${bgc#40} # black
     
    -            vals="${fgc:+$fgc;}${bgc}"
    -            vals=${vals%%;}
    +            vals="${fgc:+$fgc;}${bgc}"
    +            vals=${vals%%;}
     
    -            seq0="${vals:+\e[${vals}m}"
    -            printf "  %-9s" "${seq0:-(default)}"
    -            printf " ${seq0}TEXT\e[m"
    -            printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
    -        done
    -        echo; echo
    -    done
    -}
    +            seq0="${vals:+\e[${vals}m}"
    +            printf "  %-9s" "${seq0:-(default)}"
    +            printf " ${seq0}TEXT\e[m"
    +            printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
    +        done
    +        echo; echo
    +    done
    +}
     
    @@ -368,9 +380,9 @@ small enough for one screen.

    -
    function tre() {
    -    tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX;
    -}
    +
    function tre() {
    +    tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX;
    +}
     
    @@ -380,9 +392,9 @@ small enough for one screen.

    Create a new directory and enter it

    -
    function mkd() {
    -    mkdir -p "$@" && cd "$_";
    -}
    +
    function mkd() {
    +    mkdir -p "$@" && cd "$_";
    +}
     
    @@ -392,18 +404,18 @@ small enough for one screen.

    Filesize of directory

    -
    function fs() {
    -    if du -b /dev/null > /dev/null 2>&1; then
    -        local arg=-sbh;
    -    else
    -        local arg=-sh;
    -    fi
    -    if [[ -n "$@" ]]; then
    -        du $arg -- "$@";
    -    else
    -        du $arg .[^.]* ./*;
    -    fi;
    -}
    +
    function fs() {
    +    if du -b /dev/null > /dev/null 2>&1; then
    +        local arg=-sbh;
    +    else
    +        local arg=-sh;
    +    fi
    +    if [[ -n "$@" ]]; then
    +        du $arg -- "$@";
    +    else
    +        du $arg .[^.]* ./*;
    +    fi;
    +}
     
    @@ -413,9 +425,9 @@ small enough for one screen.

    Redirect both standard output and standard error, as well as sending to background

    -
    function nullify() {
    -    "$@" >/dev/null 2>&1
    -}
    +
    function nullify() {
    +    "$@" >/dev/null 2>&1
    +}
     
    @@ -428,21 +440,21 @@ small enough for one screen. https://doronbehar.com/articles/using-kdeconnect-to-comfortably-send-sms-messages-from-the-shell/#kdeconnects-builtin-sms-interface

    -
    sms(){
    -    local args="$@"
    -    # local phone_number name phone_type
    -    # khard phone --parsable | sort -u | fzf | IFS=$'\t' read -r phone_number name phone_type
    -    local phone_number=$(khard phone --parsable | sort -u | fzf | cut -f1 -d$'\t')
    -    if [[ -z "${phone_number}" ]]; then
    -        echo No recipient was chosen >&2
    -        return
    -    else
    -        # echo "${name}"$'\t'"${phone_number}"$'\t'"${phone_type}" > ${_KDECONNECT_SMS_LAST_RECIPIENT}
    -        kdeconnect-cli --send-sms "${args}" --destination "${phone_number}" --device 4de3b5de2264a17c
    -        # kdeconnect-cli --device ${_KDECONNECT_DEFAULT_DEVICE} --send-sms "${args}" --destination "${phone_number}" && \
    -            # echo sent sms message to ${name} | fribidi
    -    fi
    -}
    +
    sms(){
    +    local args="$@"
    +    # local phone_number name phone_type
    +    # khard phone --parsable | sort -u | fzf | IFS=$'\t' read -r phone_number name phone_type
    +    local phone_number=$(khard phone --parsable | sort -u | fzf | cut -f1 -d$'\t')
    +    if [[ -z "${phone_number}" ]]; then
    +        echo No recipient was chosen >&2
    +        return
    +    else
    +        # echo "${name}"$'\t'"${phone_number}"$'\t'"${phone_type}" > ${_KDECONNECT_SMS_LAST_RECIPIENT}
    +        kdeconnect-cli --send-sms "${args}" --destination "${phone_number}" --device 4de3b5de2264a17c
    +        # kdeconnect-cli --device ${_KDECONNECT_DEFAULT_DEVICE} --send-sms "${args}" --destination "${phone_number}" && \
    +            # echo sent sms message to ${name} | fribidi
    +    fi
    +}
     
     
    @@ -457,9 +469,9 @@ Undocumented feature which sets the size to “unlimited”. -
    export HISTFILESIZE=
    -export HISTSIZE=
    -export HISTTIMEFORMAT="[%F %T] "
    +
    export HISTFILESIZE=
    +export HISTSIZE=
    +export HISTTIMEFORMAT="[%F %T] "
     
    @@ -468,7 +480,7 @@ Change the file location because certain bash sessions truncate .bash_hist

    -
    export HISTFILE=~/.bash_eternal_history
    +
    export HISTFILE=~/.bash_eternal_history
     
    @@ -477,7 +489,7 @@ Force prompt to write history after every command.
    -
    PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
    +
    PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
     
    @@ -488,8 +500,8 @@ Force prompt to write history after every command.
    Bash Profile
    -
    [[ -f ~/.profile ]] && . ~/.profile
    -[[ -f ~/.bashrc ]] && . ~/.bashrc
    +
    [[ -f ~/.profile ]] && . ~/.profile
    +[[ -f ~/.bashrc ]] && . ~/.bashrc
     
    @@ -504,8 +516,8 @@ Force prompt to write history after every command.
    QT And GTK Themes
    -
    export QT_QPA_PLATFORMTHEME="qt5ct"
    -export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
    +
    export QT_QPA_PLATFORMTHEME="qt5ct"
    +export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
     
    @@ -515,7 +527,7 @@ export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

    Gui program to ask for sudo password

    -
    export SUDO_ASKPASS=~/.local/bin/askpass-rofi
    +
    export SUDO_ASKPASS=~/.local/bin/askpass-rofi
     
    @@ -525,10 +537,10 @@ export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

    Gnome Keyring Daemon

    -
    if [ -n "$DESKTOP_SESSION" ];then
    -    eval $(gnome-keyring-daemon --start)
    -    export SSH_AUTH_SOCK
    -fi
    +
    if [ -n "$DESKTOP_SESSION" ];then
    +    eval $(gnome-keyring-daemon --start)
    +    export SSH_AUTH_SOCK
    +fi
     
    @@ -538,11 +550,11 @@ fi

    Default

    -
    export EDITOR="nvim"
    -export TERMINAL="termite"
    -export BROWSER="qutebrowser"
    -export READER="zathura"
    -export FILE="ranger"
    +
    export EDITOR="nvim"
    +export TERMINAL="termite"
    +export BROWSER="qutebrowser"
    +export READER="zathura"
    +export FILE="ranger"
     
    @@ -559,7 +571,7 @@ export FILE="ranger" This is important for termite to work when sshing in remote machines.

    -
    export TERM=xterm-color
    +
    export TERM=xterm-color
     
    @@ -569,7 +581,7 @@ This is important for termite to work when sshing in remote machines.

    XDG Default

    -
    export XDG_CONFIG_HOME="$HOME/.config"
    +
    export XDG_CONFIG_HOME="$HOME/.config"
     
    @@ -579,7 +591,7 @@ This is important for termite to work when sshing in remote machines.

    Better yaourt colors

    -
    export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
    +
    export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
     
    @@ -589,8 +601,8 @@ This is important for termite to work when sshing in remote machines.

    Use Ripgrep for FZF

    -
    export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
    -export FZF_DEFAULT_OPTS='--layout=reverse --height=20'
    +
    export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
    +export FZF_DEFAULT_OPTS='--layout=reverse --height=20'
     
    @@ -600,7 +612,7 @@ export FZF_DEFAULT_OPTS='--layout=reverse --height=20'

    Goland

    -
    export GOPATH=$HOME/go
    +
    export GOPATH=$HOME/go
     
    @@ -610,7 +622,17 @@ export FZF_DEFAULT_OPTS='--layout=reverse --height=20'

    Latex Path

    -
    export TEXMFHOME=$HOME/.local/share/texmf
    +
    export TEXMFHOME=$HOME/.local/share/texmf
    +
    +
    +
    + + +
    +

    Bitwarden Session

    +
    +
    +
    export BW_SESSION="HH0yycfocRSuGtq/iW1e6v13PQ1sShMXbMhdb/En94S6OcIXFnJlLEyU+dySsmf2YShY4CImoB5FrxgdPsY9Qw=="
     
    @@ -621,12 +643,12 @@ export FZF_DEFAULT_OPTS='--layout=reverse --height=20'

    Path

    -
    PATH=$HOME/appimages:$PATH
    -PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH
    -PATH=$GOPATH:$GOPATH/bin:$PATH
    -PATH=~/.local/bin:$PATH
    -PATH=~/.emacs.d/bin:$PATH
    -export PATH
    +
    PATH=$HOME/appimages:$PATH
    +PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH
    +PATH=$GOPATH:$GOPATH/bin:$PATH
    +PATH=~/.local/bin:$PATH
    +PATH=~/.emacs.d/bin:$PATH
    +export PATH
     
    @@ -640,10 +662,10 @@ export PATH Completion:

    -
    # Single tab for autocompletion
    +
    # Single tab for autocompletion
     set show-all-if-ambiguous on
     
    -# Ignore case for completion
    +# Ignore case for completion
     set completion-ignore-case on
     
    @@ -652,15 +674,15 @@ set completion-ignore-case on vi mode:

    -
    # VI mode (works in bash and zsh)
    +
    # VI mode (works in bash and zsh)
     set editing-mode vi
     
    -# Show which mode (normal or insert)
    +# Show which mode (normal or insert)
     set show-mode-in-prompt on
     
    -# Show the mode by changing the cursor
    -set vi-ins-mode-string \1\e[6 q\2
    -set vi-cmd-mode-string \1\e[2 q\2
    +# Show the mode by changing the cursor
    +set vi-ins-mode-string \1\e[6 q\2
    +set vi-cmd-mode-string \1\e[2 q\2
     
    @@ -669,18 +691,18 @@ Key-bindings for vi-mode:

    set keymap vi-command
    -# these are for vi-command mode
    +# these are for vi-command mode
     Control-l: clear-screen
     Control-a: beginning-of-line
     Control-e: end-of-line
    -Control-w: "\C-aisudo \C-e"
    +Control-w: "\C-aisudo \C-e"
     
     set keymap vi-insert
    -# these are for vi-insert mode
    +# these are for vi-insert mode
     Control-l: clear-screen
     Control-a: beginning-of-line
     Control-e: end-of-line
    -Control-w: "\C-asudo \C-e"
    +Control-w: "\C-asudo \C-e"
     
    @@ -688,15 +710,15 @@ Control-w: "\C-asudo \C-e" Colorized completion

    -
    # Color files by types
    +
    # Color files by types
     set colored-stats On
    -# Append char to indicate type
    +# Append char to indicate type
     set visible-stats On
    -# Mark symlinked directories
    +# Mark symlinked directories
     set mark-symlinked-directories On
    -# Color the common prefix
    +# Color the common prefix
     set colored-completion-prefix On
    -# Color the common prefix in menu-complete
    +# Color the common prefix in menu-complete
     set menu-complete-display-prefix On
     
    @@ -713,7 +735,7 @@ Don’t echo ^C after Ctrl+C is pressed.

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/binaries-private.html b/docs/binaries-private.html index d15b098..f9636a3 100644 --- a/docs/binaries-private.html +++ b/docs/binaries-private.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + My own specific binaries @@ -31,6 +31,10 @@
  • tmp14 - Mount/Umount tmp_14_days folder
  • nas - Interact with the NAS
  • torrent-add - Download Torrent
  • +
  • note-extract-fig - Extract Figure from note file
  • +
  • share - Share file with self-hosted transfer.sh
  • +
  • screen-select - Xrandr pre-defined scripts
  • +
  • color-picker - Pick color and copy to clipboard
  • @@ -39,25 +43,28 @@

    remote-desktop - Remote Desktop Connect

    -
    computer=$(echo -e 'RNICE\nPCMEL1\nPCNASS1\nPCMEG01' | dmenu -p 'Computer:' -l 20);
    +
    computer=$(echo -e 'RNICE\nPCMEL1\nPCNASS1\nPCMEG01' | dmenu -p 'Computer:' -l 20);
     
    -case $computer in
    +dunstify --replace=89891 'Rdesktop' "Connection to ${computer}..."
    +
    +case $computer in
         PCMEL1)
    -          rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\OPPEL" -p $(pass esrf/PCMEL1/OPPEL | sed -n 1p) pcmel1
    +          xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass ssl.esrf.fr/dehaeze | sed -n 1p) /v:PCMEL1.esrf.fr;
               ;;
         PCMEG01)
    -          rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\DEHAEZE" -p $(pass ssl.esrf.fr/dehaeze | sed -n 1p) pcmeg01
    +          xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass ssl.esrf.fr/dehaeze | sed -n 1p) /v:PCMEG01.esrf.fr;
               ;;
         PCNASS1)
    -          rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\DEHAEZE" -p $(pass ssl.esrf.fr/dehaeze | sed -n 1p) pcnass1
    +          xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass ssl.esrf.fr/dehaeze | sed -n 1p) /v:PCNASS1.esrf.fr;
               ;;
         RNICE)
    -          echo "Not yet implemented"
    +          xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass ssl.esrf.fr/dehaeze | sed -n 1p) /v:rnice.esrf.fr;
               ;;
         *)
    -          echo "Not existing"
    +          echo "Not existing" && \
    +           dunstify --replace=89891 --urgency=critical 'Rdesktop' "No config for $computer";
               ;;
    -esac
    +esac
     
    @@ -67,17 +74,18 @@ esac

    print-rnice - Print on Rnice

    -
    nbpage=$(echo -e '1\n2\n4' | dmenu -p 'Number of pages per sheet' -l 20);
    -sides=$(echo -e 'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge' | dmenu -p 'Two Sided:' -l 20);
    +
    nbpage=$(echo -e '1\n2\n4' | dmenu -p 'Number of pages per sheet' -l 20);
    +sides=$(echo -e 'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge' | dmenu -p 'Two Sided:' -l 20);
    +media=$(echo -e 'A4\nA3' | dmenu -p 'Size:' -l 20);
     
    -# First copy the file to Rnice
    -if sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" scp $1 dehaeze@rnice:~/Downloads/; then
    -  # Then print on Rnice
    -  sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" ssh dehaeze@rnice "lpr -o media=A4 -o sides=$sides -o number-up=$nbpage -P ctb110c1u ~/Downloads/$1";
    -  # Finally, delete the file
    -else
    -  echo "Command Failed"
    -fi
    +# First copy the file to Rnice
    +if sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" scp $1 dehaeze@rnice:~/Downloads/; then
    +  # Then print on Rnice
    +  sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" ssh dehaeze@rnice "lpr -o media=$media -o sides=$sides -o number-up=$nbpage -P ctb110c1u ~/Downloads/$1";
    +  # Finally, delete the file
    +else
    +  echo "Command Failed"
    +fi
     
    @@ -87,19 +95,19 @@ fi

    tmp14 - Mount/Umount tmp_14_days folder

    -
    if [ $1 == "mount" ]; then
    -    if sshfs -o allow_other,default_permissions -p 5022 dehaeze@firewall.esrf.fr:/tmp_14_days/ ~/mnt/ESRF; then
    -        dunstify --replace=58249 'ESRF TMP ' 'Successfully mounted'
    -    else
    -        dunstify --replace=58249 --urgency=critical 'ESRF TMP ' 'Error while mounted'
    -    fi
    -elif [ $1 == "umount" ]; then
    -    if umount /home/thomas/mnt/ESRF/; then
    -        dunstify --replace=58249 'ESRF TMP ' 'Successfully unmounted'
    -    else
    -        dunstify --replace=58249 --urgency=critical 'ESRF TMP ' 'Error while unmounted'
    -    fi
    -fi
    +
    if [ $1 == "mount" ]; then
    +    if sshfs -o allow_other,default_permissions -p 5022 dehaeze@firewall.esrf.fr:/tmp_14_days/ ~/mnt/ESRF; then
    +        dunstify --replace=58249 'ESRF TMP ' 'Successfully mounted'
    +    else
    +        dunstify --replace=58249 --urgency=critical 'ESRF TMP ' 'Error while mounted'
    +    fi
    +elif [ $1 == "umount" ]; then
    +    if umount /home/thomas/mnt/ESRF/; then
    +        dunstify --replace=58249 'ESRF TMP ' 'Successfully unmounted'
    +    else
    +        dunstify --replace=58249 --urgency=critical 'ESRF TMP ' 'Error while unmounted'
    +    fi
    +fi
     
    @@ -118,19 +126,19 @@ As an alternative, sshfs can be used:
    -
    if [ $1 == "mount" ]; then
    -    if mount /home/thomas/mnt/NAS/; then
    -        dunstify --replace=58249 'NAS ' 'Successfully mounted'
    -    else
    -        dunstify --replace=58249 --urgency=critical 'NAS ' 'Error while mounted'
    -    fi
    -elif [ $1 == "umount" ]; then
    -    if umount /home/thomas/mnt/NAS/; then
    -        dunstify --replace=58249 'NAS ' 'Successfully unmounted'
    -    else
    -        dunstify --replace=58249 --urgency=critical 'NAS ' 'Error while unmounted'
    -    fi
    -fi
    +
    if [ $1 == "mount" ]; then
    +    if mount /home/thomas/mnt/NAS/; then
    +        dunstify --replace=58249 'NAS ' 'Successfully mounted'
    +    else
    +        dunstify --replace=58249 --urgency=critical 'NAS ' 'Error while mounted'
    +    fi
    +elif [ $1 == "umount" ]; then
    +    if umount /home/thomas/mnt/NAS/; then
    +        dunstify --replace=58249 'NAS ' 'Successfully unmounted'
    +    else
    +        dunstify --replace=58249 --urgency=critical 'NAS ' 'Error while unmounted'
    +    fi
    +fi
     
    @@ -140,18 +148,94 @@ fi

    torrent-add - Download Torrent

    -
    transmission-remote 82.64.103.2:9091 --auth tdehaeze:$(pass nas/transmission | sed -n 1p) -a $1 && \
    -    dunstify 'Torrent' 'Successfully added' || \
    -    dunstify 'Torrent' 'Error'
    +
    transmission-remote 82.64.103.2:9091 --auth tdehaeze:$(pass nas/transmission | sed -n 1p) -a $1 && \
    +    dunstify 'Torrent' 'Successfully added' || \
    +    dunstify 'Torrent' 'Error'
     
     
    + +
    +

    note-extract-fig - Extract Figure from note file

    +
    +

    +Script used to convert a figure drawn on my Boox note2 to a png file that can then be imported into a document. +

    + +
    +
    # First check that the first argument is a pdf file
    +if [[ -f $1 && $1 == *.pdf ]]; then
    +  pngfile=$(echo $1 | cut -f 1 -d '.' | sed 's/$/.png/')
    +
    +  # Convert to png and crop png
    +  pdf2png $1 && convert -trim "$pngfile" "$pngfile"
    +fi
    +
    +
    +
    +
    + +
    +

    share - Share file with self-hosted transfer.sh

    +
    +
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://file.tdehaeze.xyz/ | xsel -ib && dunstify 'Upload' 'Successful' || dunstify --urgency=critical 'Upload' 'Failed';" && tmux select-pane -U
    +else
    +    curl --progress-bar -F"file=@$1" https://file.tdehaeze.xyz/ | xsel -ib && \
    +        dunstify 'Upload' 'Successful' || \
    +        dunstify --urgency=critical 'Upload' 'Failed'
    +fi
    +
    +
    +
    +
    + +
    +

    screen-select - Xrandr pre-defined scripts

    +
    +
    +
    option=$(echo -e "Work\nXPS\nHome" | rofi -i -dmenu)
    +
    +case "$option" in
    +    "Work")
    +        xrandr --output eDP1 --off --output DP1 --off --output DP1-1 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DP1-2 --off --output DP2 --off --output VIRTUAL1 --off
    +        ;;
    +    "XPS")
    +        xrandr --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP1 --off --output DP1-1 --off --output DP1-2 --off --output DP2 --off --output VIRTUAL1 --off
    +        ;;
    +    "Home")
    +        xrandr --output eDP1 --off --output DP1 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DP2 --off --output VIRTUAL1 --off
    +        ;;
    +    *)
    +        echo "== ! missing or invalid argument ! =="
    +        exit 2
    +esac
    +
    +setbg    # Fix background if screen size/arangement has changed.
    +$HOME/.config/polybar/scripts/launch.sh # restart polybar
    +
    +exit 0
    +
    +
    +
    +
    + +
    +

    color-picker - Pick color and copy to clipboard

    +
    +
    +
    xcolor | xsel -b
    +
    +
    +
    +

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/binaries.html b/docs/binaries.html index f637348..c40e6db 100644 --- a/docs/binaries.html +++ b/docs/binaries.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Binaries @@ -27,6 +27,8 @@ @@ -63,72 +67,206 @@ Script taken from Luke Smith.

    -
    twoscreen() { # If multi-monitor is selected and there are two screens.
    +
    twoscreen() { # If multi-monitor is selected and there are two screens.
     
    -    mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
    -    # Mirror displays using native resolution of external display and a scaled
    -    # version for the internal display
    -    if [ "$mirror" = "yes" ]; then
    -        external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
    -        internal=$(echo "$screens" | grep -v "$external")
    +    mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
    +    # Mirror displays using native resolution of external display and a scaled
    +    # version for the internal display
    +    if [ "$mirror" = "yes" ]; then
    +        external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
    +        internal=$(echo "$screens" | grep -v "$external")
     
    -        res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
    -                           tail -n 1 | awk '{print $1}')
    -        res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
    -                           tail -n 1 | awk '{print $1}')
    +        res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
    +            tail -n 1 | awk '{print $1}')
    +        res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
    +            tail -n 1 | awk '{print $1}')
     
    -        res_ext_x=$(echo $res_external | sed 's/x.*//')
    -        res_ext_y=$(echo $res_external | sed 's/.*x//')
    -        res_int_x=$(echo $res_internal | sed 's/x.*//')
    -        res_int_y=$(echo $res_internal | sed 's/.*x//')
    +        res_ext_x=$(echo "$res_external" | sed 's/x.*//')
    +        res_ext_y=$(echo "$res_external" | sed 's/.*x//')
    +        res_int_x=$(echo "$res_internal" | sed 's/x.*//')
    +        res_int_y=$(echo "$res_internal" | sed 's/.*x//')
     
    -        scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
    -        scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
    +        scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
    +        scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
     
    -        xrandr --output "$external" --auto --scale 1.0x1.0 \
    -               --output "$internal" --auto --same-as "$external" \
    -               --scale "$scale_x"x"$scale_y"
    -    else
    +        xrandr --output "$external" --auto --scale 1.0x1.0 \
    +            --output "$internal" --auto --same-as "$external" \
    +            --scale "$scale_x"x"$scale_y"
    +    else
     
    -        primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
    -        secondary=$(echo "$screens" | grep -v "$primary")
    -        direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
    -        xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
    -    fi
    -}
    +        primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
    +        secondary=$(echo "$screens" | grep -v "$primary")
    +        direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
    +        xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
    +    fi
    +}
     
    -morescreen() { # If multi-monitor is selected and there are more than two screens.
    -    primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
    -    secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
    -    direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
    -    tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
    -    xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
    -}
    +morescreen() { # If multi-monitor is selected and there are more than two screens.
    +    primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
    +    secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
    +    direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
    +    tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
    +    xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
    +}
     
    -multimon() { # Multi-monitor handler.
    -    case "$(echo "$screens" | wc -l)" in
    -        1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
    -        2) twoscreen ;;
    +multimon() { # Multi-monitor handler.
    +    case "$(echo "$screens" | wc -l)" in
    +        2) twoscreen ;;
             *) morescreen ;;
    -    esac ;}
    +    esac ;}
     
    -# Get all possible displays
    -allposs=$(xrandr -q | grep "connected")
    +onescreen() { # If only one output available or chosen.
    +    xrandr --output "$1" --auto --scale 1.0x1.0 "$(echo "$allposs" | grep -v "$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ')"
    +}
     
    -# Get all connected screens.
    -screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
    +postrun() { # Stuff to run to clean up.
    +    setbg    # Fix background if screen size/arangement has changed.
    +    $HOME/.config/polybar/scripts/launch.sh # restart polybar
    +    { killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen
    +}
     
    -# Get user choice including multi-monitor and manual selection:
    -chosen=$(printf "%s\\ncancel\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
    -    case "$chosen" in
    -        "cancel") exit ;;
    -        "manual selection") arandr ; exit ;;
    -        "multi-monitor") multimon ;;
    -        *) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
    -    esac
    +# Get all possible displays
    +allposs=$(xrandr -q | grep "connected")
     
    -$HOME/.config/polybar/scripts/launch.sh # restart polybar
    -pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen
    +# Get all connected screens.
    +screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
    +
    +# If there's only one screen
    +[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
    +    { onescreen "$screens"; postrun; notify-send "💻 Only one screen detected." "Using it in its optimal settings...";  exit ;}
    +
    +# Get user choice including multi-monitor and manual selection:
    +chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
    +    case "$chosen" in
    +        "manual selection") arandr ; exit ;;
    +        "multi-monitor") multimon ;;
    +        *) onescreen "$chosen" ;;
    +    esac
    +
    +postrun
    +
    +
    + + + +
    +

    dmenumount - Mount USB and Android

    +
    +

    +Script taken from Luke Smith. +

    + +
    +
    getmount() { \
    +    [ -z "$chosen" ] && exit 1
    +    # shellcheck disable=SC2086
    +    mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1
    +    [ "$mp" = "" ] && exit 1
    +    if [ ! -d "$mp" ]; then
    +        mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1
    +        [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
    +    fi
    +}
    +
    +mountusb() { \
    +    chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1
    +    chosen="$(echo "$chosen" | awk '{print $1}')"
    +    sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
    +    alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
    +    getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
    +    partitiontype="$(lsblk -no "fstype" "$chosen")"
    +    case "$partitiontype" in
    +        "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
    +        *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
    +    esac
    +    notify-send "💻 USB mounting" "$chosen mounted to $mp."
    +}
    +
    +mountandroid() { \
    +    chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1
    +    chosen="$(echo "$chosen" | cut -d : -f 1)"
    +    getmount "$HOME -maxdepth 3 -type d"
    +    simple-mtpfs --device "$chosen" "$mp"
    +    echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
    +    simple-mtpfs --device "$chosen" "$mp"
    +    notify-send "🤖 Android Mounting" "Android device mounted to $mp."
    +}
    +
    +asktype() { \
    +    choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1
    +    case $choice in
    +        USB) mountusb ;;
    +        Android) mountandroid ;;
    +    esac
    +}
    +
    +anddrives=$(simple-mtpfs -l 2>/dev/null)
    +usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$4==""{printf "%s (%s)\n",$1,$3}')"
    +
    +if [ -z "$usbdrives" ]; then
    +    [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
    +    echo "Android device(s) detected."
    +    mountandroid
    +else
    +    if [ -z "$anddrives" ]; then
    +        echo "USB drive(s) detected."
    +        mountusb
    +    else
    +        echo "Mountable USB drive(s) and Android device(s) detected."
    +        asktype
    +    fi
    +fi
    +
    +
    +
    +
    + +
    +

    dmenuumount - Unmount USB and Android devices

    +
    +

    +Script taken from Luke Smith. +

    + +
    +
    unmountusb() {
    +    [ -z "$drives" ] && exit
    +    chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1
    +    chosen="$(echo "$chosen" | awk '{print $1}')"
    +    [ -z "$chosen" ] && exit
    +    sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted."
    +}
    +
    +unmountandroid() { \
    +    chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1
    +    [ -z "$chosen" ] && exit
    +    sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted."
    +}
    +
    +asktype() { \
    +    choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1
    +    case "$choice" in
    +        USB) unmountusb ;;
    +        Android) unmountandroid ;;
    +    esac
    +}
    +
    +drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
    +
    +if ! grep simple-mtpfs /etc/mtab; then
    +    [ -z "$drives" ] && echo "No drives to unmount." &&  exit
    +    echo "Unmountable USB drive detected."
    +    unmountusb
    +else
    +    if [ -z "$drives" ]
    +    then
    +        echo "Unmountable Android device detected."
    +        unmountandroid
    +    else
    +        echo "Unmountable USB drive(s) and Android device(s) detected."
    +        asktype
    +    fi
    +fi
     
    @@ -138,13 +276,13 @@ pgrep -x dunst >/dev/null && killall dunst && setsid dunst &a

    vpntoggle - Connect to VPN using NordVPN

    -
    if [[ $(nordvpn status) == *"Connected"* ]]; then
    -  nordvpn disconnect && dunstify --replace=23198 "VPN" "Disconnected";
    -else
    -  country=`cat ~/.local/data/nordvpn_countries.txt | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`;
    -  dunstify --replace=23198 "VPN" "Connecting to $country...";
    -  nordvpn connect $country && dunstify --replace=23198 "VPN" "Connected to $country";
    -fi
    +
    if [[ $(nordvpn status) == *"Connected"* ]]; then
    +  nordvpn disconnect && dunstify --replace=23198 "VPN" "Disconnected";
    +else
    +  country=`cat ~/.local/data/nordvpn_countries.txt | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`;
    +  dunstify --replace=23198 "VPN" "Connecting to $country...";
    +  nordvpn connect $country && dunstify --replace=23198 "VPN" "Connected to $country";
    +fi
     
    @@ -154,336 +292,336 @@ fi

    bukurun - Open link from Buku

    -
    _rofi () {
    -    rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@"
    -}
    +
    _rofi () {
    +    rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@"
    +}
     
    -# display settings
    -display_type=1
    -max_str_width=80
    +# display settings
    +display_type=1
    +max_str_width=80
     
    -# keybindings
    -switch_view="Alt+Tab"
    -new_bookmark="Alt+n"
    -actions="Alt+a"
    -edit="Alt+e"
    -delete="Alt+d"
    +# keybindings
    +switch_view="Alt+Tab"
    +new_bookmark="Alt+n"
    +actions="Alt+a"
    +edit="Alt+e"
    +delete="Alt+d"
     
    -# colors
    -help_color="#334433"
    +# colors
    +help_color="#334433"
     
    -# source global config
    -if [[ -f /etc/buku_run.config ]]
    -then
    -    source /etc/buku_run.config
    -fi
    +# source global config
    +if [[ -f /etc/buku_run.config ]]
    +then
    +    source /etc/buku_run.config
    +fi
     
    -# source local config:
    -if [[ -z $XDG_CONFIG_DIR ]]
    -then
    -    if [[ -f $HOME/.config/buku_run/config ]]
    -    then
    -        source $HOME/.config/buku_run/config
    -    else
    -        echo "User config file \'~/.config/buku_run/config\' not found. using global config"
    -    fi
    -else
    -    if [[ -f "${XDG_CONFIG_DIR}/buku_run/config" ]]
    -    then
    -        source "${XDG_CONFIG_DIR}/buku_run/config"
    -    else
    -        echo "User config file \'~/.config/buku_run/config\' not found. using global config"
    -    fi
    -fi
    +# source local config:
    +if [[ -z $XDG_CONFIG_DIR ]]
    +then
    +    if [[ -f $HOME/.config/buku_run/config ]]
    +    then
    +        source $HOME/.config/buku_run/config
    +    else
    +        echo "User config file \'~/.config/buku_run/config\' not found. using global config"
    +    fi
    +else
    +    if [[ -f "${XDG_CONFIG_DIR}/buku_run/config" ]]
    +    then
    +        source "${XDG_CONFIG_DIR}/buku_run/config"
    +    else
    +        echo "User config file \'~/.config/buku_run/config\' not found. using global config"
    +    fi
    +fi
     
     
    -main () {
    -    HELP="Welcome to Buku. Use <span color='${help_color}'>${new_bookmark}</span> to add a new Bookmark
    -Use <span color='${help_color}'>${switch_view}</span> to switch View. <span color='${help_color}'>${actions}</span> for actions"
    -    if [[ $mode == "bookmarks" ]]; then
    -        content=$(parseBuku)
    -        menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
    -    elif [[ $mode == "tags" ]]; then
    -        menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2-  | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
    -    fi
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 12 ]]; then
    +main () {
    +    HELP="Welcome to Buku. Use <span color='${help_color}'>${new_bookmark}</span> to add a new Bookmark
    +Use <span color='${help_color}'>${switch_view}</span> to switch View. <span color='${help_color}'>${actions}</span> for actions"
    +    if [[ $mode == "bookmarks" ]]; then
    +        content=$(parseBuku)
    +        menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
    +    elif [[ $mode == "tags" ]]; then
    +        menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2-  | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
    +    fi
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 12 ]]; then
             optionsMenu
    -    elif [[ $val -eq 10 ]]; then
    +    elif [[ $val -eq 10 ]]; then
             addMark
    -    elif [[ $val -eq 14 ]]; then
    +    elif [[ $val -eq 14 ]]; then
             deleteMenu
    -    elif [[ $val -eq 13 ]]; then
    +    elif [[ $val -eq 13 ]]; then
             editMenu
    -    elif [[ $val -eq 11 ]]; then
    -        if [[ $mode == "bookmarks" ]]; then
    -            export mode="tags"
    -            mode=tags main
    -        elif [[ $mode == "tags" ]]; then
    -            export mode="bookmarks"
    -            mode=bookmarks main
    -        fi
    -    elif [[ $val -eq 0 ]]; then
    -        if [[ $mode == "bookmarks" ]]; then
    -            id=$(getId "$content" "$menu")
    -            for bm in ${id}; do
    -                buku -o "${bm}"
    -            done
    -        elif [[ $mode == "tags" ]]; then
    -            filter="${menu}" mode="bookmarks" main
    -        fi
    -    fi
    -}
    +    elif [[ $val -eq 11 ]]; then
    +        if [[ $mode == "bookmarks" ]]; then
    +            export mode="tags"
    +            mode=tags main
    +        elif [[ $mode == "tags" ]]; then
    +            export mode="bookmarks"
    +            mode=bookmarks main
    +        fi
    +    elif [[ $val -eq 0 ]]; then
    +        if [[ $mode == "bookmarks" ]]; then
    +            id=$(getId "$content" "$menu")
    +            for bm in ${id}; do
    +                buku -o "${bm}"
    +            done
    +        elif [[ $mode == "tags" ]]; then
    +            filter="${menu}" mode="bookmarks" main
    +        fi
    +    fi
    +}
     
    -optionsMenu () {
    -    if [[ $mode == "bookmarks" ]]; then
    -        askmenu=$(echo -e "< Return\n---\n1. Edit\n2. Delete" | _rofi -p '> ' -mesg "Choose Action for bookmark")
    -        val=$?
    -        if [[ $val -eq 1 ]]; then
    -            exit
    -        elif [[ $val -eq 0 ]]; then
    -            if [[ $askmenu == "< Return" ]]; then
    -                export mode=bookmarks
    +optionsMenu () {
    +    if [[ $mode == "bookmarks" ]]; then
    +        askmenu=$(echo -e "< Return\n---\n1. Edit\n2. Delete" | _rofi -p '> ' -mesg "Choose Action for bookmark")
    +        val=$?
    +        if [[ $val -eq 1 ]]; then
    +            exit
    +        elif [[ $val -eq 0 ]]; then
    +            if [[ $askmenu == "< Return" ]]; then
    +                export mode=bookmarks
                     main
    -            elif [[ $askmenu == "1. Edit" ]]; then
    +            elif [[ $askmenu == "1. Edit" ]]; then
                     editMenu
    -            elif [[ $askmenu == "2. Delete" ]]; then
    +            elif [[ $askmenu == "2. Delete" ]]; then
                     deleteMenu
    -            fi
    -        fi
    -    elif [[ $mode == "tags" ]]; then
    -        askmenu=$(echo -e "< Return\n---\n1. Replace Tag\n2. Delete Tag" | _rofi -p '> ' -mesg "Choose Action for tag \"${menu}\"")
    -        val=$?
    -        if [[ $val -eq 1 ]]; then
    -            exit
    -        elif [[ $val -eq 0 ]]; then
    -            if [[ $askmenu == "< Return" ]]; then
    -                export mode=tags
    +            fi
    +        fi
    +    elif [[ $mode == "tags" ]]; then
    +        askmenu=$(echo -e "< Return\n---\n1. Replace Tag\n2. Delete Tag" | _rofi -p '> ' -mesg "Choose Action for tag \"${menu}\"")
    +        val=$?
    +        if [[ $val -eq 1 ]]; then
    +            exit
    +        elif [[ $val -eq 0 ]]; then
    +            if [[ $askmenu == "< Return" ]]; then
    +                export mode=tags
                     main
    -            elif [[ $askmenu == "1. Replace Tag" ]]; then
    -                newtag=$(echo | _rofi -p '> ' -mesg "Enter new tag name for tag \"${menu}\"")
    -                val=$?
    -                if [[ $val -eq 1 ]]; then
    -                    exit
    -                elif [[ $val -eq 0 ]]; then
    -                    if [[ $newtag == "" ]]; then
    -                        mode=tags main
    -                    else
    -                        buku -r "${menu}" "${newtag}"
    -                        mode=tags main
    -                    fi
    -                fi
    -            elif [[ $askmenu == "2. Delete Tag" ]]; then
    -                delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete tag?")
    -                val=$?
    -                if [[ $val -eq 1 ]]; then
    -                    exit
    -                elif [[ $val -eq 0 ]]; then
    -                    if [[ $delask == "1. Yes" ]]; then
    -                        buku -r "${menu}"
    -                        mode=tags main
    -                    elif [[ $delask == "2. No" ]]; then
    -                        mode=tags main
    -                    fi
    -                fi
    -            fi
    -        fi
    -    fi
    -}
    +            elif [[ $askmenu == "1. Replace Tag" ]]; then
    +                newtag=$(echo | _rofi -p '> ' -mesg "Enter new tag name for tag \"${menu}\"")
    +                val=$?
    +                if [[ $val -eq 1 ]]; then
    +                    exit
    +                elif [[ $val -eq 0 ]]; then
    +                    if [[ $newtag == "" ]]; then
    +                        mode=tags main
    +                    else
    +                        buku -r "${menu}" "${newtag}"
    +                        mode=tags main
    +                    fi
    +                fi
    +            elif [[ $askmenu == "2. Delete Tag" ]]; then
    +                delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete tag?")
    +                val=$?
    +                if [[ $val -eq 1 ]]; then
    +                    exit
    +                elif [[ $val -eq 0 ]]; then
    +                    if [[ $delask == "1. Yes" ]]; then
    +                        buku -r "${menu}"
    +                        mode=tags main
    +                    elif [[ $delask == "2. No" ]]; then
    +                        mode=tags main
    +                    fi
    +                fi
    +            fi
    +        fi
    +    fi
    +}
     
    -deleteMenu () {
    -    id=$(getId "$content" "$menu")
    -    delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete bookmark?")
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    -        if [[ $delask == "1. Yes" ]]; then
    -            buku -d ${id} --tacit
    -            mode=bookmarks main
    -        elif [[ $delask == "2. No" ]]; then
    +deleteMenu () {
    +    id=$(getId "$content" "$menu")
    +    delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete bookmark?")
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
    +        if [[ $delask == "1. Yes" ]]; then
    +            buku -d ${id} --tacit
    +            mode=bookmarks main
    +        elif [[ $delask == "2. No" ]]; then
                 optionsMenu
    -        fi
    -    fi
    -}
    +        fi
    +    fi
    +}
     
    -editMenu () {
    -    id=$(getId "$content" "$menu")
    -    title="$(getTitleFromId $id)"
    -    bookmark="$(getUrlFromId $id)"
    -    tags="$(getTagsFromId $id)"
    -    content=$(echo -e "1. title: $title\n2. url: $bookmark\n3. tags: $tags")
    -    editmenu=$(echo -e "< Return\n---\n${content}" | _rofi -p '> ')
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    -        if [[ $editmenu == "< Return" ]]; then
    +editMenu () {
    +    id=$(getId "$content" "$menu")
    +    title="$(getTitleFromId $id)"
    +    bookmark="$(getUrlFromId $id)"
    +    tags="$(getTagsFromId $id)"
    +    content=$(echo -e "1. title: $title\n2. url: $bookmark\n3. tags: $tags")
    +    editmenu=$(echo -e "< Return\n---\n${content}" | _rofi -p '> ')
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
    +        if [[ $editmenu == "< Return" ]]; then
                 main
    -        elif [[ $editmenu == "tags: NOTAG" ]]; then
    +        elif [[ $editmenu == "tags: NOTAG" ]]; then
                 addTags --update
    -        elif [[ $editmenu =~ tags:* ]]; then
    -            tags="${tags}" editTags
    -        elif [[ $editmenu =~ url:* ]]; then
    +        elif [[ $editmenu =~ tags:* ]]; then
    +            tags="${tags}" editTags
    +        elif [[ $editmenu =~ url:* ]]; then
                 editBookmark
    -        elif [[ $editmenu =~ title:* ]]; then
    +        elif [[ $editmenu =~ title:* ]]; then
                 editTitle
    -        fi
    -    fi
    -}
    +        fi
    +    fi
    +}
     
    -editTags () {
    -    edittagsmenu=$(echo | _rofi -filter "${tags}" -p '> ' -mesg "Edit Tags and hit Enter")
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    -        buku -u ${id} --tag "${edittagsmenu}"
    -    fi
    -    mode=bookmarks main
    -}
    +editTags () {
    +    edittagsmenu=$(echo | _rofi -filter "${tags}" -p '> ' -mesg "Edit Tags and hit Enter")
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
    +        buku -u ${id} --tag "${edittagsmenu}"
    +    fi
    +    mode=bookmarks main
    +}
     
    -editBookmark () {
    -    bmarkmenu=$(echo "" | _rofi -p "> " -filter "${bookmark}" -mesg "Edit Bookmark and hit Enter")
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    -        if [[ $bmarkmenu == "http"* ]]; then
    -            buku -u "${id}" --url "${bmarkmenu}"
    -        else
    -            echo "" | rofi -e "Not a valid URI, Make sure URLs start with http"
    +editBookmark () {
    +    bmarkmenu=$(echo "" | _rofi -p "> " -filter "${bookmark}" -mesg "Edit Bookmark and hit Enter")
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
    +        if [[ $bmarkmenu == "http"* ]]; then
    +            buku -u "${id}" --url "${bmarkmenu}"
    +        else
    +            echo "" | rofi -e "Not a valid URI, Make sure URLs start with http"
                 editBookmark
    -        fi
    -    fi
    -    mode=bookmarks main
    -}
    +        fi
    +    fi
    +    mode=bookmarks main
    +}
     
    -editTitle () {
    -    titlemenu=$(echo "" | _rofi -p "> " -filter "${title}" -mesg "Edit Title and hit Enter")
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    -        buku -u "${id}" --title "${titlemenu}"
    -    fi
    -    mode=bookmarks main
    -}
    +editTitle () {
    +    titlemenu=$(echo "" | _rofi -p "> " -filter "${title}" -mesg "Edit Title and hit Enter")
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
    +        buku -u "${id}" --title "${titlemenu}"
    +    fi
    +    mode=bookmarks main
    +}
     
    -addMark () {
    -    inserturl=$(echo -e "$(xclip -o)" | _rofi -p '> ' -mesg "Use URL below or type manually")
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    +addMark () {
    +    inserturl=$(echo -e "$(xclip -o)" | _rofi -p '> ' -mesg "Use URL below or type manually")
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
             addTags
    -    fi
    -}
    +    fi
    +}
     
    -addTags () {
    -    inserttags=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "Add some tags. Separate tags with ', '")
    -    val=$?
    -    if [[ $val -eq 1 ]]; then
    -        exit
    -    elif [[ $val -eq 0 ]]; then
    -        if [[ $(echo "${inserttags}" | wc -l) -gt 1 ]]; then
    -            taglist=$(echo "${inserttags}" | tr '\n' ',')
    -            tags=()
    -            for tag in $taglist; do
    -                tags+=("$tag")
    -            done
    -        else
    -            tags=${inserttags}
    -        fi
    -        if [[ $1 == "--update" ]]; then
    -            buku -u "${id}" --tag ${tags}
    -        else
    -            buku -a ${inserturl} ${tags}
    -        fi
    -    fi
    -}
    +addTags () {
    +    inserttags=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "Add some tags. Separate tags with ', '")
    +    val=$?
    +    if [[ $val -eq 1 ]]; then
    +        exit
    +    elif [[ $val -eq 0 ]]; then
    +        if [[ $(echo "${inserttags}" | wc -l) -gt 1 ]]; then
    +            taglist=$(echo "${inserttags}" | tr '\n' ',')
    +            tags=()
    +            for tag in $taglist; do
    +                tags+=("$tag")
    +            done
    +        else
    +            tags=${inserttags}
    +        fi
    +        if [[ $1 == "--update" ]]; then
    +            buku -u "${id}" --tag ${tags}
    +        else
    +            buku -a ${inserturl} ${tags}
    +        fi
    +    fi
    +}
     
    -parseBuku () {
    -    echo "$(buku --nc -p | gawk -v max="$max_str_width" -v type="$display_type" '
    -BEGIN {
    -  RS=""
    -  FS="\n"
    -}
    -{
    -  if ($3 == "")
    -    $3 = " # NOTAG"
    -  id = gensub(/([0-9]+)\.(.*)/, "\\1", "g", $1)
    -  url = substr(gensub(/\s+> (.*)/, "\\1", "g", $2),0,max)
    -  tags = gensub(/\s+# (.*)/, "\\1", "g", $3)
    -  title = substr(gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1),0,max)
    +parseBuku () {
    +    echo "$(buku --nc -p | gawk -v max="$max_str_width" -v type="$display_type" '
    +BEGIN {
    +  RS=""
    +  FS="\n"
    +}
    +{
    +  if ($3 == "")
    +    $3 = " # NOTAG"
    +  id = gensub(/([0-9]+)\.(.*)/, "\\1", "g", $1)
    +  url = substr(gensub(/\s+> (.*)/, "\\1", "g", $2),0,max)
    +  tags = gensub(/\s+# (.*)/, "\\1", "g", $3)
    +  title = substr(gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1),0,max)
     
    -  if (type == 1)
    -    print id "\t" url "\t" tags
    -  else
    -    print id "\t" title "\t" tags
    -    if (type == 3)
    -      print " \t" url "\t "
    -  print ""
    -}
    -' | column -t -s $'\t')"
    -}
    +  if (type == 1)
    +    print id "\t" url "\t" tags
    +  else
    +    print id "\t" title "\t" tags
    +    if (type == 3)
    +      print " \t" url "\t "
    +  print ""
    +}
    +' | column -t -s $'\t')"
    +}
     
    -getId () {
    -    id=$(echo "${2%% *}")
    -    if [ -z "$id" ]; then
    -        prev=""
    -        IFS=$'\n'
    -        for line in $1; do
    -            if [ "$2" = "$line" ]; then
    -                id=$(echo "${prev%% *}")
    -                break
    -            else
    -                prev="$line"
    -            fi
    -        done
    -    fi
    -    echo $id
    -}
    +getId () {
    +    id=$(echo "${2%% *}")
    +    if [ -z "$id" ]; then
    +        prev=""
    +        IFS=$'\n'
    +        for line in $1; do
    +            if [ "$2" = "$line" ]; then
    +                id=$(echo "${prev%% *}")
    +                break
    +            else
    +                prev="$line"
    +            fi
    +        done
    +    fi
    +    echo $id
    +}
     
    -getTitleFromId () {
    -    echo "$(buku --nc -p $1 | gawk '
    -  BEGIN {
    -    RS=""
    -    FS="\n"
    -  }
    -  {
    -    print gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1)
    -  }
    -  ')"
    -}
    +getTitleFromId () {
    +    echo "$(buku --nc -p $1 | gawk '
    +  BEGIN {
    +    RS=""
    +    FS="\n"
    +  }
    +  {
    +    print gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1)
    +  }
    +  ')"
    +}
     
    -getUrlFromId () {
    -    echo "$(buku --nc -p $1 | gawk '
    -  BEGIN {
    -    RS=""
    -    FS="\n"
    -  }
    -  {
    -    print gensub(/\s+> (.*)/, "\\1", "g", $2)
    -  }
    -  ')"
    -}
    +getUrlFromId () {
    +    echo "$(buku --nc -p $1 | gawk '
    +  BEGIN {
    +    RS=""
    +    FS="\n"
    +  }
    +  {
    +    print gensub(/\s+> (.*)/, "\\1", "g", $2)
    +  }
    +  ')"
    +}
     
    -getTagsFromId () {
    -    echo "$(buku --nc -p $1 | gawk '
    -  BEGIN {
    -    RS=""
    -    FS="\n"
    -  }
    -  {
    -    print gensub(/\s+# (.*)/, "\\1", "g", $3)
    -  }
    -  ')"
    -}
    +getTagsFromId () {
    +    echo "$(buku --nc -p $1 | gawk '
    +  BEGIN {
    +    RS=""
    +    FS="\n"
    +  }
    +  {
    +    print gensub(/\s+# (.*)/, "\\1", "g", $3)
    +  }
    +  ')"
    +}
     
    -mode=bookmarks main
    +mode=bookmarks main
     
    @@ -493,36 +631,46 @@ mode=bookmarks main

    i3exit - Manage lock, suspend, reboot, …

    -
    option=$(echo -e "Lock\nExit\nLogout\nSuspend\nHibernate\nReboot\nShutdown" | rofi -i -dmenu)
    +
    option=$(echo -e "Lock\nExit\nLogout\nSuspend\nHibernate\nReboot\nShutdown" | rofi -i -dmenu)
     
    -case "$option" in
    -    "Lock")
    +case "$option" in
    +    "Lock")
             ~/.local/bin/lockscreen
             ;;
    -    "Exit")
    +    "Exit")
             dm-tool switch-to-greeter
             ;;
    -    "Logout")
    -        loginctl terminate-session `loginctl session-status | head -n 1 | awk '{print $1}'`
    +    "Logout")
    +        loginctl terminate-session `loginctl session-status | head -n 1 | awk '{print $1}'`
             ;;
    -    "Suspend")
    +    "Suspend")
             systemctl suspend && ~/.local/bin/lockscreen
             ;;
    -    "Hibernate")
    +    "Hibernate")
             systemctl hibernate && ~/.local/bin/lockscreen
             ;;
    -    "Reboot")
    -        systemctl reboot
    +    "Reboot")
    +        confirmation=$(echo -e "Yes\nNo" | rofi -i -p "Are you sure you want to Reboot?" -dmenu)
    +        case "$confirmation" in
    +            "Yes")
    +                systemctl reboot
    +                ;;
    +        esac
             ;;
    -    "Shutdown")
    -        systemctl poweroff
    +    "Shutdown")
    +        confirmation=$(echo -e "Yes\nNo" | rofi -i -p "Are you sure you want to Shutdown?" -dmenu)
    +        case "$confirmation" in
    +            "Yes")
    +                systemctl poweroff
    +                ;;
    +        esac
             ;;
         *)
    -        echo "== ! i3exit: missing or invalid argument ! =="
    -        exit 2
    -esac
    +        echo "== ! i3exit: missing or invalid argument ! =="
    +        exit 2
    +esac
     
    -exit 0
    +exit 0
     
    @@ -536,10 +684,10 @@ Take password prompt from STDIN, print password to STDOUT. The sed piece just removes the colon from the provided prompt: rofi -p already gives us a colon

    -
    rofi -dmenu \
    -     -password \
    -     -no-fixed-num-lines \
    -     -p "$(printf "$1" | sed s/://)"
    +
    rofi -dmenu \
    +     -password \
    +     -no-fixed-num-lines \
    +     -p "$(printf "$1" | sed s/://)"
     
    @@ -549,32 +697,32 @@ The sed piece just removes the colon from the provided prompt: rofi -pscreenshot - Take Screenshot
    -
    status=$(echo -e "All\nGUI\nSelection\nCropped\nCopy\nShadow\nActive" | rofi -i -dmenu -p "Type")
    -if [ -z "$status" ]; then
    -  exit;
    -fi
    +
    status=$(echo -e "All\nGUI\nSelection\nCropped\nCopy\nShadow\nActive" | rofi -i -dmenu -p "Type")
    +if [ -z "$status" ]; then
    +  exit;
    +fi
     
    -name=$(echo -e "screenshot-$(date +"%m-%d-%y_%H-%M-%S")" | rofi -i -dmenu -p "Filename")
    -if [ -z "$name" ]; then
    -  exit;
    -fi
    +name=$(echo -e "screenshot-$(date +"%m-%d-%y_%H-%M-%S")" | rofi -i -dmenu -p "Filename")
    +if [ -z "$name" ]; then
    +  exit;
    +fi
     
    -case "$status" in
    -    "All")
    -        maim ~/Pictures/$name.png ;;
    -    "GUI")
    -        flameshot gui -r > ~/Pictures/$name.png ;;
    -    "Selection")
    -        maim -s ~/Pictures/$name.png ;;
    -    "Cropped")
    -        maim -s ~/Pictures/$name.png && convert -trim ~/Pictures/$name.png ~/Pictures/$name.png;;
    -    "Copy")
    +case "$status" in
    +    "All")
    +        maim ~/Pictures/$name.png ;;
    +    "GUI")
    +        flameshot gui -r > ~/Pictures/$name.png ;;
    +    "Selection")
    +        maim -s ~/Pictures/$name.png ;;
    +    "Cropped")
    +        maim -s ~/Pictures/$name.png && convert -trim ~/Pictures/$name.png ~/Pictures/$name.png;;
    +    "Copy")
             maim -s | xclip -selection clipboard -t image/png ;;
    -    "Shadow")
    -        maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage ~/Pictures/$name.png ;;
    -    "Active")
    -        maim -i $(xdotool getactivewindow) ~/Pictures/$name.png ;;
    -esac
    +    "Shadow")
    +        maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage ~/Pictures/$name.png ;;
    +    "Active")
    +        maim -i $(xdotool getactivewindow) ~/Pictures/$name.png ;;
    +esac
     
    @@ -584,16 +732,16 @@ esac

    network-toggle - Toggle Network

    -
    result=$(nmcli device | sed '1d' | dmenu -l 20);
    +
    result=$(nmcli device | sed '1d' | dmenu -l 20);
     
    -interface=$(echo $result | awk -F ' ' '{print $1}');
    -status=$(echo $result | awk -F ' ' '{print $3}');
    +interface=$(echo $result | awk -F ' ' '{print $1}');
    +status=$(echo $result | awk -F ' ' '{print $3}');
     
    -if [ $status == 'disconnected' ]; then
    -  nmcli device connect $interface
    -else
    -  nmcli device disconnect $interface
    -fi
    +if [ $status == 'disconnected' ]; then
    +  nmcli device connect $interface
    +else
    +  nmcli device disconnect $interface
    +fi
     
    @@ -603,12 +751,12 @@ fi

    make-gif - Make GIF

    -
    palette="/tmp/palette.png"
    +
    palette="/tmp/palette.png"
     
    -filters="fps=15,scale=320:-1:flags=lanczos"
    +filters="fps=15,scale=320:-1:flags=lanczos"
     
    -ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
    -ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
    +ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
    +ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
     
    @@ -618,12 +766,12 @@ ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -

    yt-audio - Download-Audio from youtube

    -
    if [ $TMUX ]; then
    -    tmux split -v -l 5 "cd ~/Downloads/ && youtube-dl --add-metadata -xic -f bestaudio/best $1" && tmux select-pane -U
    -else
    -    cd ~/Downloads/;
    -    setsid nohup youtube-dl --add-metadata -xic -f bestaudio/best $1 &> /dev/null &
    -fi
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 5 "cd ~/Downloads/ && youtube-dl --add-metadata -xic -f bestaudio/best $1" && tmux select-pane -U
    +else
    +    cd ~/Downloads/;
    +    setsid nohup youtube-dl --add-metadata -xic -f bestaudio/best $1 &> /dev/null &
    +fi
     
    @@ -633,12 +781,12 @@ fi

    yt-video - Download-Video from youtube

    -
    if [ $TMUX ]; then
    -    tmux split -v -l 5 "cd ~/Downloads/ && youtube-dl --add-metadata -ic $1" && tmux select-pane -U
    -else
    -    cd ~/Downloads/;
    -    setsid nohup youtube-dl --add-metadata -ic $1 &> /dev/null &
    -fi
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 5 "cd ~/Downloads/ && youtube-dl --add-metadata -ic $1" && tmux select-pane -U
    +else
    +    cd ~/Downloads/;
    +    setsid nohup youtube-dl --add-metadata -ic $1 &> /dev/null &
    +fi
     
    @@ -647,35 +795,36 @@ fi

    setbg - Set Background

    -
    bgloc="${XDG_CACHE_HOME:-$HOME/.cache/}/bg"
    +
    bgloc="${XDG_CACHE_HOME:-$HOME/.cache/}/bg"
     
    -[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc"
    +[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc"
     
    -[ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc"
    +[ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc"
     
    -xwallpaper --zoom "$bgloc"
    +xwallpaper --zoom "$bgloc"
     
    +

    insert-unicode - Insert Unicode Icon

    -
    # Must have xclip installed to even show menu.
    -xclip -h 2>/dev/null || exit 1
    +
    # Must have xclip installed to even show menu.
    +xclip -h 2>/dev/null || exit 1
     
    -chosen=$(cut -d ';' -f1 ~/.local/data/emojis | rofi -dmenu -i -l 20 | sed "s/ .*//")
    +chosen=$(cut -d ';' -f1 ~/.local/data/emojis | rofi -dmenu -i -l 20 | sed "s/ .*//")
     
    -[ "$chosen" != "" ] || exit
    +[ "$chosen" != "" ] || exit
     
    -# If you run this command with an argument, it will automatically insert the character.
    -if [ -n "$1" ]; then
    +# If you run this command with an argument, it will automatically insert the character.
    +if [ -n "$1" ]; then
         xdotool key Shift+Insert
    -else
    -    echo "$chosen" | tr -d '\n' | xsel -ib
    -    dunstify "'$chosen' copied to clipboard." &
    -fi
    +else
    +    echo "$chosen" | tr -d '\n' | xsel -ib
    +    dunstify "'$chosen' copied to clipboard." &
    +fi
     
    @@ -685,20 +834,20 @@ fi

    insert-nerd-fonts - Insert Nerd Font Icon

    -
    # Must have xsel installed to even show menu.
    -xsel -h 2>/dev/null || exit 1
    +
    # Must have xsel installed to even show menu.
    +xsel -h 2>/dev/null || exit 1
     
    -chosen=$(cat ~/.local/data/nerd-fonts | rofi -dmenu -i -l 20 | sed "s/ .*//")
    +chosen=$(cat ~/.local/data/nerd-fonts | rofi -dmenu -i -l 20 | sed "s/ .*//")
     
    -[ "$chosen" != "" ] || exit
    +[ "$chosen" != "" ] || exit
     
    -# If you run this command with an argument, it will automatically insert the character.
    -if [ -n "$1" ]; then
    +# If you run this command with an argument, it will automatically insert the character.
    +if [ -n "$1" ]; then
         xdotool key Shift+Insert
    -else
    -    echo "$chosen" | tr -d '\n' | xsel -ib
    -    dunstify "'$chosen' copied to clipboard." &
    -fi
    +else
    +    echo "$chosen" | tr -d '\n' | xsel -ib
    +    dunstify "'$chosen' copied to clipboard." &
    +fi
     
    @@ -713,19 +862,19 @@ This is used in newsboat to handle links

    -
    [ -z "$1" ] && { "$BROWSER"; exit; }
    +
    [ -z "$1" ] && { "$BROWSER"; exit; }
     
    -case "$1" in
    +case "$1" in
         *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*)
    -        setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet "$1" >/dev/null 2>&1 & ;;
    +        setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet "$1" >/dev/null 2>&1 & ;;
         *png|*jpg|*jpe|*jpeg|*gif)
    -        curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")"  >/dev/null 2>&1 & ;;
    +        curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")"  >/dev/null 2>&1 & ;;
         *mp3|*flac|*opus|*mp3?source*)
    -        setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;;
    +        setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;;
         *)
    -        if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1"
    -        else setsid $BROWSER "$1" >/dev/null 2>&1 & fi ;;
    -esac
    +        if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1"
    +        else setsid $BROWSER "$1" >/dev/null 2>&1 & fi ;;
    +esac
     
    @@ -737,7 +886,7 @@ esac First, turn off dunst

    -
    killall -SIGUSR1 dunst && echo "off" > /tmp/dunststatus;
    +
    killall -SIGUSR1 dunst && echo "off" > /tmp/dunststatus;
     
    @@ -745,10 +894,10 @@ First, turn off dunst Turn off the music if it is playing.

    -
    MPC_STATE=$(mpc | sed -n '2p' | cut -d "[" -f2 | cut -d "]" -f1)
    -if [[ $MPC_STATE == "playing" ]]; then
    +
    MPC_STATE=$(mpc | sed -n '2p' | cut -d "[" -f2 | cut -d "]" -f1)
    +if [[ $MPC_STATE == "playing" ]]; then
       mpc pause
    -fi
    +fi
     
    @@ -756,12 +905,12 @@ fi Then take a screenshot and process it.

    -
    temp_file="/tmp/screen.png"
    +
    temp_file="/tmp/screen.png"
     
    -rm -f $temp_file
    +rm -f $temp_file
     
    -maim $temp_file
    -convert $temp_file -scale 10% -scale 1000% $temp_file
    +maim $temp_file
    +convert $temp_file -scale 10% -scale 1000% $temp_file
     
    @@ -769,41 +918,41 @@ convert $temp_file -scale 10% -scale 1000% $temp_file Finally, lock the screen using i3lock.

    -
    i3lock --no-unlock-indicator --ignore-empty-password --nofork --image=$temp_file && killall -SIGUSR2 dunst && echo "on" > /tmp/dunststatus
    +
    i3lock --no-unlock-indicator --ignore-empty-password --nofork --image=$temp_file && killall -SIGUSR2 dunst && echo "on" > /tmp/dunststatus
     
    -
    revert() {
    -    xset dpms 0 0 0
    -}
    -trap revert HUP INT TERM
    -# turn off screen after 5 seconds
    -xset +dpms dpms 5 5 5
    +
    revert() {
    +    xset dpms 0 0 0
    +}
    +trap revert HUP INT TERM
    +# turn off screen after 5 seconds
    +xset +dpms dpms 5 5 5
     
    -# Parameters
    -temp_file="/tmp/screen.png"
    -icon="$HOME/Pictures/Evil_Rick_Sprite.png"
    -width=1920
    -height=1080
    -blur_factor=6
    -lock_blur_factor=0
    +# Parameters
    +temp_file="/tmp/screen.png"
    +icon="$HOME/Pictures/Evil_Rick_Sprite.png"
    +width=1920
    +height=1080
    +blur_factor=6
    +lock_blur_factor=0
     
    -# Take the screen shot, blur the image and add the icon
    -ffmpeg -f x11grab -video_size "${width}x${height}" -y -i $DISPLAY -i $icon -filter_complex "boxblur=$blur_factor:$blur_factor,overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,boxblur=$lock_blur_factor:$lock_blur_factor" -vframes 1 $temp_file
    +# Take the screen shot, blur the image and add the icon
    +ffmpeg -f x11grab -video_size "${width}x${height}" -y -i $DISPLAY -i $icon -filter_complex "boxblur=$blur_factor:$blur_factor,overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,boxblur=$lock_blur_factor:$lock_blur_factor" -vframes 1 $temp_file
     
    -# Alternative
    -# maim -d 1 $temp_file
    -# convert -blur 0x8 $temp_file $temp_file
    -# convert -composite $temp_file $icon -gravity South -geometry -20x1200 $temp_file
    +# Alternative
    +# maim -d 1 $temp_file
    +# convert -blur 0x8 $temp_file $temp_file
    +# convert -composite $temp_file $icon -gravity South -geometry -20x1200 $temp_file
     
    -# Lock the screen with the image
    -i3lock --no-unlock-indicator --ignore-empty-password --show-failed-attempts --nofork --image=$temp_file
    +# Lock the screen with the image
    +i3lock --no-unlock-indicator --ignore-empty-password --show-failed-attempts --nofork --image=$temp_file
     
    -# Remove the screenshot
    -rm $temp_file
    +# Remove the screenshot
    +rm $temp_file
     
    -# Don't turn off screen when back from lock
    +# Don't turn off screen when back from lock
     revert
     
    @@ -814,18 +963,18 @@ revert

    mopidy-restart - Restart Mopidy

    -
    pids=( $(pgrep -f mopidy) )
    +
    pids=( $(pgrep -f mopidy) )
     
    -for pid in "${pids[@]}"; do
    -    if [[ $pid != $$ ]]; then
    -        kill "$pid"
    -    fi
    -done
    +for pid in "${pids[@]}"; do
    +    if [[ $pid != $$ ]]; then
    +        kill "$pid"
    +    fi
    +done
     
    -echo "Killed mopidy."
    -echo "Restarting mopidy..."
    -mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
    -echo "Done"
    +echo "Killed mopidy."
    +echo "Restarting mopidy..."
    +mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
    +echo "Done"
     
    @@ -835,13 +984,13 @@ echo "Done"

    upload - Upload Script

    -
    if [ $TMUX ]; then
    -    tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
    -else
    -    curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
    -        dunstify 'Upload' 'Successful' || \
    -        dunstify --urgency=critical 'Upload' 'Failed'
    -fi
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
    +else
    +    curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
    +        dunstify 'Upload' 'Successful' || \
    +        dunstify --urgency=critical 'Upload' 'Failed'
    +fi
     
    @@ -851,34 +1000,35 @@ fi

    weather - Display Weather in terminal

    -
    if [ -n "$*" ]; then
    -    address="wttr.in/"
    -    address+=$*
    -else
    -    address="wttr.in/"
    -fi
    +
    if [ -n "$*" ]; then
    +    address="wttr.in/"
    +    address+=$*
    +else
    +    address="wttr.in/"
    +fi
     
    -if type sxiv > /dev/null 2>&1; then
    -    address+=".png"
    +if type sxiv > /dev/null 2>&1; then
    +    address+=".png"
     
    -    wget -qO- "$address" > /tmp/weather.png && \
    +    wget -qO- "$address" > /tmp/weather.png && \
             sxiv -b /tmp/weather.png
    -elif type feh > /dev/null 2>&1; then
    -    address+=".png"
    +elif type feh > /dev/null 2>&1; then
    +    address+=".png"
     
    -    wget -qO- "$address" | feh -
    -else
    -    curl "$address"
    -fi
    +    wget -qO- "$address" | feh -
    +else
    +    curl "$address"
    +fi
     
    +

    readbib - Open Bibliography File

    -
    cd ~/Cloud/pdfs/ && ls | rofi -dmenu -lines 20 | xargs -I {} zathura {}
    +
    cd ~/Cloud/pdfs/ && ls | rofi -dmenu -lines 20 | xargs -I {} zathura {}
     
    @@ -888,7 +1038,7 @@ fi

    readnotes - Open Note File

    -
    cd ~/Cloud/thesis/ressources/notes/pdfs/ && ls *.pdf | rofi -dmenu -lines 20 | xargs -I {} zathura {}
    +
    cd ~/Cloud/thesis/ressources/notes/pdfs/ && ls *.pdf | rofi -dmenu -lines 20 | xargs -I {} zathura {}
     
    @@ -898,33 +1048,33 @@ fi

    pdf2bib - Extract bibtex entry from PDF file

    -
    pdf2doi () {
    -    pdfinfo "$1" | grep -io "doi:.*" | grep -Poi "10.\d+/[^\s]+" || \
    -        pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1 | grep -Poi "10.\d+/[^\s]+" || \
    -        pdftotext "$1" 2>/dev/null - | grep -Poi "10.\d+/[^\s]+"
    -}
    +
    pdf2doi () {
    +    pdfinfo "$1" | grep -io "doi:.*" | grep -Poi "10.\d+/[^\s]+" || \
    +        pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1 | grep -Poi "10.\d+/[^\s]+" || \
    +        pdftotext "$1" 2>/dev/null - | grep -Poi "10.\d+/[^\s]+"
    +}
     
    -doi2bib () {
    -    # curl -LHs "Accept: application/x-bibtex" http://dx.doi.org/$1 -w "\\n"
    -    curl -s "http://api.crossref.org/works/$1/transform/application/x-bibtex" -w "\\n"
    -}
    +doi2bib () {
    +    # curl -LHs "Accept: application/x-bibtex" http://dx.doi.org/$1 -w "\\n"
    +    curl -s "http://api.crossref.org/works/$1/transform/application/x-bibtex" -w "\\n"
    +}
     
    -# If a file is specified, try to extract DOI from the file
    -if [ -f "$1" ]; then
    -    doi=$(pdf2doi "$1")
    -fi
    +# If a file is specified, try to extract DOI from the file
    +if [ -f "$1" ]; then
    +    doi=$(pdf2doi "$1")
    +fi
     
    -if hash rofi 2>/dev/null; then
    -    doi=$(echo "$doi" | rofi -i -dmenu -p "DOI")
    -else
    -    doi=$(echo "$doi" | dmenu -i -p "DOI")
    -fi
    +if hash rofi 2>/dev/null; then
    +    doi=$(echo "$doi" | rofi -i -dmenu -p "DOI")
    +else
    +    doi=$(echo "$doi" | dmenu -i -p "DOI")
    +fi
     
    -if [ -n "$1" ]; then
    -    doi2bib $doi | xsel -ib && \
    -        dunstify 'BibTeX' 'Copied to Clipboard' || \
    -        dunstify --urgency=critical 'BibTeX' 'Failed'
    -fi
    +if [ -n "$1" ]; then
    +    doi2bib $doi | xsel -ib && \
    +        dunstify 'BibTeX' 'Copied to Clipboard' || \
    +        dunstify --urgency=critical 'BibTeX' 'Failed'
    +fi
     
    @@ -934,84 +1084,85 @@ fi

    pdf2png - Convert a PDF to PNG

    -
    if [[ -f $1 && $1 == *.pdf ]]; then
    -    pdftoppm -png $1 > $(echo $1 | cut -f 1 -d '.' | sed 's/$/.png/')
    -fi
    +
    if [[ -f "$1" && "$1" == *.pdf ]]; then
    +    pdftoppm -png "$1" > "$(echo "$1" | cut -f 1 -d '.' | sed 's/$/.png/')"
    +fi
     
    +

    pdf-shrink - Pdf Shrink

    -
    shrink ()
    -{
    -gs \
    -  -q -dNOPAUSE -dBATCH -dSAFER \
    -  -sDEVICE=pdfwrite \
    -  -dCompatibilityLevel=1.3 \
    -  -dPDFSETTINGS=/screen \
    -  -dEmbedAllFonts=true \
    -  -dSubsetFonts=true \
    -  -dAutoRotatePages=/None \
    -  -dColorImageDownsampleType=/Bicubic \
    -  -dColorImageResolution=$3 \
    -  -dGrayImageDownsampleType=/Bicubic \
    -  -dGrayImageResolution=$3 \
    -  -dMonoImageDownsampleType=/Subsample \
    -  -dMonoImageResolution=$3 \
    -  -sOutputFile="$2" \
    -  "$1"
    -}
    +
    shrink ()
    +{
    +    gs \
    +        -q -dNOPAUSE -dBATCH -dSAFER \
    +        -sDEVICE=pdfwrite \
    +        -dCompatibilityLevel=1.3 \
    +        -dPDFSETTINGS=/screen \
    +        -dEmbedAllFonts=true \
    +        -dSubsetFonts=true \
    +        -dAutoRotatePages=/None \
    +        -dColorImageDownsampleType=/Bicubic \
    +        -dColorImageResolution=$3 \
    +        -dGrayImageDownsampleType=/Bicubic \
    +        -dGrayImageResolution=$3 \
    +        -dMonoImageDownsampleType=/Subsample \
    +        -dMonoImageResolution=$3 \
    +        -sOutputFile="$2" \
    +        "$1"
    +}
     
    -check_smaller ()
    -{
    -# If $1 and $2 are regular files, we can compare file sizes to
    -# see if we succeeded in shrinking. If not, we copy $1 over $2:
    -if [ ! -f "$1" -o ! -f "$2" ]; then
    -return 0;
    -fi
    -ISIZE="$(echo $(wc -c "$1") | cut -f1 -d\ )"
    -OSIZE="$(echo $(wc -c "$2") | cut -f1 -d\ )"
    -if [ "$ISIZE" -lt "$OSIZE" ]; then
    -echo "Input smaller than output, doing straight copy" >&2
    -cp "$1" "$2"
    -fi
    -}
    +check_smaller ()
    +{
    +    # If $1 and $2 are regular files, we can compare file sizes to
    +    # see if we succeeded in shrinking. If not, we copy $1 over $2:
    +    if [ ! -f "$1" -o ! -f "$2" ]; then
    +        return 0;
    +    fi
    +    ISIZE="$(echo $(wc -c "$1") | cut -f1 -d\ )"
    +    OSIZE="$(echo $(wc -c "$2") | cut -f1 -d\ )"
    +    if [ "$ISIZE" -lt "$OSIZE" ]; then
    +        echo "Input smaller than output, doing straight copy" >&2
    +        cp "$1" "$2"
    +    fi
    +}
     
    -usage ()
    -{
    -echo "Reduces PDF filesize by lossy recompressing with Ghostscript."
    -echo "Not guaranteed to succeed, but usually works."
    -echo "  Usage: $1 infile [outfile] [resolution_in_dpi]"
    -}
    +usage ()
    +{
    +    echo "Reduces PDF filesize by lossy recompressing with Ghostscript."
    +    echo "Not guaranteed to succeed, but usually works."
    +    echo "  Usage: $1 infile [outfile] [resolution_in_dpi]"
    +}
     
    -IFILE="$1"
    +IFILE="$1"
     
    -# Need an input file:
    -if [ -z "$IFILE" ]; then
    -usage "$0"
    -exit 1
    -fi
    +# Need an input file:
    +if [ -z "$IFILE" ]; then
    +    usage "$0"
    +    exit 1
    +fi
     
    -# Output filename defaults to "-" (stdout) unless given:
    -if [ ! -z "$2" ]; then
    -OFILE="$2"
    -else
    -OFILE="-"
    -fi
    +# Output filename defaults to "-" (stdout) unless given:
    +if [ ! -z "$2" ]; then
    +    OFILE="$2"
    +else
    +    OFILE="-"
    +fi
     
    -# Output resolution defaults to 72 unless given:
    -if [ ! -z "$3" ]; then
    -res="$3"
    -else
    -res="90"
    -fi
    +# Output resolution defaults to 72 unless given:
    +if [ ! -z "$3" ]; then
    +    res="$3"
    +else
    +    res="90"
    +fi
     
    -shrink "$IFILE" "$OFILE" "$res" || exit $?
    +shrink "$IFILE" "$OFILE" "$res" || exit $?
     
    -check_smaller "$IFILE" "$OFILE"
    +check_smaller "$IFILE" "$OFILE"
     
    @@ -1024,9 +1175,9 @@ From: https://gist.githu

    -
    pdftk $1 output /tmp/uncompressed.pdf uncompress
    -LANG=C sed -n '/^\/Annots/!p' /tmp/uncompressed.pdf > /tmp/stripped.pdf
    -pdftk /tmp/stripped.pdf output $1 compress
    +
    pdftk $1 output /tmp/uncompressed.pdf uncompress
    +LANG=C sed -n '/^\/Annots/!p' /tmp/uncompressed.pdf > /tmp/stripped.pdf
    +pdftk /tmp/stripped.pdf output $1 compress
     
    @@ -1040,16 +1191,47 @@ The requirement is to have pdftk or stapler installed.

    -
    if [[ -f $1 && $1 == *.pdf ]]; then
    -    # Argument if a file
    -    if type stapler > /dev/null 2>&1; then
    -        stapler del "$1" 1 /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    -    elif type pdftk > /dev/null 2>&1; then
    -        pdftk "$1" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    -    else
    -        echo "Neither pdftk nor stapler are installed"
    -    fi
    -fi
    +
    if [[ -f $1 && $1 == *.pdf ]]; then
    +    # Argument if a file
    +    if type stapler > /dev/null 2>&1; then
    +        stapler del "$1" 1 /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    +    elif type pdftk > /dev/null 2>&1; then
    +        pdftk "$1" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    +    else
    +        echo "Neither pdftk nor stapler are installed"
    +    fi
    +fi
    +
    +
    + + + + + +
    +

    rofi-calc - Simple Calculation using Rofi

    +
    +
    +
    rofi -show calc -mode calc -no-show-match -no-sort
    +
    +
    +
    +
    + +
    +

    pass-gen - Generate Random Alphanumeric Password

    +
    +
    +
    num=$(rofi -dmenu -p "Number of caracters")
    +pass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
    +
    +re='^[0-9]+$'
    +if [[ $num =~ $re ]] ; then
    +    pass=${pass:0:$num}
    +fi
    +
    +printf "$pass" | xclip -sel clip &&  \
    +    dunstify 'Password' 'Generated'
     
    @@ -1057,7 +1239,7 @@ fi

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/bookmarks.html b/docs/bookmarks.html index 691cde1..8b06486 100644 --- a/docs/bookmarks.html +++ b/docs/bookmarks.html @@ -1,251 +1,19 @@ - - + - Bukurun (Bookmark Manager) - -

    Bukurun (Bookmark Manager)

    -
    _rofi () {
         rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@"
    @@ -293,7 +60,7 @@ Colors
     

    Author: Dehaeze Thomas

    -

    Created: 2020-01-11 sam. 22:19

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/compositor.html b/docs/compositor.html index a098010..65134cf 100644 --- a/docs/compositor.html +++ b/docs/compositor.html @@ -1,251 +1,19 @@ - - + - Picom (Compositor) - -
    @@ -275,21 +43,14 @@ for the JavaScript code in this tag. shadow-radius = 12; shadow-offset-x = -12; shadow-offset-y = -12; -shadow-opacity = 0.95; shadow-exclude = [ - "name = 'Notification'", - "window_type = 'dock'", - "window_type = 'dnd'", - "class_g = 'VirtualBox'", - "class_g ?= 'Notify-osd'", - "class_g = 'Tilda'", - "class_g = 'Firefox'", - "class_g = 'Opera'", - "class_g = 'CoverGloobus'", - "class_g = 'Cairo-clock'", - "class_g = 'dzen'", - "class_g = 'stalonetray'", - "_GTK_FRAME_EXTENTS@:c" +"name = 'Notification'", +"window_type = 'dock'", +"window_type = 'dnd'", +"class_g = 'VirtualBox'", +"class_g ?= 'Notify-osd'", +"name = 'cpt_frame_window'", # For zoom problem when sharing screen +"class_g = 'stalonetray'" ];
    @@ -300,31 +61,9 @@ for the JavaScript code in this tag.

    Opacity

    -
    # menu-opacity = 0.92;
    -# inactive-opacity = 0.92;
    -# active-opacity = 0.92;
    -# frame-opacity = 0.9;
    +
    inactive-opacity = 1.0;
    +frame-opacity = 1.0;
     inactive-opacity-override = false;
    -# inactive-dim = 0.2;
    -# inactive-dim-fixed = true;
    -# blur-background = true;
    -# blur-background-frame = true;
    -blur-kern = "3x3box";
    -# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
    -# blur-background-fixed = true;
    -blur-background-exclude = [
    -  "window_type = 'dock'",
    -  "window_type = 'desktop'",
    -  "class_g = 'CoverGloobus'",
    -  "class_g = 'Opera'",
    -  "_GTK_FRAME_EXTENTS@:c"
    -];
    -
    -#opacity-rule = [ "80:class_g = 'XTerm'" ];
    -#opacity-rule = [ "80:class_g = 'UXTerm'" ];
    -#opacity-rule = [ "80:class_g = 'i3bar'" ];
    -#opacity-rule = [ "90:class_g = 'dzen'" ];
    -opacity-rule = [ "40:class_g = 'Bspwm' && class_i = 'presel_feedback'" ];
     
    @@ -335,13 +74,8 @@ for the JavaScript code in this tag.
    fading = false;
    -fade-delta = 10.0;
     fade-in-step = 0.03;
     fade-out-step = 0.03;
    -# no-fading-openclose = true;
    -# no-fading-destroyed-argb = true;
    -fade-exclude = [
    -];
     
    @@ -354,20 +88,9 @@ for the JavaScript code in this tag.
    backend = "xrender";
     mark-wmwin-focused = true;
     mark-ovredir-focused = true;
    -# use-ewmh-active-win = true;
     detect-rounded-corners = true;
     detect-client-opacity = true;
     refresh-rate = 0;
    -vsync = false;
    -dbe = false;
    -# sw-opti = true;
    -# unredir-if-possible = true;
    -# unredir-if-possible-delay = 5000;
    -# unredir-if-possible-exclude = [ ];
    -detect-transient = true;
    -detect-client-leader = true;
    -invert-color-include = [ ];
    -# resize-damage = 1;
     
    @@ -379,18 +102,9 @@ for the JavaScript code in this tag.
    wintypes:
     {
    -  tooltip = {
    -    fade = true;
    -    shadow = true;
    -    opacity = 0.75;
    -    focus = true;
    -  };
    -  fullscreen = {
    -    fade = true;
    -    shadow = false;
    -    opacity = 1;
    -    focus = true;
    -  };
    +tooltip = { fade = true; shadow = true; focus = true; full-shadow = false; };
    +dock = { shadow = false; }
    +dnd = { shadow = false; }
     };
     
    @@ -399,7 +113,7 @@ for the JavaScript code in this tag.

    Author: Dehaeze Thomas

    -

    Created: 2020-01-12 dim. 17:28

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/config.html b/docs/config.html index c7d0ec2..49ee5ed 100644 --- a/docs/config.html +++ b/docs/config.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Configuration Files @@ -32,7 +32,6 @@
  • Redshift
  • dmenu
  • Locale
  • -
  • Pass Git Helper
  • @@ -45,31 +44,31 @@ Host grenoble hostname 82.64.103.2 - Port 10022 + Port 10022 user tdehaeze IdentityFile ~/.ssh/id_rsa Host wingaudio hostname 207.154.251.241 - Port 22 + Port 22 user tdehaeze IdentityFile ~/.ssh/id_rsa Host octoprint hostname 192.168.1.56 - Port 22 + Port 22 user pi IdentityFile ~/.ssh/id_rsa Host hassio hostname 192.168.1.101 - Port 10022 + Port 10022 user root IdentityFile ~/.ssh/id_rsa Host nas hostname 192.168.1.50 - Port 10022 + Port 10022 user tdehaeze IdentityFile ~/.ssh/id_rsa
    @@ -81,8 +80,8 @@ Host nas

    Font

    -
    <?xml version='1.0'?>
    -<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
    +
    <?xml version='1.0'?>
    +<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
     <fontconfig>
     
     <alias>
    @@ -112,8 +111,8 @@ Host nas
     

    GnuPG

    -
    default-cache-ttl 60480000
    -max-cache-ttl 60480000
    +
    default-cache-ttl 60480000
    +max-cache-ttl 60480000
     
    @@ -123,22 +122,22 @@ max-cache-ttl 60480000

    Redshift

    -
    [redshift]
    -temp-day=5700
    -temp-night=3500
    +
    [redshift]
    +temp-day=5700
    +temp-night=3500
     
    -transition=1
    +transition=1
     
    -;brightness-day=0.7
    -;brightness-night=0.4
    +;brightness-day=0.7
    +;brightness-night=0.4
     
    -location-provider=manual
    +location-provider=manual
     
    -adjustment-method=randr
    +adjustment-method=randr
     
    -[manual]
    -lat=45.1
    -lon=5.7
    +[manual]
    +lat=45.1
    +lon=5.7
     
    @@ -148,26 +147,26 @@ lon=5.7

    dmenu

    -
    # define the font for dmenu to be used
    -DMENU_FN="Hack Nerd Font 12"
    +
    # define the font for dmenu to be used
    +DMENU_FN="Hack Nerd Font 12"
     
    -# background colour for unselected menu-items
    -DMENU_NB="#222D31"
    +# background colour for unselected menu-items
    +DMENU_NB="#222D31"
     
    -# textcolour for unselected menu-items
    -DMENU_NF="#F9FAF9"
    +# textcolour for unselected menu-items
    +DMENU_NF="#F9FAF9"
     
    -# background colour for selected menu-items
    -DMENU_SB="#16A085"
    +# background colour for selected menu-items
    +DMENU_SB="#16A085"
     
    -# textcolour for selected menu-items
    -DMENU_SF="#F9FAF9"
    +# textcolour for selected menu-items
    +DMENU_SF="#F9FAF9"
     
    -# command for the terminal application to be used:
    -TERMINAL_CMD="terminal -e"
    +# command for the terminal application to be used:
    +TERMINAL_CMD="terminal -e"
     
    -# export our variables
    -DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"
    +# export our variables
    +DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"
     
    @@ -177,31 +176,20 @@ DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMEN

    Locale

    -
    LANG=en_US.UTF-8
    -LC_CTYPE="en_US.UTF-8"
    -LC_NUMERIC=fr_FR.UTF-8
    -LC_TIME=fr_FR.UTF-8
    -LC_COLLATE="en_US.UTF-8"
    -LC_MONETARY=fr_FR.UTF-8
    -LC_MESSAGES="en_US.UTF-8"
    -LC_PAPER=fr_FR.UTF-8
    -LC_NAME=fr_FR.UTF-8
    -LC_ADDRESS=fr_FR.UTF-8
    -LC_TELEPHONE=fr_FR.UTF-8
    -LC_MEASUREMENT=fr_FR.UTF-8
    -LC_IDENTIFICATION=fr_FR.UTF-8
    -LC_ALL=
    -
    -
    -
    -
    - -
    -

    Pass Git Helper

    -
    -
    -
    [github.com*]
    -target=github.com/tdehaeze
    +
    LANG=en_US.UTF-8
    +LC_CTYPE="en_US.UTF-8"
    +LC_NUMERIC=fr_FR.UTF-8
    +LC_TIME=fr_FR.UTF-8
    +LC_COLLATE="en_US.UTF-8"
    +LC_MONETARY=fr_FR.UTF-8
    +LC_MESSAGES="en_US.UTF-8"
    +LC_PAPER=fr_FR.UTF-8
    +LC_NAME=fr_FR.UTF-8
    +LC_ADDRESS=fr_FR.UTF-8
    +LC_TELEPHONE=fr_FR.UTF-8
    +LC_MEASUREMENT=fr_FR.UTF-8
    +LC_IDENTIFICATION=fr_FR.UTF-8
    +LC_ALL=
     
    @@ -209,7 +197,7 @@ target=github.com/tdehaeze

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/doom.html b/docs/doom.html index 3e8edda..be56fa5 100644 --- a/docs/doom.html +++ b/docs/doom.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Doom Emacs Configuration @@ -40,6 +40,7 @@
  • Evil
  • Which Key
  • Visual
  • +
  • Useful General Functions
  • Change default alert backend
  • Lockfiles
  • Disable highlight of current line
  • @@ -98,6 +99,9 @@
  • Insert ScreenShot or Picture from Phone
  • Render Tables
  • Org Gcal
  • +
  • Citeproc-Org
  • +
  • Org Wild Notifier
  • +
  • Orch
  • Custom Keybindings - , leader key and C-c
  • LaTeX @@ -528,10 +532,10 @@ After that, restart Emacs with spc q r.

    Personal Information

    -
    ;; These are used for a number of things, particularly for GPG configuration,
    -;; some email clients, file templates and snippets.
    -(setq user-full-name "Dehaeze Thomas"
    -      user-mail-address "dehaeze.thomas@gmail.com")
    +
    ;; These are used for a number of things, particularly for GPG configuration,
    +;; some email clients, file templates and snippets.
    +(setq user-full-name "Dehaeze Thomas"
    +      user-mail-address "dehaeze.thomas@gmail.com")
     
    @@ -541,20 +545,45 @@ After that, restart Emacs with spc q r.

    Doom Config

    -
    (setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 12 :weight 'semi-light)
    -      doom-variable-pitch-font (font-spec :family "Hack Nerd Font Mono")
    -      doom-unicode-font (font-spec :family "Hack Nerd Font Mono" :size 12)
    -      doom-big-font (font-spec :family "Hack Nerd Font Mono" :size 19))
    +
    (setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 12 :weight 'semi-light)
    +      doom-variable-pitch-font (font-spec :family "Hack Nerd Font Mono")
    +      doom-unicode-font (font-spec :family "Hack Nerd Font Mono" :size 12)
    +      doom-big-font (font-spec :family "Hack Nerd Font Mono" :size 19))
     
    -
    (setq doom-theme 'doom-gruvbox)
    +
    (setq doom-theme 'doom-gruvbox)
     
    -
    (setq display-line-numbers-type t)
    +
    (setq display-line-numbers-type t)
    +
    +
    + +
    +
    (use-package doom-modeline
    +  :hook (after-init . doom-modeline-mode)
    +  :custom
    +  (doom-modeline-height 25)
    +  (doom-modeline-bar-width 1)
    +  (doom-modeline-icon t)
    +  (doom-modeline-major-mode-icon t)
    +  (doom-modeline-major-mode-color-icon t)
    +  (doom-modeline-buffer-file-name-style 'truncate-upto-project)
    +  (doom-modeline-buffer-state-icon t)
    +  (doom-modeline-buffer-modification-icon t)
    +  (doom-modeline-minor-modes nil)
    +  (doom-modeline-enable-word-count nil)
    +  (doom-modeline-buffer-encoding t)
    +  (doom-modeline-indent-info nil)
    +  (doom-modeline-checker-simple-format t)
    +  (doom-modeline-vcs-max-length 12)
    +  (doom-modeline-env-version t)
    +  (doom-modeline-irc-stylize 'identity)
    +  (doom-modeline-github-timer nil)
    +  (doom-modeline-gnus-timer nil))
     
    @@ -564,8 +593,8 @@ After that, restart Emacs with spc q r.

    Evil

    -
    (after! evil
    -  (map! :m  "-"  #'dired-jump))
    +
    (after! evil
    +  (map! :m  "-"  #'dired-jump))
     
    @@ -573,10 +602,10 @@ After that, restart Emacs with spc q r. Make movement keys work like they should

    -
    (define-key evil-normal-state-map (kbd "<remap> <evil-next-line>") 'evil-next-visual-line)
    -(define-key evil-normal-state-map (kbd "<remap> <evil-previous-line>") 'evil-previous-visual-line)
    -(define-key evil-motion-state-map (kbd "<remap> <evil-next-line>") 'evil-next-visual-line)
    -(define-key evil-motion-state-map (kbd "<remap> <evil-previous-line>") 'evil-previous-visual-line)
    +
    (define-key evil-normal-state-map (kbd "<remap> <evil-next-line>") 'evil-next-visual-line)
    +(define-key evil-normal-state-map (kbd "<remap> <evil-previous-line>") 'evil-previous-visual-line)
    +(define-key evil-motion-state-map (kbd "<remap> <evil-next-line>") 'evil-next-visual-line)
    +(define-key evil-motion-state-map (kbd "<remap> <evil-previous-line>") 'evil-previous-visual-line)
     
    @@ -584,7 +613,7 @@ Make movement keys work like they should Make horizontal movement cross lines

    -
    (setq-default evil-cross-lines t)
    +
    (setq-default evil-cross-lines t)
     
    @@ -594,10 +623,10 @@ Make horizontal movement cross lines

    Which Key

    -
    (after! which-key
    -  (setq which-key-idle-delay 0.5
    -        which-key-idle-secondary-delay 0.01
    -        which-key-sort-order 'which-key-key-order-alpha))
    +
    (after! which-key
    +  (setq which-key-idle-delay 0.5
    +        which-key-idle-secondary-delay 0.01
    +        which-key-sort-order 'which-key-key-order-alpha))
     
    @@ -610,7 +639,7 @@ Make horizontal movement cross lines Automatic line wrap.

    -
    (global-visual-line-mode nil)
    +
    (global-visual-line-mode nil)
     
    @@ -618,13 +647,31 @@ Automatic line wrap. Turn off auto-fill mode that add line breaks.

    -
    (auto-fill-mode -1)
    -(remove-hook 'text-mode-hook 'turn-on-auto-fill)
    -;; turn on auto-fill for text-mode
    -(add-hook 'text-mode-hook 'turn-on-auto-fill)
    -(after! org
    -  ;; turn off auto-fill for org-mode
    -  (add-hook 'org-mode-hook 'turn-off-auto-fill))
    +
    (auto-fill-mode -1)
    +(remove-hook 'text-mode-hook 'turn-on-auto-fill)
    +;; turn on auto-fill for text-mode
    +(add-hook 'text-mode-hook 'turn-on-auto-fill)
    +(after! org
    +  ;; turn off auto-fill for org-mode
    +  (add-hook 'org-mode-hook 'turn-off-auto-fill))
    +
    +
    +
  • + + +
    +

    Useful General Functions

    +
    +
    +
    (defun tdh-matlab-work ()
    +  "Setup Matlab Work Windows"
    +  (interactive)
    +  (delete-other-windows)
    +  (evil-window-vsplit)
    +  (evil-window-right 1)
    +  (switch-to-buffer "*MATLAB*")
    +  (evil-window-left 1)
    +  )
     
    @@ -634,7 +681,7 @@ Turn off auto-fill mode that add line breaks.

    Change default alert backend

    -
    (setq alert-default-style 'libnotify)
    +
    (setq alert-default-style 'libnotify)
     
    @@ -644,7 +691,7 @@ Turn off auto-fill mode that add line breaks.

    Lockfiles

    -
    (setq create-lockfiles nil)
    +
    (setq create-lockfiles nil)
     
    @@ -654,14 +701,14 @@ Turn off auto-fill mode that add line breaks.

    Disable highlight of current line

    -
    (global-hl-line-mode -1)
    -(after! org
    -  (add-hook 'org-mode-hook
    -      (lambda()
    -          (hl-line-mode -1)
    -          (global-hl-line-mode -1))
    -      't
    -  ))
    +
    (global-hl-line-mode -1)
    +(after! org
    +  (add-hook 'org-mode-hook
    +      (lambda()
    +          (hl-line-mode -1)
    +          (global-hl-line-mode -1))
    +      't
    +  ))
     
    @@ -671,10 +718,10 @@ Turn off auto-fill mode that add line breaks.

    Remap jump-forward key binding

    -
    (with-eval-after-load 'better-jumper
    -  (map!
    -  :desc "Jump Forward"
    -  "C-i" #'better-jumper-jump-forward))
    +
    (with-eval-after-load 'better-jumper
    +  (map!
    +  :desc "Jump Forward"
    +  "C-i" #'better-jumper-jump-forward))
     
    @@ -684,9 +731,22 @@ Turn off auto-fill mode that add line breaks.

    Magit

    -
    (setenv "GIT_ASKPASS" "git-gui--askpass")
    +
    (setenv "GIT_ASKPASS" "git-gui--askpass")
     
    -(setq magit-diff-refine-hunk 'all)
    +(after! magit
    +  (setq magit-diff-refine-hunk 'all)
    +  (setq magit-repository-directories `(("~/Cloud/thesis/matlab/" . 1)
    +                                       ("~/Cloud/thesis/papers/" . 1)))
    +  (setq magit-repolist-columns '(("Name" 25 magit-repolist-column-ident nil)
    +                                 ("Status" 7 magit-repolist-column-flag)
    +                                 ("B<U" 3 magit-repolist-column-unpulled-from-upstream
    +                                  ((:right-align t)
    +                                   (:help-echo "Upstream changes not in branch")))
    +                                 ("B>U" 3 magit-repolist-column-unpushed-to-upstream
    +                                  ((:right-align t)
    +                                   (:help-echo "Local changes not in upstream")))
    +                                 ("Path" 99 magit-repolist-column-path nil)))
    +  )
     
    @@ -719,11 +779,11 @@ This works also with C-x C-q
    -
    (use-package! dired-narrow
    -  :config
    -  (map! :map dired-mode-map
    -        :n "f"
    -        'dired-narrow-fuzzy))
    +
    (use-package! dired-narrow
    +  :config
    +  (map! :map dired-mode-map
    +        :n "f"
    +        'dired-narrow-fuzzy))
     
    @@ -733,10 +793,10 @@ This works also with C-x C-q

    PDF-Tools

    -
    (use-package! pdf-tools
    -  :config
    -  (add-hook 'pdf-view-mode-hook (lambda() (linum-mode -1)))
    -  )
    +
    (use-package! pdf-tools
    +  :config
    +  (add-hook 'pdf-view-mode-hook (lambda() (linum-mode -1)))
    +  )
     
    @@ -746,8 +806,8 @@ This works also with C-x C-q

    Yassnippets

    -
    (push "~/.config/doom/snippets" yas-snippet-dirs)
    -(yas-global-mode 1)
    +
    (push "~/.config/doom/snippets" yas-snippet-dirs)
    +(yas-global-mode 1)
     
    @@ -757,17 +817,17 @@ This works also with C-x C-q

    Ox-Hugo

    -
    (defun tdh-export-everything-to-hugo ()
    -  "Export all the .org files in the specified directory to markdown using Hugo"
    -  (interactive)
    -  (setq org-files (directory-files (read-directory-name "Directory:" "/home/thomas/Cloud/brain/") t "org$" t))
    +
    (defun tdh-export-everything-to-hugo ()
    +  "Export all the .org files in the specified directory to markdown using Hugo"
    +  (interactive)
    +  (setq org-files (directory-files (read-directory-name "Directory:" "/home/thomas/Cloud/brain/") t "org$" t))
     
    -  (while org-files
    -    (setq current-org-file (car org-files))
    -    (message "Exporting %s" current-org-file)
    -    (find-file current-org-file)
    -    (org-hugo-export-to-md)
    -    (setq org-files (cdr org-files))))
    +  (while org-files
    +    (setq current-org-file (car org-files))
    +    (message "Exporting %s" current-org-file)
    +    (find-file current-org-file)
    +    (org-hugo-export-to-md)
    +    (setq org-files (cdr org-files))))
     
    @@ -788,31 +848,31 @@ This works also with C-x C-q

    Org General Config

    -
    (setq org-directory "~/Cloud/org/")
    -(after! org
    -  (setq org-directory "~/Cloud/org/")
    +
    (setq org-directory "~/Cloud/org/")
    +(after! org
    +  (setq org-directory "~/Cloud/org/")
     
    -  ;; Replace the content marker, “⋯”, with a nice unicode arrow.
    -  (setq org-ellipsis " ⤵")
    +  ;; Replace the content marker, “⋯”, with a nice unicode arrow.
    +  (setq org-ellipsis " ⤵")
     
    -  (setq org-default-notes-file "~/Cloud/org/refile.org")
    +  (setq org-default-notes-file "~/Cloud/org/refile.org")
     
    -  ;; Avoid accidentally editing folded regions, say by adding text after an Org “⋯”.
    -  (setq org-catch-invisible-edits 'show)
    +  ;; Avoid accidentally editing folded regions, say by adding text after an Org “⋯”.
    +  (setq org-catch-invisible-edits 'show)
     
    -  ;; The following setting hides blank lines between headings which keeps folded view nice and compact.
    -  (setq org-cycle-separator-lines 0)
    +  ;; The following setting hides blank lines between headings which keeps folded view nice and compact.
    +  (setq org-cycle-separator-lines 0)
     
    -  ;; Indent according to the outline structure
    -  (setq org-startup-indented t)
    -  (setq org-startup-folded t)
    +  ;; Indent according to the outline structure
    +  (setq org-startup-indented t)
    +  (setq org-startup-folded t)
     
    -  ;; Record the information of when the task was marked as DONE
    -  (setq org-log-done 'time)
    +  ;; Record the information of when the task was marked as DONE
    +  (setq org-log-done 'time)
     
    -  ;; begining of line on heading behavior
    -  (setq org-special-ctrl-a/e nil)
    -)
    +  ;; begining of line on heading behavior
    +  (setq org-special-ctrl-a/e nil)
    +)
     
    @@ -820,8 +880,8 @@ This works also with C-x C-q TAB was changed to toggle only the visibility state of the current subtree, rather than cycle through it recursively. This can be reversed with:

    -
    (after! evil-org
    -  (remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h))
    +
    (after! evil-org
    +  (remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h))
     
    @@ -834,8 +894,8 @@ TAB was changed to toggle only the visibility state of the current subtree, rath Display the real size of images and not the one set with attr_latex: :width \linewidth for instance.

    -
    (after! org
    -  (setq org-image-actual-width t))
    +
    (after! org
    +  (setq org-image-actual-width t))
     
    @@ -845,12 +905,12 @@ Display the real size of images and not the one set with attr_latex: :widt

    Org Links

    -
    (after! org
    -  (setq org-link-abbrev-alist
    -    '(("bib" . "~/Cloud/brain/biblio/references.bib::%s")
    -      ("notes" . "~/Cloud/brain/%s.org")
    -      ("papers" . "~/Cloud/pdfs/%s.pdf")))
    -  )
    +
    (after! org
    +  (setq org-link-abbrev-alist
    +    '(("bib" . "~/Cloud/brain/biblio/references.bib::%s")
    +      ("notes" . "~/Cloud/brain/%s.org")
    +      ("papers" . "~/Cloud/pdfs/%s.pdf")))
    +  )
     
    @@ -860,15 +920,15 @@ Display the real size of images and not the one set with attr_latex: :widt

    Org Tagging

    -
    (after! org
    -  ;; Align Tags and flush right
    -  (setq org-tags-column -78)
    -  ;; Tags with fast selection keys
    -  (setq org-tag-alist (quote (("@home" . ?h)
    -                              ("@work" . ?w)
    -                              ("@christophe" . ?c)
    -                              ("@veijo" . ?v))))
    -  )
    +
    (after! org
    +  ;; Align Tags and flush right
    +  (setq org-tags-column -78)
    +  ;; Tags with fast selection keys
    +  (setq org-tag-alist (quote (("@home" . ?h)
    +                              ("@work" . ?w)
    +                              ("@christophe" . ?c)
    +                              ("@veijo" . ?v))))
    +  )
     
    @@ -878,9 +938,9 @@ Display the real size of images and not the one set with attr_latex: :widt

    Org Refile

    -
    (after! org
    -  (setq org-refile-targets '((org-agenda-files . (:maxlevel . 6))))
    -  )
    +
    (after! org
    +  (setq org-refile-targets '((org-agenda-files . (:maxlevel . 6))))
    +  )
     
    @@ -890,33 +950,33 @@ Display the real size of images and not the one set with attr_latex: :widt

    Org TODO

    -
    (after! org
    -  ;; Tags with fast selection keys
    -  (setq org-todo-keywords '(
    -                            (sequence "TODO(t)" "NEXT(n)" "MAIL(m)" "|" "DONE(d)")
    -                            (sequence "READ(r)" "BKMK(b)" "EXER(x)" "|" "DONE(d)")
    -                            (sequence "WAIT(w@/!)" "SDAY(s)" "|" "CANC(c@/!)")
    -                            (sequence "QUES(q)" "|" "ANSW(a)")
    -                            (sequence "EXAM(e)" "IDEA(i)" "|")
    -                            ))
    +
    (after! org
    +  ;; Tags with fast selection keys
    +  (setq org-todo-keywords '(
    +                            (sequence "TODO(t)" "NEXT(n)" "MAIL(m)" "|" "DONE(d)")
    +                            (sequence "READ(r)" "BKMK(b)" "EXER(x)" "|" "DONE(d)")
    +                            (sequence "WAIT(w@/!)" "SDAY(s)" "|" "CANC(c@/!)")
    +                            (sequence "QUES(q)" "|" "ANSW(a)")
    +                            (sequence "EXAM(e)" "IDEA(i)" "|")
    +                            ))
     
    -  ;; Display of the keywords
    -  (setq org-todo-keyword-faces
    -        '(("TODO" . (:foreground "#cc241d" :weight bold)) ;; red
    -          ("EXER" . (:foreground "#cc241d" :weight bold)) ;; red
    -          ("NEXT" . (:foreground "#cc241d" :weight bold)) ;; red
    -          ("MAIL" . (:foreground "#cc241d" :weight bold)) ;; red
    -          ("READ" . (:foreground "#cc241d" :weight bold)) ;; red
    -          ("ANSW" . (:foreground "#689d6a" :weight bold)) ;; aqua
    -          ("DONE" . (:foreground "#689d6a" :weight bold)) ;; aqua
    -          ("WAIT" . (:foreground "#d65d0e" :weight bold)) ;; orange
    -          ("QUES" . (:foreground "#d79921" :weight bold)) ;; yellow
    -          ("CANC" . (:foreground "#a89984" :weight bold)) ;; grey
    -          ("SDAY" . (:foreground "#98971a" :weight bold)) ;; green
    -          ("BKMK" . (:foreground "#98971a" :weight bold)) ;; green
    -          ("IDEA" . (:foreground "#98971a" :weight bold)) ;; green
    -          ("EXAM" . (:foreground "#98971a" :weight bold)))) ;; green
    -  )
    +  ;; Display of the keywords
    +  (setq org-todo-keyword-faces
    +        '(("TODO" . (:foreground "#cc241d" :weight bold)) ;; red
    +          ("EXER" . (:foreground "#cc241d" :weight bold)) ;; red
    +          ("NEXT" . (:foreground "#cc241d" :weight bold)) ;; red
    +          ("MAIL" . (:foreground "#cc241d" :weight bold)) ;; red
    +          ("READ" . (:foreground "#cc241d" :weight bold)) ;; red
    +          ("ANSW" . (:foreground "#689d6a" :weight bold)) ;; aqua
    +          ("DONE" . (:foreground "#689d6a" :weight bold)) ;; aqua
    +          ("WAIT" . (:foreground "#d65d0e" :weight bold)) ;; orange
    +          ("QUES" . (:foreground "#d79921" :weight bold)) ;; yellow
    +          ("CANC" . (:foreground "#a89984" :weight bold)) ;; grey
    +          ("SDAY" . (:foreground "#98971a" :weight bold)) ;; green
    +          ("BKMK" . (:foreground "#98971a" :weight bold)) ;; green
    +          ("IDEA" . (:foreground "#98971a" :weight bold)) ;; green
    +          ("EXAM" . (:foreground "#98971a" :weight bold)))) ;; green
    +  )
     
    @@ -931,50 +991,50 @@ Archive subtrees under the same hierarchy as original in the archive files

    -
    (after! org
    -  (defadvice org-archive-subtree (around fix-hierarchy activate)
    -    (let* ((fix-archive-p (and (not current-prefix-arg)
    -                               (not (use-region-p))))
    -           (location (org-archive--compute-location org-archive-location))
    -           (afile (car location))
    -           (offset (if (= 0 (length (cdr location)))
    -                       1
    -                     (1+ (string-match "[^*]" (cdr location)))))
    -           (buffer (or (find-buffer-visiting afile) (find-file-noselect afile))))
    +
    (after! org
    +  (defadvice org-archive-subtree (around fix-hierarchy activate)
    +    (let* ((fix-archive-p (and (not current-prefix-arg)
    +                               (not (use-region-p))))
    +           (location (org-archive--compute-location org-archive-location))
    +           (afile (car location))
    +           (offset (if (= 0 (length (cdr location)))
    +                       1
    +                     (1+ (string-match "[^*]" (cdr location)))))
    +           (buffer (or (find-buffer-visiting afile) (find-file-noselect afile))))
           ad-do-it
    -      (when fix-archive-p
    -        (with-current-buffer buffer
    -          (goto-char (point-max))
    -          (while (> (org-current-level) offset) (org-up-heading-safe))
    -          (let* ((olpath (org-entry-get (point) "ARCHIVE_OLPATH"))
    -                 (path (and olpath (split-string olpath "/")))
    -                 (level offset)
    -                 tree-text)
    -            (when olpath
    -              (org-mark-subtree)
    -              (setq tree-text (buffer-substring (region-beginning) (region-end)))
    -              (let (this-command) (org-cut-subtree))
    -              (goto-char (point-min))
    -              (save-restriction
    -                (widen)
    -                (-each path
    -                  (lambda (heading)
    -                    (if (re-search-forward
    -                         (rx-to-string
    -                          `(: bol (repeat ,level "*") (1+ " ") ,heading)) nil t)
    -                        (org-narrow-to-subtree)
    -                      (goto-char (point-max))
    -                      (unless (looking-at "^")
    -                        (insert "\n"))
    -                      (insert (make-string level ?*)
    -                              " "
    +      (when fix-archive-p
    +        (with-current-buffer buffer
    +          (goto-char (point-max))
    +          (while (> (org-current-level) offset) (org-up-heading-safe))
    +          (let* ((olpath (org-entry-get (point) "ARCHIVE_OLPATH"))
    +                 (path (and olpath (split-string olpath "/")))
    +                 (level offset)
    +                 tree-text)
    +            (when olpath
    +              (org-mark-subtree)
    +              (setq tree-text (buffer-substring (region-beginning) (region-end)))
    +              (let (this-command) (org-cut-subtree))
    +              (goto-char (point-min))
    +              (save-restriction
    +                (widen)
    +                (-each path
    +                  (lambda (heading)
    +                    (if (re-search-forward
    +                         (rx-to-string
    +                          `(: bol (repeat ,level "*") (1+ " ") ,heading)) nil t)
    +                        (org-narrow-to-subtree)
    +                      (goto-char (point-max))
    +                      (unless (looking-at "^")
    +                        (insert "\n"))
    +                      (insert (make-string level ?*)
    +                              " "
                                   heading
    -                              "\n"))
    -                    (cl-incf level)))
    -                (widen)
    -                (org-end-of-subtree t t)
    -                (org-paste-subtree level tree-text))))))))
    -  )
    +                              "\n"))
    +                    (cl-incf level)))
    +                (widen)
    +                (org-end-of-subtree t t)
    +                (org-paste-subtree level tree-text))))))))
    +  )
     
    @@ -987,33 +1047,33 @@ Archive subtrees under the same hierarchy as original in the archive files General configuration

    -
    (after! org
    -  ;; File to save todo items
    -  (setq org-agenda-files (list "~/Cloud/org/"))
    +
    (after! org
    +  ;; File to save todo items
    +  (setq org-agenda-files (list "~/Cloud/org/"))
     
    -  ;; Include archived files
    -  (setq org-agenda-archives-mode t)
    +  ;; Include archived files
    +  (setq org-agenda-archives-mode t)
     
    -  ;; Set priority range from A to C with default A
    -  (setq org-highest-priority ?A)
    -  (setq org-lowest-priority ?C)
    -  (setq org-default-priority ?C)
    +  ;; Set priority range from A to C with default A
    +  (setq org-highest-priority ?A)
    +  (setq org-lowest-priority ?C)
    +  (setq org-default-priority ?C)
     
    -  ;; Set colours for priorities
    -  (setq org-priority-faces '((?A . (:foreground "#FB4934"))
    -                             (?B . (:foreground "#FABD2F"))
    -                             (?C . (:foreground "#98971A"))))
    +  ;; Set colours for priorities
    +  (setq org-priority-faces '((?A . (:foreground "#FB4934"))
    +                             (?B . (:foreground "#FABD2F"))
    +                             (?C . (:foreground "#98971A"))))
     
    -  ;; Open agenda in current window
    -  (setq org-agenda-window-setup 'current-window)
    +  ;; Open agenda in current window
    +  (setq org-agenda-window-setup 'current-window)
     
    -  (setq org-agenda-prefix-format
    -        '((agenda  . " %-12:c %?-12t% s")
    -          (todo  . "") ;; Don't show the filename for reading agenda
    -          (tags  . " %-12:c")
    -          (search . " %-12:c"))
    -        )
    -  )
    +  (setq org-agenda-prefix-format
    +        '((agenda  . "  %?-12t% s")
    +          (todo  . "") ;; Don't show the filename for reading agenda
    +          (tags  . " %-12:c")
    +          (search . " %-12:c"))
    +        )
    +  )
     
    @@ -1021,85 +1081,85 @@ General configuration Org Agenda Custom Views

    -
    (after! org-agenda
    -  (defun tdh-org-agenda-skip-scheduled ()
    -    (org-agenda-skip-entry-if 'scheduled 'deadline 'regexp "\n]+>"))
    +
    (after! org-agenda
    +  (defun tdh-org-agenda-skip-scheduled ()
    +    (org-agenda-skip-entry-if 'scheduled 'deadline 'regexp "\n]+>"))
     
    -  (setq org-agenda-custom-commands
    -        '(("w" "Work"
    -           ((org-ql-block '(and (tags "@work")
    -                                (todo "TODO")
    -                                (priority "A"))
    -                          ((org-ql-block-header "Important TODOs")))
    -            (org-ql-block '(and (tags "@work")
    -                                (todo "TODO")
    -                                (priority "B"))
    -                          ((org-ql-block-header "TODOs")))
    -            (org-ql-block '(and (tags "@work")
    -                                (todo "TODO")
    -                                (priority "C"))
    -                          ((org-ql-block-header "Not important TODOs")))))
    -          ("h" "Home"
    -           ((org-ql-block '(and (tags "@home")
    -                                (todo "TODO")
    -                                (priority "A"))
    -                          ((org-ql-block-header "Things to do")))
    -            (org-ql-block '(and (tags "@home")
    -                                (todo "TODO")
    -                                (priority "B"))
    -                          ((org-ql-block-header "Things to do")))
    -            (org-ql-block '(and (tags "@home")
    -                                (todo "TODO")
    -                                (priority "C"))
    -                          ((org-ql-block-header "Things to do")))))
    -          ("q" "Questions to ask"
    -           ((org-ql-block '(and (todo "QUES")
    -                                (tags "@christophe"))
    -                          ((org-ql-block-header "Questions to Christophe")))
    -            (org-ql-block '(and (todo "QUES")
    -                                (tags "@veijo"))
    -                          ((org-ql-block-header "Questions to Veijo")))
    -            (org-ql-block '(and (todo "QUES")
    -                                (not (tags "@veijo" "@christophe")))
    -                          ((org-ql-block-header "Other Questions")))))
    -          ("R" "Already read Articles and Books"
    -           ((org-ql-block '(and (todo "DONE")
    -                                (level 1)
    -                                (tags "article" "inproceedings" "techreport" "inbook"))
    -                          ((org-ql-block-header "Articles")))
    -            (org-ql-block '(and (todo "DONE")
    -                                (level 1)
    -                                (tags "book"))
    -                          ((org-ql-block-header "Books")))
    -            (org-ql-block '(and (todo "DONE")
    -                                (level 1)
    -                                (tags "phdthesis"))
    -                          ((org-ql-block-header "Phd Thesis")))
    -            (org-ql-block '(and (todo "DONE")
    -                                (level 1)
    -                                (not (tags "article" "inproceedings" "techreport" "inbook" "book" "phdthesis")))
    -                          ((org-ql-block-header "Other Things"))))
    -           ((org-agenda-files '("~/Cloud/brain/"))))
    -          ("r" "Articles and Books to read"
    -           ((org-ql-block '(and (todo "READ")
    -                                (level 1)
    -                                (tags "article" "inproceedings" "techreport" "inbook"))
    -                          ((org-ql-block-header "Article to Read")))
    -            (org-ql-block '(and (todo "READ")
    -                                (level 1)
    -                                (tags "book"))
    -                          ((org-ql-block-header "Books to Read")))
    -            (org-ql-block '(and (todo "READ")
    -                                (level 1)
    -                                (tags "phdthesis"))
    -                          ((org-ql-block-header "Phd Thesis to Read")))
    -            (org-ql-block '(and (todo "READ")
    -                                (level 1)
    -                                (not (tags "article" "inproceedings" "techreport" "inbook" "book" "phdthesis")))
    -                          ((org-ql-block-header "Other Things to Read"))))
    -           ((org-agenda-files '("~/Cloud/brain/")))))
    -        )
    -  )
    +  (setq org-agenda-custom-commands
    +        '(("w" "Work"
    +           ((org-ql-block '(and (tags "@work")
    +                                (todo "TODO")
    +                                (priority "A"))
    +                          ((org-ql-block-header "Important TODOs")))
    +            (org-ql-block '(and (tags "@work")
    +                                (todo "TODO")
    +                                (priority "B"))
    +                          ((org-ql-block-header "TODOs")))
    +            (org-ql-block '(and (tags "@work")
    +                                (todo "TODO")
    +                                (priority "C"))
    +                          ((org-ql-block-header "Not important TODOs")))))
    +          ("h" "Home"
    +           ((org-ql-block '(and (tags "@home")
    +                                (todo "TODO")
    +                                (priority "A"))
    +                          ((org-ql-block-header "Things to do")))
    +            (org-ql-block '(and (tags "@home")
    +                                (todo "TODO")
    +                                (priority "B"))
    +                          ((org-ql-block-header "Things to do")))
    +            (org-ql-block '(and (tags "@home")
    +                                (todo "TODO")
    +                                (priority "C"))
    +                          ((org-ql-block-header "Things to do")))))
    +          ("q" "Questions to ask"
    +           ((org-ql-block '(and (todo "QUES")
    +                                (tags "@christophe"))
    +                          ((org-ql-block-header "Questions to Christophe")))
    +            (org-ql-block '(and (todo "QUES")
    +                                (tags "@veijo"))
    +                          ((org-ql-block-header "Questions to Veijo")))
    +            (org-ql-block '(and (todo "QUES")
    +                                (not (tags "@veijo" "@christophe")))
    +                          ((org-ql-block-header "Other Questions")))))
    +          ("R" "Already read Articles and Books"
    +           ((org-ql-block '(and (todo "DONE")
    +                                (level 1)
    +                                (tags "article" "inproceedings" "techreport" "inbook"))
    +                          ((org-ql-block-header "Articles")))
    +            (org-ql-block '(and (todo "DONE")
    +                                (level 1)
    +                                (tags "book"))
    +                          ((org-ql-block-header "Books")))
    +            (org-ql-block '(and (todo "DONE")
    +                                (level 1)
    +                                (tags "phdthesis"))
    +                          ((org-ql-block-header "Phd Thesis")))
    +            (org-ql-block '(and (todo "DONE")
    +                                (level 1)
    +                                (not (tags "article" "inproceedings" "techreport" "inbook" "book" "phdthesis")))
    +                          ((org-ql-block-header "Other Things"))))
    +           ((org-agenda-files '("~/Cloud/brain/"))))
    +          ("r" "Articles and Books to read"
    +           ((org-ql-block '(and (todo "READ")
    +                                (level 1)
    +                                (tags "article" "inproceedings" "techreport" "inbook"))
    +                          ((org-ql-block-header "Article to Read")))
    +            (org-ql-block '(and (todo "READ")
    +                                (level 1)
    +                                (tags "book"))
    +                          ((org-ql-block-header "Books to Read")))
    +            (org-ql-block '(and (todo "READ")
    +                                (level 1)
    +                                (tags "phdthesis"))
    +                          ((org-ql-block-header "Phd Thesis to Read")))
    +            (org-ql-block '(and (todo "READ")
    +                                (level 1)
    +                                (not (tags "article" "inproceedings" "techreport" "inbook" "book" "phdthesis")))
    +                          ((org-ql-block-header "Other Things to Read"))))
    +           ((org-agenda-files '("~/Cloud/brain/")))))
    +        )
    +  )
     
    @@ -1109,9 +1169,9 @@ Org Agenda Custom Views

    Org Fancy Priority

    -
    (use-package! org-fancy-priorities ; priority icons
    -  :hook (org-mode . org-fancy-priorities-mode)
    -  :config (setq org-fancy-priorities-list '("■" "■" "■")))
    +
    (use-package! org-fancy-priorities ; priority icons
    +  :hook (org-mode . org-fancy-priorities-mode)
    +  :config (setq org-fancy-priorities-list '("■" "■" "■")))
     
    @@ -1125,25 +1185,25 @@ Org Agenda Custom Views

    -
    (after! org-agenda
    -  (setq appt-message-warning-time 5)
    -  (defun tdh-org-agenda-to-appt ()
    -    (interactive)
    -    (setq appt-time-msg-list nil)
    -    (org-agenda-to-appt))
    +
    (after! org-agenda
    +  (setq appt-message-warning-time 5)
    +  (defun tdh-org-agenda-to-appt ()
    +    (interactive)
    +    (setq appt-time-msg-list nil)
    +    (org-agenda-to-appt))
     
    -  (tdh-org-agenda-to-appt)
    -                                        ; Display appointments as a window manager notification
    -  (setq appt-disp-window-function 'tdh-appt-display)
    -  (setq appt-delete-window-function (lambda () t))
    +  (tdh-org-agenda-to-appt)
    +                                        ; Display appointments as a window manager notification
    +  (setq appt-disp-window-function 'tdh-appt-display)
    +  (setq appt-delete-window-function (lambda () t))
     
    -  (setq tdh-appt-notification-app (concat (getenv "HOME") "/bin/appt-notification"))
    -  (defun tdh-appt-display (min-to-app new-time msg)
    -    (if (atom min-to-app)
    -        (start-process "tdh-appt-notification-app" nil tdh-appt-notification-app min-to-app msg)
    -      (dolist (i (number-sequence 0 (1- (length min-to-app))))
    -        (start-process "tdh-appt-notification-app" nil tdh-appt-notification-app (nth i min-to-app) (nth i msg)))))
    -  )
    +  (setq tdh-appt-notification-app (concat (getenv "HOME") "/bin/appt-notification"))
    +  (defun tdh-appt-display (min-to-app new-time msg)
    +    (if (atom min-to-app)
    +        (start-process "tdh-appt-notification-app" nil tdh-appt-notification-app min-to-app msg)
    +      (dolist (i (number-sequence 0 (1- (length min-to-app))))
    +        (start-process "tdh-appt-notification-app" nil tdh-appt-notification-app (nth i min-to-app) (nth i msg)))))
    +  )
     
    @@ -1152,10 +1212,10 @@ Org Agenda Custom Views

    appt-notification script

    -
    TIME="$1"TODO
    -MSG="$2"
    +
    TIME="$1"TODO
    +MSG="$2"
     
    -dunstify --replace=85401 "Event in $TIME minutes" "$MSG"
    +dunstify --replace=85401 "Event in $TIME minutes" "$MSG"
     
    @@ -1166,17 +1226,17 @@ dunstify --replace=85401 "Event in $TIME minutes" "$MSG"

    Org Structure Template

    -
    (after! org
    -  (setq org-structure-template-alist
    -    '(("c" . "center")
    -      ("C" . "comment")
    -      ("m" . "src matlab\n")
    -      ("l" . "src emacs-lisp\n")
    -      ("i" . "important")
    -      ("e" . "example")
    -      ("q" . "quote")
    -      ("s" . "src")))
    -)
    +
    (after! org
    +  (setq org-structure-template-alist
    +    '(("c" . "center")
    +      ("C" . "comment")
    +      ("m" . "src matlab\n")
    +      ("l" . "src emacs-lisp\n")
    +      ("i" . "important")
    +      ("e" . "example")
    +      ("q" . "quote")
    +      ("s" . "src")))
    +)
     
    @@ -1195,49 +1255,55 @@ Documentation:
    -
    (after! org
    -  (setq org-capture-templates
    -        (quote (("t"    ; key
    -                 "todo" ; name
    -                 entry  ; type
    -                 (file+headline "~/Cloud/org/work-notebook.org" "Inbox") ; target
    -                 "** TODO %?\n%U\n" ; template
    -                 )
    -                ("M"    ; key
    -                 "Meeting" ; name
    -                 entry  ; type
    -                 (file+headline "~/Cloud/org/work-notebook.org" "Meetings") ; target
    -                 "** %?\n%(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n" ; template
    -                 )
    -                ("m"    ; key
    -                 "mail" ; name
    -                 entry  ; type
    -                 (file+headline "~/Cloud/org/work-notebook.org" "Mails") ; target
    -                 "** TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n" ; template
    -                 )
    -                ("pm"
    -                 "Org-Protocol Mail"
    +
    (after! org
    +  (setq org-capture-templates
    +        (quote (("t"    ; key
    +                 "Todo" ; name
    +                 entry  ; type
    +                 (file+headline "~/Cloud/org/work-notebook.org" "Inbox") ; target
    +                 "** TODO %?\n%U\n" ; template
    +                 )
    +                ("M"    ; key
    +                 "Meeting" ; name
    +                 entry  ; type
    +                 (file+headline "~/Cloud/org/work-notebook.org" "Meetings") ; target
    +                 "** %?\n%(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n" ; template
    +                 )
    +                ("m"    ; key
    +                 "Mail" ; name
    +                 entry  ; type
    +                 (file+headline "~/Cloud/org/work-notebook.org" "Mails") ; target
    +                 "** TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n" ; template
    +                 )
    +                ("r"    ; key
    +                 "Reference" ; name
    +                 entry  ; type
    +                 (file+headline "~/Cloud/org/inbox-ereader.org" "Things to Read") ; target
    +                 "** TODO [#B] %?\n" ; template
    +                 )
    +                ("pm"
    +                 "Org-Protocol Mail"
                      entry
    -                 (file+headline "~/Cloud/org/work-notebook.org" "Mails")
    -                 "* MAIL %:description [[message:%:link][link]]\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n\n"
    -                 :immediate-finish t
    -                 )
    -                ("pu"
    -                 "Org-Protocol Url"
    +                 (file+headline "~/Cloud/org/work-notebook.org" "Mails")
    +                 "* MAIL %:description [[message:%:link][link]]\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n\n"
    +                 :immediate-finish t
    +                 )
    +                ("pu"
    +                 "Org-Protocol Url"
                      entry
    -                 (file+headline "~/Cloud/org/work-notebook.org" "Inbox")
    -                 "* [[%:link][%:description]]\nCaptured On: %U\n\n"
    -                 :immediate-finish t
    -                 )
    -                ("pt"
    -                 "Org-Protocol text"
    +                 (file+headline "~/Cloud/org/work-notebook.org" "Inbox")
    +                 "* [[%:link][%:description]]\nCaptured On: %U\n\n"
    +                 :immediate-finish t
    +                 )
    +                ("pt"
    +                 "Org-Protocol text"
                      entry
    -                 (file+headline "~/Cloud/org/work-notebook.org" "Inbox")
    -                 "* %:description\nSource: %:link\nCaptured On: %U\n\n#+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n"
    -                 :immediate-finish t
    -                 )
    -                )))
    -  )
    +                 (file+headline "~/Cloud/org/work-notebook.org" "Inbox")
    +                 "* %:description\nSource: %:link\nCaptured On: %U\n\n#+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n"
    +                 :immediate-finish t
    +                 )
    +                )))
    +  )
     
    @@ -1250,16 +1316,16 @@ Documentation: Basic configuration:

    -
    (after! org
    -  ;; How many levels of headline to export
    -  (setq org-export-headline-levels 4)
    +
    (after! org
    +  ;; How many levels of headline to export
    +  (setq org-export-headline-levels 4)
     
    -  ;; Authorize BIND to set local variables
    -  (setq org-export-allow-bind-keywords t)
    +  ;; Authorize BIND to set local variables
    +  (setq org-export-allow-bind-keywords t)
     
    -  ;; Use doc instead of odt
    -  (setq org-odt-preferred-output-format "doc")
    -  )
    +  ;; Use doc instead of odt
    +  (setq org-odt-preferred-output-format "doc")
    +  )
     
    @@ -1267,15 +1333,15 @@ Basic configuration: Some defaults:

    -
    (after! org
    -  (setq org-export-with-author t)
    -  (setq org-export-with-creator nil)
    -  (setq org-export-with-date t)
    -  (setq org-export-with-toc t)
    -  (setq org-export-with-drawers nil)
    -  (setq org-export-with-sub-superscripts nil)
    -  (setq org-export-with-todo-keywords nil)
    -  )
    +
    (after! org
    +  (setq org-export-with-author t)
    +  (setq org-export-with-creator nil)
    +  (setq org-export-with-date t)
    +  (setq org-export-with-toc t)
    +  (setq org-export-with-drawers nil)
    +  (setq org-export-with-sub-superscripts nil)
    +  (setq org-export-with-todo-keywords nil)
    +  )
     
    @@ -1283,10 +1349,10 @@ Some defaults: Do not export headline with the :ignore: tag:

    -
    ;; Used to not export headings with :ignore: tag
    -(after! org
    -  (require 'ox-extra)
    -  (ox-extras-activate '(ignore-headlines)))
    +
    ;; Used to not export headings with :ignore: tag
    +(after! org
    +  (require 'ox-extra)
    +  (ox-extras-activate '(ignore-headlines)))
     
    @@ -1300,31 +1366,31 @@ Do not export headline with the :ignore: tag:

    HTML Defaults

    -
    (after! org
    -  ;; (setq org-html-head-extra (concat
    -  ;;                            "<link rel='stylesheet' href='../css/htmlize.css'>\n"
    -  ;;                            "<link rel='stylesheet' href='../css/readtheorg.css'>\n"
    -  ;;                            "<link rel='stylesheet' href='../css/zenburn.css'>\n"
    -  ;;                            "<link rel='text/javascript' href='../js/bootstrap.min.js'>\n"
    -  ;;                            "<link rel='text/javascript' href='../js/jquery.min.js'>\n"
    -  ;;                            "<link rel='text/javascript' href='../js/jquery.stickytableheaders.min.js'>\n"
    -  ;;                            "<link rel='text/javascript' href='../js/readtheorg.js'>\n"))
    +
    (after! org
    +  ;; (setq org-html-head-extra (concat
    +  ;;                            "<link rel='stylesheet' href='../css/htmlize.css'>\n"
    +  ;;                            "<link rel='stylesheet' href='../css/readtheorg.css'>\n"
    +  ;;                            "<link rel='stylesheet' href='../css/zenburn.css'>\n"
    +  ;;                            "<link rel='text/javascript' href='../js/bootstrap.min.js'>\n"
    +  ;;                            "<link rel='text/javascript' href='../js/jquery.min.js'>\n"
    +  ;;                            "<link rel='text/javascript' href='../js/jquery.stickytableheaders.min.js'>\n"
    +  ;;                            "<link rel='text/javascript' href='../js/readtheorg.js'>\n"))
     
    -  ;; cleans up anything that would have been in there.
    -  (setq org-html-head nil)
    -  (setq org-html-head-include-default-style nil)
    -  (setq org-html-head-include-scripts nil)
    +  ;; cleans up anything that would have been in there.
    +  (setq org-html-head nil)
    +  (setq org-html-head-include-default-style nil)
    +  (setq org-html-head-include-scripts nil)
     
    -  (setq org-html-viewport nil)
    +  (setq org-html-viewport nil)
     
    -  (setq org-html-html5-fancy t)
    -  (setq org-html-doctype "xhtml-strict")
    +  (setq org-html-html5-fancy t)
    +  (setq org-html-doctype "xhtml-strict")
     
    -  (setq org-html-wrap-src-lines nil)
    +  (setq org-html-wrap-src-lines nil)
     
    -  ;; Export with css class instead of inline css
    -  (setq org-html-htmlize-output-type 'nil)
    -  )
    +  ;; Export with css class instead of inline css
    +  (setq org-html-htmlize-output-type 'css)
    +  )
     
    @@ -1334,29 +1400,29 @@ Do not export headline with the :ignore: tag:

    MathJax

    -
    (after! org
    -  (setq org-html-mathjax-template
    -        "<script>MathJax = {
    -          tex: {
    -            tags: 'ams',
    -            macros: {bm: [\"\\\\boldsymbol{#1}\",1],}
    -            }
    -          };
    -          </script>
    -          <script type=\"text/javascript\" src=\"%PATH\"></script>")
    +
    (after! org
    +  (setq org-html-mathjax-template
    +        "<script>MathJax = {
    +          tex: {
    +            tags: 'ams',
    +            macros: {bm: [\"\\\\boldsymbol{#1}\",1],}
    +            }
    +          };
    +          </script>
    +          <script type=\"text/javascript\" src=\"%PATH\"></script>")
     
    -  (setq org-html-mathjax-options
    -        '((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js")
    -          (scale "100")
    -          (align "center")
    -          (font "TeX")
    -          (linebreaks "false")
    -          (autonumber "AMS")
    -          (indent "0em")
    -          (multlinewidth "85%")
    -          (tagindent ".8em")
    -          (tagside "right")))
    -  )
    +  (setq org-html-mathjax-options
    +        '((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js")
    +          (scale "100")
    +          (align "center")
    +          (font "TeX")
    +          (linebreaks "false")
    +          (autonumber "AMS")
    +          (indent "0em")
    +          (multlinewidth "85%")
    +          (tagindent ".8em")
    +          (tagside "right")))
    +  )
     
    @@ -1375,91 +1441,91 @@ This is not working

    -
    (define-minor-mode unpackaged/org-export-html-with-useful-ids-mode
    -  "Attempt to export Org as HTML with useful link IDs.
    -Instead of random IDs like \"#orga1b2c3\", use heading titles,
    -made unique when necessary."
    -  :global t
    -  (if unpackaged/org-export-html-with-useful-ids-mode
    -      (advice-add #'org-export-get-reference :override #'unpackaged/org-export-get-reference)
    -    (advice-remove #'org-export-get-reference #'unpackaged/org-export-get-reference)))
    +
    (define-minor-mode unpackaged/org-export-html-with-useful-ids-mode
    +  "Attempt to export Org as HTML with useful link IDs.
    +Instead of random IDs like \"#orga1b2c3\", use heading titles,
    +made unique when necessary."
    +  :global t
    +  (if unpackaged/org-export-html-with-useful-ids-mode
    +      (advice-add #'org-export-get-reference :override #'unpackaged/org-export-get-reference)
    +    (advice-remove #'org-export-get-reference #'unpackaged/org-export-get-reference)))
     
    -(defun unpackaged/org-export-get-reference (datum info)
    -  "Like `org-export-get-reference', except uses heading titles instead of random numbers."
    -  (let ((cache (plist-get info :internal-references)))
    -    (or (car (rassq datum cache))
    -        (let* ((crossrefs (plist-get info :crossrefs))
    -               (cells (org-export-search-cells datum))
    -               ;; Preserve any pre-existing association between
    -               ;; a search cell and a reference, i.e., when some
    -               ;; previously published document referenced a location
    -               ;; within current file (see
    -               ;; `org-publish-resolve-external-link').
    -               ;;
    -               ;; However, there is no guarantee that search cells are
    -               ;; unique, e.g., there might be duplicate custom ID or
    -               ;; two headings with the same title in the file.
    -               ;;
    -               ;; As a consequence, before re-using any reference to
    -               ;; an element or object, we check that it doesn't refer
    -               ;; to a previous element or object.
    -               (new (or (cl-some
    -                         (lambda (cell)
    -                           (let ((stored (cdr (assoc cell crossrefs))))
    -                             (when stored
    -                               (let ((old (org-export-format-reference stored)))
    -                                 (and (not (assoc old cache)) stored)))))
    -                         cells)
    -                        (when (org-element-property :raw-value datum)
    -                          ;; Heading with a title
    -                          (unpackaged/org-export-new-title-reference datum cache))
    -                        ;; NOTE: This probably breaks some Org Export
    -                        ;; feature, but if it does what I need, fine.
    -                        (org-export-format-reference
    -                         (org-export-new-reference cache))))
    -               (reference-string new))
    -          ;; Cache contains both data already associated to
    -          ;; a reference and in-use internal references, so as to make
    -          ;; unique references.
    -          (dolist (cell cells) (push (cons cell new) cache))
    -          ;; Retain a direct association between reference string and
    -          ;; DATUM since (1) not every object or element can be given
    -          ;; a search cell (2) it permits quick lookup.
    -          (push (cons reference-string datum) cache)
    -          (plist-put info :internal-references cache)
    -          reference-string))))
    +(defun unpackaged/org-export-get-reference (datum info)
    +  "Like `org-export-get-reference', except uses heading titles instead of random numbers."
    +  (let ((cache (plist-get info :internal-references)))
    +    (or (car (rassq datum cache))
    +        (let* ((crossrefs (plist-get info :crossrefs))
    +               (cells (org-export-search-cells datum))
    +               ;; Preserve any pre-existing association between
    +               ;; a search cell and a reference, i.e., when some
    +               ;; previously published document referenced a location
    +               ;; within current file (see
    +               ;; `org-publish-resolve-external-link').
    +               ;;
    +               ;; However, there is no guarantee that search cells are
    +               ;; unique, e.g., there might be duplicate custom ID or
    +               ;; two headings with the same title in the file.
    +               ;;
    +               ;; As a consequence, before re-using any reference to
    +               ;; an element or object, we check that it doesn't refer
    +               ;; to a previous element or object.
    +               (new (or (cl-some
    +                         (lambda (cell)
    +                           (let ((stored (cdr (assoc cell crossrefs))))
    +                             (when stored
    +                               (let ((old (org-export-format-reference stored)))
    +                                 (and (not (assoc old cache)) stored)))))
    +                         cells)
    +                        (when (org-element-property :raw-value datum)
    +                          ;; Heading with a title
    +                          (unpackaged/org-export-new-title-reference datum cache))
    +                        ;; NOTE: This probably breaks some Org Export
    +                        ;; feature, but if it does what I need, fine.
    +                        (org-export-format-reference
    +                         (org-export-new-reference cache))))
    +               (reference-string new))
    +          ;; Cache contains both data already associated to
    +          ;; a reference and in-use internal references, so as to make
    +          ;; unique references.
    +          (dolist (cell cells) (push (cons cell new) cache))
    +          ;; Retain a direct association between reference string and
    +          ;; DATUM since (1) not every object or element can be given
    +          ;; a search cell (2) it permits quick lookup.
    +          (push (cons reference-string datum) cache)
    +          (plist-put info :internal-references cache)
    +          reference-string))))
     
    -(defun unpackaged/org-export-new-title-reference (datum cache)
    -  "Return new reference for DATUM that is unique in CACHE."
    -  (cl-macrolet ((inc-suffixf (place)
    -                             `(progn
    -                                (string-match (rx bos
    -                                                  (minimal-match (group (1+ anything)))
    -                                                  (optional "--" (group (1+ digit)))
    -                                                  eos)
    -                                              ,place)
    -                                ;; HACK: `s1' instead of a gensym.
    -                                (-let* (((s1 suffix) (list (match-string 1 ,place)
    -                                                           (match-string 2 ,place)))
    -                                        (suffix (if suffix
    -                                                    (string-to-number suffix)
    -                                                  0)))
    -                                  (setf ,place (format "%s--%s" s1 (cl-incf suffix)))))))
    -    (let* ((title (org-element-property :raw-value datum))
    -           (ref (url-hexify-string (substring-no-properties title)))
    -           (parent (org-element-property :parent datum)))
    -      (while (--any (equal ref (car it))
    -                    cache)
    -        ;; Title not unique: make it so.
    -        (if parent
    -            ;; Append ancestor title.
    -            (setf title (concat (org-element-property :raw-value parent)
    -                                "--" title)
    -                  ref (url-hexify-string (substring-no-properties title))
    -                  parent (org-element-property :parent parent))
    -          ;; No more ancestors: add and increment a number.
    -          (inc-suffixf ref)))
    -      ref)))
    +(defun unpackaged/org-export-new-title-reference (datum cache)
    +  "Return new reference for DATUM that is unique in CACHE."
    +  (cl-macrolet ((inc-suffixf (place)
    +                             `(progn
    +                                (string-match (rx bos
    +                                                  (minimal-match (group (1+ anything)))
    +                                                  (optional "--" (group (1+ digit)))
    +                                                  eos)
    +                                              ,place)
    +                                ;; HACK: `s1' instead of a gensym.
    +                                (-let* (((s1 suffix) (list (match-string 1 ,place)
    +                                                           (match-string 2 ,place)))
    +                                        (suffix (if suffix
    +                                                    (string-to-number suffix)
    +                                                  0)))
    +                                  (setf ,place (format "%s--%s" s1 (cl-incf suffix)))))))
    +    (let* ((title (org-element-property :raw-value datum))
    +           (ref (url-hexify-string (substring-no-properties title)))
    +           (parent (org-element-property :parent datum)))
    +      (while (--any (equal ref (car it))
    +                    cache)
    +        ;; Title not unique: make it so.
    +        (if parent
    +            ;; Append ancestor title.
    +            (setf title (concat (org-element-property :raw-value parent)
    +                                "--" title)
    +                  ref (url-hexify-string (substring-no-properties title))
    +                  parent (org-element-property :parent parent))
    +          ;; No more ancestors: add and increment a number.
    +          (inc-suffixf ref)))
    +      ref)))
     
    @@ -1472,47 +1538,47 @@ made unique when necessary." Adapt this from https://github.com/alhassy/emacs.d to do something similar for source blocks.

    -
    (defun my/org-drawer-format (name contents)
    -  "Export to HTML the drawers named with prefix ‘fold_’, ignoring case.
    +
    (defun my/org-drawer-format (name contents)
    +  "Export to HTML the drawers named with prefix ‘fold_’, ignoring case.
     
    -The resulting drawer is a ‘code-details’ and so appears folded;
    -the user clicks it to see the information therein.
    -Henceforth, these are called ‘fold drawers’.
    +The resulting drawer is a ‘code-details’ and so appears folded;
    +the user clicks it to see the information therein.
    +Henceforth, these are called ‘fold drawers’.
     
    -Drawers without such a prefix may be nonetheless exported if their
    -body contains ‘:export: t’ ---this switch does not appear in the output.
    -Thus, we are biased to generally not exporting non-fold drawers.
    +Drawers without such a prefix may be nonetheless exported if their
    +body contains ‘:export: t’ ---this switch does not appear in the output.
    +Thus, we are biased to generally not exporting non-fold drawers.
     
    -One may suspend export of fold drawers by having ‘:export: nil’
    -in their body definition.
    +One may suspend export of fold drawers by having ‘:export: nil’
    +in their body definition.
     
    -Fold drawers naturally come with a title.
    -Either it is specfied in the drawer body by ‘:title: ⋯’,
    -or otherwise the drawer's name is used with all underscores replaced
    -by spaces.
    -"
    -  (let* ((contents′ (replace-regexp-in-string ":export:.*\n?" "" contents))
    -         (fold? (s-prefix? "fold_" name 'ignore-case))
    -         (export? (string-match ":export:\s+t" contents))
    -         (not-export? (string-match ":export:\s+nil" contents))
    -         (title′ (and (string-match ":title:\\(.*\\)\n" contents)
    -                      (match-string 1 contents))))
    +Fold drawers naturally come with a title.
    +Either it is specfied in the drawer body by ‘:title: ⋯’,
    +or otherwise the drawer's name is used with all underscores replaced
    +by spaces.
    +"
    +  (let* ((contents′ (replace-regexp-in-string ":export:.*\n?" "" contents))
    +         (fold? (s-prefix? "fold_" name 'ignore-case))
    +         (export? (string-match ":export:\s+t" contents))
    +         (not-export? (string-match ":export:\s+nil" contents))
    +         (title′ (and (string-match ":title:\\(.*\\)\n" contents)
    +                      (match-string 1 contents))))
     
    -    ;; Ensure we have a title.
    -    (unless title′ (setq title′ (s-join " " (cdr (s-split "_" name)))))
    +    ;; Ensure we have a title.
    +    (unless title′ (setq title′ (s-join " " (cdr (s-split "_" name)))))
     
    -    ;; Output
    -    (cond
    -     ((and export? (not fold?)) contents′)
    -     (not-export? nil)
    -     (fold?
    -      (thread-last contents′
    -        (replace-regexp-in-string ":title:.*\n" "")
    -        (format "<details class=\"code-details\"> <summary> <strong>
    -            <font face=\"Courier\" size=\"3\" color=\"green\"> %s
    -            </font> </strong> </summary> %s </details>" title′))))))
    +    ;; Output
    +    (cond
    +     ((and export? (not fold?)) contents′)
    +     (not-export? nil)
    +     (fold?
    +      (thread-last contents′
    +        (replace-regexp-in-string ":title:.*\n" "")
    +        (format "<details class=\"code-details\"> <summary> <strong>
    +            <font face=\"Courier\" size=\"3\" color=\"green\"> %s
    +            </font> </strong> </summary> %s </details>" title′))))))
     
    -(setq org-html-format-drawer-function 'my/org-drawer-format)
    +(setq org-html-format-drawer-function 'my/org-drawer-format)
     
    @@ -1527,59 +1593,59 @@ by spaces.

    LaTeX Fragments

    -
    (after! org
    -  ;; Highligh latex parts in org mode
    -  (setq org-highlight-latex-and-related '(latex script entities))
    +
    (after! org
    +  ;; Highligh latex parts in org mode
    +  (setq org-highlight-latex-and-related '(latex script entities))
     
    -  ;; Use F9 to globally generate all the latex fragments
    -  (map! :map org-mode-map
    -        :n "<f9>"
    -        (lambda () (interactive) (org-preview-latex-fragment 16)))
    +  ;; Use F9 to globally generate all the latex fragments
    +  (map! :map org-mode-map
    +        :n "<f9>"
    +        (lambda () (interactive) (org-preview-latex-fragment 16)))
     
    -  ;; Put all the preview images in some directory
    -  (setq org-preview-latex-image-directory "~/.ltximg/")
    +  ;; Put all the preview images in some directory
    +  (setq org-preview-latex-image-directory "~/.ltximg/")
     
    -  ;; Define backends to preview LaTeX fragments
    -  (setq org-preview-latex-process-alist '((imagemagick
    -                                           :programs ("pdflatex" "convert")
    -                                           :description "pdf > png"
    -                                           :message "you need to install the programs: pdflatex and imagemagick."
    -                                           :image-input-type "pdf"
    -                                           :image-output-type "png"
    -                                           :image-size-adjust (1.0 . 1.0)
    -                                           :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
    -                                           :image-converter ("convert -density %D -trim -antialias %f -quality 100 %O"))
    -                                          (dvipng
    -                                           :programs ("latex" "dvipng")
    -                                           :description "dvi > png"
    -                                           :message "you need to install the programs: latex and dvipng."
    -                                           :image-input-type "dvi"
    -                                           :image-output-type "png"
    -                                           :image-size-adjust (0.4 . 0.4)
    -                                           :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
    -                                           :image-converter ("dvipng -D %D -T tight -o %O %f"))
    -                                          (dvisvgm
    -                                           :programs ("pdflatex" "dvisvgm")
    -                                           :description "dvi > svg"
    -                                           :message "you need to install the programs: latex and dvisvgm."
    -                                           :image-input-type "dvi"
    -                                           :image-output-type "svg"
    -                                           :image-size-adjust (0.6 . 0.6)
    -                                           :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
    -                                           :image-converter ("dvisvgm %f -n -b min -c %S -o %O"))
    -                                          ))
    +  ;; Define backends to preview LaTeX fragments
    +  (setq org-preview-latex-process-alist '((imagemagick
    +                                           :programs ("pdflatex" "convert")
    +                                           :description "pdf > png"
    +                                           :message "you need to install the programs: pdflatex and imagemagick."
    +                                           :image-input-type "pdf"
    +                                           :image-output-type "png"
    +                                           :image-size-adjust (1.0 . 1.0)
    +                                           :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
    +                                           :image-converter ("convert -density %D -trim -antialias %f -quality 100 %O"))
    +                                          (dvipng
    +                                           :programs ("latex" "dvipng")
    +                                           :description "dvi > png"
    +                                           :message "you need to install the programs: latex and dvipng."
    +                                           :image-input-type "dvi"
    +                                           :image-output-type "png"
    +                                           :image-size-adjust (0.4 . 0.4)
    +                                           :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
    +                                           :image-converter ("dvipng -D %D -T tight -o %O %f"))
    +                                          (dvisvgm
    +                                           :programs ("pdflatex" "dvisvgm")
    +                                           :description "dvi > svg"
    +                                           :message "you need to install the programs: latex and dvisvgm."
    +                                           :image-input-type "dvi"
    +                                           :image-output-type "svg"
    +                                           :image-size-adjust (0.6 . 0.6)
    +                                           :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
    +                                           :image-converter ("dvisvgm %f -n -b min -c %S -o %O"))
    +                                          ))
     
    -  ;; Use imagemagick/dvisvgm to generate png from pdf
    -  (setq org-preview-latex-default-process 'dvisvgm)
    +  ;; Use imagemagick/dvisvgm to generate png from pdf
    +  (setq org-preview-latex-default-process 'dvisvgm)
     
    -  ;; Don't change the font size for subscripts and superscripts in latex fragments.
    -  ;; This cause the orgmode tables not to be well aligned.
    -  (setq font-latex-fontify-script nil)
    +  ;; Don't change the font size for subscripts and superscripts in latex fragments.
    +  ;; This cause the orgmode tables not to be well aligned.
    +  (setq font-latex-fontify-script nil)
     
    -  ;; Colors of latex fragments
    -  (setq org-format-latex-options (plist-put org-format-latex-options :foreground 'default))
    -  (setq org-format-latex-options (plist-put org-format-latex-options :background (face-background 'fringe)))
    -  )
    +  ;; Colors of latex fragments
    +  (setq org-format-latex-options (plist-put org-format-latex-options :foreground 'default))
    +  (setq org-format-latex-options (plist-put org-format-latex-options :background 'default))
    +  )
     
    @@ -1589,63 +1655,82 @@ by spaces.

    LaTeX Classes

    -
    (after! org
    -;; Custom classes to use when exporting to latex
    -(add-to-list 'org-latex-classes
    -          '("beamer"
    -            ,(concat "\\documentclass[presentation]{beamer}\n"
    -                     "[DEFAULT-PACKAGES]"
    -                     "[PACKAGES]"
    -                     "[EXTRA]\n")
    -            ("\\section{%s}" . "\\section*{%s}")
    -            ("\\subsection{%s}" . "\\subsection*{%s}")
    -            ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
    -(add-to-list 'org-latex-classes
    -             '("clean-cheatsheet"
    -               "\\documentclass{clean-cheatsheet}"
    -               ("\\section{%s}" . "\\section*{%s}")
    -               ("\\subsection{%s}" . "\\subsection*{%s}")
    -               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    -               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    -               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    -             )
    -(add-to-list 'org-latex-classes
    -             '("clean-beamer"
    -               "\\documentclass{clean-beamer}"
    -               ("\\section{%s}" . "\\section*{%s}")
    -               ("\\subsection{%s}" . "\\subsection*{%s}")
    -               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    -               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    -               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    -             )
    -(add-to-list 'org-latex-classes
    -             '("cleanreport"
    -               "\\documentclass{cleanreport}"
    -               ("\\section{%s}" . "\\section*{%s}")
    -               ("\\subsection{%s}" . "\\subsection*{%s}")
    -               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    -               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    -               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    -             )
    -(add-to-list 'org-latex-classes
    -             '("scrreprt"
    -               "\\documentclass{scrreprt}"
    -               ("\\section{%s}" . "\\section*{%s}")
    -               ("\\subsection{%s}" . "\\subsection*{%s}")
    -               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    -               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    -               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    -             )
    -(add-to-list 'org-latex-classes
    -             '("biblioreport"
    -               "\\documentclass{biblioreport}"
    -               ("\\section{%s}" . "\\section*{%s}")
    -               ("\\subsection{%s}" . "\\subsection*{%s}")
    -               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    -               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    -               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    -             )
    -)
    +
    (after! org
    +;; Custom classes to use when exporting to latex
    +(add-to-list 'org-latex-classes
    +          '("beamer"
    +            ,(concat "\\documentclass[presentation]{beamer}\n"
    +                     "[DEFAULT-PACKAGES]"
    +                     "[PACKAGES]"
    +                     "[EXTRA]\n")
    +            ("\\section{%s}" . "\\section*{%s}")
    +            ("\\subsection{%s}" . "\\subsection*{%s}")
    +            ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
    +(add-to-list 'org-latex-classes
    +             '("clean-cheatsheet"
    +               "\\documentclass{clean-cheatsheet}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +(add-to-list 'org-latex-classes
    +             '("clean-beamer"
    +               "\\documentclass{clean-beamer}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +(add-to-list 'org-latex-classes
    +             '("cleanreport"
    +               "\\documentclass{cleanreport}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +(add-to-list 'org-latex-classes
    +             '("scrartcl"
    +               "\\documentclass{scrartcl}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +(add-to-list 'org-latex-classes
    +             '("scrreprt"
    +               "\\documentclass{scrreprt}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +(add-to-list 'org-latex-classes
    +             '("biblioreport"
    +               "\\documentclass{biblioreport}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +(add-to-list 'org-latex-classes
    +             '("moderncv"
    +               "\\documentclass{moderncv}"
    +               ("\\section{%s}" . "\\section*{%s}")
    +               ("\\subsection{%s}" . "\\subsection*{%s}")
    +               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
    +               ("\\paragraph{%s}" . "\\paragraph*{%s}")
    +               ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    +             )
    +
    +)
     
    @@ -1655,9 +1740,16 @@ by spaces.

    Ox Latex Subfigure package

    -
    (use-package! ox-latex-subfigure
    -  :after org
    -  :config (require 'ox-latex-subfigure))
    +
    ;; (use-package! ox-latex-subfigure
    +;;   :after org
    +;;   :config (require 'ox-latex-subfigure))
    +
    +
    + +
    +
    (use-package! ox-latex-subfigure
    +  :load-path "~/.config/doom/packages/ox-latex-subfigure/"
    +  :config (require 'ox-latex-subfigure))
     
    @@ -1671,20 +1763,20 @@ by spaces.

    -
    (after! org
    -  (defun tdh-get-headline-string-element  (headline backend info)
    -    (let ((prop-point (next-property-change 0 headline)))
    -      (if prop-point (plist-get (text-properties-at prop-point headline) :parent))))
    +
    (after! org
    +  (defun tdh-get-headline-string-element  (headline backend info)
    +    (let ((prop-point (next-property-change 0 headline)))
    +      (if prop-point (plist-get (text-properties-at prop-point headline) :parent))))
     
    -  (defun tdh-ensure-latex-clearpage (headline backend info)
    -    (when (org-export-derived-backend-p backend 'latex)
    -      (let ((elmnt (tdh-get-headline-string-element headline backend info)))
    -        (when (and elmnt (org-element-property :CLEARPAGE elmnt))
    -          (concat "\\clearpage\n" headline)))))
    +  (defun tdh-ensure-latex-clearpage (headline backend info)
    +    (when (org-export-derived-backend-p backend 'latex)
    +      (let ((elmnt (tdh-get-headline-string-element headline backend info)))
    +        (when (and elmnt (org-element-property :CLEARPAGE elmnt))
    +          (concat "\\clearpage\n" headline)))))
     
    -  (add-to-list 'org-export-filter-headline-functions
    -               'tdh-ensure-latex-clearpage)
    -  )
    +  (add-to-list 'org-export-filter-headline-functions
    +               'tdh-ensure-latex-clearpage)
    +  )
     
    @@ -1694,14 +1786,14 @@ by spaces.

    Default added packages

    -
    (after! org
    -  (add-to-list 'org-latex-packages-alist '("" "siunitx" t))
    -  (add-to-list 'org-latex-packages-alist '("" "array" t))
    -  (add-to-list 'org-latex-packages-alist '("" "tabularx" t))
    -  (add-to-list 'org-latex-packages-alist '("" "booktabs" t))
    -  (add-to-list 'org-latex-packages-alist '("" "bm" t))
    -  (add-to-list 'org-latex-packages-alist '("most" "tcolorbox" t))
    -  )
    +
    (after! org
    +  (add-to-list 'org-latex-packages-alist '("" "siunitx" t))
    +  (add-to-list 'org-latex-packages-alist '("" "array" t))
    +  (add-to-list 'org-latex-packages-alist '("" "tabularx" t))
    +  (add-to-list 'org-latex-packages-alist '("" "booktabs" t))
    +  (add-to-list 'org-latex-packages-alist '("" "bm" t))
    +  (add-to-list 'org-latex-packages-alist '("most" "tcolorbox" t))
    +  )
     
    @@ -1711,29 +1803,29 @@ by spaces.

    Some configurations

    -
    (after! org
    -  ;; Setup default option for image size when exporting to LaTeX
    -  (setq org-latex-image-default-scale "")
    -  (setq org-latex-image-default-width "\\linewidth")
    -  (setq org-latex-image-default-height "")
    -  (setq org-latex-image-default-option "")
    +
    (after! org
    +  ;; Setup default option for image size when exporting to LaTeX
    +  (setq org-latex-image-default-scale "")
    +  (setq org-latex-image-default-width "\\linewidth")
    +  (setq org-latex-image-default-height "")
    +  (setq org-latex-image-default-option "")
     
    -  ;; Use define labels instead of automatic generated ones
    -  (setq org-latex-prefer-user-labels t)
    +  ;; Use define labels instead of automatic generated ones
    +  (setq org-latex-prefer-user-labels t)
     
    -  ;; Captions above the table
    -  (setq org-latex-caption-above '(table))
    +  ;; Captions above the table
    +  (setq org-latex-caption-above '(table))
     
    -  ;; Settings to export code with `minted' instead of `verbatim'.
    -  (setq org-latex-listings 'minted)
    +  ;; Settings to export code with `minted' instead of `verbatim'.
    +  (setq org-latex-listings 'minted)
     
    -  ;; Set the following as images
    -  (setq org-latex-inline-image-rules '(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\|pgf\\|svg\\|gif\\)\\'")))
    +  ;; Set the following as images
    +  (setq org-latex-inline-image-rules '(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\|pgf\\|svg\\|gif\\)\\'")))
     
    -  ;; Command used when exporting to pdf
    -  (setq org-latex-pdf-process
    -        '("latexmk -cd -pdflatex=\"pdflatex -synctex=1 -shell-escape -interaction nonstopmode -output-directory %o\" -pdf -bibtex -f %f"))
    -  )
    +  ;; Command used when exporting to pdf
    +  (setq org-latex-pdf-process
    +        '("latexmk -cd -pdflatex=\"pdflatex -synctex=1 -shell-escape -interaction nonstopmode -output-directory %o\" -pdf -bibtex -f %f"))
    +  )
     
    @@ -1746,16 +1838,16 @@ by spaces. Bold Text

    -
    (after! org
    -  (defun tdh-my-beamer-bold (contents backend info)
    -    (when (eq backend 'beamer)
    -      (replace-regexp-in-string
    -       (concat "\\`\\\\" "[A-Za-z0-9]+") ;; If not, orgmode is crazy...
    -       "\\\\textbf"
    -       contents)))
    +
    (after! org
    +  (defun tdh-my-beamer-bold (contents backend info)
    +    (when (eq backend 'beamer)
    +      (replace-regexp-in-string
    +       (concat "\\`\\\\" "[A-Za-z0-9]+") ;; If not, orgmode is crazy...
    +       "\\\\textbf"
    +       contents)))
     
    -  (add-to-list 'org-export-filter-bold-functions 'tdh-my-beamer-bold)
    -  )
    +  (add-to-list 'org-export-filter-bold-functions 'tdh-my-beamer-bold)
    +  )
     
    @@ -1767,18 +1859,18 @@ Special Environments
  • [ ] Make some comment those special environments
  • -
    (after! org
    -  (add-to-list 'org-beamer-environments-extra
    -               '("cbox" ;; Name of environment
    -                 "m" ;; Selection key
    -                 "\\onslide%a{\\begin{cbox}[%h]%O"
    -                 "\\end{cbox}}\\vspace{0.5em}"))
    -  (add-to-list 'org-beamer-environments-extra
    -               '("csubbox" ;; Name of environment
    -                 "M" ;; Selection key
    -                 "\\onslide%a{\\tcbsubtitle{%h}"
    -                 "}"))
    -  )
    +
    (after! org
    +  (add-to-list 'org-beamer-environments-extra
    +               '("cbox" ;; Name of environment
    +                 "m" ;; Selection key
    +                 "\\onslide%a{\\begin{cbox}[%h]%O"
    +                 "\\end{cbox}}\\vspace{0.5em}"))
    +  (add-to-list 'org-beamer-environments-extra
    +               '("csubbox" ;; Name of environment
    +                 "M" ;; Selection key
    +                 "\\onslide%a{\\tcbsubtitle{%h}"
    +                 "}"))
    +  )
     
    @@ -1792,51 +1884,51 @@ Special Environments

    -
    (defcustom tdh-org-property-mapping
    -  '((latex ("CUSTOM_PAGE" . tdh-insert-org-page-latex)
    -           ("CUSTOM_LABEL" . tdh-insert-org-label-latex)))
    -  "List of mappings from org property to arbitrary strings.
    -Each element is a list:
    -  (BACKEND (PROPERTY1 . FUNCTION1) (PROPERTY2 . FUNCTION2) ...)
    -FUNCTION are functions which get called with a single
    -argument (the value of PROPERTY) and are responsible for doing
    -whatever should be done."
    -  :type '(repeat (cons symbol (repeat (cons string string)))))
    +
    (defcustom tdh-org-property-mapping
    +  '((latex ("CUSTOM_PAGE" . tdh-insert-org-page-latex)
    +           ("CUSTOM_LABEL" . tdh-insert-org-label-latex)))
    +  "List of mappings from org property to arbitrary strings.
    +Each element is a list:
    +  (BACKEND (PROPERTY1 . FUNCTION1) (PROPERTY2 . FUNCTION2) ...)
    +FUNCTION are functions which get called with a single
    +argument (the value of PROPERTY) and are responsible for doing
    +whatever should be done."
    +  :type '(repeat (cons symbol (repeat (cons string string)))))
     
    -
    (defun tdh-replace-org-property (backend)
    -  "Convert org properties using `tdh-org-property-mapping'.
    -Lookup BACKEND in `tdh-org-property-mapping' for a list of
    -(PROPERTY REPLACEMENT). For each healine being exported, if it has a
    -PROPERTY listed insert a string immediately after the healine given by
    -    (format REPLACEMENT PROPERTY-VALUE)"
    -  (let ((map (cdr (assoc backend tdh-org-property-mapping)))
    -        value replacement)
    -    (when map
    -      (org-map-entries
    -       (lambda ()
    -         (dolist (it map)
    -           (save-excursion
    -             (when (setq value (org-entry-get (point) (car it)))
    -               (funcall (cdr it) value)))))))))
    +
    (defun tdh-replace-org-property (backend)
    +  "Convert org properties using `tdh-org-property-mapping'.
    +Lookup BACKEND in `tdh-org-property-mapping' for a list of
    +(PROPERTY REPLACEMENT). For each healine being exported, if it has a
    +PROPERTY listed insert a string immediately after the healine given by
    +    (format REPLACEMENT PROPERTY-VALUE)"
    +  (let ((map (cdr (assoc backend tdh-org-property-mapping)))
    +        value replacement)
    +    (when map
    +      (org-map-entries
    +       (lambda ()
    +         (dolist (it map)
    +           (save-excursion
    +             (when (setq value (org-entry-get (point) (car it)))
    +               (funcall (cdr it) value)))))))))
     
    -(add-hook 'org-export-before-processing-hook #'tdh-replace-org-property)
    +(add-hook 'org-export-before-processing-hook #'tdh-replace-org-property)
     
    -
    (defun tdh-insert-org-label-latex (label)
    -  "Insert \"\\\\label{LABEL}\\n\" after the :PROPERTY: drawer."
    -  (search-forward-regexp org-property-end-re)
    -  (forward-char 1)
    -  (insert (format "\\label{%s}\n" label)))
    -(defun tdh-insert-org-page-latex (page)
    -  "Insert \"\\\\page{PAGE}\\n\" after the :PROPERTY: drawer."
    -  (search-forward-regexp org-property-end-re)
    -  (forward-char 1)
    -  (insert (format "\\page{%s}\n" page)))
    +
    (defun tdh-insert-org-label-latex (label)
    +  "Insert \"\\\\label{LABEL}\\n\" after the :PROPERTY: drawer."
    +  (search-forward-regexp org-property-end-re)
    +  (forward-char 1)
    +  (insert (format "\\label{%s}\n" label)))
    +(defun tdh-insert-org-page-latex (page)
    +  "Insert \"\\\\page{PAGE}\\n\" after the :PROPERTY: drawer."
    +  (search-forward-regexp org-property-end-re)
    +  (forward-char 1)
    +  (insert (format "\\page{%s}\n" page)))
     
    @@ -1850,50 +1942,50 @@ PROPERTY listed insert a string immediately after the healine given by

    -
    (after! org
    -  (defun tdh-org-renumber-environment (orig-func &rest args)
    -    "A function to inject numbers in LaTeX fragment previews."
    -    (let ((results '())
    -          (counter -1)
    -          (numberp))
    +
    (after! org
    +  (defun tdh-org-renumber-environment (orig-func &rest args)
    +    "A function to inject numbers in LaTeX fragment previews."
    +    (let ((results '())
    +          (counter -1)
    +          (numberp))
     
    -      (setq results (loop for (begin .  env) in
    -                          (org-element-map (org-element-parse-buffer) 'latex-environment
    -                            (lambda (env)
    -                              (cons
    -                               (org-element-property :begin env)
    -                               (org-element-property :value env))))
    +      (setq results (loop for (begin .  env) in
    +                          (org-element-map (org-element-parse-buffer) 'latex-environment
    +                            (lambda (env)
    +                              (cons
    +                               (org-element-property :begin env)
    +                               (org-element-property :value env))))
                               collect
    -                          (cond
    -                           ((and (string-match "\\\\begin{equation}" env)
    -                                 (not (string-match "\\\\tag{" env)))
    -                            (incf counter)
    -                            (cons begin counter))
    -                           ((string-match "\\\\begin{align}" env)
    -                            (prog2
    -                                (incf counter)
    -                                (cons begin counter)
    -                              (with-temp-buffer
    -                                (insert env)
    -                                (goto-char (point-min))
    -                                ;; \\ is used for a new line. Each one leads to a number
    -                                (incf counter (count-matches "\\\\$"))
    -                                ;; unless there are nonumbers.
    -                                (goto-char (point-min))
    -                                (decf counter (count-matches "\\nonumber")))))
    -                           (t
    -                            (cons begin nil)))))
    +                          (cond
    +                           ((and (string-match "\\\\begin{equation}" env)
    +                                 (not (string-match "\\\\tag{" env)))
    +                            (incf counter)
    +                            (cons begin counter))
    +                           ((string-match "\\\\begin{align}" env)
    +                            (prog2
    +                                (incf counter)
    +                                (cons begin counter)
    +                              (with-temp-buffer
    +                                (insert env)
    +                                (goto-char (point-min))
    +                                ;; \\ is used for a new line. Each one leads to a number
    +                                (incf counter (count-matches "\\\\$"))
    +                                ;; unless there are nonumbers.
    +                                (goto-char (point-min))
    +                                (decf counter (count-matches "\\nonumber")))))
    +                           (t
    +                            (cons begin nil)))))
     
    -      (when (setq numberp (cdr (assoc (point) results)))
    -        (setf (car args)
    -              (concat
    -               (format "\\setcounter{equation}{%s}\n" numberp)
    -               (car args)))))
    +      (when (setq numberp (cdr (assoc (point) results)))
    +        (setf (car args)
    +              (concat
    +               (format "\\setcounter{equation}{%s}\n" numberp)
    +               (car args)))))
     
    -    (apply orig-func args))
    +    (apply orig-func args))
     
    -  (advice-add 'org-create-formula-image :around #'tdh-org-renumber-environment)
    -  )
    +  (advice-add 'org-create-formula-image :around #'tdh-org-renumber-environment)
    +  )
     
    @@ -1908,25 +2000,25 @@ PROPERTY listed insert a string immediately after the healine given by

    -
    (after! org
    -  (add-to-list 'org-src-lang-modes '("latex-macros" . latex))
    +
    (after! org
    +  (add-to-list 'org-src-lang-modes '("latex-macros" . latex))
     
    -  (defvar org-babel-default-header-args:latex-macros
    -    '((:results . "raw")
    -      (:exports . "results")))
    +  (defvar org-babel-default-header-args:latex-macros
    +    '((:results . "raw")
    +      (:exports . "results")))
     
    -  (defun prefix-all-lines (pre body)
    -    (with-temp-buffer
    -      (insert body)
    -      (string-insert-rectangle (point-min) (point-max) pre)
    -      (buffer-string)))
    +  (defun prefix-all-lines (pre body)
    +    (with-temp-buffer
    +      (insert body)
    +      (string-insert-rectangle (point-min) (point-max) pre)
    +      (buffer-string)))
     
    -  (defun org-babel-execute:latex-macros (body _params)
    -    (concat
    -     "\n#+begin_export html\n<div style=\"display: none\"> \\(\n"
    +  (defun org-babel-execute:latex-macros (body _params)
    +    (concat
    +     "\n#+begin_export html\n<div style=\"display: none\"> \\(\n"
          body
    -     "\n\\)</div>\n#+end_export\n"))
    -  )
    +     "\n\\)</div>\n#+end_export\n"))
    +  )
     
    @@ -1937,60 +2029,60 @@ PROPERTY listed insert a string immediately after the healine given by

    Org Projects

    -
    (setq org-publish-project-alist
    -      '(("config"
    -         :base-directory "~/.config/literate-dotfiles/dotfiles/"
    -         :publishing-directory "~/.config/literate-dotfiles/docs/"
    -         :recursive nil
    -         :publishing-function org-html-publish-to-html
    -         :auto-sitemap nil
    -         :section-numbers nil
    -         :table-of-contents nil)
    -        ("stewart-simscape"
    -         :base-directory "~/Cloud/thesis/matlab/stewart-simscape/org/"
    -         :base-extension "org"
    -         :publishing-directory "~/Cloud/thesis/matlab/stewart-simscape/docs/"
    -         :author "Dehaeze Thomas"
    -         :email "dehaeze.thomas@gmail.com/"
    -         :recursive nil
    -         :publishing-function org-html-publish-to-html
    -         :auto-preamble t
    -         :auto-sitemap nil
    -         :html-link-up "index.html"
    -         :html-link-home "index.html"
    -         :with-todo-keywords nil
    -         :html-wrap-src-lines nil
    -         :table-of-contents nil)
    -        ("nass-simscape"
    -         :base-directory "~/Cloud/thesis/matlab/nass-simscape/org/"
    -         :base-extension "org"
    -         :publishing-directory "~/Cloud/thesis/matlab/nass-simscape/docs/"
    -         :author "Dehaeze Thomas"
    -         :email "dehaeze.thomas@gmail.com/"
    -         :recursive nil
    -         :publishing-function org-html-publish-to-html
    -         :auto-preamble t
    -         :auto-sitemap nil
    -         :html-link-up "index.html"
    -         :html-link-home "index.html"
    -         :with-todo-keywords nil
    -         :html-wrap-src-lines nil
    -         :table-of-contents nil)
    -        ("tikz-maker"
    -         :base-directory "~/Cloud/tikz/org/"
    -         :base-extension "org"
    -         :publishing-directory "~/Cloud/tikz/docs/"
    -         :author "Dehaeze Thomas"
    -         :email "dehaeze.thomas@gmail.com/"
    -         :recursive nil
    -         :publishing-function org-html-publish-to-html
    -         :auto-preamble t
    -         :auto-sitemap nil
    -         :html-link-up "index.html"
    -         :html-link-home "index.html"
    -         :with-todo-keywords nil
    -         :html-wrap-src-lines nil
    -         :table-of-contents nil)))
    +
    (setq org-publish-project-alist
    +      '(("config"
    +         :base-directory "~/.config/literate-dotfiles/dotfiles/"
    +         :publishing-directory "~/.config/literate-dotfiles/docs/"
    +         :recursive nil
    +         :publishing-function org-html-publish-to-html
    +         :auto-sitemap nil
    +         :section-numbers nil
    +         :table-of-contents nil)
    +        ("stewart-simscape"
    +         :base-directory "~/Cloud/thesis/matlab/stewart-simscape/org/"
    +         :base-extension "org"
    +         :publishing-directory "~/Cloud/thesis/matlab/stewart-simscape/docs/"
    +         :author "Dehaeze Thomas"
    +         :email "dehaeze.thomas@gmail.com/"
    +         :recursive nil
    +         :publishing-function org-html-publish-to-html
    +         :auto-preamble t
    +         :auto-sitemap nil
    +         :html-link-up "index.html"
    +         :html-link-home "index.html"
    +         :with-todo-keywords nil
    +         :html-wrap-src-lines nil
    +         :table-of-contents nil)
    +        ("nass-simscape"
    +         :base-directory "~/Cloud/thesis/matlab/nass-simscape/org/"
    +         :base-extension "org"
    +         :publishing-directory "~/Cloud/thesis/matlab/nass-simscape/docs/"
    +         :author "Dehaeze Thomas"
    +         :email "dehaeze.thomas@gmail.com/"
    +         :recursive nil
    +         :publishing-function org-html-publish-to-html
    +         :auto-preamble t
    +         :auto-sitemap nil
    +         :html-link-up "index.html"
    +         :html-link-home "index.html"
    +         :with-todo-keywords nil
    +         :html-wrap-src-lines nil
    +         :table-of-contents nil)
    +        ("tikz-maker"
    +         :base-directory "~/Cloud/tikz/org/"
    +         :base-extension "org"
    +         :publishing-directory "~/Cloud/tikz/docs/"
    +         :author "Dehaeze Thomas"
    +         :email "dehaeze.thomas@gmail.com/"
    +         :recursive nil
    +         :publishing-function org-html-publish-to-html
    +         :auto-preamble t
    +         :auto-sitemap nil
    +         :html-link-up "index.html"
    +         :html-link-home "index.html"
    +         :with-todo-keywords nil
    +         :html-wrap-src-lines nil
    +         :table-of-contents nil)))
     
    @@ -2000,29 +2092,29 @@ PROPERTY listed insert a string immediately after the healine given by

    Org big org-project

    -
    (setq org-publish-project-alist
    -      '(("website"
    -         :components ("nass-simscape" "nass-simscape-images"))
    -        ("nass-simscape"
    -         :base-directory "~/Cloud/thesis/matlab/nass-simscape/org/"
    -         :base-extension "org"
    -         :publishing-directory "~/Cloud/website/nass-simscape/"
    -         :publishing-function org-html-publish-to-html
    +
    (setq org-publish-project-alist
    +      '(("website"
    +         :components ("nass-simscape" "nass-simscape-images"))
    +        ("nass-simscape"
    +         :base-directory "~/Cloud/thesis/matlab/nass-simscape/org/"
    +         :base-extension "org"
    +         :publishing-directory "~/Cloud/website/nass-simscape/"
    +         :publishing-function org-html-publish-to-html
     
    -         :html-link-up "./index.html"
    -         :html-link-home "~/Cloud/website/index.html"
    +         :html-link-up "./index.html"
    +         :html-link-home "~/Cloud/website/index.html"
     
    -         :html-footnotes-section "<div id='footnotes'><!--%s-->%s</div>"
    +         :html-footnotes-section "<div id='footnotes'><!--%s-->%s</div>"
     
    -         :recursive nil
    -         :auto-sitemap nil
    -         :language en)
    -        ("nass-simscape-images"
    -         :base-directory "~/Cloud/thesis/matlab/nass-simscape/docs/figs/"
    -         :base-extension "png"
    -         :publishing-directory "~/Cloud/website/nass-simscape/figs/"
    -         :publishing-function org-publish-attachment)
    -        ))
    +         :recursive nil
    +         :auto-sitemap nil
    +         :language en)
    +        ("nass-simscape-images"
    +         :base-directory "~/Cloud/thesis/matlab/nass-simscape/docs/figs/"
    +         :base-extension "png"
    +         :publishing-directory "~/Cloud/website/nass-simscape/figs/"
    +         :publishing-function org-publish-attachment)
    +        ))
     
    @@ -2032,18 +2124,18 @@ PROPERTY listed insert a string immediately after the healine given by

    Automatically run startblock when opening org-mode files

    -
    (after! org
    -  (defun tdh-eval-startblock ()
    -    (if (member "startblock" (org-babel-src-block-names))
    -        (save-excursion
    -          (org-babel-goto-named-src-block "startblock")
    -          (org-babel-execute-src-block))
    +
    (after! org
    +  (defun tdh-eval-startblock ()
    +    (if (member "startblock" (org-babel-src-block-names))
    +        (save-excursion
    +          (org-babel-goto-named-src-block "startblock")
    +          (org-babel-execute-src-block))
           nil
    -      )
    -    )
    +      )
    +    )
     
    -  (add-hook 'org-mode-hook 'tdh-eval-startblock)
    -  )
    +  (add-hook 'org-mode-hook 'tdh-eval-startblock)
    +  )
     
    @@ -2062,59 +2154,59 @@ PROPERTY listed insert a string immediately after the healine given by
    -
    ;; required libraries
    -(require 'dash)
    -;; (require 'swiper)
    -(require 's)
    +
    ;; required libraries
    +(require 'dash)
    +;; (require 'swiper)
    +(require 's)
     
    -;; start directory
    -(defvar tdh-image-dir (expand-file-name "/home/thomas/Pictures"))
    +;; start directory
    +(defvar tdh-image-dir (expand-file-name "/home/thomas/Pictures"))
     
    -(defun tdh-insert-conference-image ()
    -  "Insert image from conference directory, rename and add link in current file.
    +(defun tdh-insert-conference-image ()
    +  "Insert image from conference directory, rename and add link in current file.
     
    -The file is taken from a start directory set by `tdh-image-dir' and moved to the current directory, renamed and embedded at the point as an org-mode link. The user is presented with a list of files in the start directory, from which to select the file to move, sorted by most recent first."
    -  (interactive)
    -  (let (file-list target-dir file-list-sorted start-file start-file-full file-ext end-file end-file-base end-file-full file-number)
    -    ;; Clean directories from list but keep times
    -    (setq file-list
    -          (-remove (lambda (x) (nth 1 x))
    -                   (directory-files-and-attributes tdh-image-dir)))
    +The file is taken from a start directory set by `tdh-image-dir' and moved to the current directory, renamed and embedded at the point as an org-mode link. The user is presented with a list of files in the start directory, from which to select the file to move, sorted by most recent first."
    +  (interactive)
    +  (let (file-list target-dir file-list-sorted start-file start-file-full file-ext end-file end-file-base end-file-full file-number)
    +    ;; Clean directories from list but keep times
    +    (setq file-list
    +          (-remove (lambda (x) (nth 1 x))
    +                   (directory-files-and-attributes tdh-image-dir)))
     
    -    ;; Get target directory
    -    (setq target-dir (file-name-directory (buffer-file-name)))
    +    ;; Get target directory
    +    (setq target-dir (file-name-directory (buffer-file-name)))
     
    -    ;; Sort list by most recent
    -    (setq file-list-sorted
    -          (mapcar #'car
    -                  (sort file-list
    -                        #'(lambda (x y) (time-less-p (nth 6 y) (nth 6 x))))))
    +    ;; Sort list by most recent
    +    (setq file-list-sorted
    +          (mapcar #'car
    +                  (sort file-list
    +                        #'(lambda (x y) (time-less-p (nth 6 y) (nth 6 x))))))
     
    -    ;; Use ivy to select start-file
    -    (setq start-file (ivy-read
    -                      (concat "Move selected file to " target-dir ":")
    +    ;; Use ivy to select start-file
    +    (setq start-file (ivy-read
    +                      (concat "Move selected file to " target-dir ":")
                           file-list-sorted
    -                      :re-builder #'ivy--regex
    -                      :sort nil
    -                      :initial-input nil))
    +                      :re-builder #'ivy--regex
    +                      :sort nil
    +                      :initial-input nil))
     
    -    ;; add full path to start file and end-file
    -    (setq start-file-full
    -          (expand-file-name start-file tdh-image-dir))
    +    ;; add full path to start file and end-file
    +    (setq start-file-full
    +          (expand-file-name start-file tdh-image-dir))
     
    -    ;; final file name including path
    -    (setq end-file-full
    -          (expand-file-name start-file target-dir))
    +    ;; final file name including path
    +    (setq end-file-full
    +          (expand-file-name start-file target-dir))
     
    -    ;; rename file
    -    (rename-file start-file-full end-file-full)
    -    (message "moved %s to %s" start-file-full start-file)
    +    ;; rename file
    +    (rename-file start-file-full end-file-full)
    +    (message "moved %s to %s" start-file-full start-file)
     
    -    ;; insert link
    -    (insert (org-make-link-string (format "file:%s" start-file)))
    +    ;; insert link
    +    (insert (org-make-link-string (format "file:%s" start-file)))
     
    -    ;; display image
    -    (org-display-inline-images t t)))
    +    ;; display image
    +    (org-display-inline-images t t)))
     
    @@ -2128,58 +2220,58 @@ The file is taken from a start directory set by `tdh-image-dir' and moved to the

    -
    (after! org
    -  (defun tdh-render-org-table-at-point ()
    -    (interactive)
    -    (save-excursion
    -      (beginning-of-line)
    -      ;; removes the overlay is already there
    -      (if (overlays-at (point))
    -          (delete-overlay (car (overlays-at (point))))
    +
    (after! org
    +  (defun tdh-render-org-table-at-point ()
    +    (interactive)
    +    (save-excursion
    +      (beginning-of-line)
    +      ;; removes the overlay is already there
    +      (if (overlays-at (point))
    +          (delete-overlay (car (overlays-at (point))))
     
    -        (let* ((element-type (org-element-type (org-element-at-point))))
    -          (if (and (not (eq element-type 'table))
    -                   (not (eq element-type 'table-row)))
    -              (error "not at an org table")
    +        (let* ((element-type (org-element-type (org-element-at-point))))
    +          (if (and (not (eq element-type 'table))
    +                   (not (eq element-type 'table-row)))
    +              (error "not at an org table")
     
    -            (while (not (eq 'table (org-element-type (org-element-at-point))))
    -              (forward-line -1))
    -            (tdh-render-org-table (org-element-at-point))
    -            )))))
    +            (while (not (eq 'table (org-element-type (org-element-at-point))))
    +              (forward-line -1))
    +            (tdh-render-org-table (org-element-at-point))
    +            )))))
     
     
    -  (defun tdh-render-org-table (table)
    -    (interactive)
    -    (let* ((begin (org-element-property :begin table))
    -           (end (let ((pos (org-element-property :end table)))
    -                  (goto-char pos)
    -                  (beginning-of-line)
    -                  ;; skip possible space after table
    -                  (while (not (looking-at " *[|#]"))
    -                    (setq pos (point))
    -                    (forward-line -1))
    -                  pos))
    -           (tabletxt (buffer-substring-no-properties begin end))
    -           (img (with-temp-buffer
    -                  (insert tabletxt)
    -                  (mark-whole-buffer)
    -                  (org-latex-convert-region-to-latex)
    -                  (org-latex-preview)
    -                  (goto-char (point-min))
    -                  (overlay-get  (car (overlays-at (point))) 'display)))
    -           (overlay (make-overlay begin end)))
    -      (overlay-put overlay 'display img)
    -      (forward-line -1))
    -    )
    +  (defun tdh-render-org-table (table)
    +    (interactive)
    +    (let* ((begin (org-element-property :begin table))
    +           (end (let ((pos (org-element-property :end table)))
    +                  (goto-char pos)
    +                  (beginning-of-line)
    +                  ;; skip possible space after table
    +                  (while (not (looking-at " *[|#]"))
    +                    (setq pos (point))
    +                    (forward-line -1))
    +                  pos))
    +           (tabletxt (buffer-substring-no-properties begin end))
    +           (img (with-temp-buffer
    +                  (insert tabletxt)
    +                  (mark-whole-buffer)
    +                  (org-latex-convert-region-to-latex)
    +                  (org-latex-preview)
    +                  (goto-char (point-min))
    +                  (overlay-get  (car (overlays-at (point))) 'display)))
    +           (overlay (make-overlay begin end)))
    +      (overlay-put overlay 'display img)
    +      (forward-line -1))
    +    )
     
     
    -  (defun tdh-render-org-tables-in-buffer ()
    -    (save-excursion
    -      (org-element-map (org-element-parse-buffer) 'table 'tdh-render-org-table)))
    +  (defun tdh-render-org-tables-in-buffer ()
    +    (save-excursion
    +      (org-element-map (org-element-parse-buffer) 'table 'tdh-render-org-table)))
     
    -  ;; Use F9 to globally generate tables
    -  (map! :map org-mode-map :n "<f8>" (lambda () (interactive) (tdh-render-org-table-at-point)))
    -  )
    +  ;; Use F9 to globally generate tables
    +  (map! :map org-mode-map :n "<f8>" (lambda () (interactive) (tdh-render-org-table-at-point)))
    +  )
     
    @@ -2193,17 +2285,65 @@ The file is taken from a start directory set by `tdh-image-dir' and moved to the
    -
    (use-package! org-gcal
    -  :after org
    -  :init
    -  :config
    -  (setq org-gcal-client-id "396102378658-dcmbcmrnthbe925519otsjbd921otq0v.apps.googleusercontent.com"
    -        org-gcal-client-secret "4M5PWrbhQjwYEMXGK85lDYX9"
    -        org-gcal-file-alist '(("dehaeze.thomas@gmail.com" . "~/Cloud/org/gcal.org")
    -                              ("8kjmhe2ar0abnm054ill1fb0gc@group.calendar.google.com" . "~/Cloud/org/gcal_phd.org")))
    -  ;; Automatic fetch of the new events
    -  ;; (add-hook 'org-agenda-mode-hook (lambda () (org-gcal-fetch) ))
    -)
    +
    (use-package! org-gcal
    +  :after org
    +  :init
    +  :config
    +  (setq org-gcal-client-id "396102378658-dcmbcmrnthbe925519otsjbd921otq0v.apps.googleusercontent.com"
    +        org-gcal-client-secret "4M5PWrbhQjwYEMXGK85lDYX9"
    +        org-gcal-file-alist '(("dehaeze.thomas@gmail.com" . "~/Cloud/org/gcal.org")
    +                              ("8kjmhe2ar0abnm054ill1fb0gc@group.calendar.google.com" . "~/Cloud/org/gcal_phd.org")))
    +  ;; Automatic fetch of the new events
    +  ;; (add-hook 'org-agenda-mode-hook (lambda () (org-gcal-fetch) ))
    +)
    +
    +
    + + + +
    +

    Citeproc-Org

    +
    +
    +
    (use-package! citeproc-org
    +  :ensure t
    +  :after ox-hugo
    +  :config
    +  (citeproc-org-setup))
    +
    +
    +
    +
    + +
    +

    Org Wild Notifier

    +
    +
    +
    (use-package! org-wild-notifier
    +  :after org
    +  :init
    +  (setq alert-default-style 'libnotify)
    +  :config
    +)
    +
    +
    +
    +
    + +
    +

    Orch

    +
    +
    +
    (use-package! web-server
    +  :init
    +  :config
    +)
    +
    +
    + +
    +
    (add-to-list 'load-path "~/.config/doom/packages/orch/")
    +(autoload 'orch-toggle "orch" nil t)
     
    @@ -2245,39 +2385,39 @@ The file is taken from a start directory set by `tdh-image-dir' and moved to the
    -
    (after! org
    -  (map! :map org-mode-map
    -   (:desc "Org Agenda"
    -     :ni "C-c a" 'org-agenda)
    -   (:desc "Archive"
    -     :n "C-c A" 'org-archive-subtree)
    -   (:desc "Org Capture"
    -     :ni "C-c c" 'org-capture)
    -   (:desc "Store Link"
    -     :ni "C-c l" 'org-store-link)
    -   (:desc "Narrow Subtree"
    -     :ni "C-c n" 'org-toggle-narrow-to-subtree)
    -   (:desc "Org Noter"
    -     :ni "C-c N" 'org-noter)
    -   (:desc "Align Block"
    -     :ni "C-c =" 'tdh-align-src-block)
    -   (:desc "Insert Reference"
    -     :ni "C-c r" 'org-ref-insert-ref-link)
    -   (:desc "Insert Image"
    -     :ni "C-c i" 'tdh-insert-image-org-link)
    -   (:desc "Insert Image SXIV"
    -     :ni "C-c I" 'tdh-insert-image-org-link-sxiv)
    -   (:desc "Link to next Figure"
    -     :ni "C-c f" 'tdh-insert-link-to-next-figure)
    -   (:desc "Link to previous Figure"
    -     :ni "C-c F" 'tdh-insert-link-to-previous-figure)
    -   (:desc "Insert Screenshot"
    -     :ni "C-c s" 'tdh-insert-screenshot-org-link)
    -   (:desc "Find Roam"
    -     :ni "C-c r" 'orb-find-non-ref-file)
    -   (:desc "Insert Roam"
    -     :ni "C-c R" 'orb-insert-non-ref)
    -   ))
    +
    (after! org
    +  (map! :map org-mode-map
    +   (:desc "Org Agenda"
    +     :ni "C-c a" 'org-agenda)
    +   (:desc "Archive"
    +     :n "C-c A" 'org-archive-subtree)
    +   (:desc "Org Capture"
    +     :ni "C-c c" 'org-capture)
    +   (:desc "Store Link"
    +     :ni "C-c l" 'org-store-link)
    +   (:desc "Narrow Subtree"
    +     :ni "C-c n" 'org-toggle-narrow-to-subtree)
    +   (:desc "Org Noter"
    +     :ni "C-c N" 'org-noter)
    +   (:desc "Align Block"
    +     :ni "C-c =" 'tdh-align-src-block)
    +   (:desc "Insert Reference"
    +     :ni "C-c r" 'org-ref-insert-ref-link)
    +   (:desc "Insert Image"
    +     :ni "C-c i" 'tdh-insert-image-org-link)
    +   (:desc "Insert Image SXIV"
    +     :ni "C-c I" 'tdh-insert-image-org-link-sxiv)
    +   (:desc "Link to next Figure"
    +     :ni "C-c f" 'tdh-insert-link-to-next-figure)
    +   (:desc "Link to previous Figure"
    +     :ni "C-c F" 'tdh-insert-link-to-previous-figure)
    +   (:desc "Insert Screenshot"
    +     :ni "C-c s" 'tdh-insert-screenshot-org-link)
    +   (:desc "Find Roam"
    +     :ni "C-c r" 'orb-find-non-ref-file)
    +   (:desc "Insert Roam"
    +     :ni "C-c R" 'orb-insert-non-ref)
    +   ))
     
    @@ -2289,11 +2429,11 @@ The file is taken from a start directory set by `tdh-image-dir' and moved to the Insert Link to paper

    -
    (defun tdh-insert-paper-org-link (paper)
    -  "Insert an org link to some paper, choosing the file with completion"
    -  (interactive
    -   (list (read-file-name "Paper: " "~/Cloud/pdfs/" nil t)))
    -  (insert (format "[[papers:%s]]" (file-name-base paper))))
    +
    (defun tdh-insert-paper-org-link (paper)
    +  "Insert an org link to some paper, choosing the file with completion"
    +  (interactive
    +   (list (read-file-name "Paper: " "~/Cloud/pdfs/" nil t)))
    +  (insert (format "[[papers:%s]]" (file-name-base paper))))
     
    @@ -2301,11 +2441,11 @@ Insert Link to paper Insert Link to notes

    -
    (defun tdh-insert-note-org-link (note)
    -  "Insert an org link to some note, choosing the file with completion"
    -  (interactive
    -   (list (read-file-name "Note: " "~/Cloud/pdfs/" nil t)))
    -  (insert (format "[[notes:%s]]" (file-name-base note))))
    +
    (defun tdh-insert-note-org-link (note)
    +  "Insert an org link to some note, choosing the file with completion"
    +  (interactive
    +   (list (read-file-name "Note: " "~/Cloud/pdfs/" nil t)))
    +  (insert (format "[[notes:%s]]" (file-name-base note))))
     
    @@ -2313,12 +2453,12 @@ Insert Link to notes Insert Image that is in the figs folder

    -
    (defun tdh-insert-image-org-link (img)
    -  "Insert an org image link, choosing the file with completion
    -and starting from `my-default-image-directory'."
    -  (interactive
    -   (list (file-relative-name (read-file-name "Image: " (concat default-directory "figs/")) default-directory)))
    -  (insert (format "[[file:%s]]" img)))
    +
    (defun tdh-insert-image-org-link (img)
    +  "Insert an org image link, choosing the file with completion
    +and starting from `my-default-image-directory'."
    +  (interactive
    +   (list (file-relative-name (read-file-name "Image: " (concat default-directory "figs/")) default-directory)))
    +  (insert (format "[[file:%s]]" img)))
     
    @@ -2326,14 +2466,14 @@ and starting from `my-default-image-directory'." Insert Image that is in the figs folder using SXIV

    -
    (defun tdh-insert-image-org-link-sxiv ()
    -  "Insert an org image link, choosing the file with completion
    -and starting from `my-default-image-directory'."
    -  (interactive)
    -  (setq img (shell-command-to-string "ls figs/*.{jpg,jpeg,bmp,png,gif} 2> /dev/null | sxiv -i -t -o | tail -1 | tr -d '\n'"))
    -  (unless (equal "" img)
    -    (insert (format "[[file:%s]]" img)))
    -  )
    +
    (defun tdh-insert-image-org-link-sxiv ()
    +  "Insert an org image link, choosing the file with completion
    +and starting from `my-default-image-directory'."
    +  (interactive)
    +  (setq img (shell-command-to-string "ls figs/*.{jpg,jpeg,bmp,png,gif} 2> /dev/null | sxiv -i -t -o | tail -1 | tr -d '\n'"))
    +  (unless (equal "" img)
    +    (insert (format "[[file:%s]]" img)))
    +  )
     
    @@ -2341,12 +2481,12 @@ and starting from `my-default-image-directory'." Copy picture from phone folder using SXIV and insert it

    -
    (defun tdh-insert-phone-picture ()
    -  (interactive)
    -  (setq img (shell-command-to-string "~/.config/doom/bin/copy-phone-picture.sh"))
    -  (unless (equal "" img)
    -    (insert (format "[[file:%s]]" img)))
    -  )
    +
    (defun tdh-insert-phone-picture ()
    +  (interactive)
    +  (setq img (shell-command-to-string "~/.config/doom/bin/copy-phone-picture.sh"))
    +  (unless (equal "" img)
    +    (insert (format "[[file:%s]]" img)))
    +  )
     
    @@ -2354,19 +2494,19 @@ Copy picture from phone folder using SXIV and insert it Bash script for copying pictures taken by phone.

    -
    if [ -z "$1" ]; then
    -    oldpath=$(ls -t ~/Cloud/photos/phone/*.jpg | sxiv -i -t -o | tail -1);
    -else
    -    oldpath=$(ls -t $1 | sxiv -i -t -o | tail -1);
    -fi
    +
    if [ -z "$1" ]; then
    +    oldpath=$(ls -t ~/Cloud/photos/phone/*.jpg | sxiv -i -t -o | tail -1);
    +else
    +    oldpath=$(ls -t $1 | sxiv -i -t -o | tail -1);
    +fi
     
    -if [ -n "$oldpath" ]; then
    -    newfilename=$(basename $oldpath .jpg | rofi -i -dmenu -p "Filename")
    -    if [ -n "$newfilename" ]; then
    -        cp $oldpath "figs/$newfilename.jpg"
    -        printf "figs/$newfilename.jpg"
    -    fi
    -fi
    +if [ -n "$oldpath" ]; then
    +    newfilename=$(basename $oldpath .jpg | rofi -i -dmenu -p "Filename")
    +    if [ -n "$newfilename" ]; then
    +        cp $oldpath "figs/$newfilename.jpg"
    +        printf "figs/$newfilename.jpg"
    +    fi
    +fi
     
    @@ -2380,19 +2520,19 @@ Take Screenshot and insert a link:
    -
    (defun tdh-insert-screenshot-org-link ()
    -  "Capture screenshot and insert the resulting file.
    -The screenshot tool is determined by `org-download-screenshot-method'."
    -  (interactive)
    -  (if (string-match "_" (file-name-base buffer-file-name))
    -      (setq filename (read-string "Enter file name:" (car (split-string (file-name-base buffer-file-name) "_"))))
    -    (setq filename (read-string "Enter file name:")))
    -  (setq filepath (concat "./figs/" filename ".png"))
    -  (shell-command (concat "maim -s " filepath))
    -  (insert (format "#+name: fig:%s\n#+caption:\n[[file:%s]]" filename filepath))
    -  (search-backward "caption")
    -  (end-of-line)
    -  )
    +
    (defun tdh-insert-screenshot-org-link ()
    +  "Capture screenshot and insert the resulting file.
    +The screenshot tool is determined by `org-download-screenshot-method'."
    +  (interactive)
    +  (if (string-match "_" (file-name-base buffer-file-name))
    +      (setq filename (read-string "Enter file name:" (car (split-string (file-name-base buffer-file-name) "_"))))
    +    (setq filename (read-string "Enter file name:")))
    +  (setq filepath (concat "./figs/" filename ".png"))
    +  (shell-command (concat "maim -s " filepath))
    +  (insert (format "#+name: fig:%s\n#+caption:\n[[file:%s]]" filename filepath))
    +  (search-backward "caption")
    +  (end-of-line)
    +  )
     
    @@ -2400,12 +2540,12 @@ The screenshot tool is determined by `org-download-screenshot-method'." Insert link to next figure:

    -
    (defun tdh-insert-link-to-next-figure ()
    -  (interactive)
    -  (save-excursion
    -    (re-search-forward "^#\\+name:\s*\\(fig:.*\\)" nil t 1))
    -  (insert (concat "[[" (match-string 1) "]]"))
    -  )
    +
    (defun tdh-insert-link-to-next-figure ()
    +  (interactive)
    +  (save-excursion
    +    (re-search-forward "^#\\+name:\s*\\(fig:.*\\)" nil t 1))
    +  (insert (concat "[[" (match-string 1) "]]"))
    +  )
     
    @@ -2413,12 +2553,12 @@ Insert link to next figure: Insert link to previous figure:

    -
    (defun tdh-insert-link-to-previous-figure ()
    -  (interactive)
    -  (save-excursion
    -    (re-search-backward "^#\\+name:\s*\\(fig:.*\\)" nil t 1))
    -  (insert (concat "[[" (match-string 1) "]]"))
    -  )
    +
    (defun tdh-insert-link-to-previous-figure ()
    +  (interactive)
    +  (save-excursion
    +    (re-search-backward "^#\\+name:\s*\\(fig:.*\\)" nil t 1))
    +  (insert (concat "[[" (match-string 1) "]]"))
    +  )
     
    @@ -2426,17 +2566,17 @@ Insert link to previous figure: Map Keys

    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",i" . "Insert")
    -        :n "p" 'tdh-insert-paper-org-link
    -        :n "n" 'tdh-insert-note-org-link
    -        :n "f" 'tdh-insert-image-org-link
    -        :n "F" 'tdh-insert-image-org-link-sxiv
    -        :n "i" 'tdh-insert-phone-picture
    -        :n "l" 'tdh-insert-link-to-next-figure
    -        :n "L" 'tdh-insert-link-to-previous-figure
    -        :n "s" 'tdh-insert-screenshot-org-link)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",i" . "Insert")
    +        :n "p" 'tdh-insert-paper-org-link
    +        :n "n" 'tdh-insert-note-org-link
    +        :n "f" 'tdh-insert-image-org-link
    +        :n "F" 'tdh-insert-image-org-link-sxiv
    +        :n "i" 'tdh-insert-phone-picture
    +        :n "l" 'tdh-insert-link-to-next-figure
    +        :n "L" 'tdh-insert-link-to-previous-figure
    +        :n "s" 'tdh-insert-screenshot-org-link)))
     
    @@ -2446,32 +2586,32 @@ Map Keys

    LaTeX ,l

    -
    (defun tdh-latex-watch ()
    -  "Watch LaTeX file using latexmk"
    -  (interactive)
    -  (start-process-shell-command "latexmk-watch" "*latexmk-watch-output*"
    -                               "latexmk" (format "-pdflatex=\"xelatex -synctex=1 -shell-escape -interaction nonstopmode  -output-directory='%s'\" -pdf -pvc -bibtex -f %s.tex"
    -                                                 (file-name-directory buffer-file-name)
    -                                                 (file-name-base buffer-file-name))))
    +
    (defun tdh-latex-watch ()
    +  "Watch LaTeX file using latexmk"
    +  (interactive)
    +  (start-process-shell-command "latexmk-watch" "*latexmk-watch-output*"
    +                               "latexmk" (format "-pdflatex=\"xelatex -synctex=1 -shell-escape -interaction nonstopmode  -output-directory='%s'\" -pdf -pvc -bibtex -f %s.tex"
    +                                                 (file-name-directory buffer-file-name)
    +                                                 (file-name-base buffer-file-name))))
     
    -
    (defun tdh-latex-watch-kill ()
    -  "Kill the currently running TeX job."
    -  (interactive)
    -  (delete-process "latexmk-watch")
    -  )
    +
    (defun tdh-latex-watch-kill ()
    +  "Kill the currently running TeX job."
    +  (interactive)
    +  (delete-process "latexmk-watch")
    +  )
     
    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",l" . "LaTeX")
    -        :n "w" 'tdh-latex-watch
    -        :n "k" 'tdh-latex-watch-kill
    -        :n "l" 'org-latex-export-to-latex)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",l" . "LaTeX")
    +        :n "w" 'tdh-latex-watch
    +        :n "k" 'tdh-latex-watch-kill
    +        :n "l" 'org-latex-export-to-latex)))
     
    @@ -2481,22 +2621,22 @@ Map Keys

    Org LaTeX Automatic fragment

    -
    (defun tdh-automatic-latex-fragment-activate ()
    -  (interactive)
    -  (add-hook 'org-mode-hook 'org-fragtog-mode))
    +
    (defun tdh-automatic-latex-fragment-activate ()
    +  (interactive)
    +  (add-hook 'org-mode-hook 'org-fragtog-mode))
     
    -(defun tdh-automatic-latex-fragment-deactivate ()
    -  (interactive)
    -  (remove-hook 'org-mode-hook 'org-fragtog-mode))
    +(defun tdh-automatic-latex-fragment-deactivate ()
    +  (interactive)
    +  (remove-hook 'org-mode-hook 'org-fragtog-mode))
     
    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",l" . "LaTeX")
    -        :n "f" 'tdh-automatic-latex-fragment-activate
    -        :n "F" 'tdh-automatic-latex-fragment-deactivate)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",l" . "LaTeX")
    +        :n "f" 'tdh-automatic-latex-fragment-activate
    +        :n "F" 'tdh-automatic-latex-fragment-deactivate)))
     
    @@ -2506,13 +2646,13 @@ Map Keys

    Bibtex ,r

    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",r" . "References")
    -        :n "b" 'helm-bibtex
    -        :n "B" 'helm-bibtex-with-local-bibliography
    -        :n "f" 'tdh-helm-bibtex-favorites
    -        :n "r" 'helm-resume)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",r" . "References")
    +        :n "b" 'helm-bibtex
    +        :n "B" 'helm-bibtex-with-local-bibliography
    +        :n "f" 'tdh-helm-bibtex-favorites
    +        :n "r" 'helm-resume)))
     
    @@ -2522,17 +2662,17 @@ Map Keys

    Open ranger in current directory ,o

    -
    (defun tdh-open-ranger-in-workdir ()
    -  (interactive)
    -  (call-process-shell-command
    -  (concat "termite --directory=" default-directory " --exec=ranger") nil 0))
    +
    (defun tdh-open-ranger-in-workdir ()
    +  (interactive)
    +  (call-process-shell-command
    +  (concat "termite --directory=" default-directory " --exec=ranger") nil 0))
     
    -
    (after! org
    -  (map! :map org-mode-map
    -        :n ",o" 'tdh-open-ranger-in-workdir))
    +
    (after! org
    +  (map! :map org-mode-map
    +        :n ",o" 'tdh-open-ranger-in-workdir))
     
    @@ -2545,10 +2685,10 @@ Map Keys Open PDF output with zathura

    -
    (defun tdh-open-org-pdf-externally ()
    -  (interactive)
    -  (call-process "zathura" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".pdf"))
    -  )
    +
    (defun tdh-open-org-pdf-externally ()
    +  (interactive)
    +  (call-process "zathura" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".pdf"))
    +  )
     
    @@ -2556,19 +2696,19 @@ Open PDF output with zathura Open HTML output externally

    -
    (defun tdh-open-org-html-externally ()
    -    (interactive)
    -    (call-process "xdg-open" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".html"))
    -    )
    +
    (defun tdh-open-org-html-externally ()
    +    (interactive)
    +    (call-process "xdg-open" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".html"))
    +    )
     
    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",v" . "View")
    -        :n "p" 'tdh-open-org-pdf-externally
    -        :n "h" 'tdh-open-org-html-externally)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",v" . "View")
    +        :n "p" 'tdh-open-org-pdf-externally
    +        :n "h" 'tdh-open-org-html-externally)))
     
    @@ -2587,11 +2727,11 @@ Open HTML output externally Don’t ask for confirmation when evaluating following blocs

    -
    (defun tdh-org-confirm-babel-evaluate (lang body)
    -  (not (member lang '("emacs-lisp" "latex" "matlab" "sh" "latex-macros" "python"))))
    +
    (defun tdh-org-confirm-babel-evaluate (lang body)
    +  (not (member lang '("emacs-lisp" "latex" "matlab" "sh" "latex-macros" "python"))))
     
    -(after! org
    -  (setq org-confirm-babel-evaluate 'tdh-org-confirm-babel-evaluate))
    +(after! org
    +  (setq org-confirm-babel-evaluate 'tdh-org-confirm-babel-evaluate))
     
    @@ -2599,8 +2739,8 @@ Don’t ask for confirmation when evaluating following blocs Default header arguments.

    -
    (after! org
    -  (setq org-babel-default-header-args '((:eval . "no-export"))))
    +
    (after! org
    +  (setq org-babel-default-header-args '((:eval . "no-export"))))
     
    @@ -2608,8 +2748,8 @@ Default header arguments. Use the current window for C-c ’ source editing

    -
    (after! org
    -  (setq org-src-window-setup 'current-window))
    +
    (after! org
    +  (setq org-src-window-setup 'current-window))
     
    @@ -2619,16 +2759,16 @@ Use the current window for C-c ’ source editing

    Appearance of source blocks

    -
    (defun tdh-org-prettify-symbols ()
    -  (mapc (apply-partially 'add-to-list 'prettify-symbols-alist)
    -        (cl-reduce 'append
    -                   (mapcar (lambda (x) (list x (cons (upcase (car x)) (cdr x))))
    -                           `(("#+begin_src" . ?✎)
    -                             ("#+end_src"   . ?□)
    -                             ("#+begin_quote" . ?«)
    -                             ("#+end_quote" . ?»)))))
    -  (turn-on-prettify-symbols-mode))
    -(add-hook 'org-mode-hook #'tdh-org-prettify-symbols)
    +
    (defun tdh-org-prettify-symbols ()
    +  (mapc (apply-partially 'add-to-list 'prettify-symbols-alist)
    +        (cl-reduce 'append
    +                   (mapcar (lambda (x) (list x (cons (upcase (car x)) (cdr x))))
    +                           `(("#+begin_src" . ?✎)
    +                             ("#+end_src"   . ?□)
    +                             ("#+begin_quote" . ?«)
    +                             ("#+end_quote" . ?»)))))
    +  (turn-on-prettify-symbols-mode))
    +(add-hook 'org-mode-hook #'tdh-org-prettify-symbols)
     
    @@ -2638,11 +2778,11 @@ Use the current window for C-c ’ source editing

    Indentation

    -
    (after! org
    -  (setq org-edit-src-content-indentation 2
    -        org-src-tab-acts-natively nil
    -        org-src-preserve-indentation nil)
    -  )
    +
    (after! org
    +  (setq org-edit-src-content-indentation 2
    +        org-src-tab-acts-natively nil
    +        org-src-preserve-indentation nil)
    +  )
     
    @@ -2656,8 +2796,8 @@ Add all named source blocks to org-babel-library-of-babel (
    -
    (after! org
    -  (org-babel-lob-ingest "~/.config/literate-dotfiles/dotfiles/emacs-library-babel.org"))
    +
    (after! org
    +  (org-babel-lob-ingest "~/.config/literate-dotfiles/dotfiles/emacs-library-babel.org"))
     
    @@ -2668,22 +2808,9 @@ Add all named source blocks to org-babel-library-of-babel (
    Org-Babel Matlab
    -
    (after! org
    -  (setq org-babel-matlab-shell-command "/home/thomas/.local/bin/matlab -softwareopengl -nodesktop -nosplash")
    -
    -  (setq org-babel-matlab-emacs-link-wrapper-method
    -        "%s
    -      if ischar(ans);
    -      echo('test');
    -      fid = fopen('%s', 'w');
    -      fprintf(fid, '%s', ans);
    -      fclose(fid);
    -      else;
    -      save -ascii %s ans;
    -      end
    -      delete('%s');
    -      ")
    -  )
    +
    (after! org
    +  (setq org-babel-matlab-shell-command "/home/thomas/.local/bin/matlab -softwareopengl -nodesktop -nosplash")
    +  )
     
    @@ -2691,19 +2818,109 @@ Add all named source blocks to org-babel-library-of-babel (
    -
    (after! org
    -  (setq org-babel-default-header-args:matlab
    -        '((:results . "none")
    -          (:session . "*MATLAB*")
    -          (:comments . "org")
    -          (:exports . "both")
    -          (:cache .   "no")
    -          (:noweb . "no")
    -          (:hlines . "no")
    -          (:tangle . "yes")
    -          (:mkdir . "yes")
    -          (:eval . "no-export")))
    -  )
    +
    (after! org
    +  (setq org-babel-default-header-args:matlab
    +        '((:results . "none")
    +          (:session . "*MATLAB*")
    +          (:comments . "org")
    +          (:exports . "both")
    +          (:cache .   "no")
    +          (:noweb . "no")
    +          (:hlines . "no")
    +          (:tangle . "yes")
    +          (:mkdir . "yes")
    +          (:eval . "no-export")))
    +  )
    +
    +
    + +

    +Better format the output results for Matlab (link). +

    +
    +
    (after! org
    +  (defun org-babel-octave-evaluate-session
    +      (session body result-type &optional matlabp)
    +    "Evaluate BODY in SESSION."
    +    (let* ((tmp-file (org-babel-temp-file (if matlabp "matlab-" "octave-")))
    +           (wait-file (org-babel-temp-file "matlab-emacs-link-wait-signal-"))
    +           (full-body
    +            (pcase result-type
    +              (`output
    +               (mapconcat
    +                #'org-babel-chomp
    +                (list (if matlabp
    +                          (multi-replace-regexp-in-string
    +                           '(("%.*$"                      . "")    ;Remove comments
    +                             (";\\s-*\n+"                 . "; ")  ;Concatenate lines
    +                             ("\\(\\.\\)\\{3\\}\\s-*\n+"  . " ")   ;Handle continuations
    +                             (",*\\s-*\n+"                . ", ")) ;Concatenate lines
    +                           body)
    +                        body)
    +                      org-babel-octave-eoe-indicator) "\n"))
    +              (`value
    +               (if (and matlabp org-babel-matlab-with-emacs-link)
    +                   (concat
    +                    (format org-babel-matlab-emacs-link-wrapper-method
    +                            body
    +                            (org-babel-process-file-name tmp-file 'noquote)
    +                            (org-babel-process-file-name tmp-file 'noquote) wait-file) "\n")
    +                 (mapconcat
    +                  #'org-babel-chomp
    +                  (list (format org-babel-octave-wrapper-method
    +                                body
    +                                (org-babel-process-file-name tmp-file 'noquote)
    +                                (org-babel-process-file-name tmp-file 'noquote))
    +                        org-babel-octave-eoe-indicator) "\n")))))
    +           (raw (if (and matlabp org-babel-matlab-with-emacs-link)
    +                    (save-window-excursion
    +                      (with-temp-buffer
    +                        (insert full-body)
    +                        (write-region "" 'ignored wait-file nil nil nil 'excl)
    +                        (matlab-shell-run-region (point-min) (point-max))
    +                        (message "Waiting for Matlab Emacs Link")
    +                        (while (file-exists-p wait-file) (sit-for 0.01))
    +                        "")) ;; matlab-shell-run-region doesn't seem to
    +                  ;; make *matlab* buffer contents easily
    +                  ;; available, so :results output currently
    +                  ;; won't work
    +                  (org-babel-comint-with-output
    +                      (session
    +                       (if matlabp
    +                           org-babel-octave-eoe-indicator
    +                         org-babel-octave-eoe-output)
    +                       t full-body)
    +                    (insert full-body) (comint-send-input nil t)))) results)
    +      (pcase result-type
    +        (`value
    +         (org-babel-octave-import-elisp-from-file tmp-file))
    +        (`output
    +         (setq results
    +               (if matlabp
    +                   (cdr (reverse (delete "" (mapcar #'org-strip-quotes
    +                                                    (mapcar #'org-trim (remove-car-upto-newline raw))))))
    +                 (cdr (member org-babel-octave-eoe-output
    +                              (reverse (mapcar #'org-strip-quotes
    +                                               (mapcar #'org-trim raw)))))))
    +         (mapconcat #'identity (reverse results) "\n")))))
    +
    +  (defun remove-car-upto-newline (raw)
    +    "Truncate each string in a list of strings up to the first newline"
    +    (cons (mapconcat #'identity
    +                     (cdr (split-string-and-unquote (car raw) "\n"))
    +                     "\n") (cdr raw)))
    +
    +  (defun multi-replace-regexp-in-string (replacements-list string &optional rest)
    +    (interactive)
    +    "Replace multiple regexps in a string. Order matters."
    +    (if (null replacements-list)
    +        string
    +      (let ((regex (caar replacements-list))
    +            (replacement (cdar replacements-list)))
    +        (multi-replace-regexp-in-string (cdr replacements-list)
    +                                        (replace-regexp-in-string regex replacement
    +                                                                  string rest)))))
    +  )
     
    @@ -2716,13 +2933,13 @@ Default options for Matlab code whos matlab function

    -
    (defun tdh-matlab-whos (&optional start end)
    -"Get what is in the Matlab workspace"
    -  (interactive)
    -  (if (use-region-p)
    -    (let ((regionp (buffer-substring (region-beginning) (region-end))))
    -      (process-send-string "*MATLAB*" (concat "whosEmacs " regionp "\n")))
    -    (process-send-string "*MATLAB*" (concat "whosEmacs" "\n"))))
    +
    (defun tdh-matlab-whos (&optional start end)
    +"Get what is in the Matlab workspace"
    +  (interactive)
    +  (if (use-region-p)
    +    (let ((regionp (buffer-substring (region-beginning) (region-end))))
    +      (process-send-string "*MATLAB*" (concat "whosEmacs " regionp "\n")))
    +    (process-send-string "*MATLAB*" (concat "whosEmacs" "\n"))))
     
    @@ -2730,14 +2947,14 @@ Default options for Matlab code help matlab function

    -
    (defun tdh-matlab-help (&optional start end)
    -  "Get help on the selected function"
    -  (interactive)
    -  (if (use-region-p)
    -    (let ((regionp (buffer-substring (region-beginning) (region-end))))
    -        (process-send-string "*MATLAB*" (concat "help " regionp "\n")))
    -    (process-send-string "*MATLAB*" (concat "help " (read-string "Matlab help:") "\n")))
    -  )
    +
    (defun tdh-matlab-help (&optional start end)
    +  "Get help on the selected function"
    +  (interactive)
    +  (if (use-region-p)
    +    (let ((regionp (buffer-substring (region-beginning) (region-end))))
    +        (process-send-string "*MATLAB*" (concat "help " regionp "\n")))
    +    (process-send-string "*MATLAB*" (concat "help " (read-string "Matlab help:") "\n")))
    +  )
     
    @@ -2745,10 +2962,10 @@ Default options for Matlab code Specify a Matlab command to run

    -
    (defun tdh-matlab-run-command ()
    -  "Prompt user to enter a matlab command"
    -  (interactive)
    -  (process-send-string "*MATLAB*" (concat (read-string "Matlab Command: ") "\n")))
    +
    (defun tdh-matlab-run-command ()
    +  "Prompt user to enter a matlab command"
    +  (interactive)
    +  (process-send-string "*MATLAB*" (concat (read-string "Matlab Command: ") "\n")))
     
    @@ -2756,10 +2973,10 @@ Specify a Matlab command to run Specify a Matlab command to run and show output in mini-buffer

    -
    (defun tdh-matlab-run-command-show-output ()
    -  "Prompt user to enter a matlab command"
    -  (interactive)
    -  (process-send-string "*MATLAB*" (concat "evalEmacs('" (read-string "Matlab Command: ") "')\n")))
    +
    (defun tdh-matlab-run-command-show-output ()
    +  "Prompt user to enter a matlab command"
    +  (interactive)
    +  (process-send-string "*MATLAB*" (concat "evalEmacs('" (read-string "Matlab Command: ") "')\n")))
     
    @@ -2767,19 +2984,19 @@ Specify a Matlab command to run and show output in mini-buffer Org-Babel Tangle File and Execute with Matlab

    -
    (defun tdh-matlab-tangle-and-execute ()
    -  "Jump to tangle file for the source block at point."
    -  (interactive)
    -  (let (file org-babel-pre-tangle-hook org-babel-post-tangle-hook)
    -    (cl-letf (((symbol-function 'write-region) (lambda (start end filename &rest _ignore)
    -                         (setq file filename)))
    -          ((symbol-function 'delete-file) #'ignore))
    -      (org-babel-tangle '(4)))
    -    (when file
    -      (setq file (expand-file-name file))
    -      (if (file-readable-p file)
    -      (process-send-string "*MATLAB*" (concat "run " file "\n"))
    -    (error "Cannot open tangle file %S" file)))))
    +
    (defun tdh-matlab-tangle-and-execute ()
    +  "Jump to tangle file for the source block at point."
    +  (interactive)
    +  (let (file org-babel-pre-tangle-hook org-babel-post-tangle-hook)
    +    (cl-letf (((symbol-function 'write-region) (lambda (start end filename &rest _ignore)
    +                         (setq file filename)))
    +          ((symbol-function 'delete-file) #'ignore))
    +      (org-babel-tangle '(4)))
    +    (when file
    +      (setq file (expand-file-name file))
    +      (if (file-readable-p file)
    +      (process-send-string "*MATLAB*" (concat "run " file "\n"))
    +    (error "Cannot open tangle file %S" file)))))
     
    @@ -2787,14 +3004,14 @@ Org-Babel Tangle File and Execute with Matlab Map Functions

    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",m" . "Matlab")
    -        :n  "e" 'tdh-matlab-run-command
    -        :n  "E" 'tdh-matlab-run-command-show-output
    -        :n  "T" 'tdh-matlab-tangle-and-execute
    -        :nv "h" 'tdh-matlab-help
    -        :nv "w" 'tdh-matlab-whos)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",m" . "Matlab")
    +        :n  "e" 'tdh-matlab-run-command
    +        :n  "E" 'tdh-matlab-run-command-show-output
    +        :n  "T" 'tdh-matlab-tangle-and-execute
    +        :nv "h" 'tdh-matlab-help
    +        :nv "w" 'tdh-matlab-whos)))
     
    @@ -2813,24 +3030,24 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-r

    -
    (defun tdh-ctrl-ret ()
    -  (interactive)
    -  (defun tdh-in-src-block-p ()
    -    "Returns t when the point is inside a source code block"
    -    (string= "src" (org-in-block-p '("src"))))
    +
    (defun tdh-ctrl-ret ()
    +  (interactive)
    +  (defun tdh-in-src-block-p ()
    +    "Returns t when the point is inside a source code block"
    +    (string= "src" (org-in-block-p '("src"))))
     
    -  (if (tdh-in-src-block-p)
    -      (progn
    -        (org-babel-execute-src-block)
    -        (org-babel-next-src-block))
    -    (+org--insert-item 'below)))
    +  (if (tdh-in-src-block-p)
    +      (progn
    +        (org-babel-execute-src-block)
    +        (org-babel-next-src-block))
    +    (+org--insert-item 'below)))
     
    -
    (map! :after evil-org
    -      :map evil-org-mode-map
    -      :n "<C-return>" #'tdh-ctrl-ret)
    +
    (map! :after evil-org
    +      :map evil-org-mode-map
    +      :n "<C-return>" #'tdh-ctrl-ret)
     
    @@ -2844,65 +3061,65 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-r

    tdh-org-babel-execute-matlab-background

    -
    (defun tdh-org-babel-execute-matlab-background (&optional arg info params)
    -  (interactive)
    -  (let* ((org-babel-current-src-block-location
    -      (or org-babel-current-src-block-location
    -          (nth 5 info)
    -          (org-babel-where-is-src-block-head)))
    -     (info (if info (copy-tree info) (org-babel-get-src-block-info))))
    -    ;; Merge PARAMS with INFO before considering source block
    -    ;; evaluation since both could disagree.
    -    (cl-callf org-babel-merge-params (nth 2 info) params)
    -    (when (org-babel-check-evaluate info)
    -      (cl-callf org-babel-process-params (nth 2 info))
    -      (let* ((params (nth 2 info))
    -         (cache (let ((c (cdr (assq :cache params))))
    -              (and (not arg) c (string= "yes" c))))
    -         (new-hash (and cache (org-babel-sha1-hash info :eval)))
    -         (old-hash (and cache (org-babel-current-result-hash)))
    -         (current-cache (and new-hash (equal new-hash old-hash))))
    -    (cond
    -     (current-cache
    -      (save-excursion		;Return cached result.
    -        (goto-char (org-babel-where-is-src-block-result nil info))
    -        (forward-line)
    -        (skip-chars-forward " \t")
    -        (let ((result (org-babel-read-result)))
    -          (message (replace-regexp-in-string "%" "%%" (format "%S" result)))
    -          result)))
    -     ((org-babel-confirm-evaluate info)
    -      (let* ((lang (nth 0 info))
    -         (result-params (cdr (assq :result-params params)))
    -         ;; Expand noweb references in BODY and remove any
    -         ;; coderef.
    -         (body
    -          (let ((coderef (nth 6 info))
    -            (expand
    -             (if (org-babel-noweb-p params :eval)
    -                 (org-babel-expand-noweb-references info)
    -               (nth 1 info))))
    -            (if (not coderef) expand
    -              (replace-regexp-in-string
    -               (org-src-coderef-regexp coderef) "" expand nil nil 1))))
    -         (dir (cdr (assq :dir params)))
    -         (mkdirp (cdr (assq :mkdirp params)))
    -         (default-directory
    -           (cond
    -            ((not dir) default-directory)
    -            ((member mkdirp '("no" "nil" nil))
    -             (file-name-as-directory (expand-file-name dir)))
    -            (t
    -             (let ((d (file-name-as-directory (expand-file-name dir))))
    -               (make-directory d 'parents)
    -               d))))
    -         (cmd (intern (concat "org-babel-execute:" lang)))
    -         result)
    -        (process-send-string "*MATLAB*" (concat body "\n"))
    -        result))
    -     )))
    -    )
    -  )
    +
    (defun tdh-org-babel-execute-matlab-background (&optional arg info params)
    +  (interactive)
    +  (let* ((org-babel-current-src-block-location
    +      (or org-babel-current-src-block-location
    +          (nth 5 info)
    +          (org-babel-where-is-src-block-head)))
    +     (info (if info (copy-tree info) (org-babel-get-src-block-info))))
    +    ;; Merge PARAMS with INFO before considering source block
    +    ;; evaluation since both could disagree.
    +    (cl-callf org-babel-merge-params (nth 2 info) params)
    +    (when (org-babel-check-evaluate info)
    +      (cl-callf org-babel-process-params (nth 2 info))
    +      (let* ((params (nth 2 info))
    +         (cache (let ((c (cdr (assq :cache params))))
    +              (and (not arg) c (string= "yes" c))))
    +         (new-hash (and cache (org-babel-sha1-hash info :eval)))
    +         (old-hash (and cache (org-babel-current-result-hash)))
    +         (current-cache (and new-hash (equal new-hash old-hash))))
    +    (cond
    +     (current-cache
    +      (save-excursion           ;Return cached result.
    +        (goto-char (org-babel-where-is-src-block-result nil info))
    +        (forward-line)
    +        (skip-chars-forward " \t")
    +        (let ((result (org-babel-read-result)))
    +          (message (replace-regexp-in-string "%" "%%" (format "%S" result)))
    +          result)))
    +     ((org-babel-confirm-evaluate info)
    +      (let* ((lang (nth 0 info))
    +         (result-params (cdr (assq :result-params params)))
    +         ;; Expand noweb references in BODY and remove any
    +         ;; coderef.
    +         (body
    +          (let ((coderef (nth 6 info))
    +            (expand
    +             (if (org-babel-noweb-p params :eval)
    +                 (org-babel-expand-noweb-references info)
    +               (nth 1 info))))
    +            (if (not coderef) expand
    +              (replace-regexp-in-string
    +               (org-src-coderef-regexp coderef) "" expand nil nil 1))))
    +         (dir (cdr (assq :dir params)))
    +         (mkdirp (cdr (assq :mkdirp params)))
    +         (default-directory
    +           (cond
    +            ((not dir) default-directory)
    +            ((member mkdirp '("no" "nil" nil))
    +             (file-name-as-directory (expand-file-name dir)))
    +            (t
    +             (let ((d (file-name-as-directory (expand-file-name dir))))
    +               (make-directory d 'parents)
    +               d))))
    +         (cmd (intern (concat "org-babel-execute:" lang)))
    +         result)
    +        (process-send-string "*MATLAB*" (concat body "\n"))
    +        result))
    +     )))
    +    )
    +  )
     
    @@ -2912,11 +3129,11 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-r

    tdh-matlab-execute-selected

    -
    (defun tdh-matlab-execute-selected (start end)
    -"Execute selected text in the *MATLAB* buffer"
    -  (interactive "r")
    -  (let ((regionp (buffer-substring start end)))
    -      (process-send-string "*MATLAB*" (concat regionp "\n"))))
    +
    (defun tdh-matlab-execute-selected (start end)
    +"Execute selected text in the *MATLAB* buffer"
    +  (interactive "r")
    +  (let ((regionp (buffer-substring start end)))
    +      (process-send-string "*MATLAB*" (concat regionp "\n"))))
     
    @@ -2939,30 +3156,30 @@ if no region is selected, it runs all the code blocks and goes to the next block
    -
    (defun tdh-ctrl-shift-ret ()
    -  (interactive)
    -  (defun tdh-in-src-block-p ()
    -    "Returns t when the point is inside a source code block"
    -    (string= "src" (org-in-block-p '("src"))))
    +
    (defun tdh-ctrl-shift-ret ()
    +  (interactive)
    +  (defun tdh-in-src-block-p ()
    +    "Returns t when the point is inside a source code block"
    +    (string= "src" (org-in-block-p '("src"))))
     
    -  (if (tdh-in-src-block-p)
    -      (let ((lang (nth 0 (org-babel-get-src-block-info))))
    -        (if (string= lang "matlab")
    -            (if (region-active-p)
    -                (tdh-matlab-execute-selected (region-beginning) (region-end))
    -              (progn (tdh-org-babel-execute-matlab-background)
    -                     (org-babel-next-src-block)))
    -          (tdh-ctrl-ret))
    -        )
    -    )
    -  )
    +  (if (tdh-in-src-block-p)
    +      (let ((lang (nth 0 (org-babel-get-src-block-info))))
    +        (if (string= lang "matlab")
    +            (if (region-active-p)
    +                (tdh-matlab-execute-selected (region-beginning) (region-end))
    +              (progn (tdh-org-babel-execute-matlab-background)
    +                     (org-babel-next-src-block)))
    +          (tdh-ctrl-ret))
    +        )
    +    )
    +  )
     
    -
    (map! :after evil-org
    -      :map evil-org-mode-map
    -      :n "<C-S-return>" #'tdh-ctrl-shift-ret)
    +
    (map! :after evil-org
    +      :map evil-org-mode-map
    +      :n "<C-S-return>" #'tdh-ctrl-shift-ret)
     
    @@ -2973,18 +3190,18 @@ if no region is selected, it runs all the code blocks and goes to the next block

    Align Source Blocks

    -
    (defun tdh-align-src-block ()
    -  (interactive)
    -  (defun tdh-in-src-block-p ()
    -    "Returns t when the point is inside a source code block"
    -    (string= "src" (org-in-block-p '("src"))))
    +
    (defun tdh-align-src-block ()
    +  (interactive)
    +  (defun tdh-in-src-block-p ()
    +    "Returns t when the point is inside a source code block"
    +    (string= "src" (org-in-block-p '("src"))))
     
    -  (if (tdh-in-src-block-p)
    -      (progn
    -        (org-edit-special)
    -        (evil-indent (point-min) (point-max))
    -        (org-edit-src-exit))
    -    (org-table-eval-formula)))
    +  (if (tdh-in-src-block-p)
    +      (progn
    +        (org-edit-special)
    +        (evil-indent (point-min) (point-max))
    +        (org-edit-src-exit))
    +    (org-table-eval-formula)))
     
    @@ -2997,14 +3214,14 @@ if no region is selected, it runs all the code blocks and goes to the next block Org-Babel Tangle Sub-tree

    -
    (defun tdh-org-babel-tangle-subtree ()
    -  "Tangle the current subtree"
    -  (interactive)
    -  (progn
    -    (org-narrow-to-subtree)
    -    (org-babel-tangle)
    -    (widen))
    -  )
    +
    (defun tdh-org-babel-tangle-subtree ()
    +  "Tangle the current subtree"
    +  (interactive)
    +  (progn
    +    (org-narrow-to-subtree)
    +    (org-babel-tangle)
    +    (widen))
    +  )
     
    @@ -3012,19 +3229,19 @@ Org-Babel Tangle Sub-tree Org-Tangle and Org-Babel Jump to Tangle File

    -
    (defun tdh-org-babel-jump-to-tangle-file ()
    -  "Jump to tangle file for the source block at point."
    -  (interactive)
    -  (let (file org-babel-pre-tangle-hook org-babel-post-tangle-hook)
    -    (cl-letf (((symbol-function 'write-region) (lambda (start end filename &rest _ignore)
    -                                                 (setq file filename)))
    -              ((symbol-function 'delete-file) #'ignore))
    -      (org-babel-tangle '(4)))
    -    (when file
    -      (setq file (expand-file-name file))
    -      (if (file-readable-p file)
    -          (find-file file)
    -        (error "Cannot open tangle file %S" file)))))
    +
    (defun tdh-org-babel-jump-to-tangle-file ()
    +  "Jump to tangle file for the source block at point."
    +  (interactive)
    +  (let (file org-babel-pre-tangle-hook org-babel-post-tangle-hook)
    +    (cl-letf (((symbol-function 'write-region) (lambda (start end filename &rest _ignore)
    +                                                 (setq file filename)))
    +              ((symbol-function 'delete-file) #'ignore))
    +      (org-babel-tangle '(4)))
    +    (when file
    +      (setq file (expand-file-name file))
    +      (if (file-readable-p file)
    +          (find-file file)
    +        (error "Cannot open tangle file %S" file)))))
     
    @@ -3032,11 +3249,11 @@ Org-Tangle and Org-Babel Jump to Tangle File Map Functions

    -
    (after! org
    -  (map! :map org-mode-map
    -        (:prefix (",b" . "Tangle")
    -        :n  "F" 'tdh-org-babel-jump-to-tangle-file
    -        :n  "T" 'tdh-org-babel-tangle-subtree)))
    +
    (after! org
    +  (map! :map org-mode-map
    +        (:prefix (",b" . "Tangle")
    +        :n  "F" 'tdh-org-babel-jump-to-tangle-file
    +        :n  "T" 'tdh-org-babel-tangle-subtree)))
     
    @@ -3073,68 +3290,76 @@ Nice Functions:
    -
    (use-package! org-ref
    -  :after org
    -  :init
    -  :config
    -  ;; Folder where the notes files are located (or file if just one Note file)
    -  (setq org-ref-notes-directory "~/Cloud/brain")
    -  (setq org-ref-bibliography-notes "~/Cloud/brain")
    +
    (use-package! org-ref
    +  :after org
    +  :init
    +  :config
    +  ;; Folder where the notes files are located (or file if just one Note file)
    +  (setq org-ref-notes-directory "~/Cloud/brain")
    +  (setq org-ref-bibliography-notes "~/Cloud/brain")
     
    -  ;; Bibliography File
    -  (setq reftex-default-bibliography  '("~/Cloud/brain/biblio/references.bib"))
    -  (setq org-ref-default-bibliography '("~/Cloud/brain/biblio/references.bib"))
    +  ;; Bibliography File
    +  (setq reftex-default-bibliography  '("~/Cloud/brain/biblio/references.bib"))
    +  (setq org-ref-default-bibliography '("~/Cloud/brain/biblio/references.bib"))
     
    -  ;; Folder where all the pdf are located
    -  (setq org-ref-pdf-directory "~/Cloud/pdfs")
    +  ;; Folder where all the pdf are located
    +  (setq org-ref-pdf-directory "~/Cloud/pdfs")
     
    -  ;; Tell org-ref to let helm-bibtex find notes for it
    -  (setq org-ref-notes-function
    -        (lambda (thekey)
    -          (let ((bibtex-completion-bibliography (org-ref-find-bibliography)))
    -            (bibtex-completion-edit-notes
    -             (list (car (org-ref-get-bibtex-key-and-file thekey)))))))
    +  (setq org-ref-bibliography-entry-format
    +        '(("article" . "%a, %t, %j, v(%n), %p (%y).")
    +          ("book" . "%a, %t, %u (%y).")
    +          ("techreport" . "%a, %t, %i, %u (%y).")
    +          ("phdthesis" . "%a, %t (%y).")
    +          ("proceedings" . "%e, %t in %S, %u (%y).")
    +          ("inproceedings" . "%a, %t, %p, in %b, edited by %e, %u (%y)")))
     
    -  ;; Problem with speed: don't display broken links
    -  (setq org-ref-show-broken-links t)
    -  ;; Display information on the citation
    -  (setq org-ref-show-citation-on-enter t)
    +  ;; Tell org-ref to let helm-bibtex find notes for it
    +  (setq org-ref-notes-function
    +        (lambda (thekey)
    +          (let ((bibtex-completion-bibliography (org-ref-find-bibliography)))
    +            (bibtex-completion-edit-notes
    +             (list (car (org-ref-get-bibtex-key-and-file thekey)))))))
     
    -  (add-to-list 'org-ref-helm-user-candidates
    -               '("Open pdf in Zathura" . (lambda () (call-process "zathura" nil 0 nil  (concat
    -                                                                                        (file-name-as-directory org-ref-pdf-directory)
    -                                                                                        (car (org-ref-get-bibtex-key-and-file))
    -                                                                                        ".pdf"))))
    -               t)
    +  ;; Problem with speed: don't display broken links
    +  (setq org-ref-show-broken-links t)
    +  ;; Display information on the citation
    +  (setq org-ref-show-citation-on-enter t)
     
    -  (add-to-list 'org-ref-helm-user-candidates
    -               '("Drag and Drop" . (lambda () (call-process "/bin/bash" nil 0 nil "-c" (concat
    -                                                                                        "dragon-drag-and-drop "
    -                                                                                        (file-name-as-directory org-ref-pdf-directory)
    -                                                                                        (car (org-ref-get-bibtex-key-and-file))
    -                                                                                        ".pdf"))))
    -               t)
    +  (add-to-list 'org-ref-helm-user-candidates
    +               '("Open pdf in Zathura" . (lambda () (call-process "zathura" nil 0 nil  (concat
    +                                                                                        (file-name-as-directory org-ref-pdf-directory)
    +                                                                                        (car (org-ref-get-bibtex-key-and-file))
    +                                                                                        ".pdf"))))
    +               t)
     
    -  ;; Let Mathjax deals with equation reference
    -  (defun org-ref-eqref-export (keyword desc format)
    -    (cond
    -     ((eq format 'latex) (format "\\eqref{%s}" keyword))
    -     ((eq format 'html) (format "\\eqref{%s}" keyword))
    -     ((eq format 'md) (format "\\eqref{%s}" keyword))))
    -  )
    +  (add-to-list 'org-ref-helm-user-candidates
    +               '("Drag and Drop" . (lambda () (call-process "/bin/bash" nil 0 nil "-c" (concat
    +                                                                                        "dragon-drag-and-drop "
    +                                                                                        (file-name-as-directory org-ref-pdf-directory)
    +                                                                                        (car (org-ref-get-bibtex-key-and-file))
    +                                                                                        ".pdf"))))
    +               t)
    +
    +  ;; Let Mathjax deals with equation reference
    +  (defun org-ref-eqref-export (keyword desc format)
    +    (cond
    +     ((eq format 'latex) (format "\\eqref{%s}" keyword))
    +     ((eq format 'html) (format "\\eqref{%s}" keyword))
    +     ((eq format 'md) (format "\\eqref{%s}" keyword))))
    +  )
     
    -
    (defun tdh-org-ref-open-pdf-at-point ()
    -  "Open the pdf in external program for bibtex key under point if it exists."
    -  (interactive)
    -  (let* ((results (org-ref-get-bibtex-key-and-file))
    -         (key (car results))
    -         (pdf-file (funcall org-ref-get-pdf-filename-function key)))
    -    (if (file-exists-p pdf-file)
    -        (call-process "zathura" nil 0 nil pdf-file)
    -      (message "no pdf found for %s" key))))
    +
    (defun tdh-org-ref-open-pdf-at-point ()
    +  "Open the pdf in external program for bibtex key under point if it exists."
    +  (interactive)
    +  (let* ((results (org-ref-get-bibtex-key-and-file))
    +         (key (car results))
    +         (pdf-file (funcall org-ref-get-pdf-filename-function key)))
    +    (if (file-exists-p pdf-file)
    +        (call-process "zathura" nil 0 nil pdf-file)
    +      (message "no pdf found for %s" key))))
     
    @@ -3144,37 +3369,37 @@ Nice Functions:

    Org Noter (link)

    -
    (use-package! org-noter
    -  :defer t
    -  :after (:any org pdf-view)
    -  :config
    -  (setq org-noter-always-create-frame nil)
    +
    (use-package! org-noter
    +  :defer t
    +  :after (:any org pdf-view)
    +  :config
    +  (setq org-noter-always-create-frame nil)
     
    -  (setq org-noter-kill-frame-at-session-end nil)
    +  (setq org-noter-kill-frame-at-session-end nil)
     
    -  ;; Fraction of the frame that the document window will occupy when split
    -  (setq org-noter-doc-split-fraction '(0.6 . 0.6))
    +  ;; Fraction of the frame that the document window will occupy when split
    +  (setq org-noter-doc-split-fraction '(0.6 . 0.6))
     
    -  ;; Save the last visited location automatically; when starting a new session, go to that location
    -  (setq org-noter-auto-save-last-location nil)
    +  ;; Save the last visited location automatically; when starting a new session, go to that location
    +  (setq org-noter-auto-save-last-location nil)
     
    -  ;; Add an empty line between each note's heading and content
    -  (setq org-noter-separate-notes-from-heading t)
    +  ;; Add an empty line between each note's heading and content
    +  (setq org-noter-separate-notes-from-heading t)
     
    -  ;; List of paths to check (non recursively) when searching for a notes file
    -  (setq org-noter-notes-search-path "~/Cloud/brain")
    +  ;; List of paths to check (non recursively) when searching for a notes file
    +  (setq org-noter-notes-search-path "~/Cloud/brain")
     
    -  (defun org-noter-init-pdf-view ()
    -    (pdf-view-fit-page-to-window)
    -    (pdf-view-auto-slice-minor-mode)
    -    (run-at-time "0.5 sec" nil #'org-noter))
    -  (add-hook 'pdf-view-mode-hook 'org-noter-init-pdf-view)
    +  (defun org-noter-init-pdf-view ()
    +    (pdf-view-fit-page-to-window)
    +    (pdf-view-auto-slice-minor-mode)
    +    (run-at-time "0.5 sec" nil #'org-noter))
    +  (add-hook 'pdf-view-mode-hook 'org-noter-init-pdf-view)
     
    -  (map!
    -   :map pdf-view-mode-map
    -   (:desc "Insert Note"
    -     :n "i" #'org-noter-insert-note))
    -  )
    +  (map!
    +   :map pdf-view-mode-map
    +   (:desc "Insert Note"
    +     :n "i" #'org-noter-insert-note))
    +  )
     
    @@ -3184,60 +3409,72 @@ Nice Functions:

    Org Roam (link)

    -
    (use-package! org-roam
    -  :custom-face
    -  (org-roam-link ((t (:inherit org-link :foreground "#cc241d"))))
    -  :config
    -  (setq org-roam-directory "~/Cloud/brain/")
    -  (setq org-roam-completion-system 'helm)
    -  (setq org-roam-capture-templates
    -        `(("d" "default" plain (function org-roam--capture-get-point)
    -           "%?"
    -           :file-name "${slug}"
    -           :head ,(concat "#+TITLE: ${title}\n"
    -                          "#+SETUPFILE: ./setup/org-setup-file.org\n"
    -                          "#+HUGO_SECTION: zettels\n"
    -                          "\n"
    -                          "- Tags ::\n"
    -                          "\n"
    -                          "* Bibliography                                                        :ignore:\n"
    -                          "bibliography:./biblio/references.bib"
    -                          )
    -           :unnarrowed t)))
    -  (setq org-roam-capture-ref-templates
    -        `(("r" "ref" plain (function org-roam--capture-get-point)
    -           "%?"
    -           :file-name "${slug}"
    -           :head ,(concat "#+TITLE: ${title}\n"
    -                          "#+SETUPFILE: ./setup/org-setup-file.org\n"
    -                          "#+HUGO_SECTION: websites\n"
    -                          "#+ROAM_KEY: ${ref}\n"
    -                          "\n"
    -                          "- Tags ::\n"
    -                          )
    -           :unnarrowed t)))
    -  )
    +
    (use-package! org-roam
    +  :custom-face
    +  (org-roam-link ((t (:inherit org-link :foreground "#cc241d"))))
    +  :config
    +  (setq org-roam-directory "~/Cloud/brain/")
    +  (setq org-roam-completion-system 'helm)
    +  (setq org-roam-tag-sources '(prop last-directory))
    +  (setq org-roam-capture-templates
    +        `(("d" "default" plain (function org-roam--capture-get-point)
    +           "%?"
    +           :file-name "${slug}"
    +           :head ,(concat "#+TITLE: ${title}\n"
    +                          "#+SETUPFILE: ./setup/org-setup-file.org\n"
    +                          "#+HUGO_SECTION: zettels\n"
    +                          "\n"
    +                          "- Tags ::\n"
    +                          "\n"
    +                          "* Bibliography                                                        :ignore:\n"
    +                          "bibliography:./biblio/references.bib"
    +                          )
    +           :unnarrowed t)))
    +  (setq org-roam-capture-ref-templates
    +        `(("r" "ref" plain (function org-roam--capture-get-point)
    +           "%?"
    +           :file-name "${slug}"
    +           :head ,(concat "#+TITLE: ${title}\n"
    +                          "#+SETUPFILE: ./setup/org-setup-file.org\n"
    +                          "#+HUGO_SECTION: websites\n"
    +                          "#+ROAM_KEY: ${ref}\n"
    +                          "\n"
    +                          "- Tags ::\n"
    +                          )
    +           :unnarrowed t)))
    +  )
     
    +

    +Automatic export of backlinks +

    -
    (defun tdh-org-roam--backlinks-list (file)
    -  (if (org-roam--org-roam-file-p file)
    -      (--reduce-from
    -       (concat acc (format "- [[file:%s][%s]]\n"
    -                           (file-relative-name (car it) org-roam-directory)
    -                           (org-roam--get-title-or-slug (car it))))
    -       "" (org-roam-db-query [:select [from] :from links :where (= to $s1)] file))
    -    ""))
    +
    (after! (org org-roam)
    +  (defun tdh-org-roam--backlinks-list (file)
    +    (when (org-roam--org-roam-file-p file)
    +      (mapcar #'car (org-roam-db-query [:select :distinct [from]
    +                                        :from links
    +                                        :where (= to $s1)
    +                                        :and from :not :like $s2] file "%private%"))))
    +  (defun tdh-org-export-preprocessor (_backend)
    +    (when-let ((links (tdh-org-roam--backlinks-list (buffer-file-name))))
    +      (insert "\nBacklinks:\n")
    +      (dolist (link links)
    +        (insert (format "- [[file:%s][%s]]\n"
    +                        (file-relative-name link org-roam-directory)
    +                        (org-roam--get-title-or-slug link))))))
    +  (add-hook 'org-export-before-processing-hook #'tdh-org-export-preprocessor)
     
    -(defun tdh-org-export-preprocessor (backend)
    -  (let ((links (tdh-org-roam--backlinks-list (buffer-file-name))))
    -    (unless (string= links "")
    -      (save-excursion
    -        (goto-char (point-max))
    -        (insert (concat "\n* Backlinks\n") links)))))
     
    -(add-hook 'org-export-before-processing-hook 'tdh-org-export-preprocessor)
    +  (defun tdh-org-roam-export-all ()
    +    "Re-exports all Org-roam files to Hugo markdown."
    +    (interactive)
    +    (dolist (f (org-roam--list-all-files))
    +      (with-current-buffer (find-file f)
    +        (when (s-contains? "SETUPFILE" (buffer-string))
    +          (org-hugo-export-wim-to-md)))))
    +  )
     
    @@ -3247,79 +3484,93 @@ Nice Functions:

    Helm-Bibtex (link)

    -
    (use-package! helm-bibtex
    -  :after-call helm-bibtex
    -  :init
    -  :config
    -  ;; Bibliography file
    -  (setq bibtex-completion-bibliography "~/Cloud/brain/biblio/references.bib")
    +
    (use-package! helm-bibtex
    +  :after-call helm-bibtex
    +  :init
    +  :config
    +  ;; Bibliography file
    +  (setq bibtex-completion-bibliography "~/Cloud/brain/biblio/references.bib")
     
    -  ;; Directory with all the pdfs
    -  (setq bibtex-completion-library-path "~/Cloud/pdfs")
    +  ;; Directory with all the pdfs
    +  (setq bibtex-completion-library-path "~/Cloud/pdfs/")
     
    -  ;; Directory with notes files
    -  (setq bibtex-completion-notes-path "~/Cloud/brain/")
    +  ;; Directory with notes files
    +  (setq bibtex-completion-notes-path "~/Cloud/brain/")
     
    -  (setq bibtex-completion-notes-extension ".org")
    +  (setq bibtex-completion-notes-extension ".org")
     
    -  (setq bibtex-completion-pdf-extension '(".pdf" ".djvu"))
    +  (setq bibtex-completion-pdf-extension '(".pdf" ".djvu"))
     
    -  ;; Use "tags" field when looking for bib entries
    -  (setq helm-bibtex-additional-search-fields '(tags))
    +  ;; Use "tags" field when looking for bib entries
    +  (setq helm-bibtex-additional-search-fields '(tags))
     
    -  (setq helm-bibtex-full-frame nil)
    +  (setq helm-bibtex-full-frame nil)
     
    -  ;; Display of bibtex entries with helm
    -  (setq bibtex-completion-display-formats
    -        '((t . "${author:36} ${title:*} ${year:4} ${=type=:7} ${=has-note=:1}")))
    +  ;; Display of bibtex entries with helm
    +  (setq bibtex-completion-display-formats
    +        '((t . "${author:36} ${title:*} ${year:4} ${=type=:7} ${=has-note=:1}")))
     
    -  ;; Special symbols for notes and pdf
    -  (setq bibtex-completion-pdf-symbol "⌘")
    -  (setq bibtex-completion-notes-symbol "✎")
    +  ;; Special symbols for notes and pdf
    +  (setq bibtex-completion-pdf-symbol "⌘")
    +  (setq bibtex-completion-notes-symbol "✎")
     
    -  ;; Template used when creating new Note file
    -  (setq bibtex-completion-notes-template-multiple-files (concat "#+TITLE: ${title}\n"
    -                                                                "#+SETUPFILE: ./setup/org-setup-file.org\n"
    -                                                                "#+HUGO_SECTION: ${=type=}\n"
    -                                                                "#+ROAM_KEY: ${=key=}\n"
    -                                                                "\n"
    -                                                                "- Tags ::\n"
    -                                                                "- Reference :: cite:${=key=}\n"
    -                                                                "- Author(s) :: ${author}\n"
    -                                                                "- Year :: ${year}\n"
    -                                                                "\n"
    -                                                                "* ${author-abbrev} (${year}): ${title} :${=type=}:ignore:\n"
    -                                                                ":PROPERTIES:\n"
    -                                                                ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
    -                                                                ":END:\n"
    -                                                                "\n"
    -                                                                "* Bibliography                                                        :ignore:\n"
    -                                                                "bibliography:./biblio/references.bib"
    -                                                                ))
    +  ;; Template used when creating new Note file
    +  (setq bibtex-completion-notes-template-multiple-files (concat "#+TITLE: ${title}\n"
    +                                                                "#+SETUPFILE: ./setup/org-setup-file.org\n"
    +                                                                "#+HUGO_SECTION: ${=type=}\n"
    +                                                                "#+ROAM_KEY: ${=key=}\n"
    +                                                                "\n"
    +                                                                "- Tags ::\n"
    +                                                                "- Reference :: cite:${=key=}\n"
    +                                                                "- Author(s) :: ${author}\n"
    +                                                                "- Year :: ${year}\n"
    +                                                                "\n"
    +                                                                "* ${author-abbrev} (${year}): ${title} :${=type=}:ignore:\n"
    +                                                                ":PROPERTIES:\n"
    +                                                                ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
    +                                                                ":END:\n"
    +                                                                "\n"
    +                                                                "* Bibliography                                                        :ignore:\n"
    +                                                                "bibliography:./biblio/references.bib"
    +                                                                ))
     
    -  ;; Make "Edit notes" the default action
    -  (helm-delete-action-from-source "Edit notes" helm-source-bibtex)
    -  (helm-add-action-to-source "Edit notes" 'helm-bibtex-edit-notes helm-source-bibtex 0)
    +  ;; Make "Edit notes" the default action
    +  (helm-delete-action-from-source "Edit notes" helm-source-bibtex)
    +  (helm-add-action-to-source "Edit notes" 'helm-bibtex-edit-notes helm-source-bibtex 0)
     
    -  (helm-delete-action-from-source "Open PDF Externally" helm-source-bibtex)
    -  (helm-add-action-to-source "Open PDF Externally" 'tdh-open-pdf-externally helm-source-bibtex 1)
    +  (helm-delete-action-from-source "Open PDF Externally" helm-source-bibtex)
    +  (helm-add-action-to-source "Open PDF Externally" 'tdh-open-pdf-externally helm-source-bibtex 1)
     
    -  (helm-add-action-to-source "Insert Link to Note" 'tdh-insert-link-to-note helm-source-bibtex 2)
    -  )
    +  (helm-add-action-to-source "Insert Link to Note" 'tdh-insert-link-to-note helm-source-bibtex 2)
    +
    +  (helm-add-action-to-source "Insert E-Reader Link" 'tdh-insert-link-to-pdf-entry helm-source-bibtex 3)
    +  )
     
    -
    (defun tdh-insert-link-to-note (key)
    -  "Insert a link to a note associated with the bibtex entry."
    -  (if (and bibtex-completion-notes-path
    -           (f-directory? bibtex-completion-notes-path))
    -      (let* ((path (f-join bibtex-completion-notes-path
    -                           (s-concat key bibtex-completion-notes-extension))))
    -        (if (file-exists-p path)
    -            (insert (concat "[[" (file-relative-name path) "][Notes]]"))
    -          (message "No note file associated"))
    -        )))
    +
    (defun tdh-insert-link-to-pdf-entry (key)
    +  "Insert a link to a pdf associated with the bibtex entry."
    +  (let*
    +      ((entry (bibtex-completion-get-entry key))
    +       (title (bibtex-completion-get-value "title" entry)))
    +    (insert (concat "[[file:Download/" key ".pdf][" title "]] (cite:" key ")"))
    +    )
    +  )
    +
    +
    + +
    +
    (defun tdh-insert-link-to-note (key)
    +  "Insert a link to a note associated with the bibtex entry."
    +  (if (and bibtex-completion-notes-path
    +           (f-directory? bibtex-completion-notes-path))
    +      (let* ((path (f-join bibtex-completion-notes-path
    +                           (s-concat key bibtex-completion-notes-extension))))
    +        (if (file-exists-p path)
    +            (insert (concat "[[file:" (file-relative-name path) "][Notes]]"))
    +          (message "No note file associated"))
    +        )))
     
    @@ -3327,8 +3578,8 @@ Nice Functions: Open pdf externally

    -
    (defun tdh-open-pdf-externally (key)
    -  (call-process "zathura" nil 0 nil (nth 0 (-cons-to-list (bibtex-completion-find-pdf key)))))
    +
    (defun tdh-open-pdf-externally (key)
    +  (call-process "zathura" nil 0 nil (nth 0 (-cons-to-list (bibtex-completion-find-pdf key)))))
     
    @@ -3336,10 +3587,10 @@ Open pdf externally Special Commands

    -
    (defun tdh-helm-bibtex-favorites (&optional arg)
    -  "Search Favorite BibTeX entries"
    -  (interactive "P")
    -  (helm-bibtex arg nil "favorite "))
    +
    (defun tdh-helm-bibtex-favorites (&optional arg)
    +  "Search Favorite BibTeX entries"
    +  (interactive "P")
    +  (helm-bibtex arg nil "favorite "))
     
    @@ -3347,24 +3598,24 @@ Special Commands List all element of the bibliography without pdf associated

    -
    (defun tdh-list-bib-without-pdf-associated ()
    -  (interactive)
    -  (bibtex-completion-init)
    -  (setq candidates (bibtex-completion-candidates))
    +
    (defun tdh-list-bib-without-pdf-associated ()
    +  (interactive)
    +  (bibtex-completion-init)
    +  (setq candidates (bibtex-completion-candidates))
     
    -  (defun canditate-is-pdf-present (candidate)
    -    (bibtex-completion-find-pdf-in-library (cdr (assoc "=key=" candidate)))
    -    )
    +  (defun canditate-is-pdf-present (candidate)
    +    (bibtex-completion-find-pdf-in-library (cdr (assoc "=key=" candidate)))
    +    )
     
    -  (setq candidates-without-pdf (remove-if #'canditate-is-pdf-present candidates))
    +  (setq candidates-without-pdf (remove-if #'canditate-is-pdf-present candidates))
     
    -  (setq candidate-without-pdf-names (mapcar
    -                                     (lambda (x) (cdr (assoc "title" x)))
    -                                     candidates-without-pdf))
    +  (setq candidate-without-pdf-names (mapcar
    +                                     (lambda (x) (cdr (assoc "title" x)))
    +                                     candidates-without-pdf))
     
    -  (with-output-to-temp-buffer "*bib-without-pdf*" (princ (string-join candidate-without-pdf-names "\n")))
    -  (switch-to-buffer-other-window "*bib-without-pdf*")
    -  )
    +  (with-output-to-temp-buffer "*bib-without-pdf*" (princ (string-join candidate-without-pdf-names "\n")))
    +  (switch-to-buffer-other-window "*bib-without-pdf*")
    +  )
     
    @@ -3374,9 +3625,9 @@ List all element of the bibliography without pdf associated

    Deft

    -
    (use-package! deft
    -  :custom
    -  (deft-directory "~/Cloud/brain/"))
    +
    (use-package! deft
    +  :custom
    +  (deft-directory "~/Cloud/brain/"))
     
    @@ -3395,77 +3646,58 @@ Provides nice functions such as:
    -
    (use-package! org-roam-bibtex
    -  :hook (org-roam-mode . org-roam-bibtex-mode)
    -  :config
    -  (setq org-roam-bibtex-preformat-keywords `("=key=" "title" "author" "year" "author-abbrev" "=type="))
    +
    (use-package! org-roam-bibtex
    +  :hook (org-roam-mode . org-roam-bibtex-mode)
    +  :config
    +  (setq orb-preformat-keywords `("=key=" "title" "author" "year" "author-abbrev" "=type="))
     
    -  (setq org-roam-bibtex-templates
    -        `(("r" "ref" plain (function org-roam-capture--get-point) ""
    -           :file-name "${=key=}"
    -           :head ,(concat "#+TITLE: ${title}\n"
    -                          "#+SETUPFILE: ./setup/org-setup-file.org\n"
    -                          "#+HUGO_SECTION: ${=type=}\n"
    -                          "#+ROAM_KEY: ${ref}\n"
    -                          "\n"
    -                          "- Tags ::\n"
    -                          "- Reference :: ${ref}\n"
    -                          "- Author(s) :: ${author}\n"
    -                          "- Year :: ${year}\n"
    -                          "\n"
    -                          "* ${author-abbrev} (${year}): ${title} :${=type=}:ignore:\n"
    -                          ":PROPERTIES:\n"
    -                          ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
    -                          ":END:\n"
    -                          "\n"
    -                          "* Bibliography                                                        :ignore:\n"
    -                          "bibliography:./biblio/references.bib"
    -                          )
    -           :unnarrowed t)))
    +  (setq orb-templates
    +        `(("r" "ref" plain (function org-roam-capture--get-point) ""
    +           :file-name "${=key=}"
    +           :head ,(concat "#+TITLE: ${title}\n"
    +                          "#+SETUPFILE: ./setup/org-setup-file.org\n"
    +                          "#+HUGO_SECTION: ${=type=}\n"
    +                          "#+ROAM_KEY: ${ref}\n"
    +                          "\n"
    +                          "- Tags ::\n"
    +                          "- Reference :: ${ref}\n"
    +                          "- Author(s) :: ${author}\n"
    +                          "- Year :: ${year}\n"
    +                          "\n"
    +                          "* ${author-abbrev} (${year}): ${title} :${=type=}:ignore:\n"
    +                          ":PROPERTIES:\n"
    +                          ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
    +                          ":END:\n"
    +                          "\n"
    +                          "* Bibliography                                                        :ignore:\n"
    +                          "bibliography:./biblio/references.bib"
    +                          )
    +           :unnarrowed t)))
     
    -  (setq orb-note-actions-user '(("Open with Zathura" . tdh-open-bib-with-zathura)))
    -  )
    +  (setq orb-note-actions-user '(("Open with Zathura" . tdh-open-bib-with-zathura)))
    +  )
     
    -
    (defun tdh-open-bib-with-zathura (key)
    -  "Open the pdf corresponding to the reference KEY with Zathura"
    -  (if (listp key)
    -      (setq key (car key)))
    -  (call-process "zathura" nil 0 nil (org-ref-get-pdf-filename key)))
    +
    (defun tdh-open-bib-with-zathura (key)
    +  "Open the pdf corresponding to the reference KEY with Zathura"
    +  (if (listp key)
    +      (setq key (car key)))
    +  (call-process "zathura" nil 0 nil (org-ref-get-pdf-filename key)))
     
    -
    -

    Org-Ref-Ox-Hugo (link)

    -
    -

    -This package is used to correctly format the bibliography and links when exporting to hugo. -

    - +
    +

    Citeproc-org (link)

    +
    -
    (use-package! org-ref-ox-hugo
    -  :load-path "~/.config/doom/packages/org-ref-ox-hugo/"
    -  :config
    -  (add-to-list 'org-ref-formatted-citation-formats
    -               '("md"
    -                 ("article" . "${author}, *${title}*, ${journal}, *${volume}(${number})*, ${pages} (${year}). ${doi}")
    -                 ("inproceedings" . "${author}, *${title}*, In ${editor}, ${booktitle} (pp. ${pages}) (${year}). ${address}: ${publisher}.")
    -                 ("book" . "${author}, *${title}* (${year}), ${address}: ${publisher}.")
    -                 ("phdthesis" . "${author}, *${title}* (${year}). ${school}.")
    -                 ("inbook" . "${author}, *${title}*, In ${editor} (Eds.), ${booktitle} (pp. ${pages}) (${year}). ${address}: ${publisher}.")
    -                 ("incollection" . "${author}, *${title}*, In ${editor} (Eds.), ${booktitle} (pp. ${pages}) (${year}). ${address}: ${publisher}.")
    -                 ("proceedings" . "${editor} (Eds.), _${booktitle}_ (${year}). ${address}: ${publisher}.")
    -                 ("unpublished" . "${author}, *${title}* (${year}). Unpublished manuscript.")
    -                 ("misc" . "${author} (${year}). *${title}*. Retrieved from [${howpublished}](${howpublished}). ${note}.")
    -                 (nil . "${author}, *${title}* (${year}).")))
    -
    -  (setq reference-link-class "reference-link")
    -  (setq bibtex-entry-class "bibtex-entry")
    -  )
    +
    (use-package! citeproc-org
    +  :after org
    +  :config
    +  (citeproc-org-setup))
     
    @@ -3485,7 +3717,7 @@ This package is used to correctly format the bibliography and links when exporti

    Master file

    -
    (setq-default TeX-master nil)
    +
    (setq-default TeX-master nil)
     
    @@ -3495,20 +3727,20 @@ This package is used to correctly format the bibliography and links when exporti

    Clean Output Files

    -
    (defun tdh-latex-clean ()
    -  "Clean LaTeX output using latexmk"
    -  (interactive)
    -  (async-shell-command
    -   ;; command and parameters
    -   "latexmk -c "
    -   (shell-quote-argument buffer-file-name)
    -   " &"
    -   ))
    +
    (defun tdh-latex-clean ()
    +  "Clean LaTeX output using latexmk"
    +  (interactive)
    +  (async-shell-command
    +   ;; command and parameters
    +   "latexmk -c "
    +   (shell-quote-argument buffer-file-name)
    +   " &"
    +   ))
     
    -(map! :map LaTeX-mode-map
    -      :n ",C" 'tdh-latex-clean)
    +(map! :map LaTeX-mode-map
    +      :n ",C" 'tdh-latex-clean)
     
    -(add-hook 'TeX-mode-hook #'TeX-fold-mode)
    +(add-hook 'TeX-mode-hook #'TeX-fold-mode)
     
    @@ -3518,12 +3750,12 @@ This package is used to correctly format the bibliography and links when exporti

    PDF Viewer

    -
    (setq TeX-view-program-selection '((output-pdf "Zathura")))
    -(setq TeX-source-correlate-mode t)
    -(setq TeX-source-correlate-start-server t)
    -(setq TeX-source-correlate-method 'synctex)
    -(setq TeX-view-program-list
    -      '(("PDF Tools" TeX-pdf-tools-sync-view)))
    +
    (setq TeX-view-program-selection '((output-pdf "Zathura")))
    +(setq TeX-source-correlate-mode t)
    +(setq TeX-source-correlate-start-server t)
    +(setq TeX-source-correlate-method 'synctex)
    +(setq TeX-view-program-list
    +      '(("PDF Tools" TeX-pdf-tools-sync-view)))
     
    @@ -3533,9 +3765,9 @@ This package is used to correctly format the bibliography and links when exporti

    Bibtex

    -
    (use-package! bibtex
    -  :config
    -  (bibtex-set-dialect 'BibTeX))
    +
    (use-package! bibtex
    +  :config
    +  (bibtex-set-dialect 'BibTeX))
     
    @@ -3554,9 +3786,10 @@ This package is used to correctly format the bibliography and links when exporti

    Setup Matlab Mode

    -
    (setq matlab-shell-command "/home/thomas/.local/bin/matlab")
    -(setq matlab-shell-command-switches (list "-nodesktop -nosplash"))
    -(setq mlint-programs '("mlint" "/home/thomas/.local/bin/mlint"))
    +
    (setq matlab-shell-command "/home/thomas/.local/bin/matlab")
    +(setq matlab-shell-command-switches (list "-softwareopengl -nodesktop -nosplash"))
    +(setq matlab-indent-function t)
    +(setq mlint-programs '("mlint" "/home/thomas/.local/bin/mlint"))
     
    @@ -3566,19 +3799,19 @@ This package is used to correctly format the bibliography and links when exporti

    Setup Flycheck to work with mlint

    -
    (defvar mlint-executable "/home/thomas/.local/bin/mlint")
    +
    (defvar mlint-executable "/home/thomas/.local/bin/mlint")
     
    -(flycheck-define-command-checker 'matlab-mlint
    -  "A Matlab checker based on mlint."
    -  :command `(,mlint-executable source)
    -  :error-patterns
    -  '((warning line-start "L " line " (C " (1+ digit)  "): " (message) line-end))
    -  :modes '(matlab-mode))
    +(flycheck-define-command-checker 'matlab-mlint
    +  "A Matlab checker based on mlint."
    +  :command `(,mlint-executable source)
    +  :error-patterns
    +  '((warning line-start "L " line " (C " (1+ digit)  "): " (message) line-end))
    +  :modes '(matlab-mode))
     
    -(add-to-list 'flycheck-checkers 'matlab-mlint)
    +(add-to-list 'flycheck-checkers 'matlab-mlint)
     
    -;; Automatic startup of flycheck for matlab
    -(add-hook 'matlab-mode-hook 'flycheck-mode)
    +;; Automatic startup of flycheck for matlab
    +(add-hook 'matlab-mode-hook 'flycheck-mode)
     
    @@ -3588,8 +3821,8 @@ This package is used to correctly format the bibliography and links when exporti

    Completion in the Matlab Shell

    -
    (map! :map matlab-shell-mode-map
    -      :i "<tab>" 'matlab-shell-tab)
    +
    (map! :map matlab-shell-mode-map
    +      :i "<tab>" 'matlab-shell-tab)
     
    @@ -3599,18 +3832,18 @@ This package is used to correctly format the bibliography and links when exporti

    Beautify code

    -
    (defun tdh-matlab-beautify-buffer ()
    -  "Beautify Current Matlab Buffer"
    -  (interactive)
    -  ;; First verifies is the current file is a Matlab file
    -  (if (string= (file-name-extension (buffer-file-name)) "m")
    -      (progn
    -        (save-buffer)
    -        (matlab-shell-run-command (concat "MBeautify.formatFileNoEditor(\"" (buffer-file-name) "\", \"" (buffer-file-name) "\")"))
    -        (revert-buffer :ignore-auto :noconfirm))
    -    (message "Current buffer is not a matlab file")
    -    )
    -  )
    +
    (defun tdh-matlab-beautify-buffer ()
    +  "Beautify Current Matlab Buffer"
    +  (interactive)
    +  ;; First verifies is the current file is a Matlab file
    +  (if (string= (file-name-extension (buffer-file-name)) "m")
    +      (progn
    +        (save-buffer)
    +        (matlab-shell-run-command (concat "MBeautify.formatFileNoEditor(\"" (buffer-file-name) "\", \"" (buffer-file-name) "\")"))
    +        (revert-buffer :ignore-auto :noconfirm))
    +    (message "Current buffer is not a matlab file")
    +    )
    +  )
     
    @@ -3620,46 +3853,57 @@ This package is used to correctly format the bibliography and links when exporti

    Key Bindings

    -
    (defun tdh-matlab-add-breakpoint ()
    -  (interactive)
    -  (matlab-shell-run-command (concat "dbstop in " (buffer-name) " at " (number-to-string (line-number-at-pos nil)))))
    +
    (defun tdh-matlab-add-breakpoint ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "dbstop in " (buffer-name) " at " (number-to-string (line-number-at-pos nil)))))
     
    -(defun tdh-matlab-remove-breakpoint ()
    -  (interactive)
    -  (matlab-shell-run-command (concat "dbclear in " (buffer-name) " at " (number-to-string (line-number-at-pos nil)))))
    +(defun tdh-matlab-remove-breakpoint ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "dbclear in " (buffer-name) " at " (number-to-string (line-number-at-pos nil)))))
     
    -(defun tdh-matlab-list-breakpoints ()
    -  (interactive)
    -  (matlab-shell-run-command (concat "dbstatus " (buffer-name))))
    +(defun tdh-matlab-list-breakpoints ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "dbstatus " (buffer-name))))
     
    -(defun tdh-matlab-clear-breakpoints ()
    -  (interactive)
    -  (matlab-shell-run-command (concat "dbclear in " (buffer-name))))
    +(defun tdh-matlab-clear-breakpoints ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "dbclear in " (buffer-name))))
     
    -(defun tdh-matlab-go-to-file-directory ()
    -  (interactive)
    -  (matlab-shell-run-command (concat "cd " (file-name-directory buffer-file-name))))
    +(defun tdh-matlab-no-debug-on-error ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "dbclear if error")))
    +
    +(defun tdh-matlab-debug-on-error ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "dbstop if error")))
    +
    +(defun tdh-matlab-go-to-file-directory ()
    +  (interactive)
    +  (matlab-shell-run-command (concat "cd " (file-name-directory buffer-file-name))))
     
    -
    (map! :map matlab-mode-map
    -      :n ",g" 'tdh-matlab-go-to-file-directory
    -      :n ",da" 'tdh-matlab-add-breakpoint
    -      :n ",dr" 'tdh-matlab-remove-breakpoint
    -      :n ",dL" 'tdh-matlab-list-breakpoints
    -      :n ",dc" 'tdh-matlab-clear-breakpoints
    -      :n ",dl" 'gud-cont
    -      :n ",ds" 'gud-step
    -      :n ",dn" 'gud-next
    -      :n ",dq" 'gud-finish)
    +
    (map! :map matlab-mode-map
    +      (:prefix ("," . "prefix")
    +       :n "g" 'tdh-matlab-go-to-file-directory
    +       (:prefix ("d" . "Debug")
    +        :n "de" 'tdh-matlab-debug-on-error
    +        :n "dE" 'tdh-matlab-no-debug-on-error
    +        :n "da" 'tdh-matlab-add-breakpoint
    +        :n "dr" 'tdh-matlab-remove-breakpoint
    +        :n "dL" 'tdh-matlab-list-breakpoints
    +        :n "dc" 'tdh-matlab-clear-breakpoints
    +        :n "dl" 'gud-cont
    +        :n "ds" 'gud-step
    +        :n "dn" 'gud-next
    +        :n "dq" 'gud-finish)))
     
    -

    Mu4e

    @@ -3747,14 +3991,14 @@ Send math and source code: This is a helper to help determine which account context I am in based on the folder in my maildir the email (eg. ~/.mail/nine27) is located in.

    -
    (defun mu4e-message-maildir-matches (msg rx)
    -  (when rx
    -    (if (listp rx)
    -        ;; If rx is a list, try each one for a match
    -        (or (mu4e-message-maildir-matches msg (car rx))
    -            (mu4e-message-maildir-matches msg (cdr rx)))
    -      ;; Not a list, check rx
    -      (string-match rx (mu4e-message-field msg :maildir)))))
    +
    (defun mu4e-message-maildir-matches (msg rx)
    +  (when rx
    +    (if (listp rx)
    +        ;; If rx is a list, try each one for a match
    +        (or (mu4e-message-maildir-matches msg (car rx))
    +            (mu4e-message-maildir-matches msg (cdr rx)))
    +      ;; Not a list, check rx
    +      (string-match rx (mu4e-message-field msg :maildir)))))
     
    @@ -3762,18 +4006,18 @@ This is a helper to help determine which account context I am in based on the fo Choose account label to feed msmtp -a option based on From header in Message buffer; This function must be added to message-send-mail-hook for on-the-fly change of From address before sending message since message-send-mail-hook is processed right before sending message.

    -
    (defun choose-msmtp-account ()
    -  (if (message-mail-p)
    -      (save-excursion
    -        (let*
    -            ((from (save-restriction
    -                     (message-narrow-to-headers)
    -                     (message-fetch-field "from")))
    -             (account
    -              (cond
    -               ((string-match "dehaeze.thomas@gmail.com" from) "gmail")
    -               ((string-match "thomas.dehaeze@esrf.fr" from) "esrf"))))
    -          (setq message-sendmail-extra-arguments (list '"-a" account))))))
    +
    (defun choose-msmtp-account ()
    +  (if (message-mail-p)
    +      (save-excursion
    +        (let*
    +            ((from (save-restriction
    +                     (message-narrow-to-headers)
    +                     (message-fetch-field "from")))
    +             (account
    +              (cond
    +               ((string-match "dehaeze.thomas@gmail.com" from) "gmail")
    +               ((string-match "thomas.dehaeze@esrf.fr" from) "esrf"))))
    +          (setq message-sendmail-extra-arguments (list '"-a" account))))))
     
    @@ -3783,23 +4027,23 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Basic Config

    -
    (use-package! mu4e
    -  :config
    -  (setq mail-user-agent 'mu4e-user-agent
    -        mu4e-mu-binary "/usr/bin/mu"
    -        mu4e-maildir "~/.mail"
    -        mu4e-compose-format-flowed t
    -        mu4e-compose-in-new-frame nil
    -        mu4e-view-show-images t
    -        mu4e-html2text-command "w3m -dump -T text/html"
    -        mu4e-use-fancy-chars t
    -        mu4e-headers-include-related t
    -        mu4e-attachment-dir  "~/Downloads"
    -        message-kill-buffer-on-exit t
    -        mu4e-compose-signature-auto-include t
    -        mu4e-view-show-images t
    -        mu4e-view-show-addresses t)
    -  )
    +
    (use-package! mu4e
    +  :config
    +  (setq mail-user-agent 'mu4e-user-agent
    +        mu4e-mu-binary "/usr/bin/mu"
    +        mu4e-maildir "~/.mail"
    +        mu4e-compose-format-flowed t
    +        mu4e-compose-in-new-frame nil
    +        mu4e-view-show-images t
    +        mu4e-html2text-command "w3m -dump -T text/html"
    +        mu4e-use-fancy-chars t
    +        mu4e-headers-include-related t
    +        mu4e-attachment-dir  "~/Downloads"
    +        message-kill-buffer-on-exit t
    +        mu4e-compose-signature-auto-include t
    +        mu4e-view-show-images t
    +        mu4e-view-show-addresses t)
    +  )
     
    @@ -3809,26 +4053,26 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Additional config

    -
    (use-package! mu4e
    -  :config
    -  ;; Use imagemagick, if available.
    -  (when (fboundp 'imagemagick-register-types)
    -    (imagemagick-register-types))
    +
    (use-package! mu4e
    +  :config
    +  ;; Use imagemagick, if available.
    +  (when (fboundp 'imagemagick-register-types)
    +    (imagemagick-register-types))
     
    -  ;; Sometimes html email is just not readable in a text based client, this lets me open the
    -  ;; email in my browser.
    -  (add-to-list 'mu4e-view-actions '("View in browser" . mu4e-action-view-in-browser) t)
    +  ;; Sometimes html email is just not readable in a text based client, this lets me open the
    +  ;; email in my browser.
    +  (add-to-list 'mu4e-view-actions '("View in browser" . mu4e-action-view-in-browser) t)
     
    -  ;; Spell checking ftw.
    -  (add-hook 'mu4e-compose-mode-hook 'flyspell-mode)
    +  ;; Spell checking ftw.
    +  (add-hook 'mu4e-compose-mode-hook 'flyspell-mode)
     
    -  ;; Use Helm to select mailboxes
    -  (setq mu4e-completing-read-function 'completing-read)
    -  ;; Don't ask for a 'context' upon opening mu4e
    -  (setq mu4e-context-policy 'pick-first)
    -  ;; Don't ask to quit... why is this the default?
    -  (setq mu4e-confirm-quit nil)
    -  )
    +  ;; Use Helm to select mailboxes
    +  (setq mu4e-completing-read-function 'completing-read)
    +  ;; Don't ask for a 'context' upon opening mu4e
    +  (setq mu4e-context-policy 'pick-first)
    +  ;; Don't ask to quit... why is this the default?
    +  (setq mu4e-confirm-quit nil)
    +  )
     
    @@ -3838,17 +4082,17 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Provide Information

    -
    (use-package! mu4e
    -  :config
    -  (setq mu4e-user-mail-address-list '("dehaeze.thomas@gmail.com" "thomas.dehaeze@esrf.fr")
    -        mu4e-compose-signature "Thomas Dehaeze\n"
    -        user-mail-address "dehaeze.thomas@gmail.com")
    -  ;; Default Folders
    -  (setq mu4e-sent-folder "/gmail/Sent"
    -        mu4e-drafts-folder "/gmail/Drafts"
    -        mu4e-trash-folder "/gmail/Trash"
    -        mu4e-refile-folder "/gmail/Archive")
    -  )
    +
    (use-package! mu4e
    +  :config
    +  (setq mu4e-user-mail-address-list '("dehaeze.thomas@gmail.com" "thomas.dehaeze@esrf.fr")
    +        mu4e-compose-signature "Thomas Dehaeze\n"
    +        user-mail-address "dehaeze.thomas@gmail.com")
    +  ;; Default Folders
    +  (setq mu4e-sent-folder "/gmail/Sent"
    +        mu4e-drafts-folder "/gmail/Drafts"
    +        mu4e-trash-folder "/gmail/Trash"
    +        mu4e-refile-folder "/gmail/Archive")
    +  )
     
    @@ -3858,12 +4102,12 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Receiving emails using mbsync

    -
    (use-package! mu4e
    -  :config
    -  (setq mu4e-get-mail-command "checkmail"
    -        mu4e-update-interval nil
    -        mu4e-change-filenames-when-moving t) ;; Fix for mbsync
    -  )
    +
    (use-package! mu4e
    +  :config
    +  (setq mu4e-get-mail-command "checkmail"
    +        mu4e-update-interval nil
    +        mu4e-change-filenames-when-moving t) ;; Fix for mbsync
    +  )
     
    @@ -3873,41 +4117,41 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Contexts

    -
    (use-package! mu4e
    -  :config
    -  (setq mu4e-contexts
    -        `( ,(make-mu4e-context
    -             :name "gmail"
    -             :enter-func (lambda () (mu4e-message "Switch to the gmail context"))
    -             :match-func (lambda (msg) (when msg
    -                                         (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
    -             :leave-func (lambda () (mu4e-clear-caches))
    -             :vars '(
    -                     (user-mail-address . "dehaeze.thomas@gmail.com")
    -                     (user-full-name        . "Thomas Dehaeze")
    -                     (mu4e-sent-folder . "/gmail/Sent")
    -                     (mu4e-trash-folder . "/gmail/Trash")
    -                     (mu4e-drafts-folder . "/gmail/Drafts")
    -                     (mu4e-refile-folder . "/gmail/Archive")
    -                     (mu4e-compose-signature  . "Thomas Dehaeze\n")
    -                     ))
    -           ,(make-mu4e-context
    -             :name "esrf"
    -             :enter-func (lambda () (mu4e-message "Switch to the esrf context"))
    -             :match-func (lambda (msg) (when msg
    -                                         (string-prefix-p "/esrf" (mu4e-message-field msg :maildir))))
    -             :leave-func (lambda () (mu4e-clear-caches))
    -             :vars '(
    -                     (user-mail-address . "thomas.dehaeze@esrf.fr")
    -                     (user-full-name        . "Thomas Dehaeze")
    -                     (mu4e-sent-folder . "/esrf/Sent")
    -                     (mu4e-trash-folder . "/esrf/Trash")
    -                     (mu4e-drafts-folder . "/esrf/Drafts")
    -                     (mu4e-refile-folder . "/esrf/Archive")
    -                     (mu4e-compose-signature  . "Thomas Dehaeze\n")
    -                     ))
    -           ))
    -  )
    +
    (use-package! mu4e
    +  :config
    +  (setq mu4e-contexts
    +        `( ,(make-mu4e-context
    +             :name "gmail"
    +             :enter-func (lambda () (mu4e-message "Switch to the gmail context"))
    +             :match-func (lambda (msg) (when msg
    +                                         (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
    +             :leave-func (lambda () (mu4e-clear-caches))
    +             :vars '(
    +                     (user-mail-address . "dehaeze.thomas@gmail.com")
    +                     (user-full-name        . "Thomas Dehaeze")
    +                     (mu4e-sent-folder . "/gmail/Sent")
    +                     (mu4e-trash-folder . "/gmail/Trash")
    +                     (mu4e-drafts-folder . "/gmail/Drafts")
    +                     (mu4e-refile-folder . "/gmail/Archive")
    +                     (mu4e-compose-signature  . "Thomas Dehaeze\n")
    +                     ))
    +           ,(make-mu4e-context
    +             :name "esrf"
    +             :enter-func (lambda () (mu4e-message "Switch to the esrf context"))
    +             :match-func (lambda (msg) (when msg
    +                                         (string-prefix-p "/esrf" (mu4e-message-field msg :maildir))))
    +             :leave-func (lambda () (mu4e-clear-caches))
    +             :vars '(
    +                     (user-mail-address . "thomas.dehaeze@esrf.fr")
    +                     (user-full-name        . "Thomas Dehaeze")
    +                     (mu4e-sent-folder . "/esrf/Sent")
    +                     (mu4e-trash-folder . "/esrf/Trash")
    +                     (mu4e-drafts-folder . "/esrf/Drafts")
    +                     (mu4e-refile-folder . "/esrf/Archive")
    +                     (mu4e-compose-signature  . "Thomas Dehaeze\n")
    +                     ))
    +           ))
    +  )
     
    @@ -3917,19 +4161,19 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Sending mails

    -
    (use-package! mu4e
    -  :config
    -  (setq message-send-mail-function 'message-send-mail-with-sendmail
    -        sendmail-program "/usr/bin/msmtp"
    -        user-full-name "Thomas Dehaeze")
    +
    (use-package! mu4e
    +  :config
    +  (setq message-send-mail-function 'message-send-mail-with-sendmail
    +        sendmail-program "/usr/bin/msmtp"
    +        user-full-name "Thomas Dehaeze")
     
    -  ;; This prevents saving the email to the Sent folder since gmail will do this for us on their end.
    -  (setq mu4e-sent-messages-behavior 'delete)
    +  ;; This prevents saving the email to the Sent folder since gmail will do this for us on their end.
    +  (setq mu4e-sent-messages-behavior 'delete)
     
    -  ;; Use the correct account context when sending mail based on the from header.
    -  (setq message-sendmail-envelope-from 'header)
    -  (add-hook 'message-send-mail-hook 'choose-msmtp-account)
    -  )
    +  ;; Use the correct account context when sending mail based on the from header.
    +  (setq message-sendmail-envelope-from 'header)
    +  (add-hook 'message-send-mail-hook 'choose-msmtp-account)
    +  )
     
    @@ -3939,16 +4183,16 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Bookmarks

    -
    (use-package! mu4e
    -  :config
    -  (setq mu4e-bookmarks `(,(make-mu4e-bookmark
    -                          :name "All Inboxes"
    -                          :query "maildir:/gmail/Inbox OR maildir:/esrf/Inbox"
    -                          :key ?i)
    -                         ("flag:unread" "Unread messages" ?u)
    -                         ("date:today..now" "Today's messages" ?t)
    -                         ("date:7d..now" "Last 7 days" ?w)))
    -  )
    +
    (use-package! mu4e
    +  :config
    +  (setq mu4e-bookmarks `(,(make-mu4e-bookmark
    +                          :name "All Inboxes"
    +                          :query "maildir:/gmail/Inbox OR maildir:/esrf/Inbox"
    +                          :key ?i)
    +                         ("flag:unread" "Unread messages" ?u)
    +                         ("date:today..now" "Today's messages" ?t)
    +                         ("date:7d..now" "Last 7 days" ?w)))
    +  )
     
    @@ -3959,95 +4203,99 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Doom init.el

    -
    (when noninteractive
    -  (after! undo-tree
    -    (global-undo-tree-mode -1)))
    +
    (when noninteractive
    +  (after! undo-tree
    +    (global-undo-tree-mode -1)))
     
    -(doom! :completion
    -       company           ; the ultimate code completion backend
    -       helm              ; the *other* search engine for love and life
    -       ivy               ; a search engine for love and life
    +(doom! :completion
    +       company           ; the ultimate code completion backend
    +       helm              ; the *other* search engine for love and life
    +       ivy               ; a search engine for love and life
     
    -       :ui
    -       doom              ; what makes DOOM look the way it does
    +       :ui
    +       doom              ; what makes DOOM look the way it does
            deft
    -       hl-todo           ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
    +       hl-todo           ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
            hydra
    -       (modeline
    -        +light)          ; snazzy, Atom-inspired modeline, plus API
    -       ophints           ; highlight the region an operation acts on
    -       (popup            ; tame sudden yet inevitable temporary windows
    -        +all             ; catch all popups that start with an asterix
    -        +defaults)       ; default popup rules
    -       unicode           ; extended unicode support for various languages
    -       vc-gutter         ; vcs diff in the fringe
    -       vi-tilde-fringe   ; fringe tildes to mark beyond EOB
    -       workspaces        ; tab emulation, persistence & separate workspaces
    +       modeline
    +       ophints           ; highlight the region an operation acts on
    +       (popup            ; tame sudden yet inevitable temporary windows
    +        +all             ; catch all popups that start with an asterix
    +        +defaults)       ; default popup rules
    +       unicode           ; extended unicode support for various languages
    +       vc-gutter         ; vcs diff in the fringe
    +       vi-tilde-fringe   ; fringe tildes to mark beyond EOB
    +       workspaces        ; tab emulation, persistence & separate workspaces
    +       (emoji +unicode)
     
    -       :editor
    -       (evil +everywhere); come to the dark side, we have cookies
    -       fold              ; (nigh) universal code folding
    -       rotate-text       ; cycle region at point between text candidates
    -       snippets          ; my elves. They type so I don't have to
    -       word-wrap         ; soft wrapping with language-aware indent
    +       :editor
    +       (evil +everywhere); come to the dark side, we have cookies
    +       fold              ; (nigh) universal code folding
    +       rotate-text       ; cycle region at point between text candidates
    +       snippets          ; my elves. They type so I don't have to
    +       word-wrap         ; soft wrapping with language-aware indent
     
    -       :emacs
    -       (dired +icons)    ; making dired pretty [functional]
    -       electric          ; smarter, keyword-based electric-indent
    -       (ibuffer +icons)  ; interactive buffer management
    -       vc                ; version-control and Emacs, sitting in a tree
    +       :emacs
    +       (dired +icons)    ; making dired pretty [functional]
    +       electric          ; smarter, keyword-based electric-indent
    +       (ibuffer +icons)  ; interactive buffer management
    +       vc                ; version-control and Emacs, sitting in a tree
    +       undo
     
    -       :term
    -       eshell            ; a consistent, cross-platform shell (WIP)
    +       :term
    +       eshell            ; a consistent, cross-platform shell (WIP)
            vterm
     
    -       :tools
    -       debugger          ; Stepping through code, to help you add bugs
    -       (eval +overlay)     ; run code, run (also, repls)
    -       (lookup           ; helps you navigate your code and documentation
    -        +docsets)        ; ...or in Dash docsets locally
    +       :tools
    +       debugger          ; Stepping through code, to help you add bugs
    +       (eval +overlay)     ; run code, run (also, repls)
    +       (lookup           ; helps you navigate your code and documentation
    +        +docsets)        ; ...or in Dash docsets locally
            lsp
    -       magit             ; a git porcelain for Emacs
    -       ;;pass              ; password manager for nerds
    -       pdf               ; pdf enhancements
    +       magit             ; a git porcelain for Emacs
    +       docker
    +       ;;pass              ; password manager for nerds
    +       pdf               ; pdf enhancements
            eval
            biblio
    +       (lookup +dictionary)
     
    -       :checkers
    -       syntax          ; tasing you for every semicolon you forget
    -       spell          ; tasing you for misspelling mispelling
    +       :checkers
    +       syntax          ; tasing you for every semicolon you forget
    +       spell          ; tasing you for misspelling mispelling
     
    -       :lang
    -       data              ; config/data formats
    -       emacs-lisp        ; drown in parentheses
    +       :lang
    +       data              ; config/data formats
    +       emacs-lisp        ; drown in parentheses
            go
    -       (javascript
    -        +lsp)
    -       latex            ; writing papers in Emacs has never been so fun
    -       ;; markdown          ; writing docs for people to ignore
    -       (org              ; organize your plain life in plain text
    -        +dragndrop       ; drag & drop files/images into org buffers
    -        +hugo            ; use Emacs for hugo blogging
    -        +roam         ;
    -        +present)        ; using org-mode for presentations
    -       python            ; beautiful is better than ugly
    -       (sh                ; she sells {ba,z,fi}sh shells on the C xor
    -        +lsp)
    -       (web
    -        +lsp)
    +       (javascript
    +        +lsp)
    +       latex            ; writing papers in Emacs has never been so fun
    +       ;; markdown          ; writing docs for people to ignore
    +       (org              ; organize your plain life in plain text
    +        +dragndrop       ; drag & drop files/images into org buffers
    +        +hugo            ; use Emacs for hugo blogging
    +        +roam         ;
    +        +present)        ; using org-mode for presentations
    +       python            ; beautiful is better than ugly
    +       (sh                ; she sells {ba,z,fi}sh shells on the C xor
    +        +lsp)
    +       (web
    +        +lsp)
    +       yaml
     
    -       :email
    -       (mu4e +gmail)
    +       :email
    +       (mu4e +gmail)
     
    -       :app
    +       :app
            calendar
    -       ;;(rss +org)        ; emacs as an RSS reader
    -       ;;write             ; emacs for writers (fiction, notes, papers, etc.)
    +       ;;(rss +org)        ; emacs as an RSS reader
    +       ;;write             ; emacs for writers (fiction, notes, papers, etc.)
     
    -       :config
    +       :config
            literate
    -       (default +bindings)
    -       )
    +       (default +bindings)
    +       )
     
    @@ -4057,19 +4305,28 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Doom packages.el

    -
    (package! poet-theme)
    -(package! org-alert)
    -(package! org-gcal)
    -(package! ox-latex-subfigure
    -  :recipe (:host github :repo "linktohack/ox-latex-subfigure"))
    -(package! matlab-mode
    -  :recipe (:host github :repo "matlab-mode/mirror"))
    -(package! org-ref)
    -(package! org-roam-bibtex)
    -(package! org-ql)
    -(package! org-fancy-priorities)
    -(package! evil-escape :disable t)
    -(package! dired-narrow)
    +
    (package! poet-theme)
    +(package! spice-mode)
    +(package! org-pandoc-import
    +  :recipe (:host github
    +           :repo "tecosaur/org-pandoc-import"
    +           :files ("*.el" "filters" "preprocessors")))
    +
    +(package! citeproc-org)
    +(package! org-wild-notifier)
    +(package! org-gcal)
    +;; (package! ox-latex-subfigure
    +;;   :recipe (:host github :repo "linktohack/ox-latex-subfigure"))
    +;; (package! matlab-mode)
    +(package! matlab-mode
    +  :recipe (:host github :repo "matlab-mode/mirror"))
    +(package! org-ref)
    +(package! citeproc-org)
    +(package! org-ql)
    +(package! org-fancy-priorities)
    +(package! evil-escape :disable t)
    +(package! dired-narrow)
    +(package! web-server)
     
    @@ -4077,7 +4334,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/emacs-snippets.html b/docs/emacs-snippets.html index f3176a4..96c4bc2 100644 --- a/docs/emacs-snippets.html +++ b/docs/emacs-snippets.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Doom Emacs Configuration @@ -57,6 +57,8 @@
  • Frac
  • Left
  • Minipage
  • +
  • Minipage Figures
  • +
  • Wrap Figure
  • Multicolumn
  • Subfigure
  • Table
  • @@ -91,10 +93,10 @@

    Coordinate

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :coordinate
    -# --
    -\coordinate[${1:->}] (${2:name}) at (${3:pointcoordinate});
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :coordinate
    +# --
    +\coordinate[${1:->}] (${2:name}) at (${3:pointcoordinate});
     $0
     
    @@ -105,10 +107,10 @@ $0

    Draw

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :draw
    -# --
    -\draw[${1:->}] (${2:point1}) -- (${3:point2});
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :draw
    +# --
    +\draw[${1:->}] (${2:point1}) -- (${3:point2});
     $0
     
    @@ -119,10 +121,10 @@ $0

    Node

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :node
    -# --
    -node[${1:below right}] (${2:name}) {${3:label}};
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :node
    +# --
    +node[${1:below right}] (${2:name}) {${3:label}};
     $0
     
    @@ -133,10 +135,10 @@ $0

    Path

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :path
    -# --
    -\path[${1}] (${2:point1}) -- (${3:point2});
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :path
    +# --
    +\path[${1}] (${2:point1}) -- (${3:point2});
     $0
     
    @@ -152,9 +154,9 @@ $0

    Clear

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :clear and close all
    -# --
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :clear and close all
    +# --
     clear; close all; clc;
     $0
     
    @@ -166,10 +168,10 @@ $0

    Function

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :function
    -# --
    -function [${4:outputs}] = ${1:functionName}(${2:inputs}, ${3:opts_param})
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :function
    +# --
    +function [${4:outputs}] = ${1:functionName}(${2:inputs}, ${3:opts_param})
     % $1 - Description
     %
     % Syntax: $1($2, $3)
    @@ -183,21 +185,21 @@ function [${4:outputs}] = ${1:functionName}(${2:inputs}, ${3:opts_param})
     %    - $4 -
     
     %% Default value for opts
    -opts = struct(...
    -    '${5:outputs}', ${6:default_value} ...
    +opts = struct(...
    +    '${5:outputs}', ${6:default_value} ...
     );
     
    -if exist('opts_param','var')
    -    for opt = fieldnames($3)'
    -        if sum(strcmp(fieldnames(opts), opt{1})) == 1
    -            opts.(opt{1}) = $3.(opt{1});
    -        else
    -            warning(sprintf('%s is not a valid option.', opt{1}));
    -        end
    -    end
    -end
    +if exist('opts_param','var')
    +    for opt = fieldnames($3)'
    +        if sum(strcmp(fieldnames(opts), opt{1})) == 1
    +            opts.(opt{1}) = $3.(opt{1});
    +        else
    +            warning(sprintf('%s is not a valid option.', opt{1}));
    +        end
    +    end
    +end
     
    -$0
    +$0
     
    @@ -212,10 +214,10 @@ $0

    Begin

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :LaTeX Environment
    -# --
    -\begin{${1:equation}}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :LaTeX Environment
    +# --
    +\begin{${1:equation}}
       $0
     \end{$1}
     
    @@ -227,10 +229,10 @@ $0

    Caption

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Caption
    -# --
    -#+caption: $0
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Caption
    +# --
    +#+caption: $0
     
    @@ -240,15 +242,15 @@ $0

    Block

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Org-Mode Block
    -#key: block
    -# --
    -#+begin_${1:$$(let ((type (yas-choose-value '("src" "example" "quote" "verse" "center" "latex" "html" "ascii"))))
    -               (if type (concat type (if (equal type "src")
    -                                         (concat " " (yas-choose-value '("emacs-lisp" "latex" "python" "sh" "matlab")))))))}
    -$0
    -#+end_${1:$(car (split-string yas-text))}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Org-Mode Block
    +#key: block
    +# --
    +#+begin_${1:$$(let ((type (yas-choose-value '("src" "example" "quote" "verse" "center" "latex" "html" "ascii"))))
    +               (if type (concat type (if (equal type "src")
    +                                         (concat " " (yas-choose-value '("emacs-lisp" "latex" "python" "sh" "matlab")))))))}
    +$0
    +#+end_${1:$(car (split-string yas-text))}
     
    @@ -258,13 +260,13 @@ $0

    Custom Box

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Custom Box
    -# --
    -#+attr_latex: :options [$1]{${2:blue}}{${3:ams nodisplayskip}}
    -#+begin_cbox
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Custom Box
    +# --
    +#+attr_latex: :options [$1]{${2:blue}}{${3:ams nodisplayskip}}
    +#+begin_cbox
     $0
    -#+end_cbox
    +#+end_cbox
     
    @@ -274,11 +276,11 @@ $0

    Latex Class

    -
    #name: latex-class
    -#key: lc
    -#expand-env: ((classes (mapcar 'car org-latex-classes)))
    -# --
    -#+latex_class: ${1:$$(yas-choose-value classes)}
    +
    #name: latex-class
    +#key: lc
    +#expand-env: ((classes (mapcar 'car org-latex-classes)))
    +# --
    +#+latex_class: ${1:$$(yas-choose-value classes)}
     $0
     
    @@ -289,10 +291,10 @@ $0

    Bibliography with completion

    -
    #name: bibliography with completion
    -#key: bib
    -# --
    -bibliography:${1:$$(yas-choose-value (org-ref-find-bibliography))}
    +
    #name: bibliography with completion
    +#key: bib
    +# --
    +bibliography:${1:$$(yas-choose-value (org-ref-find-bibliography))}
     
    @@ -302,11 +304,11 @@ bibliography:${1:$$(yas-choose-value (org-ref-find-bibliography))}

    Cite

    -
    #name: org-ref cite link
    -#key: cite
    -# --
    -cite:${1:$$(completing-read
    -       "bibtex key: "
    +
    #name: org-ref cite link
    +#key: cite
    +# --
    +cite:${1:$$(completing-read
    +       "bibtex key: "
            (let ((bibtex-files (org-ref-find-bibliography)))(bibtex-global-key-alist)))}
     
    @@ -317,10 +319,10 @@ cite:${1:$$(completing-read

    Ref

    -
    #name: org-ref ref link with completion
    -#key: ref
    -# --
    -ref:${1:$$(completing-read "label: " (org-ref-get-labels))}
    +
    #name: org-ref ref link with completion
    +#key: ref
    +# --
    +ref:${1:$$(completing-read "label: " (org-ref-get-labels))}
     
    @@ -330,13 +332,13 @@ ref:${1:$$(completing-read "label: " (org-ref-get-labels))}

    Beamer - CBOX

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Beamer Custom Box
    -# --
    -*** ${1:@@latex:@@}           :B_cbox:
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Beamer Custom Box
    +# --
    +*** ${1:@@latex:@@}           :B_cbox:
     ,:PROPERTIES:
     :BEAMER_env: cbox
    -:BEAMER_opt: {${2:blue}}{${3:ams nodisplayskip}}
    +:BEAMER_opt: {${2:blue}}{${3:ams nodisplayskip}}
     :END:
     
     $0
    @@ -349,14 +351,14 @@ $0
     

    Code

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Code
    -# --
    -#+caption: ${1:Listing Caption}
    -#+label: lst:${2:listing_name}
    -#+begin_src ${3:listing_language}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Code
    +# --
    +#+caption: ${1:Listing Caption}
    +#+label: lst:${2:listing_name}
    +#+begin_src ${3:listing_language}
     $0
    -#+end_src
    +#+end_src
     
    @@ -366,10 +368,10 @@ $0

    Equation

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Equation
    -# --
    -#+name: eq:${1:equation_name}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Equation
    +# --
    +#+name: eq:${1:equation_name}
     \begin{equation}
     $0
     \end{equation}
    @@ -382,12 +384,12 @@ $0
     

    Figure

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Figure
    -# --
    -#+name: fig:${1:figure_name}
    -#+caption: ${2:Figure caption}
    -[[file:${3:figs/}$1.${4:pdf}]]
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Figure
    +# --
    +#+name: fig:${1:figure_name}
    +#+caption: ${2:Figure caption}
    +[[file:${3:figs/}$1.${4:pdf}]]
     $0
     
    @@ -398,9 +400,9 @@ $0

    Frac

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :LaTeX Fraction
    -# --
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :LaTeX Fraction
    +# --
     \frac{$1}{$2} $0
     
    @@ -411,9 +413,9 @@ $0

    Left

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Left Right mathematical delimitations
    -# --
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Left Right mathematical delimitations
    +# --
     \left$1 $0 \right$2
     
    @@ -424,27 +426,73 @@ $0

    Minipage

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :minipage
    -# --
    -#+BEGIN_EXPORT latex
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :minipage
    +# --
    +#+BEGIN_EXPORT latex
     \begin{figure}[htbp]
     \centering
    -\begin{minipage}[t]{0.49\linewidth}
    -#+END_EXPORT
    -#+attr_latex: :float nil :width 0.95\linewidth
    +\begin{minipage}[t]{0.49\linewidth}
    +#+END_EXPORT
    +#+attr_latex: :float nil :width 0.95\linewidth
     $0
    -#+BEGIN_EXPORT latex
    +#+BEGIN_EXPORT latex
     \end{minipage}%
     \hfill%
    -\begin{minipage}[t]{0.49\linewidth}
    -#+END_EXPORT
    -#+attr_latex: :float nil :width 0.95\linewidth
    +\begin{minipage}[t]{0.49\linewidth}
    +#+END_EXPORT
    +#+attr_latex: :float nil :width 0.95\linewidth
     
    -#+BEGIN_EXPORT latex
    +#+BEGIN_EXPORT latex
     \end{minipage}
     \end{figure}
    -#+END_EXPORT
    +#+END_EXPORT
    +
    +
    +
    +
    + +
    +

    Minipage Figures

    +
    +
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Minipage with Figures
    +# --
    +#+attr_latex: :options [t]{${3:0.5\linewidth}}
    +#+begin_minipage
    +#+name: fig:$1
    +#+caption: ${2:Caption}
    +#+attr_latex: ${4::width \linewidth} :float nil
    +[[file:figs/${1:figure_name}.pdf]]
    +#+end_minipage
    +\hfill
    +#+attr_latex: :options [t]{${7:0.5\linewidth}}
    +#+begin_minipage
    +#+name: fig:$5
    +#+caption: ${6:Caption}
    +#+attr_latex: ${8::width \linewidth} :float nil
    +[[file:figs/${5:figure_name}.pdf]]
    +#+end_minipage
    +$0
    +
    +
    +
    +
    + +
    +

    Wrap Figure

    +
    +
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Wrap Figure
    +# --
    +#+attr_latex: :options {${1:rl}}{${2:0.45\textwidth}}
    +#+begin_wrapfigure
    +#+attr_latex: :${3:width \linewidth}
    +[[file:figs/${4:figure_name.pdf}]]
    +#+end_wrapfigure
    +$0
     
    @@ -454,10 +502,10 @@ $0

    Multicolumn

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Multcolumn
    -# --
    -#+attr_latex: :float multicolumn
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Multcolumn
    +# --
    +#+attr_latex: :float multicolumn
     $0
     
    @@ -468,14 +516,14 @@ $0

    Subfigure

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Subfigure
    -# --
    -#+name: fig:${1:figure_name}
    -#+caption: ${2:figure caption}
    -#+attr_latex: :environment subfigure :width 0.49\linewidth :align c
    -| file:${3:sub_fig_name}.${4:pdf}       | file:${5:sub_fig_name}.${6:pdf} |
    -| <<fig:$3>> ${7:sub figure caption}    | <<fig:$5>> ${8:sub figure caption}    |
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Subfigure
    +# --
    +#+name: fig:${1:figure_name}
    +#+caption: ${2:figure caption}
    +#+attr_latex: :environment subfigure :width 0.49\linewidth :align c
    +| file:${3:sub_fig_name}.${4:pdf}       | file:${5:sub_fig_name}.${6:pdf} |
    +| <<fig:$3>> ${7:sub figure caption}    | <<fig:$5>> ${8:sub figure caption}    |
     $0
     
    @@ -486,13 +534,13 @@ $0

    Table

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Table
    -# --
    -#+name: tab:${1:table_name}
    -#+caption: ${2:Table caption}
    -#+attr_latex: :environment tabularx :width ${3:\linewidth} :align ${4:lXX}
    -#+attr_latex: :center t :booktabs t :float t
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Table
    +# --
    +#+name: tab:${1:table_name}
    +#+caption: ${2:Table caption}
    +#+attr_latex: :environment tabularx :width ${3:\linewidth} :align ${4:lXX}
    +#+attr_latex: :center t :booktabs t :float t
     | $0  |   |   |
     |---+---+---|
     |   |   |   |
    @@ -505,14 +553,14 @@ $0
     

    Tikz

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Tikz figure
    -# --
    -#+begin_src latex :file ${1:figure_name}.pdf :post pdf2svg(file=*this*, ext="png") :exports both
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Tikz figure
    +# --
    +#+begin_src latex :file ${1:figure_name}.pdf :post pdf2svg(file=*this*, ext="png") :exports both
       \begin{tikzpicture}
         $0
       \end{tikzpicture}
    -#+end_src
    +#+end_src
     
    @@ -522,23 +570,23 @@ $0

    Tikzfig

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Tikz Figure
    -# --
    -#+NAME: fig:${1:figure_name}
    -#+HEADER: :headers '("\\\\usepackage{tikz}" "\\\\usepackage{import}" "\\\\import{$HOME/Cloud/thesis/LaTeX/}{config.tex}")
    -#+HEADER: :imagemagick t :fit yes :iminoptions -scale 100% -density 150 :imoutoptions -quality 100
    -#+HEADER: :results raw replace :buffer no :eval no-export :exports both :mkdirp yes
    -#+HEADER: :output-dir ${2:figs}
    -#+begin_src latex :file $1.pdf :post pdf2svg(file=*this*, ext="png") :exports both
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Tikz Figure
    +# --
    +#+NAME: fig:${1:figure_name}
    +#+HEADER: :headers '("\\\\usepackage{tikz}" "\\\\usepackage{import}" "\\\\import{$HOME/Cloud/thesis/LaTeX/}{config.tex}")
    +#+HEADER: :imagemagick t :fit yes :iminoptions -scale 100% -density 150 :imoutoptions -quality 100
    +#+HEADER: :results raw replace :buffer no :eval no-export :exports both :mkdirp yes
    +#+HEADER: :output-dir ${2:figs}
    +#+begin_src latex :file $1.pdf :post pdf2svg(file=*this*, ext="png") :exports both
       \begin{tikzpicture}
         $0
       \end{tikzpicture}
    -#+end_src
    +#+end_src
     
    -#+NAME: fig:$1
    -#+CAPTION: ${3:Caption}
    -#+RESULTS: fig:$1
    +#+NAME: fig:$1
    +#+CAPTION: ${3:Caption}
    +#+RESULTS: fig:$1
     
    @@ -548,20 +596,20 @@ $0

    Tikzheader

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Tikz Header
    -# --
    -* ${1:Title/Description of the figure}
    -#+begin_src latex :file ${2:figure_name}.pdf :tangle figs/$2.tex :exports ${3:both}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Tikz Header
    +# --
    +* ${1:Title/Description of the figure}
    +#+begin_src latex :file ${2:figure_name}.pdf :tangle figs/$2.tex :exports ${3:both}
       \begin{tikzpicture}
         $0
       \end{tikzpicture}
    -#+end_src
    +#+end_src
     
    -#+name: fig:$2
    -#+caption: $1 ([[./figs/$2.png][png]], [[./figs/$2.pdf][pdf]], [[./figs/$2.tex][tex]]).
    -#+RESULTS:
    -[[file:./figs/$2.png]]
    +#+name: fig:$2
    +#+caption: $1 ([[./figs/$2.png][png]], [[./figs/$2.pdf][pdf]], [[./figs/$2.tex][tex]]).
    +#+RESULTS:
    +[[file:./figs/$2.png]]
     
    @@ -571,13 +619,13 @@ $0

    User-config

    -
    # -*- mode: snippet -*-
    -# name: user-config
    -# key: uc
    -# --
    -#+begin_src emacs-lisp :tangle user-config.el
    +
    # -*- mode: snippet -*-
    +# name: user-config
    +# key: uc
    +# --
    +#+begin_src emacs-lisp :tangle user-config.el
     $1
    -#+end_src
    +#+end_src
     
    @@ -603,10 +651,10 @@ $1

    Wrap

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Wrap
    -# --
    -#+attr_latex: :float wrap
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Wrap
    +# --
    +#+attr_latex: :float wrap
     $0
     
    @@ -621,18 +669,18 @@ $0

    Mconfig

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Matlab-Configuration-Header
    -# --
    -#+PROPERTY: header-args:matlab  :session *MATLAB*
    -#+PROPERTY: header-args:matlab+ :tangle ${1:filename}.m
    -#+PROPERTY: header-args:matlab+ :comments org
    -#+PROPERTY: header-args:matlab+ :exports both
    -#+PROPERTY: header-args:matlab+ :results none
    -#+PROPERTY: header-args:matlab+ :eval no-export
    -#+PROPERTY: header-args:matlab+ :noweb yes
    -#+PROPERTY: header-args:matlab+ :mkdirp yes
    -#+PROPERTY: header-args:matlab+ :output-dir ${2:figs}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Matlab-Configuration-Header
    +# --
    +#+PROPERTY: header-args:matlab  :session *MATLAB*
    +#+PROPERTY: header-args:matlab+ :tangle ${1:filename}.m
    +#+PROPERTY: header-args:matlab+ :comments org
    +#+PROPERTY: header-args:matlab+ :exports both
    +#+PROPERTY: header-args:matlab+ :results none
    +#+PROPERTY: header-args:matlab+ :eval no-export
    +#+PROPERTY: header-args:matlab+ :noweb yes
    +#+PROPERTY: header-args:matlab+ :mkdirp yes
    +#+PROPERTY: header-args:matlab+ :output-dir ${2:figs}
     $0
     
    @@ -643,9 +691,9 @@ $0

    Mdescription

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Measurement-Description
    -# --
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Measurement-Description
    +# --
     * Measurement description
     ** Setup                                                             :ignore:
     *Setup*:
    @@ -659,14 +707,14 @@ $0
     Three measurements are done:
     | Measurement File        | Description                  |
     |-------------------------+------------------------------|
    -| =mat/data_${1:001}.mat= | $2                           |
    +| =mat/data_${1:001}.mat= | $2                           |
     
    -Each of the measurement =mat= file contains one =data= array with 3 columns:
    +Each of the measurement =mat= file contains one =data= array with 3 columns:
     | Column number | Description       |
     |---------------+-------------------|
    -|             1 | $3                |
    -|             2 | $4                |
    -|             3 | Time              |
    +|             1 | $3                |
    +|             2 | $4                |
    +|             3 | Time              |
     
     $0
     
    @@ -678,17 +726,17 @@ $0

    Mfigure

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Matlab-Figure
    -# --
    -#+begin_src matlab :tangle no :exports results :results file replace
    -   exportFig('figs/${1:filename}.pdf', 'width', '${2:full}', 'height', '${3:full}');
    -#+end_src
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Matlab-Figure
    +# --
    +#+begin_src matlab :tangle no :exports results :results file replace
    +   exportFig('figs/${1:filename}.pdf', 'width', '${2:full}', 'height', '${3:full}');
    +#+end_src
     
    -#+name: fig:$1
    -#+caption: $0
    -#+RESULTS:
    -[[file:figs/$1.png]]
    +#+name: fig:$1
    +#+caption: $0
    +#+RESULTS:
    +[[file:figs/$1.png]]
     
    @@ -698,23 +746,23 @@ $0

    Mfunction

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Matlab-Function
    -# --
    -* ${1:Function Name}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Matlab-Function
    +# --
    +* ${1:Function Name}
     :PROPERTIES:
    -:header-args:matlab+: :tangle src/${2:matlab_file_name}.m
    +:header-args:matlab+: :tangle src/${2:matlab_file_name}.m
     :header-args:matlab+: :comments none :mkdirp yes :eval no
     :END:
     <<sec:$2>>
     
     This Matlab function is accessible [[file:src/$2.m][here]].
     
    -#+begin_src matlab
    -  function [${4:in_data}] = $2(${3:in_data})
    +#+begin_src matlab
    +  function [${4:in_data}] = $2(${3:in_data})
       % $2 - $0
       %
    -  % Syntax: [$4] = $2($3)
    +  % Syntax: [$4] = $2($3)
       %
       % Inputs:
       %    - $3 -
    @@ -723,7 +771,7 @@ This Matlab function is accessible [[file:src/$2.m][here]].
       %    - $4 -
     
       end
    -#+end_src
    +#+end_src
     
    @@ -733,18 +781,18 @@ This Matlab function is accessible [[file:src/$2.m][here]].

    Mheader

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Matlab-Header
    -# --
    -* ${1:Heading Name}
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Matlab-Header
    +# --
    +* ${1:Heading Name}
     :PROPERTIES:
    -:header-args:matlab+: :tangle matlab/${2:matlab_file_name}.m
    +:header-args:matlab+: :tangle matlab/${2:matlab_file_name}.m
     :header-args:matlab+: :comments org :mkdirp yes
     :END:
     <<sec:$2>>
     
     ** ZIP file containing the data and matlab files                     :ignore:
    -#+begin_src bash :exports none :results none
    +#+begin_src bash :exports none :results none
       if [ matlab/$2.m -nt data/$2.zip ]; then
         cp matlab/$2.m $2.m;
         zip data/$2 \
    @@ -752,11 +800,11 @@ This Matlab function is accessible [[file:src/$2.m][here]].
             $2.m
         rm $2.m;
       fi
    -#+end_src
    +#+end_src
     
    -#+begin_note
    +#+begin_note
       All the files (data and Matlab scripts) are accessible [[file:data/$2.zip][here]].
    -#+end_note
    +#+end_note
     
     $0
     
    @@ -768,17 +816,17 @@ $0

    Minit

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Matlab-Init
    -# --
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Matlab-Init
    +# --
     ** Matlab Init                                             :noexport:ignore:
    -#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
    +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
       <<matlab-dir>>
    -#+end_src
    +#+end_src
     
    -#+begin_src matlab :exports none :results silent :noweb yes
    +#+begin_src matlab :exports none :results silent :noweb yes
       <<matlab-init>>
    -#+end_src
    +#+end_src
     
     $0
     
    @@ -790,12 +838,12 @@ $0

    Mtable

    -
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    -#name :Matlab-Table
    -# --
    -#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
    -  data2orgtable(${1:data}, {${2:'rowlabel'}}, {${3:'collabel'}}, ' %.1f ');
    -#+end_src
    +
    #contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
    +#name :Matlab-Table
    +# --
    +#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
    +  data2orgtable(${1:data}, {${2:'rowlabel'}}, {${3:'collabel'}}, ' %.1f ');
    +#+end_src
     $0
     
    @@ -806,7 +854,7 @@ $0

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/git.html b/docs/git.html index 649f1e0..a2f2e5a 100644 --- a/docs/git.html +++ b/docs/git.html @@ -1,251 +1,19 @@ - - + - Git Configuration - -
    @@ -273,6 +41,7 @@ for the JavaScript code in this tag.
  • Global Git Ignore
  • +
  • Pass Git Helper
  • @@ -484,6 +253,9 @@ for the JavaScript code in this tag. [credential "https://github.com"] username = tdehaeze + +[credential "https://git.tdehaeze.xyz"] + username = tdehaeze
    @@ -524,10 +296,27 @@ Session.vim
    + +
    +

    Pass Git Helper

    +
    +
    +
    [github.com*]
    +target=github.com/tdehaeze
    +
    +[git.tdehaeze.xyz*]
    +target=git.tdehaeze.xyz/tdehaeze
    +
    +[gitlab.esrf.fr*]
    +target=gitlab.esrf.fr/dehaeze
    +
    +
    +
    +

    Author: Dehaeze Thomas

    -

    Created: 2020-01-11 sam. 22:19

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/image.html b/docs/image.html index a0f26fd..60405f0 100644 --- a/docs/image.html +++ b/docs/image.html @@ -1,229 +1,19 @@ - - + - SXIV Configuration - -
    @@ -232,7 +22,6 @@ HOME

    SXIV Configuration

    -

    Press C-x to activate to key handler.

    @@ -254,7 +43,7 @@ done

    Author: Dehaeze Thomas

    -

    Created: 2020-04-05 dim. 11:29

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/inkscape.html b/docs/inkscape.html new file mode 100644 index 0000000..67292d6 --- /dev/null +++ b/docs/inkscape.html @@ -0,0 +1,134 @@ + + + + + + +Inkscape + + + + + + + + + + +
    + UP + | + HOME +
    +

    Inkscape

    +
    +

    Table of Contents

    + +
    + +
    +

    Save Selection to SVG extension

    +
    +
    +
    +

    ink file

    +
    +
    +
    <?xml version="1.0" encoding="utf-8"?>
    +<?xml version="1.0" encoding="UTF-8"?>
    +<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
    +  <!-- _name must have same name as .py file but capitalise it. Shows on Menu this way-->
    +  <_name>Save Selection</_name>
    +
    +  <!-- id should be unique. Associates entered values with this menu -->
    +  <id>org.inkscape.save_selection</id>
    +
    +  <!-- mention a dependency here and will check for existence (optional)-->
    +  <dependency type="executable" location="inx">save_selection.py</dependency>
    +
    +  <!-- start notebook -->
    +  <param name="param" type="float" min="0.1"  max="1000.0"  precision="5"  _gui-text="A floating value">1.0</param>
    +  <param name="achoice" type="bool" _gui-text="A boolean value">false</param>
    +
    +  <effect>
    +    <object-type>all</object-type>
    +    <effects-menu>
    +      <submenu _name="Save Selection"/>
    +    </effects-menu>
    +  </effect>
    +
    +  <!-- py file again -->
    +  <script>
    +    <command location="inx" interpreter="python">save_selection.py</command>
    +  </script>
    +</inkscape-extension>
    +
    +
    +
    +
    + +
    +

    py file

    +
    +
    +
    import os
    +import inkex
    +import inkex.command
    +
    +
    +class SaveSelection(inkex.OutputExtension): # choose a better name
    +
    +    def add_arguments(self, pars):
    +        pars.add_argument("--param", type=float, dest="param", default=1.0)
    +        pars.add_argument("-x", "--achoice", type=inkex.Boolean, dest="achoice", default=False)
    +
    +    def save(self, stream):
    +        # param2 = self.options.param
    +        # choice = self.options.achoice
    +
    +        # inkex.command.inkscape_command(self.svg, verbs=['EditInvert']);
    +        # inkex.command.inkscape_command(self.svg, verbs=['EditDelete']);
    +
    +        # filename = os.popen('rofi -dmenu -p "Filename"')
    +        # print(filename)
    +        # inkex.debug(self.svg.selected.svg)
    +
    +        self.document.write(self.svg.selected)
    +
    +        # Get selected objects
    +        # selection = self.svg.selected
    +        # selection = inkex.load_svg(
    +        #     inkex.command.inkscape_command(
    +        #         self.svg, verbs=['FitCanvasToDrawing']))
    +
    +        # # Create a Canvas ovject
    +
    +        # # Write File
    +        # # stream.write(b''.join(self.svg.selected.tostring()))
    +        # inkex.command.write_svg(selection, "/home/thomas/", "test.svg")
    +
    +
    +if __name__ == '__main__':
    +    SaveSelection().run()
    +
    +
    +
    +
    +
    +
    +
    +

    Author: Dehaeze Thomas

    +

    Created: 2020-11-03 mar. 16:26

    +
    + + diff --git a/docs/install.html b/docs/install.html index bad217d..f46f263 100644 --- a/docs/install.html +++ b/docs/install.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Installation @@ -18,18 +18,18 @@
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    -
    sudo pacman -S yay
    +
    sudo pacman -S yay
     
    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    @@ -630,19 +631,19 @@ To check all installed packages:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    -
    yay -S git
    +
    yay -S git
     
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Git Configuration:

    @@ -660,9 +661,9 @@ To check all installed packages: https://github.com/so-fancy/diff-so-fancy

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S diff-so-fancy
     
    @@ -670,11 +671,11 @@ To check all installed packages:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +
    -
    git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
    +
    git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
     
    @@ -702,9 +703,9 @@ This is explained in a further part: Integration of Pass w

    Termite

    -
    @@ -763,29 +764,14 @@ This is explained in a further part: Integration of Pass w - - - - - - - - - - - + - + - - - - -
    ctrl-shift-upscroll up a line
    ctrl-shift-downscroll down a line
    ctrl-+ctrl + increase font size
    ctrl--ctrl - decrease font size
    ctrl-=reset font size to default
    @@ -796,9 +782,9 @@ This is explained in a further part: Integration of Pass w

    Unicode Rxvt

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Most of Urxvt configuration is done in ~/.Xresources

    @@ -825,9 +811,9 @@ Most of Urxvt configuration is done in ~/.Xresources

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S bash bash-completion zsh
     
    @@ -835,9 +821,9 @@ Most of Urxvt configuration is done in ~/.Xresources
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Bash configuration:

    @@ -859,9 +845,9 @@ Most of Urxvt configuration is done in ~/.Xresources

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S tmux
     
    @@ -869,18 +855,18 @@ Most of Urxvt configuration is done in ~/.Xresources
    -
    -

    Configuration

    -
    + -
    -

    Ressources

    -
    +
    +

    Ressources

    +
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -949,9 +935,9 @@ Most of Urxvt configuration is done in ~/.Xresources

    Fonts

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S nerd-fonts-complete
     
    @@ -1004,9 +990,9 @@ List all fonts available: fc-list
    -
    -

    Text Editors

    -
    +
    +

    Text Editors

    +

    Neovim

    @@ -1016,9 +1002,9 @@ List all fonts available: fc-list

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S neovim
     
    @@ -1026,9 +1012,9 @@ List all fonts available: fc-list
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Vim configuration

    @@ -1044,9 +1030,9 @@ List all fonts available: fc-list

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S emacs
     
    @@ -1054,9 +1040,9 @@ List all fonts available: fc-list
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Doom Emacs configuration

    @@ -1083,7 +1069,7 @@ List all fonts available: fc-list

    Generating a new SSH key

    -
    ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com"
    +
    ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com"
     
    @@ -1093,7 +1079,7 @@ List all fonts available: fc-list

    Start the ssh-agent in the background

    -
    eval "$(ssh-agent -s)"
    +
    eval "$(ssh-agent -s)"
     
    @@ -1146,8 +1132,8 @@ Edit the following file ~/.gnupg/gpg-agent.conf

    -
    default-cache-ttl 60480000
    -max-cache-ttl 60480000
    +
    default-cache-ttl 60480000
    +max-cache-ttl 60480000
     
    @@ -1182,11 +1168,11 @@ Alternative:
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    -
    yay -S rofi
    +
    yay -S rofi rofi-calc
     
    @@ -1219,7 +1205,7 @@ Use sudo -A, that will open a rofi prompt to ask for the password. For that to work, we need to add the following code to ~/.profile:

    -
    export SUDO_ASKPASS=~/.local/bin/askpass-rofi
    +
    export SUDO_ASKPASS=~/.local/bin/askpass-rofi
     
    @@ -1227,15 +1213,15 @@ For that to work, we need to add the following code to ~/.profile: The askpass script is:

    -
    #!/bin/sh
    +
    #!/bin/sh
     
    -# Take password prompt from STDIN, print password to STDOUT
    -# the sed piece just removes the colon from the provided
    -# prompt: rofi -p already gives us a colon
    -rofi -dmenu \
    -     -password \
    -     -no-fixed-num-lines \
    -     -p "$(printf "$1" | sed s/://)"
    +# Take password prompt from STDIN, print password to STDOUT
    +# the sed piece just removes the colon from the provided
    +# prompt: rofi -p already gives us a colon
    +rofi -dmenu \
    +     -password \
    +     -no-fixed-num-lines \
    +     -p "$(printf "$1" | sed s/://)"
     
    @@ -1264,16 +1250,16 @@ rofi -dmenu \

    Initialize the password store as a git repository

    -
    pass git init
    -pass git remote add origin https://github.com/tdehaeze/pass.git
    +
    pass git init
    +pass git remote add origin https://github.com/tdehaeze/pass.git
     
    -
    -

    Gui Manager

    -
    +
    +

    Gui Manager

    +

    https://github.com/IJHack/qtpass

    @@ -1285,17 +1271,17 @@ pass git remote add origin https://github.com/tdehaeze/pass.git
    -
    -

    Integration with Rofi

    -
    +
    +

    Integration with Rofi

    + -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S rofi-pass
     
    @@ -1338,9 +1324,9 @@ This is explained here. https://github.com/languitar/pass-git-helper

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S pass-git-helper
     
    @@ -1348,9 +1334,9 @@ This is explained here.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    First, add the relation between repository addresses and entries in pass. This is done in the following config file .config/pass-git-helper/git-pass-mapping.ini:

    @@ -1414,9 +1400,9 @@ Bitwarden https://github.com/bitwarde

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    -
    -

    Integration with Rofi

    -
    +
    +

    Integration with Rofi

    +
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    wget https://raw.githubusercontent.com/carnager/buku_run/master/buku_run -o ~/.local/bin/buku_run
    -chmod +x ~/.local/bin/buku_run
    +chmod +x ~/.local/bin/buku_run
     
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    The configuration file is here: ~/.config/buku_run/config

    @@ -1473,8 +1459,8 @@ The database is stored in ~/.local/share/buku/bookmarks.db. We initialize a git repository in this folder:

    -
    cd ~/.local/share/buku/bookmarks.db
    -git init
    +
    cd ~/.local/share/buku/bookmarks.db
    +git init
     
    @@ -1513,7 +1499,7 @@ To remove them, use: buku --replace '2018dec20' '' Run:

    -
    bukuserver run --host 127.0.0.1 --port 5001
    +
    bukuserver run --host 127.0.0.1 --port 5001
     
    @@ -1523,9 +1509,9 @@ And then browse to http://127.0.0.1:5001.
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -1589,9 +1575,9 @@ And then browse to http://127.0.0.1:5001.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S qutebrowser
     
    @@ -1603,9 +1589,9 @@ And then browse to http://127.0.0.1:5001.

    View Pdf inside qutebrowser with pdfjs

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S pdfjs
     
    @@ -1613,9 +1599,9 @@ And then browse to http://127.0.0.1:5001.
    -
    -

    Usage

    -
    +
    +

    Usage

    +

    When opening a pdf file on qutebrowser, you’ll be ask for options:

    @@ -1769,9 +1755,9 @@ If sound is not working, should run pulseaudio --kill to kill the d

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S mpd
     
    @@ -1866,9 +1852,9 @@ If mopidy is used, MPD should be disabled. (systemctl disable --user mpd.s

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S ncmpcpp
     
    @@ -1886,9 +1872,9 @@ The key bindings can be configured here: ~/.ncmpcpp/bindings.
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +

    https://pkgbuild.com/~jelle/ncmpcpp/

    @@ -1919,9 +1905,9 @@ The key bindings can be configured here: ~/.ncmpcpp/bindings.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S beets
     
    @@ -1929,18 +1915,18 @@ The key bindings can be configured here: ~/.ncmpcpp/bindings.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Configuration folder: ~/.config/beets/

    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -1975,9 +1961,9 @@ Configuration folder: ~/.config/beets/

    Media Player - MPV

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S mpv
     
    @@ -1994,9 +1980,9 @@ The configuration is set in /.config/mpv/input.conf.
    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    @@ -2024,9 +2010,9 @@ The configuration is set in /.config/mpv/input.conf.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S catt
     
    @@ -2243,9 +2229,9 @@ This looks for contacts in all indexed emails.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S weechat
     
    @@ -2331,34 +2317,34 @@ Then we install some dependencies

    -
    /set weechat.look.prefix_same_nick "⤷"
    -/set weechat.look.prefix_error "⚠"
    -/set weechat.look.prefix_action "⚡"
    -/set weechat.look.bar_more_down "▼▼"
    -/set weechat.look.bar_more_left "◀◀"
    -/set weechat.look.bar_more_right "▶▶"
    -/set weechat.look.bar_more_up "▲▲"
    -/set weechat.look.prefix_suffix "╡"
    +
    /set weechat.look.prefix_same_nick "⤷"
    +/set weechat.look.prefix_error "⚠"
    +/set weechat.look.prefix_action "⚡"
    +/set weechat.look.bar_more_down "▼▼"
    +/set weechat.look.bar_more_left "◀◀"
    +/set weechat.look.bar_more_right "▶▶"
    +/set weechat.look.bar_more_up "▲▲"
    +/set weechat.look.prefix_suffix "╡"
     /set weechat.color.chat_nick_colors red,green,brown,blue,magenta,cyan,white,lightred,lightgreen,yellow,lightblue,lightmagenta,lightcyan
    -/set weechat.color.separator 31
    -/set buffers.color.current_fg 31
    +/set weechat.color.separator 31
    +/set buffers.color.current_fg 31
     /set buffers.color.current_bg white
    -/set buffers.color.hotlist_message_fg 229
    -/set buffers.color.hotlist_private_fg 121
    -/set buffers.color.hotlist_highlight_fg 163
    -/set buffers.color.number 239
    -/set buffers.color.number_char 245
    -/set weechat.bar.title.conditions "${inactive}"
    +/set buffers.color.hotlist_message_fg 229
    +/set buffers.color.hotlist_private_fg 121
    +/set buffers.color.hotlist_highlight_fg 163
    +/set buffers.color.number 239
    +/set buffers.color.number_char 245
    +/set weechat.bar.title.conditions "${inactive}"
     /set weechat.bar.title.color_fg black
    -/set weechat.bar.title.color_bg 31         #Or white if 31 does nothing
    +/set weechat.bar.title.color_bg 31         #Or white if 31 does nothing
     
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    https://hugo.md/post/the-perfect-weechat-setup-2/ https://robots.thoughtbot.com/weechat-for-slacks-irc-gateway @@ -2401,8 +2387,8 @@ And enter is bound to magic_enter that directly sends the message i https://github.com/keith/edit-weechat

    -
    mkdir -p ~/.weechat/python/autoload
    -cd ~/.weechat/python/autoload
    +
    mkdir -p ~/.weechat/python/autoload
    +cd ~/.weechat/python/autoload
     wget https://raw.githubusercontent.com/keith/edit-weechat/master/edit.py
     
    @@ -2413,9 +2399,9 @@ Then, on weechat, type /edit.
    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    @@ -2463,9 +2449,9 @@ Then, on weechat, type /edit.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S python2-websocket-client
     
    @@ -2473,9 +2459,9 @@ Then, on weechat, type /edit.
    -
    cd ~/.weechat/python
    +
    cd ~/.weechat/python
     wget https://raw.githubusercontent.com/wee-slack/wee-slack/master/wee_slack.py
    -ln -s ../wee_slack.py autoload
    +ln -s ../wee_slack.py autoload
     
    @@ -2581,9 +2567,9 @@ It runs weechat inside tmux.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S isync
     
    @@ -2591,9 +2577,9 @@ It runs weechat inside tmux.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.mbsyncrc

    @@ -2647,9 +2633,9 @@ systemctl --user start syncmail.timer

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S msmtp
     
    @@ -2675,9 +2661,9 @@ systemctl --user start syncmail.timer

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S neomutt
     
    @@ -2705,9 +2691,9 @@ systemctl --user start syncmail.timer
    -
    -

    Ressources

    -
    +
    +

    Ressources

    + -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S ranger
     
    @@ -2756,9 +2742,9 @@ Configuration files:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    The configuration file is ~/.config/ranger/rc.conf.

    @@ -2806,9 +2792,9 @@ It works better with Urxvt.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S sxiv
     
    @@ -2826,9 +2812,9 @@ It works better with Urxvt.
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -2902,9 +2888,9 @@ Configuration file: SXHKD.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S i3-gaps
     
    @@ -2912,9 +2898,9 @@ Configuration file: SXHKD.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.i3/config

    @@ -2934,9 +2920,9 @@ Configuration file: SXHKD.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S polybar
     
    @@ -2957,9 +2943,9 @@ Configuration file: SXHKD.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S picom
     
    @@ -2967,9 +2953,9 @@ Configuration file: SXHKD.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/picom/picom.conf

    @@ -2999,9 +2985,9 @@ Compton is run from .xprofile config in the background:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S dunst dunstify
     
    @@ -3009,20 +2995,20 @@ Compton is run from .xprofile config in the background:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/dunst/dunstrc

    -
    -

    Usage

    -
    +
    +

    Usage

    +
    -
    dunstify --replace=16549 "AppName" "Message"
    +
    dunstify --replace=16549 "AppName" "Message"
     
    @@ -3087,9 +3073,9 @@ Gtk2 themes are managed using the file ~/.gtkrc-2.0 while Gtk3 them

    -
    -

    Gui Manager

    -
    +
    +

    Gui Manager

    +

    To customize the look of the system using GUI application, run lxappearance.

    @@ -3160,7 +3146,7 @@ Check the queue

    lpq
    -lpq -a # on all queues
    +lpq -a # on all queues
     
    @@ -3168,8 +3154,8 @@ lpq -a # on all queues Clear the queue

    -
    lprm   # remove last entry only
    -lprm - # remove all entries
    +
    lprm   # remove last entry only
    +lprm - # remove all entries
     
    @@ -3257,11 +3243,11 @@ Stats about the printer

    yay -S tlp
    -sudo systemctl enable tlp
    -sudo systemctl start tlp
    -sudo systemctl enable tlp-sleep
    -sudo systemctl start tlp-sleep
    -sudo tlp start
    +sudo systemctl enable tlp
    +sudo systemctl start tlp
    +sudo systemctl enable tlp-sleep
    +sudo systemctl start tlp-sleep
    +sudo tlp start
     
    @@ -3270,8 +3256,8 @@ sudo tlp start

    yay -S thermald
    -sudo systemctl enable thermald
    -sudo systemctl start thermald
    +sudo systemctl enable thermald
    +sudo systemctl start thermald
     
    @@ -3343,13 +3329,13 @@ Bluetooth manager: https://
    -
    -

    LaTeX

    -
    +
    +

    LaTeX

    +
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S texlive-most
     
    @@ -3394,9 +3380,9 @@ In order for LaTeX to be aware of new packages/classes, run sudo texhash
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S mathpix-snipping-tool
     
    @@ -3418,9 +3404,9 @@ In order for LaTeX to be aware of new packages/classes, run sudo texhash
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S insect
     
    @@ -3428,9 +3414,9 @@ In order for LaTeX to be aware of new packages/classes, run sudo texhash
    -
    -

    Usage

    -
    +
    +

    Usage

    +
    @@ -3469,9 +3455,9 @@ In order for LaTeX to be aware of new packages/classes, run sudo texhash -
    @@ -3765,9 +3751,9 @@ To check the status of the service:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S khal
     
    @@ -3824,9 +3810,9 @@ On the phone:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S newboat
     
    @@ -3834,9 +3820,9 @@ On the phone:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    https://newsboat.org/releases/2.12/docs/newsboat.html ~/.newsboat/ @@ -3844,9 +3830,9 @@ On the phone:

    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S wunderline
     
    @@ -3881,9 +3867,9 @@ On the phone:
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +

    Add a task with:

    @@ -3942,9 +3928,9 @@ Other commands: https://pwmt.org/projects/zathura/

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S zathura
     
    @@ -3964,18 +3950,18 @@ It seems that mupdf is better that poppler to view pdf.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/zathura/zathurarc

    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -4078,9 +4064,9 @@ pdfpc is a great tool for showing pdf presentations. It support: -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S pdfpc
     
    @@ -4098,9 +4084,9 @@ pdfpc is a great tool for showing pdf presentations. It support:
    -
    -

    Usage

    -
    +
    +

    Usage

    +
    pdfpc filename.pdf
     
    @@ -4123,10 +4109,10 @@ It seems the color is due to this part of the script. Should then source this fi

    -
    BASE16_SHELL="$HOME/.base16-manager/chriskempson/base16-shell/"
    -[ -n "$PS1" ] && \
    -    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
    -        eval "$("$BASE16_SHELL/profile_helper.sh")"
    +
    BASE16_SHELL="$HOME/.base16-manager/chriskempson/base16-shell/"
    +[ -n "$PS1" ] && \
    +    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
    +        eval "$("$BASE16_SHELL/profile_helper.sh")"
     
    @@ -4189,11 +4175,11 @@ Then we can use these colors multiple applications. This changes the shell colors. This should be added to ~/.bashrc:

    -
    # Base16 Shell
    -BASE16_SHELL="$HOME/.config/base16-shell/"
    -[ -n "$PS1" ] && \
    -    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
    -        eval "$("$BASE16_SHELL/profile_helper.sh")"
    +
    # Base16 Shell
    +BASE16_SHELL="$HOME/.config/base16-shell/"
    +[ -n "$PS1" ] && \
    +    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
    +        eval "$("$BASE16_SHELL/profile_helper.sh")"
     
    @@ -4214,6 +4200,27 @@ This help changes many applications colors at once.
    +
    +

    Streaming - OBS

    +
    +
    +
    yay -Ss obs-studio
    +
    +
    + +

    +To share the screen as a webcam: +http://dlaw.me/webcam-spoofing-with-obs/ +

    +
    +
    yay -S obs-v4l2sink
    +yay -S v4l2loopback-dkms-git
    +sudo modprobe v4l2loopback exclusive_caps=1 video_nr=9
    +
    +
    +
    +
    +

    Graphical Editor

    @@ -4233,9 +4240,9 @@ This help changes many applications colors at once.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S nordvpn-bin
     
    @@ -4243,20 +4250,20 @@ This help changes many applications colors at once.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +
    -
    sudo systemctl enable nordvpnd.service
    -sudo systemctl start nordvpnd.service
    +
    sudo systemctl enable nordvpnd.service
    +sudo systemctl start nordvpnd.service
     
    -
    -

    Usage

    -
    +
    +

    Usage

    +
    @@ -4313,9 +4320,9 @@ sudo systemctl start nordvpnd.service -
    -

    Others

    -
    +
    +

    Others

    +

    Wallpaper: xwallpaper

    @@ -4370,7 +4377,7 @@ sudo systemctl start nordvpnd.service
    -
    yay -S fd ripgrep pdf2svg pdftk unclutter
    +
    yay -S fd ripgrep pdf2svg pdftk unclutter pdfarranger
     
    @@ -4687,9 +4694,9 @@ Will create split1.pdf to split6.pdf files correspondi
    -
    -

    Others

    -
    +
    +

    Others

    +
    @@ -4778,6 +4785,26 @@ Will create split1.pdf to split6.pdf files correspondi + + + + + + + + + + + + + + + + + + + +
    maim Take screenshots
    batcat alternative
    procsps alternative
    sdsed alternative
    inxiCLI tool to get system information
    @@ -4937,9 +4964,9 @@ Use apack and aunpack:

    For loop

    -
    for file in ./*; do
    -  command ${file};
    -done
    +
    for file in ./*; do
    +  command ${file};
    +done
     
    @@ -4953,9 +4980,9 @@ To improve the startup time.

    -
    sudo systemctl disable apparmor
    -sudo systemctl disable snapd
    -sudo systemctl disable systemd-backlight@backlight\:intel_backlight.service
    +
    sudo systemctl disable apparmor
    +sudo systemctl disable snapd
    +sudo systemctl disable systemd-backlight@backlight\:intel_backlight.service
     
    @@ -4963,15 +4990,15 @@ sudo systemctl disable systemd-backlight@backlight\:intel_backlight.service To see next timers

    -
    systemctl --user list-timers
    +
    systemctl --user list-timers
     
    -
    -

    Ressources

    -
    +
    +

    Ressources

    +

    Dotfiles

    @@ -5025,9 +5052,9 @@ bfg - Removes large or troublesome blobs like git-filter-branch does, but faster
    -
    -

    Text Editors

    -
    +
    +

    Text Editors

    +

    aspell - Spell checker with better logic than ispell vim - Vi ’workalike’ with many additional features @@ -5036,8 +5063,8 @@ neovim - Ambitious Vim-fork focused on extensibility and agility

    -
    -

    LaTeX

    +
    +

    LaTeX

    Mutt

    @@ -5316,7 +5343,7 @@ moreutils - Collection of tools that nobody wrote when UNIX was young

    Author: Thomas Dehaeze

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/mail.html b/docs/mail.html index b9bf14a..bc1826a 100644 --- a/docs/mail.html +++ b/docs/mail.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Mail Configuration @@ -29,8 +29,8 @@
  • Synchronize Mailboxes - Mbsync @@ -38,8 +38,8 @@
  • Send Mails - Msmtp
  • -
    -

    Gmail Account

    -
    +
    +

    Gmail Account

    +
    IMAPAccount gmail
     Host imap.gmail.com
     User dehaeze.thomas@gmail.com
    -PassCmd "pass email/dehaeze.thomas@gmail.com"
    +PassCmd "pass email/dehaeze.thomas@gmail.com"
     SSLType IMAPS
     AuthMechs LOGIN
     CertificateFile /etc/ssl/certs/ca-certificates.crt
    @@ -205,35 +205,35 @@ Path ~/.mail/gmail/
     Inbox ~/.mail/gmail/Inbox
     
     Channel gmail-Home
    -Master :gmail-remote:"INBOX"
    +Master :gmail-remote:"INBOX"
     Slave :gmail-local:Inbox
     
     Channel gmail-Drafts
    -Master :gmail-remote:"[Gmail]/Drafts"
    +Master :gmail-remote:"[Gmail]/Drafts"
     Slave :gmail-local:Drafts
     
     Channel gmail-Sent
    -Master :gmail-remote:"[Gmail]/Sent Mail"
    +Master :gmail-remote:"[Gmail]/Sent Mail"
     Slave :gmail-local:Sent
     
     Channel gmail-Trash
    -Master :gmail-remote:"[Gmail]/Trash"
    +Master :gmail-remote:"[Gmail]/Trash"
     Slave :gmail-local:Trash
     
     Channel gmail-All
    -Master :gmail-remote:"[Gmail]/All Mail"
    +Master :gmail-remote:"[Gmail]/All Mail"
     Slave :gmail-local:Archive
     
    -
    # Catch-all for everything else: note that the `Patterns` have to exclude both
    -# the remote and local names for all the folders we want to exclude (except
    -# "INBOX", which is special-cased, it would seem).
    +
    # Catch-all for everything else: note that the `Patterns` have to exclude both
    +# the remote and local names for all the folders we want to exclude (except
    +# "INBOX", which is special-cased, it would seem).
     Channel gmail
     Master :gmail-remote:
     Slave :gmail-local:
    -# Exclude everything under the internal [Gmail] folder, except the interesting folders
    +# Exclude everything under the internal [Gmail] folder, except the interesting folders
     Patterns *
     Patterns !INBOX
     Patterns ![Gmail]*
    @@ -247,9 +247,9 @@ Patterns !Starred
     
    -
    # For doing a quick sync of just the INBOX with `mbsync gmail-download`.
    +
    # For doing a quick sync of just the INBOX with `mbsync gmail-download`.
     Channel gmail-download
    -Master :gmail-remote:"INBOX"
    +Master :gmail-remote:"INBOX"
     Slave :gmail-local:Inbox
     Create Slave
     Expunge Slave
    @@ -259,14 +259,14 @@ Sync Pull
     
    -
    -

    ESRF Account

    -
    +
    +

    ESRF Account

    +
    IMAPAccount esrf
     Host imaps.esrf.fr
     User dehaeze
    -PassCmd "pass email/thomas.dehaeze@esrf.fr"
    +PassCmd "pass email/thomas.dehaeze@esrf.fr"
     SSLType IMAPS
     AuthMechs LOGIN
     
    @@ -281,23 +281,23 @@ Path ~/.mail/esrf/ Inbox ~/.mail/esrf/Inbox Channel esrf-Home -Master :esrf-remote:"Inbox" +Master :esrf-remote:"Inbox" Slave :esrf-local:Inbox Channel esrf-Drafts -Master :esrf-remote:"Drafts" +Master :esrf-remote:"Drafts" Slave :esrf-local:Drafts Channel esrf-Archive -Master :esrf-remote:"Archive" +Master :esrf-remote:"Archive" Slave :esrf-local:Archive Channel esrf-Sent -Master :esrf-remote:"Sent" +Master :esrf-remote:"Sent" Slave :esrf-local:Sent Channel esrf-Trash -Master :esrf-remote:"Trash" +Master :esrf-remote:"Trash" Slave :esrf-local:Trash
    @@ -314,7 +314,7 @@ For doing a quick sync of just the INBOX with `mbsync esrf-download`.

    Channel esrf-download
    -Master :esrf-remote:"INBOX"
    +Master :esrf-remote:"INBOX"
     Slave :esrf-local:Inbox
     Create Slave
     Expunge Slave
    @@ -331,7 +331,7 @@ Sync Pull
     
    IMAPAccount ulg
     Host mail.ulg.ac.be
     User thomas.dehaeze@doct.uliege.be
    -PassCmd "pass email/thomas.dehaeze@doct.uliege.be"
    +PassCmd "pass email/thomas.dehaeze@doct.uliege.be"
     SSLType IMAPS
     AuthMechs LOGIN
     
    @@ -346,23 +346,23 @@ Path ~/.mail/ulg/ Inbox ~/.mail/ulg/Inbox Channel ulg-Home -Master :ulg-remote:"Inbox" +Master :ulg-remote:"Inbox" Slave :ulg-local:Inbox Channel ulg-Drafts -Master :ulg-remote:"Drafts" +Master :ulg-remote:"Drafts" Slave :ulg-local:Drafts Channel ulg-Archive -Master :ulg-remote:"Archive" +Master :ulg-remote:"Archive" Slave :ulg-local:Archive Channel ulg-Sent -Master :ulg-remote:"Sent" +Master :ulg-remote:"Sent" Slave :ulg-local:Sent Channel ulg-Trash -Master :ulg-remote:"Trash" +Master :ulg-remote:"Trash" Slave :ulg-local:Trash
    @@ -379,7 +379,7 @@ For doing a quick sync of just the INBOX with `mbsync ulg-download`.

    Channel ulg-download
    -Master :ulg-remote:"Inbox"
    +Master :ulg-remote:"Inbox"
     Slave :ulg-local:Inbox
     Create Slave
     Expunge Slave
    @@ -396,7 +396,7 @@ Sync Pull
     
    IMAPAccount uliege
     Host mail.ulg.ac.be
     User tdehaeze@uliege.be
    -PassCmd "pass email/tdehaeze@uliege.be"
    +PassCmd "pass email/tdehaeze@uliege.be"
     SSLType IMAPS
     AuthMechs LOGIN
     
    @@ -411,23 +411,23 @@ Path ~/.mail/uliege/ Inbox ~/.mail/uliege/Inbox Channel uliege-Home -Master :uliege-remote:"Inbox" +Master :uliege-remote:"Inbox" Slave :uliege-local:Inbox Channel uliege-Drafts -Master :uliege-remote:"Drafts" +Master :uliege-remote:"Drafts" Slave :uliege-local:Drafts Channel uliege-Archive -Master :uliege-remote:"Archive" +Master :uliege-remote:"Archive" Slave :uliege-local:Archive Channel uliege-Sent -Master :uliege-remote:"Sent" +Master :uliege-remote:"Sent" Slave :uliege-local:Sent Channel uliege-Trash -Master :uliege-remote:"Trash" +Master :uliege-remote:"Trash" Slave :uliege-local:Trash
    @@ -444,7 +444,7 @@ For doing a quick sync of just the INBOX with `mbsync uliege-download`.

    Channel uliege-download
    -Master :uliege-remote:"Inbox"
    +Master :uliege-remote:"Inbox"
     Slave :uliege-local:Inbox
     Create Slave
     Expunge Slave
    @@ -476,34 +476,34 @@ tls_certcheck off
     
    -
    -

    Gmail Account

    -
    +
    +

    Gmail Account

    +
    account      gmail
     host         smtp.gmail.com
    -port         587
    +port         587
     protocol     smtp
     from         dehaeze.thomas@gmail.com
     user         dehaeze.thomas@gmail.com
    -passwordeval "pass email/dehaeze.thomas@gmail.com"
    +passwordeval "pass email/dehaeze.thomas@gmail.com"
     
    -
    -

    ESRF Account

    -
    +
    +

    ESRF Account

    +
    account        esrf
     host           smtps.esrf.fr
    -port           465
    +port           465
     protocol       smtp
     from           thomas.dehaeze@esrf.fr
     user           dehaeze
     tls_starttls   off
    -passwordeval   "pass email/thomas.dehaeze@esrf.fr"
    +passwordeval   "pass email/thomas.dehaeze@esrf.fr"
     
    @@ -515,12 +515,12 @@ passwordeval "pass email/thomas.dehaeze@esrf.fr"
    account        ulg
     host           smtp.ulg.ac.be
    -port           587
    +port           587
     protocol       smtp
     from           thomas.dehaeze@doct.uliege.be
     user           s177313
     tls_starttls   on
    -passwordeval   "pass email/thomas.dehaeze@doct.uliege.be"
    +passwordeval   "pass email/thomas.dehaeze@doct.uliege.be"
     
    @@ -532,12 +532,12 @@ passwordeval "pass email/thomas.dehaeze@doct.uliege.be"
    account        uliege
     host           smtp.ulg.ac.be
    -port           587
    +port           587
     protocol       smtp
     from           tdehaeze@uliege.be
     user           u231244
     tls_starttls   on
    -passwordeval   "pass email/tdehaeze@uliege.be"
    +passwordeval   "pass email/tdehaeze@uliege.be"
     
    @@ -566,7 +566,7 @@ Useful commands are described in the -
    mu find 'mime:application/pdf'
    +
    mu find 'mime:application/pdf'
     
    @@ -667,16 +667,16 @@ bind generic,pager,editor,index <Return> noop bind generic,pager,editor,index | noop -bind generic,pager,editor,index 1 noop -bind generic,pager,editor,index 2 noop -bind generic,pager,editor,index 3 noop -bind generic,pager,editor,index 4 noop -bind generic,pager,editor,index 5 noop -bind generic,pager,editor,index 6 noop -bind generic,pager,editor,index 7 noop -bind generic,pager,editor,index 8 noop -bind generic,pager,editor,index 9 noop -bind generic,pager,editor,index 0 noop +bind generic,pager,editor,index 1 noop +bind generic,pager,editor,index 2 noop +bind generic,pager,editor,index 3 noop +bind generic,pager,editor,index 4 noop +bind generic,pager,editor,index 5 noop +bind generic,pager,editor,index 6 noop +bind generic,pager,editor,index 7 noop +bind generic,pager,editor,index 8 noop +bind generic,pager,editor,index 9 noop +bind generic,pager,editor,index 0 noop bind generic,pager,editor,index ! noop bind generic,pager,editor,index @ noop bind generic,pager,editor,index $ noop @@ -871,15 +871,15 @@ bind generic,pager,editor,index <Esc>) noop
    bind index,pager,compose Q exit
    -macro index q "<shell-escape>if [ $TMUX ]; then tmux detach; fi<enter>"
    +macro index q "<shell-escape>if [ $TMUX ]; then tmux detach; fi<enter>"
     
    -
    -

    Generic

    -
    +
    +

    Generic

    +
    bind generic Q exit
     
    @@ -889,11 +889,11 @@ bind generic l select-entry
     bind generic,index k previous-entry
     bind generic,index j next-entry
     
    -bind generic,index 0 first-entry
    +bind generic,index 0 first-entry
     bind generic,index $ last-entry
     
    -bind generic,index \031 previous-entry # Mouse wheel
    -bind generic,index \005 next-entry # Mouse wheel
    +bind generic,index \031 previous-entry # Mouse wheel
    +bind generic,index \005 next-entry # Mouse wheel
     
     bind generic,index gg first-entry
     bind generic,index G last-entry
    @@ -925,34 +925,34 @@ bind index <Return> display-message
     bind pager l view-attachments
     
     bind pager gg top
    -bind pager 0 top
    +bind pager 0 top
     
     bind pager G bottom
     bind pager $ bottom
     
    -macro index h "<change-folder>?" "Go back to the list of mailboxes"
    +macro index h "<change-folder>?" "Go back to the list of mailboxes"
     bind pager h exit
     bind pager q exit
     
    -macro index c "<change-folder>?<toggle-mailboxes>" "change folder"
    +macro index c "<change-folder>?<toggle-mailboxes>" "change folder"
     
     bind index,pager u undelete-message
     
     bind index,pager P print-message
     
    -# Compose a new email (not a reply) to the sender
    +# Compose a new email (not a reply) to the sender
     bind index,pager @ compose-to-sender
     
    -# Marl All message as read
    +# Marl All message as read
     macro index \Cr \
    -    "<tag-pattern>~N<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" \
    -    "mark all new as read"
    +    "<tag-pattern>~N<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" \
    +    "mark all new as read"
     
    bind index za collapse-thread
    -bind index zA collapse-all # Missing :folddisable/foldenable
    +bind index zA collapse-all # Missing :folddisable/foldenable
     
    @@ -983,8 +983,8 @@ Sync Mailbox Sync email

    -
    macro index,pager o "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh<enter>"
    -macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh -a<enter>"
    +
    macro index,pager o "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh<enter>"
    +macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh -a<enter>"
     
    @@ -992,7 +992,7 @@ macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail. Make quick html view macro

    -
    macro index,pager H "<view-attachments><search>html<enter><view-mailcap><exit>"
    +
    macro index,pager H "<view-attachments><search>html<enter><view-mailcap><exit>"
     
    @@ -1000,12 +1000,12 @@ Make quick html view macro Open mail with Vim

    -
    macro index,pager V "<view-attachments><search>plain<enter><view-mailcap><exit>"
    +
    macro index,pager V "<view-attachments><search>plain<enter><view-mailcap><exit>"
     
    -
    # bind index,pager U toggle-new
    +
    # bind index,pager U toggle-new
     
    @@ -1044,9 +1044,9 @@ bind index,pager N search-opposite
    -
    -

    Attachments

    -
    +
    +

    Attachments

    +
    bind attach l view-attach
     
    @@ -1055,7 +1055,7 @@ bind attach q exit
     
     bind attach <return> view-mailcap
     
    -macro attach W <save-entry><kill-line>~/Downloads/<enter>y "Save entry"
    +macro attach W <save-entry><kill-line>~/Downloads/<enter>y "Save entry"
     
    @@ -1077,7 +1077,7 @@ bind compose a attach-file Open another instance of neomutt in readonly mode while composing

    -
    macro compose M "<shell-escape>$TERMINAL -e \"neomutt -R\"<enter>"
    +
    macro compose M "<shell-escape>$TERMINAL -e \"neomutt -R\"<enter>"
     
    @@ -1085,7 +1085,15 @@ Open another instance of neomutt in readonly mode while composing Attach multiple files using ranger

    -
    macro compose A "<shell-escape>bash $HOME/.config/neomutt/bin/rangerpick<enter><enter-command>source /tmp/rangerpick<enter><shell-escape>bash $HOME/.config/neomutt/bin/rangerpick clean<enter>" "Attach with Ranger"
    +
    macro compose A "<shell-escape>bash $HOME/.config/neomutt/bin/rangerpick<enter><enter-command>source /tmp/rangerpick<enter><shell-escape>bash $HOME/.config/neomutt/bin/rangerpick clean<enter>" "Attach with Ranger"
    +
    +
    + +

    +Attach file by drooping from GUI +

    +
    +
    macro compose B "<shell-escape>bash $HOME/.config/neomutt/bin/rangerpick dragon<enter><enter-command>source /tmp/rangerpick<enter><shell-escape>bash $HOME/.config/neomutt/bin/rangerpick clean<enter>" "Attach with Ranger"
     
    @@ -1094,12 +1102,14 @@ Attach multiple files using ranger
    Attach with Ranger Script
    -
    tmpfile=/tmp/rangerpick
    -if [ -z "$1" ]; then
    -   ranger --choosefiles $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}'  $tmpfile)" > $tmpfile
    -elif [ $1 == "clean" ]; then
    -  ls $tmpfile
    -fi
    +
    tmpfile=/tmp/rangerpick
    +if [ -z "$1" ]; then
    +    ranger --choosefiles $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}'  $tmpfile)" > $tmpfile
    +elif [ $1 == "dragon" ]; then
    +    dragon-drag-and-drop --target --print-path --keep > $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
    +elif [ $1 == "clean" ]; then
    +    ls $tmpfile
    +fi
     
    @@ -1112,7 +1122,7 @@ fi Write html emails using markdown

    -
    # macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=us-ascii\n"
    +
    # macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=us-ascii\n"
     
    @@ -1124,7 +1134,7 @@ Write html emails using markdown
    bind browser l select-entry
    -macro browser h "<top-page><select-entry>"
    +macro browser h "<top-page><select-entry>"
     
     bind browser t tag-entry
     
    @@ -1134,9 +1144,9 @@ bind browser q exit
     
    -
    -

    Generic

    -
    +
    +

    Generic

    +

    Enter Command

    @@ -1151,16 +1161,16 @@ Enter Command

    Copy and move mails

    -
    macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
    -macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
    +
    macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
    +macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
     
    -
    -

    Sidebar

    -
    +
    +

    Sidebar

    +
    bind index,pager \Cp sidebar-prev
     bind index,pager \Cn sidebar-next
    @@ -1176,7 +1186,7 @@ bind index,pager \Ch sidebar-toggle-visible
     

    Reload Configuration

    -
    macro generic,index,pager,editor ,<Space> ":source ~/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file"
    +
    macro generic,index,pager,editor ,<Space> ":source ~/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file"
     
    @@ -1189,13 +1199,13 @@ bind index,pager \Ch sidebar-toggle-visible Use urlview to extract urls from the mail.

    -
    macro attach,compose,index,pager \cw "\
    -  :set my_tmp_pipe_decode=\$pipe_decode\n\
    -  :set pipe_decode\n\
    -  <pipe-message>urlview\n\
    -  :set pipe_decode=\$my_tmp_pipe_decode\n\
    -  :unset my_tmp_pipe_decode\n" \
    -  'call urlview to extract URLs out of a message'
    +
    macro attach,compose,index,pager \cw "\
    +  :set my_tmp_pipe_decode=\$pipe_decode\n\
    +  :set pipe_decode\n\
    +  <pipe-message>urlview\n\
    +  :set pipe_decode=\$my_tmp_pipe_decode\n\
    +  :unset my_tmp_pipe_decode\n" \
    +  'call urlview to extract URLs out of a message'
     
    @@ -1205,10 +1215,10 @@ Use urlview to extract urls from the mail.

    Searching using Mu

    -
    macro index,pager \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mail/search " \
    -                         "mu find"
    -macro index,pager gf "<change-folder-readonly>~/.mail/search<enter>" \
    -                         "mu find results"
    +
    macro index,pager \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mail/search " \
    +                         "mu find"
    +macro index,pager gf "<change-folder-readonly>~/.mail/search<enter>" \
    +                         "mu find results"
     
    @@ -1223,7 +1233,7 @@ macro index,pager gf "<change-folder-readonly>~/.mail/search<enter>"

    -
    macro index,pager S "<pipe-message>$HOME/.config/neomutt/bin/mutt-save-org-link.py\n"
    +
    macro index,pager S "<pipe-message>$HOME/.config/neomutt/bin/mutt-save-org-link.py\n"
     
    @@ -1232,24 +1242,24 @@ macro index,pager gf "<change-folder-readonly>~/.mail/search<enter>"
    Link mail to orgmode - Script
    -
    import sys
    -import email
    -import subprocess
    -import urllib.parse
    +
    import sys
    +import email
    +import subprocess
    +import urllib.parse
     
    -# Parse the email from standard input
    -message_bytes = sys.stdin.buffer.read()
    -message = email.message_from_bytes(message_bytes)
    +# Parse the email from standard input
    +message_bytes = sys.stdin.buffer.read()
    +message = email.message_from_bytes(message_bytes)
     
    -# Grab the relevant message headers
    -message_id = urllib.parse.quote(message['message-id'].strip()[1:-1])
    -subject = message['subject'].replace('[', '{').replace(']', '}').replace('\n', ' ')
    -subject = (subject[:75] + '..') if len(subject) > 75 else subject
    +# Grab the relevant message headers
    +message_id = urllib.parse.quote(message['message-id'].strip()[1:-1])
    +subject = message['subject'].replace('[', '{').replace(']', '}').replace('\n', ' ')
    +subject = (subject[:75] + '..') if len(subject) > 75 else subject
     
    -# Ask emacsclient to save a link to the message
    -p = subprocess.Popen([
    -    'emacsclient',
    -    f'org-protocol://capture?template=pm&url={message_id}&title={subject}'
    +# Ask emacsclient to save a link to the message
    +p = subprocess.Popen([
    +    'emacsclient',
    +    f'org-protocol://capture?template=pm&url={message_id}&title={subject}'
     ])
     
     p.wait()
    @@ -1280,7 +1290,7 @@ color indicator   color000       color021
     color tree        color021       color000
     color progress    color000       color021
     
    -# basic monocolor screen
    +# basic monocolor screen
     mono  bold      bold
     mono  underline underline
     mono  indicator reverse
    @@ -1294,43 +1304,43 @@ mono  error     bold
     

    Index

    -
    color index color021       color000 "~A"      # All messages
    -color index brightcolor006 color000 "~N"      # New messages
    -color index color020       color000 "~O"      # Old messages
    -color index color020       color000 "~Q"      # messages that have been replied to
    -color index color021       color000 "~R"      # read messages
    -color index color006       color000 "~U"      # unread messages
    -color index color021       color000 "~R~p!~F" # messages to me
    -color index brightcolor006 color000 "~N~p!~F" # new messages to me
    -color index brightcolor006 color000 "~U~p!~F" # unread messages to me
    -color index color005       color000 "~F"      # flagged messages
    -color index color005       color000 "~F~p"    # flagged messages to me
    -color index brightcolor006 color000 "~N~F"    # new flagged messages
    -color index brightcolor006 color000 "~N~F~p"  # new flagged messages to me
    -color index brightcolor006 color000 "~U~F~p"  # new flagged messages to me
    -color index brightcolor000 color001 "~D"      # deleted messages
    +
    color index color021       color000 "~A"      # All messages
    +color index brightcolor006 color000 "~N"      # New messages
    +color index color020       color000 "~O"      # Old messages
    +color index color020       color000 "~Q"      # messages that have been replied to
    +color index color021       color000 "~R"      # read messages
    +color index color006       color000 "~U"      # unread messages
    +color index color021       color000 "~R~p!~F" # messages to me
    +color index brightcolor006 color000 "~N~p!~F" # new messages to me
    +color index brightcolor006 color000 "~U~p!~F" # unread messages to me
    +color index color005       color000 "~F"      # flagged messages
    +color index color005       color000 "~F~p"    # flagged messages to me
    +color index brightcolor006 color000 "~N~F"    # new flagged messages
    +color index brightcolor006 color000 "~N~F~p"  # new flagged messages to me
    +color index brightcolor006 color000 "~U~F~p"  # new flagged messages to me
    +color index brightcolor000 color001 "~D"      # deleted messages
     
    -color index brightcolor021 color019 "~v~(!~N)"    # collapsed thread with no unread
    -color index brightcolor006 color019 "~v~(~N)"     # collapsed thread with some unread
    -color index brightcolor006 color019 "~N~v~(~N)"   # collapsed thread with unread parent
    -color index brightcolor005 color019 "~v~(~F)!~N"  # collapsed thread with flagged, no unread
    -color index brightcolor006 color019 "~v~(~F~N)"   # collapsed thread with some unread & flagged
    -color index brightcolor006 color019 "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
    -color index brightcolor005 color019 "~N~v~(~F)"   # collapsed thread with unread parent, no unread inside, but some flagged
    -color index brightcolor000 color001 "~v~(~D)"     # thread with deleted (doesn't differentiate between all or partial)
    +color index brightcolor021 color019 "~v~(!~N)"    # collapsed thread with no unread
    +color index brightcolor006 color019 "~v~(~N)"     # collapsed thread with some unread
    +color index brightcolor006 color019 "~N~v~(~N)"   # collapsed thread with unread parent
    +color index brightcolor005 color019 "~v~(~F)!~N"  # collapsed thread with flagged, no unread
    +color index brightcolor006 color019 "~v~(~F~N)"   # collapsed thread with some unread & flagged
    +color index brightcolor006 color019 "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
    +color index brightcolor005 color019 "~N~v~(~F)"   # collapsed thread with unread parent, no unread inside, but some flagged
    +color index brightcolor000 color001 "~v~(~D)"     # thread with deleted (doesn't differentiate between all or partial)
     
    -
    -

    Sidebar

    -
    +
    +

    Sidebar

    +
    -
    color sidebar_indicator color000       color021  # Mailbox is open
    -color sidebar_highlight color000       color003  # Mailbox is highlighted
    -color sidebar_new       brightcolor006 color000  # Mailbox contains new mail
    -color sidebar_ordinary  color021       color000  # Mailbox contains new mail
    +
    color sidebar_indicator color000       color021  # Mailbox is open
    +color sidebar_highlight color000       color003  # Mailbox is highlighted
    +color sidebar_new       brightcolor006 color000  # Mailbox contains new mail
    +color sidebar_ordinary  color021       color000  # Mailbox contains new mail
     
    @@ -1341,36 +1351,36 @@ color sidebar_ordinary color021 color000 # Mailbox contains new mail
    color hdrdefault color006       color000
    -color header     brightcolor006 color000 "^(From)"
    -color header     brightcolor004 color000 "^(Subject)"
    +color header     brightcolor006 color000 "^(From)"
    +color header     brightcolor004 color000 "^(Subject)"
     
    -
    -

    Attachments

    -
    +
    +

    Attachments

    +
    -
    # Color if the attachment is autoviewed
    -color   attach_headers     brightgreen     default    "Autoview"
    -# Color only the brackets around the headers
    -color   attach_headers     brightyellow    default    "^\\[--"
    -color   attach_headers     brightyellow    default    "--]$"
    -# Color the mime type and the size
    -color   attach_headers     green           default    "Type: [a-z]+/[a-z0-9\-]+"
    -color   attach_headers     green           default    "Size: [0-9\.]+[KM]"
    -# Color GPGME signature checks
    -color   attach_headers     brightgreen     default    "Good signature from.*"
    -color   attach_headers     brightred       default    "Bad signature from.*"
    -color   attach_headers     brightred       default    "BAD signature from.*"
    -color   attach_headers     brightred       default    "Note: This key has expired!"
    -color   attach_headers     brightmagenta   default    "Problem signature from.*"
    -color   attach_headers     brightmagenta   default    "WARNING: This key is not certified with a trusted signature!"
    -color   attach_headers     brightmagenta   default    "         There is no indication that the signature belongs to the owner."
    -color   attach_headers     brightmagenta   default    "can't handle these multiple signatures"
    -color   attach_headers     brightmagenta   default    "signature verification suppressed"
    -color   attach_headers     brightmagenta   default    "invalid node with packet of type"
    +
    # Color if the attachment is autoviewed
    +color   attach_headers     brightgreen     default    "Autoview"
    +# Color only the brackets around the headers
    +color   attach_headers     brightyellow    default    "^\\[--"
    +color   attach_headers     brightyellow    default    "--]$"
    +# Color the mime type and the size
    +color   attach_headers     green           default    "Type: [a-z]+/[a-z0-9\-]+"
    +color   attach_headers     green           default    "Size: [0-9\.]+[KM]"
    +# Color GPGME signature checks
    +color   attach_headers     brightgreen     default    "Good signature from.*"
    +color   attach_headers     brightred       default    "Bad signature from.*"
    +color   attach_headers     brightred       default    "BAD signature from.*"
    +color   attach_headers     brightred       default    "Note: This key has expired!"
    +color   attach_headers     brightmagenta   default    "Problem signature from.*"
    +color   attach_headers     brightmagenta   default    "WARNING: This key is not certified with a trusted signature!"
    +color   attach_headers     brightmagenta   default    "         There is no indication that the signature belongs to the owner."
    +color   attach_headers     brightmagenta   default    "can't handle these multiple signatures"
    +color   attach_headers     brightmagenta   default    "signature verification suppressed"
    +color   attach_headers     brightmagenta   default    "invalid node with packet of type"
     
    @@ -1398,11 +1408,11 @@ color normal color021 color000

    PGP

    -
    color body  color001 color000         "(BAD signature)"
    -color body  color002 color000         "(Good signature)"
    -color body  color002 color000         "^gpg: Good signature .*"
    -color body  color002 color000         "^gpg: "
    -color body  color002 color000         "^gpg: BAD signature from.*"
    +
    color body  color001 color000         "(BAD signature)"
    +color body  color002 color000         "(Good signature)"
    +color body  color002 color000         "^gpg: Good signature .*"
    +color body  color002 color000         "^gpg: "
    +color body  color002 color000         "^gpg: BAD signature from.*"
     
    @@ -1412,7 +1422,7 @@ color body color002 color000 "^gpg: BAD signature from.*"

    Urls

    -
    color body color006 color000         "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
    +
    color body color006 color000         "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
     
    @@ -1422,7 +1432,7 @@ color body color002 color000 "^gpg: BAD signature from.*"

    Emails

    -
    color body color006 color000 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
    +
    color body color006 color000 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
     
    @@ -1433,7 +1443,7 @@ color body color002 color000 "^gpg: BAD signature from.*"

    Contacts with Mu

    -
    set query_command="mu cfind '%s' -o mutt-ab"
    +
    set query_command="mu cfind '%s' -o mutt-ab"
     
     bind editor <Tab> complete-query
     
    @@ -1445,13 +1455,13 @@ bind editor <Tab> complete-query

    Paths

    -
    set folder           = ~/.mail                         # mail location
    -set alias_file       = ~/.config/neomutt/alias         # where to store aliases
    -set header_cache     = ~/.config/neomutt/cache/headers # where to store headers
    -set message_cachedir = ~/.config/neomutt/cache/bodies  # where to store bodies
    -set certificate_file = ~/.config/neomutt/certificates  # where to store certs
    -set mailcap_path     = ~/.config/neomutt/mailcap       # entries for filetypes
    -set tmpdir           = ~/.config/neomutt/temp          # where to keep temp files
    +
    set folder           = ~/.mail                         # mail location
    +set alias_file       = ~/.config/neomutt/alias         # where to store aliases
    +set header_cache     = ~/.config/neomutt/cache/headers # where to store headers
    +set message_cachedir = ~/.config/neomutt/cache/bodies  # where to store bodies
    +set certificate_file = ~/.config/neomutt/certificates  # where to store certs
    +set mailcap_path     = ~/.config/neomutt/mailcap       # entries for filetypes
    +set tmpdir           = ~/.config/neomutt/temp          # where to keep temp files
     
    @@ -1465,7 +1475,7 @@ set tmpdir = ~/.config/neomutt/temp # where to keep temp file

    -
    # set print_command="/usr/bin/muttprint %s -p ctb110c1u"
    +
    # set print_command="/usr/bin/muttprint %s -p ctb110c1u"
     
    @@ -1475,19 +1485,19 @@ set tmpdir = ~/.config/neomutt/temp # where to keep temp file

    Accounts

    -
    set spoolfile = "+gmail/Inbox" # Default inbox
    -set realname = "Dehaeze Thomas"
    -set from = "dehaeze.thomas@gmail.com"
    +
    set spoolfile = "+gmail/Inbox" # Default inbox
    +set realname = "Dehaeze Thomas"
    +set from = "dehaeze.thomas@gmail.com"
     
     folder-hook gmail/* source ~/.config/neomutt/accounts/gmail
     folder-hook esrf/*  source ~/.config/neomutt/accounts/esrf
     folder-hook ulg/*   source ~/.config/neomutt/accounts/ulg
     folder-hook uliege/*   source ~/.config/neomutt/accounts/uliege
     
    -macro index,pager gl "<change-folder>+uliege/Inbox<enter>" "go to inbox"
    -macro index,pager gu "<change-folder>+ulg/Inbox<enter>" "go to inbox"
    -macro index,pager ge "<change-folder>+esrf/Inbox<enter>" "go to inbox"
    -macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
    +macro index,pager gl "<change-folder>+uliege/Inbox<enter>" "go to inbox"
    +macro index,pager gu "<change-folder>+ulg/Inbox<enter>" "go to inbox"
    +macro index,pager ge "<change-folder>+esrf/Inbox<enter>" "go to inbox"
    +macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
     
    @@ -1496,171 +1506,27 @@ macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inb

    Gmail

    -
    -
    Configuration
    -
    -
    -
    set from     = "dehaeze.thomas@gmail.com"
    -set sendmail = "msmtp -a gmail"
    -
    -# Other special folders.
    -set mbox      = "+gmail/Archive"
    -unset record # Don't copy send message to Sent folder: Gmail does that for us
    -set postponed = "+gmail/Drafts"
    -
    -set signature = "~/.config/neomutt/accounts/gmail.signature"
    -
    -macro index,pager d \
    -  "<save-message>+gmail/Archive<enter>" \
    -  "Move message to the Archive"
    -
    -macro index,pager D \
    -  "<save-message>+gmail/Trash<enter>" \
    -  "Move message to the Trash"
    -
    -
    -
    -
    - -
    -
    Signature
    -
    -
    -
    Thomas Dehaeze
    -
    -
    -

    -This empty code block is used to add a new line after signature -

    -
    -
    -
    -
    -
    -
    -
    - -
    -

    ESRF

    -
    -
    -
    -
    Configuration
    -
    -
    -
    set from     = "thomas.dehaeze@esrf.fr"
    -set sendmail = "msmtp -a esrf"
    -
    -# Other special folders.
    -set mbox      = "+esrf/Archive"
    -set record    = "+esrf/Sent"
    -set postponed = "+esrf/Drafts"
    -
    -set signature = "~/.config/neomutt/accounts/esrf.signature"
    -
    -macro index,pager d \
    -  "<save-message>+esrf/Archive<enter>" \
    -  "Move message to the Archive"
    -
    -macro index,pager D \
    -  "<save-message>+esrf/Trash<enter>" \
    -  "Move message to the Trash"
    -
    -
    -
    -
    - -
    -
    Signature
    -
    -
    -
    Thomas Dehaeze
    -
    -
    -

    -This empty code block is used to add a new line after signature -

    -
    -
    -
    -
    -
    -
    -
    - -
    -

    ULG

    -
    -
    -
    -
    Configuration
    -
    -
    -
    set from     = "thomas.dehaeze@doct.uliege.be"
    -set sendmail = "msmtp -a ulg"
    -
    -# Other special folders.
    -set mbox      = "+ulg/Archive"
    -set record    = "+ulg/Sent"
    -set postponed = "+ulg/Drafts"
    -
    -set signature = "~/.config/neomutt/accounts/ulg.signature"
    -
    -macro index,pager d \
    -  "<save-message>+ulg/Archive<enter>" \
    -  "Move message to the Archive"
    -
    -macro index,pager D \
    -  "<save-message>+ulg/Trash<enter>" \
    -  "Move message to the Trash"
    -
    -
    -
    -
    - -
    -
    Signature
    -
    -
    -
    Thomas Dehaeze
    -
    -
    -

    -This empty code block is used to add a new line after signature -

    -
    -
    -
    -
    -
    -
    -
    - -
    -

    ULIEGE

    -
    -
    Configuration
    -
    set from     = "tdehaeze@uliege.be"
    -set sendmail = "msmtp -a uliege"
    +
    set from     = "dehaeze.thomas@gmail.com"
    +set sendmail = "msmtp -a gmail"
     
    -# Other special folders.
    -set mbox      = "+uliege/Archive"
    -set record    = "+uliege/Sent"
    -set postponed = "+uliege/Drafts"
    +# Other special folders.
    +set mbox      = "+gmail/Archive"
    +unset record # Don't copy send message to Sent folder: Gmail does that for us
    +set postponed = "+gmail/Drafts"
     
    -set signature = "~/.config/neomutt/accounts/uliege.signature"
    +set signature = "~/.config/neomutt/accounts/gmail.signature"
     
     macro index,pager d \
    -  "<save-message>+uliege/Archive<enter>" \
    -  "Move message to the Archive"
    +  "<save-message>+gmail/Archive<enter>" \
    +  "Move message to the Archive"
     
     macro index,pager D \
    -  "<save-message>+uliege/Trash<enter>" \
    -  "Move message to the Trash"
    +  "<save-message>+gmail/Trash<enter>" \
    +  "Move message to the Trash"
     
    @@ -1683,31 +1549,175 @@ This empty code block is used to add a new line after signature
    + +
    +

    ESRF

    +
    +
    +
    +
    Configuration
    +
    +
    +
    set from     = "thomas.dehaeze@esrf.fr"
    +set sendmail = "msmtp -a esrf"
    +
    +# Other special folders.
    +set mbox      = "+esrf/Archive"
    +set record    = "+esrf/Sent"
    +set postponed = "+esrf/Drafts"
    +
    +set signature = "~/.config/neomutt/accounts/esrf.signature"
    +
    +macro index,pager d \
    +  "<save-message>+esrf/Archive<enter>" \
    +  "Move message to the Archive"
    +
    +macro index,pager D \
    +  "<save-message>+esrf/Trash<enter>" \
    +  "Move message to the Trash"
    +
    +
    +
    +
    + +
    +
    Signature
    +
    +
    +
    Thomas Dehaeze
    +
    +
    +

    +This empty code block is used to add a new line after signature +

    +
    +
    +
    +
    +
    +
    +
    + +
    +

    ULG

    +
    +
    +
    +
    Configuration
    +
    +
    +
    set from     = "thomas.dehaeze@doct.uliege.be"
    +set sendmail = "msmtp -a ulg"
    +
    +# Other special folders.
    +set mbox      = "+ulg/Archive"
    +set record    = "+ulg/Sent"
    +set postponed = "+ulg/Drafts"
    +
    +set signature = "~/.config/neomutt/accounts/ulg.signature"
    +
    +macro index,pager d \
    +  "<save-message>+ulg/Archive<enter>" \
    +  "Move message to the Archive"
    +
    +macro index,pager D \
    +  "<save-message>+ulg/Trash<enter>" \
    +  "Move message to the Trash"
    +
    +
    +
    +
    + +
    +
    Signature
    +
    +
    +
    Thomas Dehaeze
    +
    +
    +

    +This empty code block is used to add a new line after signature +

    +
    +
    +
    +
    +
    +
    +
    + +
    +

    ULIEGE

    +
    +
    +
    +
    Configuration
    +
    +
    +
    set from     = "tdehaeze@uliege.be"
    +set sendmail = "msmtp -a uliege"
    +
    +# Other special folders.
    +set mbox      = "+uliege/Archive"
    +set record    = "+uliege/Sent"
    +set postponed = "+uliege/Drafts"
    +
    +set signature = "~/.config/neomutt/accounts/uliege.signature"
    +
    +macro index,pager d \
    +  "<save-message>+uliege/Archive<enter>" \
    +  "Move message to the Archive"
    +
    +macro index,pager D \
    +  "<save-message>+uliege/Trash<enter>" \
    +  "Move message to the Trash"
    +
    +
    +
    +
    + +
    +
    Signature
    +
    +
    +
    Thomas Dehaeze
    +
    +
    +

    +This empty code block is used to add a new line after signature +

    +
    +
    +
    +
    +
    +
    +

    Basic Options

    -
    set wait_key = no        # shut up, mutt
    -set mbox_type = Maildir  # mailbox type
    -set help = no            # No top bar
    -set timeout = 3          # idle time before scanning
    -set sleep_time = 0       # how long NeoMutt may wait after an error message
    -set mail_check = 0       # minimum time between scans
    -set delete               # don't ask, just do
    -unset confirmappend      # don't ask, just do!
    -set quit                 # don't ask, just do!!
    -set mark_old = no        # read/new is good enough for me
    -set beep_new             # bell on new mails
    -# set pipe_decode          # strip headers and eval mimes when piping
    -set thorough_search      # strip headers and eval mimes before searching
    -set send_charset="us-ascii:utf-8:iso-8859-1"
    -set sendmail_wait = 0 # no please don't silently fail, email is important
    -set use_from             # respect the From: address the editor sends back
    +
    set wait_key = no        # shut up, mutt
    +set mbox_type = Maildir  # mailbox type
    +set help = no            # No top bar
    +set timeout = 3          # idle time before scanning
    +set sleep_time = 0       # how long NeoMutt may wait after an error message
    +set mail_check = 0       # minimum time between scans
    +set delete               # don't ask, just do
    +unset confirmappend      # don't ask, just do!
    +set quit                 # don't ask, just do!!
    +set mark_old = no        # read/new is good enough for me
    +set beep_new             # bell on new mails
    +# set pipe_decode          # strip headers and eval mimes when piping
    +set thorough_search      # strip headers and eval mimes before searching
    +set send_charset="us-ascii:utf-8:iso-8859-1"
    +set sendmail_wait = 0 # no please don't silently fail, email is important
    +set use_from             # respect the From: address the editor sends back
     
    -# Use Vim to compose email, with a few default options.
    -set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert' -c ':Goyo'"
    +# Use Vim to compose email, with a few default options.
    +set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert'"
     
    @@ -1721,9 +1731,9 @@ set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert' -c ':Goyo'"

    Status Bar

    -
    set status_on_top = no
    -set status_chars  = " *%A"
    -set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"
    +
    set status_on_top = no
    +set status_chars  = " *%A"
    +set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"
     
    @@ -1733,15 +1743,15 @@ set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)

    Index View Options

    -
    set date_format = "%d/%m/%y %H:%M"
    -set index_format = "[%Z] %D %-20.20F %s"
    +
    set date_format = "%d/%m/%y %H:%M"
    +set index_format = "[%Z] %D %-20.20F %s"
     
    -set sort = threads                         # like gmail
    -set sort_aux = reverse-last-date-received  # like gmail
    -set uncollapse_jump                        # don't collapse on an unread message
    -set sort_re                                # thread based on regex
    -set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
    -set folder_format = "%2C %t %N %8s %f"
    +set sort = threads                         # like gmail
    +set sort_aux = reverse-last-date-received  # like gmail
    +set uncollapse_jump                        # don't collapse on an unread message
    +set sort_re                                # thread based on regex
    +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
    +set folder_format = "%2C %t %N %8s %f"
     
    @@ -1751,16 +1761,16 @@ set folder_format = "%2C %t %N %8s %f"

    Pager View Options

    -
    set pager_index_lines = 10 # number of index lines to show
    -set pager_context = 3      # number of context lines to show
    -set pager_stop             # don't go to next message automatically
    -set menu_scroll            # scroll in menus
    -set tilde                  # show tildes like in vim
    -set markers = no           # no ugly plus signs
    -set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
    +
    set pager_index_lines = 10 # number of index lines to show
    +set pager_context = 3      # number of context lines to show
    +set pager_stop             # don't go to next message automatically
    +set menu_scroll            # scroll in menus
    +set tilde                  # show tildes like in vim
    +set markers = no           # no ugly plus signs
    +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
     
    -auto_view text/html                                      # view html automatically
    -alternative_order text/plain text/enriched text/html     # save html for last
    +auto_view text/html                                      # view html automatically
    +alternative_order text/plain text/enriched text/html     # save html for last
     
    @@ -1770,21 +1780,20 @@ alternative_order text/plain text/enriched text/html # save html for last

    Compose View Options

    -
    set envelope_from                    # which from?
    -set sig_dashes                       # dashes before sig
    -set sig_on_top                       # the signature is just below the response
    -set edit_headers                     # show headers when composing
    -set fast_reply                       # skip to compose when replying
    -set askcc                            # ask for CC:
    -set fcc_attach                       # save attachments with the body
    -set mime_forward = yes               # forward attachments as part of body
    -set forward_format = "Fwd: %s"       # format of subject when forwarding
    -set forward_decode                   # decode when forwarding
    -set attribution = "On %d, %n wrote:" # format of quoting header
    -set reply_to                         # reply to Reply to: field
    -set reverse_name                     # reply as whomever it was to
    -set include                          # include message in replies
    -set forward_quote                    # include message in forwards
    +
    set sig_dashes                       # dashes before sig
    +set sig_on_top                       # the signature is just below the response
    +set edit_headers                     # show headers when composing
    +set fast_reply                       # skip to compose when replying
    +set askcc                            # ask for CC:
    +set fcc_attach                       # save attachments with the body
    +set mime_forward = yes               # forward attachments as part of body
    +set forward_format = "Fwd: %s"       # format of subject when forwarding
    +set forward_decode                   # decode when forwarding
    +set attribution = "On %d, %n wrote:" # format of quoting header
    +set reply_to                         # reply to Reply to: field
    +set reverse_name                     # reply as whomever it was to
    +set include                          # include message in replies
    +set forward_quote                    # include message in forwards
     
    @@ -1794,81 +1803,80 @@ set forward_quote # include message in forwards

    Headers

    -
    ignore *                                # ignore all headers
    -unignore from: to: cc: date: subject:   # show only these
    +
    ignore *                                # ignore all headers
    +unignore from: to: cc: date: subject:   # show only these
     unhdr_order *
    -hdr_order from: to: cc: date: subject:  # and in this order
    +hdr_order from: to: cc: date: subject:  # and in this order
     
    -
    -

    Sidebar

    -
    +
    +

    Sidebar

    +

    General Config

    -
    # Should the Sidebar be shown?
    -set sidebar_visible = yes
    +
    # Should the Sidebar be shown?
    +set sidebar_visible = yes
     
    -# How wide should the Sidebar be in screen columns?
    -# Note: Some characters, e.g. Chinese, take up two columns each.
    -set sidebar_width = 20
    +# How wide should the Sidebar be in screen columns?
    +# Note: Some characters, e.g. Chinese, take up two columns each.
    +set sidebar_width = 20
     
    -# Should the mailbox paths be abbreviated?
    -set sidebar_short_path = yes
    +# Should the mailbox paths be abbreviated?
    +set sidebar_short_path = yes
     
    -# When abbreviating mailbox path names, use any of these characters as path
    -# separators.  Only the part after the last separators will be shown.
    -# For file folders '/' is good.  For IMAP folders, often '.' is useful.
    -set sidebar_delim_chars = '/.'
    +# When abbreviating mailbox path names, use any of these characters as path
    +# separators.  Only the part after the last separators will be shown.
    +# For file folders '/' is good.  For IMAP folders, often '.' is useful.
    +set sidebar_delim_chars = '/.'
     
    -# If the mailbox path is abbreviated, should it be indented?
    -set sidebar_folder_indent = yes
    +# If the mailbox path is abbreviated, should it be indented?
    +set sidebar_folder_indent = yes
     
    -# Indent mailbox paths with this string.
    -set sidebar_indent_string = '  '
    +# Indent mailbox paths with this string.
    +set sidebar_indent_string = '  '
     
    -# Make the Sidebar only display mailboxes that contain new, or flagged,
    -# mail.
    -set sidebar_new_mail_only = no
    +# Make the Sidebar only display mailboxes that contain new, or flagged,
    +# mail.
    +set sidebar_new_mail_only = no
     
    -# Any mailboxes that are whitelisted will always be visible, even if the
    -# sidebar_new_mail_only option is enabled.
    -# sidebar_whitelist '/home/user/mailbox1'
    -# sidebar_whitelist '/home/user/mailbox2'
    +# Any mailboxes that are whitelisted will always be visible, even if the
    +# sidebar_new_mail_only option is enabled.
    +# sidebar_whitelist '/home/user/mailbox1'
    +# sidebar_whitelist '/home/user/mailbox2'
     
    -# When searching for mailboxes containing new mail, should the search wrap
    -# around when it reaches the end of the list?
    -set sidebar_next_new_wrap = no
    +# When searching for mailboxes containing new mail, should the search wrap
    +# around when it reaches the end of the list?
    +set sidebar_next_new_wrap = no
     
    -# Show the Sidebar on the right-hand side of the screen
    -set sidebar_on_right = no
    +# Show the Sidebar on the right-hand side of the screen
    +set sidebar_on_right = no
     
    -# The character to use as the divider between the Sidebar and the other Mutt
    -# panels.
    -# Note: Only the first character of this string is used.
    -set sidebar_divider_char = '│'
    +# The character to use as the divider between the Sidebar and the other Mutt
    +# panels.
    +# Note: Only the first character of this string is used.
    +set sidebar_divider_char = '│'
     
    -# Enable extended buffy mode to calculate total, new, and flagged
    -# message counts for each mailbox.
    +# Enable extended buffy mode to calculate total, new, and flagged
    +# message counts for each mailbox.
     set mail_check_stats
     
    -# Display the Sidebar mailboxes using this format string.
    -# set sidebar_format = '%B %?N?(%N)?%* %S'
    -set sidebar_format = '%B %* %?N?[%N]?'
    +# Display the Sidebar mailboxes using this format string.
    +set sidebar_format = '%D %* %?N?[%N]?'
     
    -# Sort the mailboxes in the Sidebar using this method:
    -#       count    - total number of messages
    -#       flagged  - number of flagged messages
    -#       new      - number of new messages
    -#       path     - mailbox path
    -#       unsorted - do not sort the mailboxes
    -set sidebar_sort_method = 'unsorted'
    +# Sort the mailboxes in the Sidebar using this method:
    +#       count    - total number of messages
    +#       flagged  - number of flagged messages
    +#       new      - number of new messages
    +#       path     - mailbox path
    +#       unsorted - do not sort the mailboxes
    +set sidebar_sort_method = 'unsorted'
     
    @@ -1878,31 +1886,31 @@ set sidebar_sort_method = 'unsorted'

    Mailboxes to show in the sidebar.

    -
    named-mailboxes "   Search" =search
    -named-mailboxes " GMAIL" =empty/gmail
    -named-mailboxes "   Inbox" =gmail/Inbox
    -named-mailboxes "   Sent" =gmail/Sent
    -named-mailboxes "   Drafts" =gmail/Drafts
    -named-mailboxes " ﮊ  Archive" =gmail/Archive
    -named-mailboxes "   Trash" =gmail/Trash
    -named-mailboxes " ESRF" =empty/esrf
    -named-mailboxes "   Inbox" =esrf/Inbox
    -named-mailboxes "   Sent" =esrf/Sent
    -named-mailboxes "   Drafts" =esrf/Drafts
    -named-mailboxes " ﮊ  Archive" =esrf/Archive
    -named-mailboxes "   Trash" =esrf/Trash
    -named-mailboxes " ULG" =empty/ulg
    -named-mailboxes "   Inbox" =ulg/Inbox
    -named-mailboxes "   Sent" =ulg/Sent
    -named-mailboxes "   Drafts" =ulg/Drafts
    -named-mailboxes " ﮊ  Archive" =ulg/Archive
    -named-mailboxes "   Trash" =ulg/Trash
    -named-mailboxes " ULIEGE" =empty/uliege
    -named-mailboxes "   Inbox" =uliege/Inbox
    -named-mailboxes "   Sent" =uliege/Sent
    -named-mailboxes "   Drafts" =uliege/Drafts
    -named-mailboxes " ﮊ  Archive" =uliege/Archive
    -named-mailboxes "   Trash" =uliege/Trash
    +
    named-mailboxes "   Search" =search
    +named-mailboxes " GMAIL" =empty/gmail
    +named-mailboxes "   Inbox" =gmail/Inbox
    +named-mailboxes "   Sent" =gmail/Sent
    +named-mailboxes "   Drafts" =gmail/Drafts
    +named-mailboxes " ﮊ  Archive" =gmail/Archive
    +named-mailboxes "   Trash" =gmail/Trash
    +named-mailboxes " ESRF" =empty/esrf
    +named-mailboxes "   Inbox" =esrf/Inbox
    +named-mailboxes "   Sent" =esrf/Sent
    +named-mailboxes "   Drafts" =esrf/Drafts
    +named-mailboxes " ﮊ  Archive" =esrf/Archive
    +named-mailboxes "   Trash" =esrf/Trash
    +named-mailboxes " ULG" =empty/ulg
    +named-mailboxes "   Inbox" =ulg/Inbox
    +named-mailboxes "   Sent" =ulg/Sent
    +named-mailboxes "   Drafts" =ulg/Drafts
    +named-mailboxes " ﮊ  Archive" =ulg/Archive
    +named-mailboxes "   Trash" =ulg/Trash
    +named-mailboxes " ULIEGE" =empty/uliege
    +named-mailboxes "   Inbox" =uliege/Inbox
    +named-mailboxes "   Sent" =uliege/Sent
    +named-mailboxes "   Drafts" =uliege/Drafts
    +named-mailboxes " ﮊ  Archive" =uliege/Archive
    +named-mailboxes "   Trash" =uliege/Trash
     
    @@ -1914,15 +1922,15 @@ named-mailboxes "  Trash" =uliege/Trash
    -
    -

    Attachments

    -
    +
    +

    Attachments

    +

    Attachment View Options

    -
    set attach_format = "[%D %t] %2n [%-7.7m/%10.10M] %.40d %> [%s] "
    +
    set attach_format = "[%D %t] %2n [%-7.7m/%10.10M] %.40d %> [%s] "
     
    @@ -1959,8 +1967,8 @@ Of ranger can be used with the A keybinding.

    Forgotten Attachment

    -
    set abort_noattach = ask-yes
    -set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons))\\>"
    +
    set abort_noattach = ask-yes
    +set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons))\\>"
     
    @@ -1975,11 +1983,11 @@ set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attach

    Sync Mail script

    -
    if [ $TMUX ]; then
    -    tmux split -v -l 1 checkmail $1 && tmux select-pane -U
    -else
    -    checkmail $1
    -fi
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 1 checkmail $1 && tmux select-pane -U
    +else
    +    checkmail $1
    +fi
     
    @@ -1989,16 +1997,16 @@ fi

    Openfile Scripts

    -
    base=$(basename "$1")
    -ext="${base##*.}"
    +
    base=$(basename "$1")
    +ext="${base##*.}"
     
    -file=$(mktemp -u --suffix=".$ext")
    +file=$(mktemp -u --suffix=".$ext")
     
    -rm -f "$file"
    +rm -f "$file"
     
    -cp "$1" "$file"
    +cp "$1" "$file"
     
    -setsid xdg-open "$file" >/dev/null 2>&1 &
    +setsid xdg-open "$file" >/dev/null 2>&1 &
     
    @@ -2008,7 +2016,7 @@ setsid xdg-open "$file" >/dev/null 2>&1 &

    urlview Config

    -
    REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
    +
    REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
     
     COMMAND nohup qutebrowser %s </dev/null &>/dev/null &
     
    @@ -2028,7 +2036,7 @@ video/*; setsid mpv --quiet %s & image/*; sxiv -a -b %s & application/pdf; zathura %s & audio/*; /usr/bin/xdg-open %s; copiousoutput -text/html; export DISPLAY=:0 && setsid qutebrowser %s; nametemplate=%s.html +text/html; export DISPLAY=:0 && setsid qutebrowser %s; nametemplate=%s.html text/html; w3m -I %{charset} -T text/html; copiousoutput; text/calendar; khal import --batch -a home %s && khal printics %s; copiousoutput; application/ics; khal import --batch -a home %s && khal printics %s; copiousoutput; @@ -2042,70 +2050,70 @@ Libreoffice
    application/docx; libreoffice %s --nologo &; copiousoutput;
     application/doc; libreoffice --nologo %s &; copiousoutput;
     
    -application/vnd.oasis.opendocument.database; libreoffice --nologo --base '%s'; copiousoutput
    -application/vnd.oasis.opendocument.chart; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.oasis.opendocument.spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.oasis.opendocument.spreadsheet-template; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.oasis.opendocument.graphics; libreoffice --nologo --draw '%s'; copiousoutput
    -application/vnd.oasis.opendocument.graphics-template; libreoffice --nologo --draw '%s'; copiousoutput
    -application/vnd.oasis.opendocument.presentation; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.oasis.opendocument.presentation-template; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.oasis.opendocument.formula; libreoffice --nologo --math '%s'; copiousoutput
    -application/vnd.oasis.opendocument.text; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.oasis.opendocument.text-master; libreoffice --nologo -global '%s'; copiousoutput
    -application/vnd.oasis.opendocument.text-template; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.oasis.opendocument.text-web; libreoffice --nologo -web '%s'; copiousoutput
    -application/vnd.sun.xml.base; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.sun.xml.calc; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.sun.xml.calc.template; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.sun.xml.draw; libreoffice --nologo --draw '%s'; copiousoutput
    -application/vnd.sun.xml.draw.template; libreoffice --nologo --draw '%s'; copiousoutput
    -application/vnd.stardivision.calc; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.stardivision.chart; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.stardivision.draw; libreoffice --nologo --draw '%s'; copiousoutput
    -application/vnd.stardivision.impress; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.stardivision.math; libreoffice --nologo --math '%s'; copiousoutput
    -application/vnd.stardivision.writer-global; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.stardivision.writer; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.sun.xml.impress; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.sun.xml.impress.template; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.sun.xml.math; libreoffice --nologo --math '%s'; copiousoutput
    -application/vnd.sun.xml.writer; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.sun.xml.writer.global; libreoffice --nologo -global '%s'; copiousoutput
    -application/vnd.sun.xml.writer.template; libreoffice --nologo --writer '%s'; copiousoutput
    -text/csv; libreoffice --nologo --calc '%s'; copiousoutput
    -text/spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput
    -application/x-quattropro; libreoffice --nologo --calc '%s'; copiousoutput
    -application/x-dbf; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.ms-excel.sheet.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.ms-excel.template.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.spreadsheetml.template; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.lotus-1-2-3; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.ms-excel; libreoffice --nologo --calc '%s'; copiousoutput
    -application/msexcel; libreoffice --nologo --calc '%s'; copiousoutput
    -application/x-dbase; libreoffice --nologo --calc '%s'; copiousoutput
    -text/x-csv; libreoffice --nologo --calc '%s'; copiousoutput
    -application/vnd.ms-powerpoint.presentation.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.ms-powerpoint.slideshow.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.ms-powerpoint.template.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.presentationml.slideshow; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.presentationml.template; libreoffice --nologo --impress '%s'; copiousoutput
    -application/vnd.ms-powerpoint; libreoffice --nologo --impress '%s'; copiousoutput
    -application/mspowerpoint; libreoffice --nologo --impress '%s'; copiousoutput
    -text/mathml; libreoffice --nologo --math '%s'; copiousoutput
    -application/rtf; libreoffice --nologo --writer '%s'; copiousoutput
    -application/x-t602; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.wordperfect; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.ms-word.document.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.ms-word.template.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.openxmlformats-officedocument.wordprocessingml.template; libreoffice --nologo --writer '%s'; copiousoutput
    -application/vnd.ms-works; libreoffice --nologo --writer '%s'; copiousoutput
    -application/msword; libreoffice --nologo --writer '%s'; copiousoutput
    -application/wordperfect; libreoffice --nologo --writer '%s'; copiousoutput
    -text/rtf; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.oasis.opendocument.database; libreoffice --nologo --base '%s'; copiousoutput
    +application/vnd.oasis.opendocument.chart; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.oasis.opendocument.spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.oasis.opendocument.spreadsheet-template; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.oasis.opendocument.graphics; libreoffice --nologo --draw '%s'; copiousoutput
    +application/vnd.oasis.opendocument.graphics-template; libreoffice --nologo --draw '%s'; copiousoutput
    +application/vnd.oasis.opendocument.presentation; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.oasis.opendocument.presentation-template; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.oasis.opendocument.formula; libreoffice --nologo --math '%s'; copiousoutput
    +application/vnd.oasis.opendocument.text; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.oasis.opendocument.text-master; libreoffice --nologo -global '%s'; copiousoutput
    +application/vnd.oasis.opendocument.text-template; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.oasis.opendocument.text-web; libreoffice --nologo -web '%s'; copiousoutput
    +application/vnd.sun.xml.base; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.sun.xml.calc; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.sun.xml.calc.template; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.sun.xml.draw; libreoffice --nologo --draw '%s'; copiousoutput
    +application/vnd.sun.xml.draw.template; libreoffice --nologo --draw '%s'; copiousoutput
    +application/vnd.stardivision.calc; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.stardivision.chart; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.stardivision.draw; libreoffice --nologo --draw '%s'; copiousoutput
    +application/vnd.stardivision.impress; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.stardivision.math; libreoffice --nologo --math '%s'; copiousoutput
    +application/vnd.stardivision.writer-global; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.stardivision.writer; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.sun.xml.impress; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.sun.xml.impress.template; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.sun.xml.math; libreoffice --nologo --math '%s'; copiousoutput
    +application/vnd.sun.xml.writer; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.sun.xml.writer.global; libreoffice --nologo -global '%s'; copiousoutput
    +application/vnd.sun.xml.writer.template; libreoffice --nologo --writer '%s'; copiousoutput
    +text/csv; libreoffice --nologo --calc '%s'; copiousoutput
    +text/spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput
    +application/x-quattropro; libreoffice --nologo --calc '%s'; copiousoutput
    +application/x-dbf; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.ms-excel.sheet.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.ms-excel.template.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.spreadsheetml.template; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.lotus-1-2-3; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.ms-excel; libreoffice --nologo --calc '%s'; copiousoutput
    +application/msexcel; libreoffice --nologo --calc '%s'; copiousoutput
    +application/x-dbase; libreoffice --nologo --calc '%s'; copiousoutput
    +text/x-csv; libreoffice --nologo --calc '%s'; copiousoutput
    +application/vnd.ms-powerpoint.presentation.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.ms-powerpoint.slideshow.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.ms-powerpoint.template.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.presentationml.slideshow; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.presentationml.template; libreoffice --nologo --impress '%s'; copiousoutput
    +application/vnd.ms-powerpoint; libreoffice --nologo --impress '%s'; copiousoutput
    +application/mspowerpoint; libreoffice --nologo --impress '%s'; copiousoutput
    +text/mathml; libreoffice --nologo --math '%s'; copiousoutput
    +application/rtf; libreoffice --nologo --writer '%s'; copiousoutput
    +application/x-t602; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.wordperfect; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.ms-word.document.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.ms-word.template.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.openxmlformats-officedocument.wordprocessingml.template; libreoffice --nologo --writer '%s'; copiousoutput
    +application/vnd.ms-works; libreoffice --nologo --writer '%s'; copiousoutput
    +application/msword; libreoffice --nologo --writer '%s'; copiousoutput
    +application/wordperfect; libreoffice --nologo --writer '%s'; copiousoutput
    +text/rtf; libreoffice --nologo --writer '%s'; copiousoutput
     
    @@ -2115,7 +2123,7 @@ text/rtf; libreoffice --nologo --writer '%s'; copiousoutput

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/matlab.html b/docs/matlab.html index a2781af..829ee8d 100644 --- a/docs/matlab.html +++ b/docs/matlab.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Matlab Configuration @@ -43,11 +43,7 @@
  • Clear
  • -
  • Setup - -
  • +
  • Setup
  • @@ -61,10 +57,10 @@

    Setup LaTeX as a default interpreter

    -
    set(groot, 'DefaultTextInterpreter', 'LaTeX');
    -set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX');
    -set(groot, 'DefaultAxesFontName', 'LaTeX');
    -set(groot, 'DefaultLegendInterpreter', 'LaTeX');
    +
    set(groot, 'DefaultTextInterpreter', 'LaTeX');
    +set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX');
    +set(groot, 'DefaultAxesFontName', 'LaTeX');
    +set(groot, 'DefaultLegendInterpreter', 'LaTeX');
     
    @@ -74,8 +70,8 @@ set(groot, 'DefaultLegendInterpreter', 'LaTeX');

    Default Line Width

    -
    set(groot, 'DefaultLineLineWidth', 1.5);
    -set(groot, 'DefaultAxesLineWidth', 0.5);
    +
    set(groot, 'DefaultLineLineWidth', 1.5);
    +set(groot, 'DefaultAxesLineWidth', 0.5);
     
    @@ -85,9 +81,9 @@ set(groot, 'DefaultAxesLineWidth', 0.5);

    Default grids on all axis

    -
    set(groot, 'DefaultAxesXGrid','on');
    -set(groot, 'DefaultAxesYGrid','on');
    -set(groot, 'DefaultAxesZGrid','on');
    +
    set(groot, 'DefaultAxesXGrid','on');
    +set(groot, 'DefaultAxesYGrid','on');
    +set(groot, 'DefaultAxesZGrid','on');
     
    @@ -97,11 +93,11 @@ set(groot, 'DefaultAxesZGrid','on');

    Default Font Size

    -
    set(groot, 'DefaultTextFontUnits', 'points');
    -set(groot, 'DefaultTextFontSize', 10);
    -set(groot, 'DefaultAxesFontUnits', 'points');
    -set(groot, 'DefaultAxesFontSize', 10);
    -set(groot, 'DefaultUicontrolFontSize', 10);
    +
    set(groot, 'DefaultTextFontUnits', 'points');
    +set(groot, 'DefaultTextFontSize', 10);
    +set(groot, 'DefaultAxesFontUnits', 'points');
    +set(groot, 'DefaultAxesFontSize', 10);
    +set(groot, 'DefaultUicontrolFontSize', 10);
     
    @@ -111,8 +107,8 @@ set(groot, 'DefaultUicontrolFontSize', 10);

    Default Fonts

    -
    set(groot, 'DefaultAxesFontName', 'Helvetica');
    -set(groot, 'DefaultTextFontName', 'Helvetica');
    +
    set(groot, 'DefaultAxesFontName', 'Helvetica');
    +set(groot, 'DefaultTextFontName', 'Helvetica');
     
    @@ -122,7 +118,7 @@ set(groot, 'DefaultTextFontName', 'Helvetica');

    Make figures into a Box

    -
    set(groot, 'DefaultAxesBox', 'on');
    +
    set(groot, 'DefaultAxesBox', 'on');
     
    @@ -132,11 +128,11 @@ set(groot, 'DefaultTextFontName', 'Helvetica');

    Default Colors

    -
    set(groot, 'DefaultAxesColor', 'w');
    -set(groot, 'DefaultAxesXColor', 'k');
    -set(groot, 'DefaultAxesYColor', 'k');
    +
    set(groot, 'DefaultAxesColor', 'w');
    +set(groot, 'DefaultAxesXColor', 'k');
    +set(groot, 'DefaultAxesYColor', 'k');
     
    -set(groot, 'DefaultFigureColor', 'w');
    +set(groot, 'DefaultFigureColor', 'w');
     
    @@ -146,15 +142,15 @@ set(groot, 'DefaultFigureColor', 'w');

    Default Plot Colors

    -
    c1 = [     0    0.4470    0.7410]; % Blue
    -c2 = [0.8500    0.3250    0.0980]; % Orange
    -c3 = [0.9290    0.6940    0.1250]; % Yellow
    -c4 = [0.4940    0.1840    0.5560]; % Purple
    -c5 = [0.4660    0.6740    0.1880]; % Green
    -c6 = [0.3010    0.7450    0.9330]; % Light Blue
    -c7 = [0.6350    0.0780    0.1840]; % Red
    +
    c1 = [     0    0.4470    0.7410]; % Blue
    +c2 = [0.8500    0.3250    0.0980]; % Orange
    +c3 = [0.9290    0.6940    0.1250]; % Yellow
    +c4 = [0.4940    0.1840    0.5560]; % Purple
    +c5 = [0.4660    0.6740    0.1880]; % Green
    +c6 = [0.3010    0.7450    0.9330]; % Light Blue
    +c7 = [0.6350    0.0780    0.1840]; % Red
     
    -set(groot, 'defaultAxesColorOrder', [c1; c2; c3; c4; c5; c6; c7])
    +set(groot, 'defaultAxesColorOrder', [c1; c2; c3; c4; c5; c6; c7])
     
    @@ -164,8 +160,8 @@ set(groot, 'defaultAxesColorOrder', [c1; c2; c3; c4; c5; c6; c7])

    Figure paper and window style

    -
    set(groot, 'DefaultFigurePaperType', 'A4');
    -set(groot, 'DefaultFigureWindowStyle', 'normal');
    +
    set(groot, 'DefaultFigurePaperType', 'A4');
    +set(groot, 'DefaultFigureWindowStyle', 'normal');
     
    @@ -186,7 +182,7 @@ format long g;

    Home Path

    -
    toolboxes_path = '~/Cloud/thesis/matlab/toolboxes/';
    +
    toolboxes_path = '~/Cloud/thesis/matlab/toolboxes/';
     
    @@ -195,31 +191,83 @@ format long g;

    Add to path

    +

    +Provides vecfig3 for FRF fitting (link). +

    -
    addpath([toolboxes_path 'Org-Mode-Toolbox/src'])
    -addpath([toolboxes_path 'Usefull-Functions/src'])
    -addpath([toolboxes_path 'Stacked-Elements-Toolbox/src'])
    -addpath([toolboxes_path 'Measure-Analysis-Toolbox/src'])
    -addpath([toolboxes_path 'Hinf-Toolbox/src'])
    -addpath([toolboxes_path 'Fit-Model-Toolbox/src'])
    -addpath([toolboxes_path 'Dspace-Toolbox/src'])
    -addpath([toolboxes_path 'SpeedGoat-Toolbox/src'])
    -addpath([toolboxes_path 'Add-Ons/matrix_fitting_toolbox_1'])
    -addpath([toolboxes_path 'Add-Ons/matlab-schemer'])
    -addpath([toolboxes_path 'Add-Ons/matlab2tikz/src'])
    -addpath([toolboxes_path 'Add-Ons/hline_vline'])
    -addpath([toolboxes_path 'Add-Ons/export_fig'])
    -addpath([toolboxes_path 'Add-Ons/subaxis'])
    -addpath([toolboxes_path 'Add-Ons/cbrewer'])
    -addpath([toolboxes_path 'Add-Ons/tightfig'])
    -addpath([toolboxes_path 'Add-Ons/fig2svg/src'])
    -addpath([toolboxes_path 'Add-Ons/CVX'])
    -addpath([toolboxes_path 'Add-Ons/MBeautifier'])
    +
    addpath([toolboxes_path 'matrix_fitting_toolbox_1'])
     
    +

    +Apply and save color schemes in MATLAB with ease (link). +

    -
    addpath('/home/thomas/.emacs.d/.local/straight/repos/mirror/toolbox')
    +
    addpath([toolboxes_path 'matlab-schemer'])
    +
    +
    + +

    +Converts MATLAB figures to TikZ (link). +

    +
    +
    addpath([toolboxes_path 'matlab2tikz/src'])
    +
    +
    + +

    +MATLAB toolbox for exporting publication quality figures (link). +

    +
    +
    addpath([toolboxes_path 'export_fig'])
    +
    +
    + +

    +MATLAB source code formatter, beautifier (link). +

    +
    +
    addpath([toolboxes_path 'MBeautifier'])
    +
    +
    + +

    +Toolbox for Convex Programming (link). +

    +
    +
    addpath([toolboxes_path 'CVX'])
    +
    +
    + +

    +Useful functions to use with orgmode (link). +

    +
    +
    addpath([toolboxes_path 'Org-Mode-Toolbox/src'])
    +
    +
    + +

    +Some useful function (link). +

    +
    +
    addpath([toolboxes_path 'matlab_useful_functions/src'])
    +
    +
    + +

    +H-Infinity Toolbox (link). +

    +
    +
    % addpath([toolboxes_path 'Hinf-Toolbox/src'])
    +
    +
    + +

    +Toolbox to work with Finite Element Models (link). +

    +
    +
    addpath([toolboxes_path 'fem_toolbox/src'])
     
    @@ -239,22 +287,23 @@ addpath([toolboxes_path 'Add-Ons/MBeautifier'])

    Setup

    -
    +

    +This script should be run once after Matlab is installed. +

    -
    -

    Schemer Import

    -
    +

    +Import a nice color scheme. +

    -
    schemer_import([home_path '/Cloud/thesis/matlab/toolboxes/Add-Ons/matlab-schemer/schemes/monokai.prf']);
    +
    schemer_import('~/Cloud/thesis/matlab/toolboxes/Add-Ons/matlab-schemer/schemes/monokai.prf');
     
    -

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/music.html b/docs/music.html index 6f2b4b9..1e7c5dd 100644 --- a/docs/music.html +++ b/docs/music.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Music/Sound Configuration @@ -44,14 +44,14 @@

    Pavu Control

    -
    [window]
    -width=500
    -height=400
    -sinkInputType=1
    -sourceOutputType=1
    -sinkType=0
    -sourceType=1
    -showVolumeMeters=1
    +
    [window]
    +width=500
    +height=400
    +sinkInputType=1
    +sourceOutputType=1
    +sinkType=0
    +sourceType=1
    +showVolumeMeters=1
     
    @@ -73,7 +73,7 @@ Cheatsheet: https://pkgbuild.com/ Configuration directory.

    -
    ncmpcpp_directory = ~/.config/ncmpcpp
    +
    ncmpcpp_directory = ~/.config/ncmpcpp
     
    @@ -81,9 +81,9 @@ Configuration directory. MPD Configuration.

    -
    mpd_host = localhost
    -mpd_port = 6600
    -mpd_music_dir = ~/Music
    +
    mpd_host = localhost
    +mpd_port = 6600
    +mpd_music_dir = ~/Music
     
    @@ -91,7 +91,7 @@ mpd_music_dir = ~/Music Notification of song change.

    -
    execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
    +
    execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
     
    @@ -101,41 +101,41 @@ Notification of song change.

    Bindings

    -
    def_key "q"
    -  run_external_command "if [ $TMUX ]; then tmux detach; fi"
    -def_key "Q"
    +
    def_key "q"
    +  run_external_command "if [ $TMUX ]; then tmux detach; fi"
    +def_key "Q"
       quit
    -def_key "g"
    +def_key "g"
       move_home
    -def_key "G"
    +def_key "G"
       move_end
    -def_key "j"
    +def_key "j"
       scroll_down
    -def_key "k"
    +def_key "k"
       scroll_up
    -def_key "ctrl-u"
    +def_key "ctrl-u"
       page_up
    -def_key "ctrl-d"
    +def_key "ctrl-d"
       page_down
    -def_key "l"
    +def_key "l"
       enter_directory
    -def_key "h"
    +def_key "h"
       jump_to_parent_directory
    -def_key "."
    +def_key "."
       show_lyrics
    -def_key "n"
    +def_key "n"
       next_found_item
    -def_key "N"
    +def_key "N"
       previous_found_item
    -def_key "J"
    +def_key "J"
       move_sort_order_down
    -def_key "K"
    +def_key "K"
       move_sort_order_up
    -def_key "d"
    +def_key "d"
       delete_playlist_items
    -def_key "+"
    +def_key "+"
       volume_up
    -def_key "-"
    +def_key "-"
       volume_down
     
     
    @@ -169,39 +169,47 @@ plugins: fromfilename discogs

    Mopidy

    -
    [spotify]
    -username = dehaeze.thomas@gmail.com
    -password = <<get-password(passname="spotify.com/dehaeze.thomas@gmail.com")>>
    -client_id = 9dd02534-f038-46d8-946e-bfe72498204e
    -client_secret = <<get-password(passname="spotify/client_secret")>>
    -bitrate = 320
    +
    [spotify]
    +username = dehaeze.thomas@gmail.com
    +password = <<get-password(passname="spotify.com/dehaeze.thomas@gmail.com")>>
    +client_id = 9dd02534-f038-46d8-946e-bfe72498204e
    +client_secret = <<get-password(passname="spotify/client_secret")>>
    +bitrate = 320
     
    -[mpd]
    -enabled = true
    -hostname = 127.0.0.1
    -port = 6600
    -password =
    -max_connections = 20
    -connection_timeout = 60
    -zeroconf = Mopidy MPD server on $hostname
    -command_blacklist = listall,listallinfo
    -default_playlist_scheme = m3u
    +[mpd]
    +enabled = true
    +hostname = 127.0.0.1
    +port = 6600
    +password =
    +max_connections = 20
    +connection_timeout = 60
    +zeroconf = Mopidy MPD server on $hostname
    +command_blacklist = listall,listallinfo
    +default_playlist_scheme = m3u
     
    -[file]
    -enabled = true
    -media_dirs = /home/thomas/Music
    -excluded_file_extensions =
    -  .db
    -  .directory
    -  .html
    -  .jpeg
    -  .jpg
    -  .log
    -  .nfo
    -  .pdf
    -  .png
    -  .txt
    -  .zip
    +[jellyfin]
    +hostname = https://jellyfin.tdehaeze.xyz/
    +username = tdehaeze
    +password = <<get-password(passname="music.tdehaeze.xyz/tdehaeze")>>
    +libraries = Music
    +albumartistsort = True
    +album_format = {ProductionYear} - {Name}
    +
    +[file]
    +enabled = true
    +media_dirs = /home/thomas/Music
    +excluded_file_extensions =
    +.db
    +.directory
    +.html
    +.jpeg
    +.jpg
    +.log
    +.nfo
    +.pdf
    +.png
    +.txt
    +.zip
     
    @@ -211,26 +219,26 @@ excluded_file_extensions =

    Radio with curseradio

    -
    [opml]
    -root = http://opml.radiotime.com/
    +
    [opml]
    +root = http://opml.radiotime.com/
     
    -[playback]
    -command = /usr/bin/mpv
    +[playback]
    +command = /usr/bin/mpv
     
    -[interface]
    -keymap = vi
    +[interface]
    +keymap = vi
     
    -[keymap.vi]
    -up = k
    -down = j
    -start = 0
    -end = $
    -pageup = u
    -pagedown = d
    -enter = l
    -stop = p
    -exit = q
    -favourite = f
    +[keymap.vi]
    +up = k
    +down = j
    +start = 0
    +end = $
    +pageup = u
    +pagedown = d
    +enter = l
    +stop = p
    +exit = q
    +favourite = f
     
    @@ -238,7 +246,7 @@ favourite = f

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/newsboat.html b/docs/newsboat.html index 0e82128..391ffce 100644 --- a/docs/newsboat.html +++ b/docs/newsboat.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Newsboat Configuration @@ -30,7 +30,7 @@
    -
    -

    Queries

    -
    +
    +

    Queries

    +
    prepopulate-query-feeds yes
     
    @@ -150,7 +149,7 @@ player "mpv"

    Filters

    -
    define-filter "Unread Articles" "unread = \"yes\""
    +
    define-filter "Unread Articles" "unread = \"yes\""
     
    @@ -160,7 +159,7 @@ player "mpv"

    Notifications

    -
    notify-format "%n unread articles"
    +
    notify-format "%n unread articles"
     notify-program ~/.config/newsboat/scripts/newsboat-notify.sh
     notify-always no
     
    @@ -171,7 +170,7 @@ notify-always no

    Notification Script

    -
    dunstify --replace=38492 "Newsboat " "$1"
    +
    dunstify --replace=38492 "Newsboat " "$1"
     
    @@ -211,8 +210,8 @@ bind-key U show-urls bind-key t set-tag bind-key T clear-tag -bind-key r reload # Reload the currently selected feed -bind-key R reload-all # Reload all feeds +bind-key r reload # Reload the currently selected feed +bind-key R reload-all # Reload all feeds
    @@ -223,7 +222,7 @@ bind-key R reload-all # Reload all feeds
    bookmark-autopilot no
    -bookmark-cmd "~/.config/newsboat/scripts/buku-add.sh"
    +bookmark-cmd "~/.config/newsboat/scripts/buku-add.sh"
     bookmark-interactive no
     
    @@ -233,9 +232,9 @@ bookmark-interactive no

    Buku Scripts

    -
    buku --add "$1" --title "$2" --comment "$3" && \
    -    dunstify "Buku" "Bookmark Added" && \
    -    exit 0
    +
    buku --add "$1" --title "$2" --comment "$3" && \
    +    dunstify "Buku" "Bookmark Added" && \
    +    exit 0
     
    @@ -246,29 +245,29 @@ bookmark-interactive no

    Macros - Starts with , key

    -
    # Default Browser
    +
    # Default Browser
     browser linkhandler
     
    -# Open in Browser
    +# Open in Browser
     macro , open-in-browser
     
    -# Download Video with Youtube-DL
    -macro v set browser "cd ~/Documents/to-watch && ~/.local/bin/yt-video %u" ; open-in-browser ; set browser linkhandler
    +# Download Video with Youtube-DL
    +macro v set browser "cd ~/Documents/to-watch && ~/.local/bin/yt-video %u" ; open-in-browser ; set browser linkhandler
     
    -# Download Audio with Youtube-DL
    -macro a set browser "cd ~/Documents/to-watch && ~/.local/bin/yt-audio %u" ; open-in-browser ; set browser linkhandler
    +# Download Audio with Youtube-DL
    +macro a set browser "cd ~/Documents/to-watch && ~/.local/bin/yt-audio %u" ; open-in-browser ; set browser linkhandler
     
    -# Open Video with MPV
    -macro m set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser linkhandler
    +# Open Video with MPV
    +macro m set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser linkhandler
     
    -# Open With W3M
    -macro w set browser "w3m %u" ; open-in-browser ; set browser linkhandler
    +# Open With W3M
    +macro w set browser "w3m %u" ; open-in-browser ; set browser linkhandler
     
    -# Copy Address to clipboard
    -macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler
    +# Copy Address to clipboard
    +macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler
     
    -# Quit
    -macro q set browser "tmux detach;" ; open-in-browser ; set browser linkhandler
    +# Quit
    +macro q set browser "tmux detach" ; open-in-browser ; set browser linkhandler
     
    @@ -278,9 +277,9 @@ macro q set browser "tmux detach;" ; open-in-browser ; set browser linkhandler

    hide articles matching

    -
    ignore-article "*" "title =~ \"Sponsor\""
    -ignore-article "*" "title =~ \"Advertisement\""
    -ignore-mode "display"
    +
    ignore-article "*" "title =~ \"Sponsor\""
    +ignore-article "*" "title =~ \"Advertisement\""
    +ignore-mode "display"
     
    @@ -290,13 +289,13 @@ ignore-mode "display"

    Feedlist and Article Format

    -
    feedlist-format "%4i %n %11u %t"
    -feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?"
    +
    feedlist-format "%4i %n %11u %t"
    +feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?"
     
    -articlelist-format "%3i %f %D  %?T?|%-17T| ?%t"
    -articlelist-title-format "%N %V - Articles in feed '%T' (%u unread, %t total) - %U"
    +articlelist-format "%3i %f %D  %?T?|%-17T| ?%t"
    +articlelist-title-format "%N %V - Articles in feed '%T' (%u unread, %t total) - %U"
     
    -itemview-title-format "Article '%T'"
    +itemview-title-format "Article '%T'"
     
    @@ -306,7 +305,7 @@ itemview-title-format "Article '%T'"

    Color Scheme

    -
    include "~/.config/newsboat/colors"
    +
    include "~/.config/newsboat/colors"
     
    @@ -325,10 +324,10 @@ color listfocus_unread black yellow color info default black color article default default -# highlights -highlight article "^(Title):.*$" blue default -highlight article "https?://[^ ]+" red default -highlight article "\\[image\\ [0-9]+\\]" green default +# highlights +highlight article "^(Title):.*$" blue default +highlight article "https?://[^ ]+" red default +highlight article "\\[image\\ [0-9]+\\]" green default
    @@ -339,15 +338,15 @@ highlight article "\\[image\\ [0-9]+\\]" green default
    -
    -

    Queries

    -
    +
    +

    Queries

    +
    -
    "query:Unread:unread = \"yes\""
    -"query:Unwatch - Youtube:unread = \"yes\" and tags # \"youtube\""
    -"query:Unread - Linux:unread = \"yes\" and tags # \"linux\""
    -"query:Unread - Emacs:unread = \"yes\" and tags # \"emacs\""
    -"query:Unread - Sciences:unread = \"yes\" and tags # \"science\""
    +
    "query:Unread:unread = \"yes\""
    +"query:Unwatch - Youtube:unread = \"yes\" and tags # \"youtube\""
    +"query:Unread - Linux:unread = \"yes\" and tags # \"linux\""
    +"query:Unread - Emacs:unread = \"yes\" and tags # \"emacs\""
    +"query:Unread - Sciences:unread = \"yes\" and tags # \"science\""
     
    @@ -357,97 +356,103 @@ highlight article "\\[image\\ [0-9]+\\]" green default

    Newsfeeds

    -
    -

    Matlab and Control

    -
    +
    +

    Matlab and Control

    +
    -
    https://undocumentedmatlab.com/feed/                                   "~RSS undocumentedmatlab" matlab
    -http://blogs.mathworks.com/seth/feed/                                  "~RSS Guy on Simulink" matlab control
    -http://blogs.mathworks.com/loren/?feed=rss2                            "~RSS Loren on the Art of MATLAB" matlab
    -http://blogs.mathworks.com/pick/feed/                                  "~RSS File Exchange Pick of the Week" matlab
    -https://enriquedelsol.com/feed/                                        "~RSS Enrique del Sol" control
    -http://brettbeauregard.com/blog/feed/                                  "~RSS Project Blog" control
    -https://mburkeonmbd.com/feed/                                          "~RSS Model-Based Design" control matlab
    +
    https://undocumentedmatlab.com/feed/                                   "~RSS undocumentedmatlab" matlab
    +http://blogs.mathworks.com/seth/feed/                                  "~RSS Guy on Simulink" matlab control
    +http://blogs.mathworks.com/loren/?feed=rss2                            "~RSS Loren on the Art of MATLAB" matlab
    +http://blogs.mathworks.com/pick/feed/                                  "~RSS File Exchange Pick of the Week" matlab
    +https://enriquedelsol.com/feed/                                        "~RSS Enrique del Sol" control
    +http://brettbeauregard.com/blog/feed/                                  "~RSS Project Blog" control
    +https://mburkeonmbd.com/feed/                                          "~RSS Model-Based Design" control matlab
    +https://medium.com/feed/@mithi                                         "~RSS Medium - Mithi" control
     
    -
    -

    Audio and Electronics

    -
    +
    +

    Audio and Electronics

    +
    -
    http://jipihorn.wordpress.com/feed/                                    "~RSS Jipihorn's Blog" electronics audio
    -https://quantasylum.com/blogs/news.atom                                "~RSS QuantAsylum" audio
    +
    http://jipihorn.wordpress.com/feed/                                    "~RSS Jipihorn's Blog" electronics audio
    +https://quantasylum.com/blogs/news.atom                                "~RSS QuantAsylum" audio
    +https://www.scrample.xyz/index.xml                                     "~RSS Scrample" electronics
     
    -
    -

    Science

    -
    +
    +

    Science

    +
    -
    http://sciencetonnante.wordpress.com/feed/                             "~RSS Science étonnante" science
    -https://brushingupscience.com/feed/                                    "~RSS Brushing Up Science" science
    +
    http://sciencetonnante.wordpress.com/feed/                             "~RSS Science étonnante" science
    +https://brushingupscience.com/feed/                                    "~RSS Brushing Up Science" science
     
    -
    -

    Linux, Emacs and Computer Science

    -
    +
    +

    Linux, Emacs and Computer Science

    +
    -
    https://yiufung.net/index.xml                                          "~RSS yiufung" emacs
    -https://bzg.fr/index.xml                                               "~RSS bzg" emacs
    -https://thomashartmann.dev/rss.xml                                     "~RSS thomashartmann.dev" emacs linux
    -http://cachestocaches.com/feed/                                        "~RSS CachesToCaches" emacs
    -http://frederic.bezies.free.fr/blog/?feed=rss2                         "~RSS Le Weblog de Frederic Bezies" linux
    -https://la-bibliotex.fr/feed/                                          "~RSS La biblioTeX" latex
    -https://so.nwalsh.com/feed/                                            "~RSS so..." emacs
    -http://karl-voit.at/feeds/lazyblorg-all.atom_1.0.links-and-content.xml "~RSS Public Voit" emacs
    -https://people.umass.edu/weikaichen/index.xml                          "~RSS Weikai Chen" emacs
    -https://babbagefiles.xyz/index.xml                                     "~RSS The Neo-Babbage Files" linux emacs
    -https://write.as/dani/feed/                                            "~RSS Dani" emacs
    -https://lepisma.xyz/atom.xml                                           "~RSS Lepisma" emacs
    -http://kitchingroup.cheme.cmu.edu/blog/feed                            "~RSS The Kitchin Research Group" emacs
    -http://lukesmith.xyz/rss.xml                                           "~RSS The Latest from Luke" linux
    -http://manuel-uberti.github.io/feed.xml                                "~RSS Manuel Uberti" emacs
    -https://lord.re/index.xml                                              "~RSS /home/lord" linux
    -https://beepb00p.xyz/rss.xml                                           "~RSS beepb00p" linux emacs
    -http://pragmaticemacs.com/feed/                                        "~RSS Pragmatic Emacs" emacs
    -https://jonathanabennett.github.io/rss.xml                             "~RSS Jonathan Bennett's Blog" emacs
    -https://joshrollinswrites.com/index.xml                                "~RSS The Art of Not Asking Why" emacs linux
    -http://endlessparentheses.com/atom.xml                                 "~RSS Endless Parentheses" emacs
    -https://www.gonsie.com/blorg/feed.xml                                  "~RSS Elsa Gonsiorowski" emacs
    -http://tiagoweber.github.io/blog.xml                                   "~RSS Tiago Oliveira Weber" matlab emacs science
    -https://shreyas.ragavan.co/index.xml                                   "~RSS Shreyas Ragavan" emacs
    -https://pinecast.com/feed/emacscast                                    "~RSS EmacsCast" emacs
    -http://amitp.blogspot.com/feeds/posts/default                          "~RSS Amit's Thoughts" emacs
    -http://sachachua.com/wp/category/emacs/feed/                           "~RSS Sacha Chua" emacs
    -https://cestlaz.github.io/rss.xml                                      "~RSS C'est la Z" emacs
    -https://www-public.imtbs-tsp.eu/~berger_o/weblog/tag/org-mode/feed/    "~RSS WebLog Pro Olivier Berger" emacs
    -https://scripter.co/index.xml                                          "~RSS A Scripter's Notes" linux emacs
    -https://assortedarray.com/index.xml                                    "~RSS Assorted Array" emacs
    -https://www.with-emacs.com/rss.xml                                     "~RSS with-emacs" emacs
    -https://linktohack.com/index.xml                                       "~RSS QL's blog" emacs
    -https://itsfoss.com/feed                                               "~RSS It's FOSS" linux
    -https://llazarek.com/feeds/all.rss.xml                                 "~RSS llazarek" emacs
    -https://200ok.ch/rss.xml                                               "~RSS 200ok" emacs
    -http://irreal.org/blog/?feed=rss2                                      "~RSS Irreal" emacs
    -https://emacs.cafe/feed.xml                                            "~RSS Emacs café" emacs
    -http://vxlabs.com/feed/                                                "~RSS vxlabs" emacs linux
    -https://www.rousette.org.uk/index.xml                                  "~RSS But she's a Girl..." emacs
    -https://www.anand-iyer.com/feed.xml                                    "~RSS Anand Iyer" emacs
    -https://addy-dclxvi.github.io/index.xml                                "~RSS Addy's Blog" linux
    -https://ekaschalk.github.io/index.xml                                  "~RSS Modern Emacs" emacs
    -http://howardism.org/index.xml                                         "~RSS Howardism" emacs
    -http://xkcd.com/rss.xml                                                "~RSS XKCD" random
    -https://blog.jethro.dev/index.xml                                      "~RSS Jethro Kuan" emacs
    -https://lord.re/posts/index.xml                                        "~RSS Lord~" linux
    -https://rgoswami.me/posts/index.xml                                    "~RSS Rohit Goswami~" linux emacs
    -# https://jonathanh.co.uk/
    +
    https://yiufung.net/index.xml                                          "~RSS yiufung" emacs
    +https://bzg.fr/index.xml                                               "~RSS bzg" emacs
    +https://thomashartmann.dev/rss.xml                                     "~RSS thomashartmann.dev" emacs linux
    +http://cachestocaches.com/feed/                                        "~RSS CachesToCaches" emacs
    +http://frederic.bezies.free.fr/blog/?feed=rss2                         "~RSS Le Weblog de Frederic Bezies" linux
    +https://la-bibliotex.fr/feed/                                          "~RSS La biblioTeX" latex
    +https://so.nwalsh.com/feed/                                            "~RSS so..." emacs
    +http://karl-voit.at/feeds/lazyblorg-all.atom_1.0.links-and-content.xml "~RSS Public Voit" emacs
    +https://people.umass.edu/weikaichen/index.xml                          "~RSS Weikai Chen" emacs
    +https://babbagefiles.xyz/index.xml                                     "~RSS The Neo-Babbage Files" linux emacs
    +https://write.as/dani/feed/                                            "~RSS Dani" emacs
    +https://lepisma.xyz/atom.xml                                           "~RSS Lepisma" emacs
    +http://kitchingroup.cheme.cmu.edu/blog/feed                            "~RSS The Kitchin Research Group" emacs
    +http://lukesmith.xyz/rss.xml                                           "~RSS The Latest from Luke" linux
    +http://manuel-uberti.github.io/feed.xml                                "~RSS Manuel Uberti" emacs
    +https://lord.re/index.xml                                              "~RSS /home/lord" linux
    +https://beepb00p.xyz/rss.xml                                           "~RSS beepb00p" linux emacs
    +http://pragmaticemacs.com/feed/                                        "~RSS Pragmatic Emacs" emacs
    +https://jonathanabennett.github.io/rss.xml                             "~RSS Jonathan Bennett's Blog" emacs
    +https://joshrollinswrites.com/index.xml                                "~RSS The Art of Not Asking Why" emacs linux
    +http://endlessparentheses.com/atom.xml                                 "~RSS Endless Parentheses" emacs
    +https://www.gonsie.com/blorg/feed.xml                                  "~RSS Elsa Gonsiorowski" emacs
    +http://tiagoweber.github.io/blog.xml                                   "~RSS Tiago Oliveira Weber" matlab emacs science
    +https://shreyas.ragavan.co/index.xml                                   "~RSS Shreyas Ragavan" emacs
    +https://pinecast.com/feed/emacscast                                    "~RSS EmacsCast" emacs
    +http://amitp.blogspot.com/feeds/posts/default                          "~RSS Amit's Thoughts" emacs
    +http://sachachua.com/wp/category/emacs/feed/                           "~RSS Sacha Chua" emacs
    +https://cestlaz.github.io/rss.xml                                      "~RSS C'est la Z" emacs
    +https://www-public.imtbs-tsp.eu/~berger_o/weblog/tag/org-mode/feed/    "~RSS WebLog Pro Olivier Berger" emacs
    +https://scripter.co/index.xml                                          "~RSS A Scripter's Notes" linux emacs
    +https://assortedarray.com/index.xml                                    "~RSS Assorted Array" emacs
    +https://www.with-emacs.com/rss.xml                                     "~RSS with-emacs" emacs
    +https://linktohack.com/index.xml                                       "~RSS QL's blog" emacs
    +https://itsfoss.com/feed                                               "~RSS It's FOSS" linux
    +https://llazarek.com/feeds/all.rss.xml                                 "~RSS llazarek" emacs
    +https://200ok.ch/rss.xml                                               "~RSS 200ok" emacs
    +http://irreal.org/blog/?feed=rss2                                      "~RSS Irreal" emacs
    +https://emacs.cafe/feed.xml                                            "~RSS Emacs café" emacs
    +http://vxlabs.com/feed/                                                "~RSS vxlabs" emacs linux
    +https://www.rousette.org.uk/index.xml                                  "~RSS But she's a Girl..." emacs
    +https://www.anand-iyer.com/feed.xml                                    "~RSS Anand Iyer" emacs
    +https://addy-dclxvi.github.io/index.xml                                "~RSS Addy's Blog" linux
    +https://ekaschalk.github.io/index.xml                                  "~RSS Modern Emacs" emacs
    +http://howardism.org/index.xml                                         "~RSS Howardism" emacs
    +http://xkcd.com/rss.xml                                                "~RSS XKCD" random
    +https://blog.jethro.dev/index.xml                                      "~RSS Jethro Kuan" emacs
    +https://lord.re/posts/index.xml                                        "~RSS Lord~" linux
    +https://rgoswami.me/posts/index.xml                                    "~RSS Rohit Goswami~" linux emacs
    +https://translucentink.gitlab.io/rss.xml                               "~RSS Translucent Ink" emacs
    +https://jherrlin.github.io/index.xml                                   "~RSS Jherrlin" emacs linux
    +https://camsaul.com/feed.xml                                           "~RSS Camsaul" emacs
    +https://ag91.github.io/rss.xml                                         "~RSS Were Parallels Cross" emacs
    +# https://jonathanh.co.uk/
     
    @@ -458,86 +463,94 @@ https://rgoswami.me/posts/index.xml "~RSS Roh

    Youtube

    -
    -

    Matlab and Control

    -
    +
    +

    Matlab and Control

    +
    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~YT Steve Brunton" youtube control science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCoUOaSVYkTV6W4uLvxvgiFA "~YT Nathan Kutz" youtube science control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCSlhlkPaq3RL1CP0Tv1xWBQ "~YT MIT Institute for Data, Systems, and Society" youtube science control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~YT How To Mechatronics" youtube science control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCGNxF654kRelnM0nKxM6QDQ "~YT Tom Oomen" youtube science control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCRCdl2SXma02BG384RuZPqg "~YT katkimshow" youtube science control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~YT Brian Douglas" youtube control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~YT BostonDynamics" youtube control engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCPUuVY7w8brL0r__P8UBgyQ "~YT Christopher Lum" youtube matlab control
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCNm2TzhsV5wGlFIAcpCx9hQ "~YT Jousef Murad" youtube engineering matlab
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCMBXZxd-j6VqrynykO1dURw "~YT John Rossiter" youtube control
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~YT Steve Brunton" youtube control science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCoUOaSVYkTV6W4uLvxvgiFA "~YT Nathan Kutz" youtube science control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCSlhlkPaq3RL1CP0Tv1xWBQ "~YT MIT Institute for Data, Systems, and Society" youtube science control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~YT How To Mechatronics" youtube science control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCGNxF654kRelnM0nKxM6QDQ "~YT Tom Oomen" youtube science control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCRCdl2SXma02BG384RuZPqg "~YT katkimshow" youtube science control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~YT Brian Douglas" youtube control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~YT BostonDynamics" youtube control engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCPUuVY7w8brL0r__P8UBgyQ "~YT Christopher Lum" youtube matlab control
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCNm2TzhsV5wGlFIAcpCx9hQ "~YT Jousef Murad" youtube engineering matlab
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCMBXZxd-j6VqrynykO1dURw "~YT John Rossiter" youtube control
     
    -
    -

    Audio and Electronics

    -
    +
    +

    Audio and Electronics

    +
    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCI-FgEdZQxBASsm3HNcWKxQ "~YT Red Robbo's Workshop" youtube linux audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCtpB66XKjAtFZfZyzmC-_Cg "~YT HexiBase" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCGIr92yrDW4cRLD-QaZmS6w "~YT Ethan Winer" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCslWMxX93gcaiXwxMv4asHA "~YT Jean Maurer Swiss Audio Manufacture SA" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC6mzA8J7n0ylf0RnDpj-vrg "~YT PS Audio" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCy0tKL1T7wFoYcxCe0xjN6Q "~YT Technology Connections" youtube audio engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~YT jipihorn" youtube electronics audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCOuow_HIYmeaIqi42zVs3qg "~YT Kirby Meets Audio" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCWOhWAOydPUqillkpt5UlaA "~YT Dakoustics" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCm2rchKqdoSKdB448TTVEnQ "~YT Impulse Audio" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC5QPFDZ3Y4ylkkGJc6Y1OOA "~YT Philippe Demerliac" youtube electronics
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCVqx3vXNghSqUcVg2nmegYA "~YT U꞊RI" youtube electronics diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCUJQSGHlYC9Xyz-uNfSpSsA "~YT ElectronikHeart" youtube electronics
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC74xmXx1NfeIIa44J1IU84w "~YT Audio Fest" youtube audio
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCP_yR0wxxyLa46rRgsmje3Q "~YT DIY Speaker Building" youtube audio
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCI-FgEdZQxBASsm3HNcWKxQ "~YT Red Robbo's Workshop" youtube linux audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCtpB66XKjAtFZfZyzmC-_Cg "~YT HexiBase" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCGIr92yrDW4cRLD-QaZmS6w "~YT Ethan Winer" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCslWMxX93gcaiXwxMv4asHA "~YT Jean Maurer Swiss Audio Manufacture SA" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC6mzA8J7n0ylf0RnDpj-vrg "~YT PS Audio" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCy0tKL1T7wFoYcxCe0xjN6Q "~YT Technology Connections" youtube audio engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~YT jipihorn" youtube electronics audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCOuow_HIYmeaIqi42zVs3qg "~YT Kirby Meets Audio" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCWOhWAOydPUqillkpt5UlaA "~YT Dakoustics" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCm2rchKqdoSKdB448TTVEnQ "~YT Impulse Audio" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC5QPFDZ3Y4ylkkGJc6Y1OOA "~YT Philippe Demerliac" youtube electronics
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVqx3vXNghSqUcVg2nmegYA "~YT U꞊RI" youtube electronics diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCUJQSGHlYC9Xyz-uNfSpSsA "~YT ElectronikHeart" youtube electronics
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC74xmXx1NfeIIa44J1IU84w "~YT Audio Fest" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCP_yR0wxxyLa46rRgsmje3Q "~YT DIY Speaker Building" youtube audio
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVryWqJ4cSlbTSETBHpBUWw "~YT Phil S" youtube electronics control
     
    -
    -

    Linux, Emacs and Computer Science

    -
    +
    +

    Linux, Emacs and Computer Science

    +
    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCNqFXwI5gNcyxt2c1zTQAKw "~YT Yisrael Dov L" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~YT Luke Smith" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCkf4VIqu3Acnfzuk3kRIFwA "~YT gotbletu" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCVHICXXtKG7rZgtC5xonNdQ "~YT Howard Abrams" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~YT EmacsCast" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCzgkOWKcwy0uhYilE6bd1Lg "~YT Zaiste Programming" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC5dAH2txWtKSsgmRglRB88A "~YT kyptin" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA "~YT Brodie Robertson" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YT Greg Hurrell" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCxjDcP3Su59bg5VDnlwyt5A "~YT Bailey Ling" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCi8XrDg1bK_MJ0goOnbpTMQ "~YT budlabs" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCfbGTpcJyEOMwKP-eYz3_fg "~YT Rainer König" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg "~YT Wolfgang's Channel" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~YT John Kitchin" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCFk8kgNu_bqsRZewxMGqkzQ "~YT Emacs SF" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCIFJHWyIlN0XFrW2vMKG6QA "~YT Alain M. Lafon" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCvA_wgsX6eFAOXI8Rbg_WiQ "~YT tutoriaLinux" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCUF4bHszxd8T4ulrvLejumA "~YT Alexander Fu" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCbW6-rTEn6nPj56K_9dLozQ "~YT Gilles Castel" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YT thoughtbot" youtube linux emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg "~YT DistroTube" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCDEtZ7AKmwS0_GNJog01D2g "~YT Uncle Dave" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCYnrHo7CDgKobmoJ3Borrnw "~YT Niklas Carlsson" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCljOhRB2a3sQgLCdK9CHQvQ "~YT Leafshade Software" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCwRXb5dUK4cvsHbx-rGzSgw "~YT Derek Banas" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCP2bshADPrVMoNrdJvZEQzw "~YT KeepItTechie" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCVRJ6D343dX-x730MRP8tNw "~YT cocadmin" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCxkMDXQ5qzYOgXPRnOBrp1w "~YT Mike Zamansky" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCgREucssIfY9e0Iy3yhse8w "~YT Conner McDaniel" youtube linux
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~YT emacsrocks" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g "~YT Protesilaos Stavrou" youtube emacs
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCsJXkw_Ssp-1myJFm4_SMJA "~YT Seorenn" youtube emacs
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCNqFXwI5gNcyxt2c1zTQAKw "~YT Yisrael Dov L" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~YT Luke Smith" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCkf4VIqu3Acnfzuk3kRIFwA "~YT gotbletu" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVHICXXtKG7rZgtC5xonNdQ "~YT Howard Abrams" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~YT EmacsCast" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCzgkOWKcwy0uhYilE6bd1Lg "~YT Zaiste Programming" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC5dAH2txWtKSsgmRglRB88A "~YT kyptin" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA "~YT Brodie Robertson" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YT Greg Hurrell" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCxjDcP3Su59bg5VDnlwyt5A "~YT Bailey Ling" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCi8XrDg1bK_MJ0goOnbpTMQ "~YT budlabs" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCfbGTpcJyEOMwKP-eYz3_fg "~YT Rainer König" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg "~YT Wolfgang's Channel" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~YT John Kitchin" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCFk8kgNu_bqsRZewxMGqkzQ "~YT Emacs SF" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCIFJHWyIlN0XFrW2vMKG6QA "~YT Alain M. Lafon" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCvA_wgsX6eFAOXI8Rbg_WiQ "~YT tutoriaLinux" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCUF4bHszxd8T4ulrvLejumA "~YT Alexander Fu" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCbW6-rTEn6nPj56K_9dLozQ "~YT Gilles Castel" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YT thoughtbot" youtube linux emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg "~YT DistroTube" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCDEtZ7AKmwS0_GNJog01D2g "~YT Uncle Dave" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCYnrHo7CDgKobmoJ3Borrnw "~YT Niklas Carlsson" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCljOhRB2a3sQgLCdK9CHQvQ "~YT Leafshade Software" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCwRXb5dUK4cvsHbx-rGzSgw "~YT Derek Banas" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCP2bshADPrVMoNrdJvZEQzw "~YT KeepItTechie" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVRJ6D343dX-x730MRP8tNw "~YT cocadmin" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCxkMDXQ5qzYOgXPRnOBrp1w "~YT Mike Zamansky" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCgREucssIfY9e0Iy3yhse8w "~YT Conner McDaniel" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~YT emacsrocks" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g "~YT Protesilaos Stavrou" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCsJXkw_Ssp-1myJFm4_SMJA "~YT Seorenn" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCvrQyT2xhsxq2a4Xopf2JTA "~YT Zaeph" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCYnl1cugi7Lv1h8j6JNqNEg "~YT Dima Gerasimov" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCDKPGD9T00eS_l--D_DRTUQ "~YT Linuxtricks" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCcCeYbIBGQPB1G12psAPMKw "~YT Spudlyo" youtube emacs
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCS97tchJDq17Qms3cux8wcA "~YT Chrisatmachine" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCwFpzG5MK5Shg_ncAhrgr9g "~YT Awesome Open Source" youtube linux
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA "~YT Mental Outlaw" youtube linux
     
    @@ -547,28 +560,28 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCsJXkw_Ssp-1myJFm4_SMJA "~Y

    3D-Printing and DIY

    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCGEBcDJ7QIY1LuEddDM9x9Q "~YT Oldies" youtube 3d-printing
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCqdRx3JV3xRchi4_xwFJUTA "~YT 8FabLab" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCCsdIja21VT7AKkbVI5y8bQ "~YT Alain Vaillancourt" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCyi6pFP-lmaDD3Eb4dqsvdg "~YT ioduremetallique" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCYI8olK-jH9Ubc2FaA2LgPw "~YT Egalistel" youtube 3d-printing
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCSULDz1yaHLVQWHpm4g_GHA "~YT monsieur bidouille" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC2UT8pPDlUvRbQXTVOf5Ocw "~YT Henri Hihacks" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCLecVrux63S6aYiErxdiy4w "~YT BRUH Automation" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCQfMyugsjrVUWU0v_ZxQs2Q "~YT Machine Tech Video Blog" youtube diy engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCjED9uS41ioeFuPfbR-OBlw "~YT Les Freres Poulain" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCVSHXNNBitaPd5lYz48--yg "~YT Tech Ingredients" youtube diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCPFChjpOgkUqckj3378jt5w "~YT Heliox" youtube 3d-printing
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC9_nxvBohH1G2yR77XTdA2g "~YT Tommy Desrochers" youtube 3d-printing diy
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "~YT GreatScott" youtube diy
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCGEBcDJ7QIY1LuEddDM9x9Q "~YT Oldies" youtube 3d-printing
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCqdRx3JV3xRchi4_xwFJUTA "~YT 8FabLab" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCCsdIja21VT7AKkbVI5y8bQ "~YT Alain Vaillancourt" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCyi6pFP-lmaDD3Eb4dqsvdg "~YT ioduremetallique" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCYI8olK-jH9Ubc2FaA2LgPw "~YT Egalistel" youtube 3d-printing
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCSULDz1yaHLVQWHpm4g_GHA "~YT monsieur bidouille" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC2UT8pPDlUvRbQXTVOf5Ocw "~YT Henri Hihacks" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCLecVrux63S6aYiErxdiy4w "~YT BRUH Automation" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCQfMyugsjrVUWU0v_ZxQs2Q "~YT Machine Tech Video Blog" youtube diy engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCjED9uS41ioeFuPfbR-OBlw "~YT Les Freres Poulain" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVSHXNNBitaPd5lYz48--yg "~YT Tech Ingredients" youtube diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCPFChjpOgkUqckj3378jt5w "~YT Heliox" youtube 3d-printing
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC9_nxvBohH1G2yR77XTdA2g "~YT Tommy Desrochers" youtube 3d-printing diy
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "~YT GreatScott" youtube diy
     
    -
    -

    Engineering

    -
    +
    +

    Engineering

    +
     
    @@ -580,44 +593,44 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "~Y

    Interesting - General

    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UC5eOLQO5VUEFJukNg9cl5jg "~YT Histoire Brève" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YT Hygiène Mentale" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC9BnGZLT4iPaJtDOXYwQuHQ "~YT Primum Non Nocere" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCP46_MXP_WG_auH88FnfS1A "~YT Nota Bene" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCUR03ZSZlEvCO6EWwv4jU2w "~YT Absol Vidéos" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCWty1tzwZW_ZNSp5GVGteaA "~YT La statistique expliquée à mon chat" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCLbgxBMMEo6mAYe87esxGmg "~YT horror humanum est" youtube interesting
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~YT Chat Sceptique" youtube interesting
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UC5eOLQO5VUEFJukNg9cl5jg "~YT Histoire Brève" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YT Hygiène Mentale" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC9BnGZLT4iPaJtDOXYwQuHQ "~YT Primum Non Nocere" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCP46_MXP_WG_auH88FnfS1A "~YT Nota Bene" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCUR03ZSZlEvCO6EWwv4jU2w "~YT Absol Vidéos" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCWty1tzwZW_ZNSp5GVGteaA "~YT La statistique expliquée à mon chat" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCLbgxBMMEo6mAYe87esxGmg "~YT horror humanum est" youtube interesting
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~YT Chat Sceptique" youtube interesting
     
     
    -
    -

    Science

    -
    +
    +

    Science

    +
    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCwgqYNmYaij2_8hq_tOFyZw "~YT Aurelien Barrau" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCeR8BYZS7IHYjk_9Mh5JgkA "~YT Scilabus" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC1Ue7TuX3iH4y8-Qrjj-hyg "~YT J'm'énerve pas, j'explique" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCjsHDXUU3BjBCG7OaCbNDyQ "~YT Le Sense Of Wonder" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC4PasDd25MXqlXBogBw9CAg "~YT Mickaël Launay" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCsz9DiwPtgDvxJ-njWnieZw "~YT Passe-Science" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC_GlthPB9gzdxfkTTEIVxMA "~YT Incroyables Expériences" youtube science engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YT Domain of Science" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YT ScienceEtonnante" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCeQEKFH31vvD-InkTGSvCrA "~YT brusspup" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YT Veritasium" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCH6ppHEvV3_WIXEwmhv9HEg "~YT Deus Ex Silicium" youtube engineering science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YT 2veritasium" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCvGag7MyHR8H9oRm9iL9Ifw "~YT Experimentboy" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC6107grRI4m0o2-emgoDnAA "~YT SmarterEveryDay" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCtqICqGbPSbTN09K1_7VZ3Q "~YT DirtyBiology" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC_ZChHhr5nDrUymz7qsRqRw "~YT Confér'ENS" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCNmLe68qKzdjuEpT_YTDFuA "~YT Etonnarium" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCCSN5zJTKjl6UKvPcLzLuiw "~YT Macroscopie" youtube science
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC7DdEm33SyaTDtWYGO2CwdA "~YT Physics Girl" youtube science
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCwgqYNmYaij2_8hq_tOFyZw "~YT Aurelien Barrau" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCeR8BYZS7IHYjk_9Mh5JgkA "~YT Scilabus" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC1Ue7TuX3iH4y8-Qrjj-hyg "~YT J'm'énerve pas, j'explique" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCjsHDXUU3BjBCG7OaCbNDyQ "~YT Le Sense Of Wonder" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC4PasDd25MXqlXBogBw9CAg "~YT Mickaël Launay" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCsz9DiwPtgDvxJ-njWnieZw "~YT Passe-Science" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC_GlthPB9gzdxfkTTEIVxMA "~YT Incroyables Expériences" youtube science engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YT Domain of Science" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YT ScienceEtonnante" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCeQEKFH31vvD-InkTGSvCrA "~YT brusspup" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YT Veritasium" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCH6ppHEvV3_WIXEwmhv9HEg "~YT Deus Ex Silicium" youtube engineering science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YT 2veritasium" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCvGag7MyHR8H9oRm9iL9Ifw "~YT Experimentboy" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC6107grRI4m0o2-emgoDnAA "~YT SmarterEveryDay" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCtqICqGbPSbTN09K1_7VZ3Q "~YT DirtyBiology" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC_ZChHhr5nDrUymz7qsRqRw "~YT Confér'ENS" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCNmLe68qKzdjuEpT_YTDFuA "~YT Etonnarium" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCCSN5zJTKjl6UKvPcLzLuiw "~YT Macroscopie" youtube science
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC7DdEm33SyaTDtWYGO2CwdA "~YT Physics Girl" youtube science
     
     
    @@ -628,8 +641,8 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC7DdEm33SyaTDtWYGO2CwdA "~Y

    Keyboard

    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UC5ClFK9Ko4ACRgXjRZc_GfA "~YT Rhinofeed" youtube keyboards
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC2yitP8oH86YBRVU4anycoA "~YT Quentin Lebastard" youtube keyboards
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UC5ClFK9Ko4ACRgXjRZc_GfA "~YT Rhinofeed" youtube keyboards
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC2yitP8oH86YBRVU4anycoA "~YT Quentin Lebastard" youtube keyboards
     
    @@ -640,11 +653,11 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC2yitP8oH86YBRVU4anycoA "~Y
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC3gZqwD45zGCsduBn-Q2lew "~YT Gabrielle Grau" youtube music
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCZHPwKyeypWwU8SNJSzQhCw "~YT Révisons nos Classiques" youtube music
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCPpNtkHeCnwN7Tl5oLq4AAg "~YT Une chanson, l'addition" youtube music
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC_17P1ruDpCVujf7C_SxhOA "~YT Metalliquoi" youtube music
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCzabZYC0MYRR2MFkq62d6yQ "~YT Florent Garcia" youtube music
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC3gZqwD45zGCsduBn-Q2lew "~YT Gabrielle Grau" youtube music
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCZHPwKyeypWwU8SNJSzQhCw "~YT Révisons nos Classiques" youtube music
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCPpNtkHeCnwN7Tl5oLq4AAg "~YT Une chanson, l'addition" youtube music
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC_17P1ruDpCVujf7C_SxhOA "~YT Metalliquoi" youtube music
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCzabZYC0MYRR2MFkq62d6yQ "~YT Florent Garcia" youtube music
     
    @@ -654,24 +667,24 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCzabZYC0MYRR2MFkq62d6yQ "~Y

    Space

    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCdL3UpiseRlvxXuORJjmqZw "~YT Stardust" youtube space
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC5X4e8ScZI2AFd_vkjSoyoQ "~YT AstronoGeek" youtube space
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCdL3UpiseRlvxXuORJjmqZw "~YT Stardust" youtube space
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC5X4e8ScZI2AFd_vkjSoyoQ "~YT AstronoGeek" youtube space
     
    -
    -

    Engineering

    -
    +
    +

    Engineering

    +
    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCotwjyJnb-4KW7bmsOoLfkg "~YT Art of the Problem" youtube engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCR1IuLEqb6UEA_zQ81kwXfg "~YT Real Engineering" youtube engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCfsznjef2zGJnrCRQBXqo6Q "~YT Machine Thinking" youtube engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC2bkHVIDjXS7sgrgjFtzOXQ "~YT engineerguy" youtube engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCivA7_KLKWo43tFcCkFvydw "~YT Applied Science" youtube science engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCk0fGHsCEzGig-rSzkfCjMw "~YT The Engineering Mindset" youtube engineering
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC5_Y-BKzq1uW_2rexWkUzlA "~YT New Mind" youtube engineering
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCotwjyJnb-4KW7bmsOoLfkg "~YT Art of the Problem" youtube engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCR1IuLEqb6UEA_zQ81kwXfg "~YT Real Engineering" youtube engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCfsznjef2zGJnrCRQBXqo6Q "~YT Machine Thinking" youtube engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC2bkHVIDjXS7sgrgjFtzOXQ "~YT engineerguy" youtube engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCivA7_KLKWo43tFcCkFvydw "~YT Applied Science" youtube science engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCk0fGHsCEzGig-rSzkfCjMw "~YT The Engineering Mindset" youtube engineering
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC5_Y-BKzq1uW_2rexWkUzlA "~YT New Mind" youtube engineering
     
    @@ -680,38 +693,38 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC5_Y-BKzq1uW_2rexWkUzlA "~Y

    Random - Fun - Others

    -
    https://www.youtube.com/feeds/videos.xml?channel_id=UCJM10Rp7G0h9j5S92QszJ5Q "~YT Tales From The Click" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCCMxHHciWRBBouzk-PGzmtQ "~YT Bazar du Grenier" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCTt2AnK--mnRmICnf-CCcrw "~YT Le Rire Jaune" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCJRljQ8OcyfzHBYpS_bDbow "~YT La Mezzanine" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCVTAmJvZOxuj9Kto8Ty9L8Q "~YT Rapha Gaming" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCTafEJoRl5myC8A50plIrng "~YT FabienOlicard" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCZeyUZmGAyRLDfM2ir3q-OQ "~YT Captain Popcorn" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCwzxu1j19ICnfW5zrBvUw-w "~YT Une bière et Jivay" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCPF7JOWMDWZmnP_cQfyAezg "~YT Scinéma" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCUK0HBIBWgM2c4vsPhkYY4w "~YT The Slow Mo Guys" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCxeA1l2E5AYrtpkqUbBEg3A "~YT Pierre Lecourt" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCYD22MFqaNqXp-ogTMosW_A "~YT Le Show Jaune" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC4HANn7TBY-xcION-eL3rLA "~YT Daniil le Russe" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCf0mOxfawezlHIVuHd3L2VA "~YT Didi Chandouidoui" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCw3tZ7g_FljNjzGprCuptpA "~YT Taupe10" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCfXXAQ-mp1uUcvSpvMcAAtw "~YT LinksTheSun" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCWeg2Pkate69NFdBeuRFTAw "~YT Squeezie" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCtI6_1vGanPlH5lgVIDjJGQ "~YT MrAntoineDaniel" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCm3C3OSgcyzaTBXrNRupB3Q "~YT Le Woop" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCuBzVunAVbcwzMfQaJVacuw "~YT LE ROI DES RATS" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCyWqModMQlbIo8274Wh_ZsQ "~YT Cyprien" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCAFQjCZo5okIPkHUQlBZM-g "~YT Bonjour Tristesse" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCoZoRz4-y6r87ptDp4Jk74g "~YT Palmashow" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCww2zZWg4Cf5xcRKG-ThmXQ "~YT NORMAN FAIT DES VIDÉOS" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCkEa1AfdeB93-he4VziKGFg "~YT JIGMÉ" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCND0gjuG9ltEWDvh82VJITg "~YT Jeannot Nymouce" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCP5tjEmvPItGyLhmjdwP7Ww "~YT RealLifeLore" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCwbV8cTR4yBgFdfa_BXV2OA "~YT Le Fossoyeur de Films" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCGgvKW19IWVvUUblrr8EgHA "~YT Experimentboy 2" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCJZ94qp4dtCw0Q5UQqAkg7w "~YT larsandersen23" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UCDPK_MTu3uTUFJXRVcTJcEw "~YT Mcfly et Carlito" youtube random
    -https://www.youtube.com/feeds/videos.xml?channel_id=UC2_OG1L8DLTzQ7UrZVOk7OA "~YT Axolot" youtube random
    +
    https://www.youtube.com/feeds/videos.xml?channel_id=UCJM10Rp7G0h9j5S92QszJ5Q "~YT Tales From The Click" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCCMxHHciWRBBouzk-PGzmtQ "~YT Bazar du Grenier" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCTt2AnK--mnRmICnf-CCcrw "~YT Le Rire Jaune" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCJRljQ8OcyfzHBYpS_bDbow "~YT La Mezzanine" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCVTAmJvZOxuj9Kto8Ty9L8Q "~YT Rapha Gaming" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCTafEJoRl5myC8A50plIrng "~YT FabienOlicard" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCZeyUZmGAyRLDfM2ir3q-OQ "~YT Captain Popcorn" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCwzxu1j19ICnfW5zrBvUw-w "~YT Une bière et Jivay" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCPF7JOWMDWZmnP_cQfyAezg "~YT Scinéma" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCUK0HBIBWgM2c4vsPhkYY4w "~YT The Slow Mo Guys" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCxeA1l2E5AYrtpkqUbBEg3A "~YT Pierre Lecourt" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCYD22MFqaNqXp-ogTMosW_A "~YT Le Show Jaune" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC4HANn7TBY-xcION-eL3rLA "~YT Daniil le Russe" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCf0mOxfawezlHIVuHd3L2VA "~YT Didi Chandouidoui" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCw3tZ7g_FljNjzGprCuptpA "~YT Taupe10" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCfXXAQ-mp1uUcvSpvMcAAtw "~YT LinksTheSun" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCWeg2Pkate69NFdBeuRFTAw "~YT Squeezie" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCtI6_1vGanPlH5lgVIDjJGQ "~YT MrAntoineDaniel" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCm3C3OSgcyzaTBXrNRupB3Q "~YT Le Woop" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCuBzVunAVbcwzMfQaJVacuw "~YT LE ROI DES RATS" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCyWqModMQlbIo8274Wh_ZsQ "~YT Cyprien" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCAFQjCZo5okIPkHUQlBZM-g "~YT Bonjour Tristesse" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCoZoRz4-y6r87ptDp4Jk74g "~YT Palmashow" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCww2zZWg4Cf5xcRKG-ThmXQ "~YT NORMAN FAIT DES VIDÉOS" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCkEa1AfdeB93-he4VziKGFg "~YT JIGMÉ" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCND0gjuG9ltEWDvh82VJITg "~YT Jeannot Nymouce" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCP5tjEmvPItGyLhmjdwP7Ww "~YT RealLifeLore" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCwbV8cTR4yBgFdfa_BXV2OA "~YT Le Fossoyeur de Films" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCGgvKW19IWVvUUblrr8EgHA "~YT Experimentboy 2" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCJZ94qp4dtCw0Q5UQqAkg7w "~YT larsandersen23" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UCDPK_MTu3uTUFJXRVcTJcEw "~YT Mcfly et Carlito" youtube random
    +https://www.youtube.com/feeds/videos.xml?channel_id=UC2_OG1L8DLTzQ7UrZVOk7OA "~YT Axolot" youtube random
     
     
    @@ -722,7 +735,7 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC2_OG1L8DLTzQ7UrZVOk7OA "~Y

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/polybar.html b/docs/polybar.html index a2b6b6d..fddd83e 100644 --- a/docs/polybar.html +++ b/docs/polybar.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Polybar Configuration @@ -118,23 +118,23 @@

    Colors

    -
    [colors]
    -bg = ${xrdb:background}
    -red = ${xrdb:color1}
    -green = ${xrdb:color2}
    -yellow = ${xrdb:color3}
    -blue = ${xrdb:color4}
    -purple = ${xrdb:color5}
    -aqua = ${xrdb:color6}
    -gray = ${colors.color7}
    -darkgray = ${colors.color8}
    -darkred = ${xrdb:color9}
    -darkgreen = ${xrdb:color10}
    -darkyellow = ${xrdb:color11}
    -darkblue = ${xrdb:color12}
    -darkpurple = ${xrdb:color13}
    -darkaqua = ${xrdb:color14}
    -fg = ${xrdb:foreground}
    +
    [colors]
    +bg = ${xrdb:background}
    +red = ${xrdb:color1}
    +green = ${xrdb:color2}
    +yellow = ${xrdb:color3}
    +blue = ${xrdb:color4}
    +purple = ${xrdb:color5}
    +aqua = ${xrdb:color6}
    +gray = ${colors.color7}
    +darkgray = ${colors.color8}
    +darkred = ${xrdb:color9}
    +darkgreen = ${xrdb:color10}
    +darkyellow = ${xrdb:color11}
    +darkblue = ${xrdb:color12}
    +darkpurple = ${xrdb:color13}
    +darkaqua = ${xrdb:color14}
    +fg = ${xrdb:foreground}
     
    @@ -144,9 +144,9 @@ fg = ${xrdb:foreground}

    VM

    -
    [global/wm]
    -margin-top = 0
    -margin-bottom = 0
    +
    [global/wm]
    +margin-top = 0
    +margin-bottom = 0
     
    @@ -156,43 +156,43 @@ margin-bottom = 0

    Top Bar

    -
    [bar/top]
    -enable-ipc = true
    -override-redirect = false
    -bottom = false
    -fixed-center = false
    +
    [bar/top]
    +enable-ipc = true
    +override-redirect = false
    +bottom = false
    +fixed-center = false
     
    -width = 100%
    -height = 27
    -radius = 0.0
    +width = 100%
    +height = 27
    +radius = 0.0
     
    -background = ${colors.bg}
    -foreground = ${colors.fg}
    +background = ${colors.bg}
    +foreground = ${colors.fg}
     
    -line-size = 2
    +line-size = 2
     
    -border-size = 0
    +border-size = 0
     
    -padding-left = 2
    -padding-right = 12
    +padding-left = 2
    +padding-right = 12
     
    -module-margin-left = 1
    -module-margin-right = 1
    +module-margin-left = 1
    +module-margin-right = 1
     
    -font-0 = Hack Nerd Font:style=Medium,Regular:pixelsize=10;1
    -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
    -font-2 = Weather Icons:size=10;1
    +font-0 = Hack Nerd Font:style=Medium,Regular:pixelsize=10;1
    +font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
    +font-2 = Weather Icons:size=10;1
     
    -modules-left = i3 bspwm xwindow
    -modules-center =
    -modules-right = pulseaudio wired-network wireless-network wireguard nordvpn loopback redshift lockscreen dunst packages unread_news unread_mail calendar temperature battery date
    +modules-left = i3 bspwm xwindow
    +modules-center =
    +modules-right = pulseaudio wired-network wireless-network wireguard nordvpn loopback redshift lockscreen dunst packages unread_news unread_mail calendar temperature battery date
     
    -wm-restack = i3
    +wm-restack = i3
     
    -tray-position = right
    -tray-detached = true
    -tray-padding = 0
    -tray-background = ${colors.bg}
    +tray-position = right
    +tray-detached = true
    +tray-padding = 0
    +tray-background = ${colors.bg}
     
    @@ -202,9 +202,9 @@ tray-background = ${colors.bg}

    Show Windows Title

    -
    [module/xwindow]
    -type = internal/xwindow
    -label = %title:0:30:...%
    +
    [module/xwindow]
    +type = internal/xwindow
    +label = %title:0:30:...%
     
    @@ -214,49 +214,49 @@ label = %title:0:30:...%

    I3 - Information about workspaces and active one

    -
    [module/i3]
    -type = internal/i3
    +
    [module/i3]
    +type = internal/i3
     
    -enable-scroll = false
    -wrapping-scroll = false
    +enable-scroll = false
    +wrapping-scroll = false
     
    -
    format = <label-state> <label-mode>
    -index-sort = true
    +
    format = <label-state> <label-mode>
    +index-sort = true
     
    -
    label-mode-foreground = ${colors.bg}
    -label-mode-background = ${colors.fg}
    -label-mode-padding = 1
    +
    label-mode-foreground = ${colors.bg}
    +label-mode-background = ${colors.fg}
    +label-mode-padding = 1
     
    -# focused = Active workspace on focused monitor
    -label-focused = %icon% %index%
    -label-focused-foreground = ${colors.fg}
    -label-focused-background = ${colors.bg}
    -label-focused-underline = ${colors.aqua}
    -label-focused-padding = 1
    +# focused = Active workspace on focused monitor
    +label-focused = %icon% %index%
    +label-focused-foreground = ${colors.fg}
    +label-focused-background = ${colors.bg}
    +label-focused-underline = ${colors.aqua}
    +label-focused-padding = 1
     
    -# unfocused = Inactive workspace on any monitor
    -label-unfocused = %icon% %index%
    -label-unfocused-foreground = ${colors.fg}
    -label-unfocused-background = ${colors.bg}
    -label-unfocused-underline = ${colors.bg}
    -label-unfocused-padding = 1
    +# unfocused = Inactive workspace on any monitor
    +label-unfocused = %icon% %index%
    +label-unfocused-foreground = ${colors.fg}
    +label-unfocused-background = ${colors.bg}
    +label-unfocused-underline = ${colors.bg}
    +label-unfocused-padding = 1
     
    -# visible = Active workspace on unfocused monitor
    -label-visible = %icon% %index%
    -label-visible-background = ${colors.bg}
    -label-visible-underline = ${colors.aqua}
    -label-visible-padding = 1
    +# visible = Active workspace on unfocused monitor
    +label-visible = %icon% %index%
    +label-visible-background = ${colors.bg}
    +label-visible-underline = ${colors.aqua}
    +label-visible-padding = 1
     
    -# urgent = Workspace with urgency hint set
    -label-urgent = %icon% %index%
    -label-urgent-background = ${colors.red}
    -label-urgent-padding = 1
    +# urgent = Workspace with urgency hint set
    +label-urgent = %icon% %index%
    +label-urgent-background = ${colors.red}
    +label-urgent-padding = 1
     
    @@ -266,44 +266,44 @@ label-urgent-padding = 1

    BSPWM

    -
    [module/bspwm]
    -type = internal/bspwm
    +
    [module/bspwm]
    +type = internal/bspwm
     
    -pin-workspaces = true
    -enable-click = true
    -enable-scroll = false
    +pin-workspaces = true
    +enable-click = true
    +enable-scroll = false
     
     ; Use fuzzy (partial) matching on labels when assigning
     ; icons to workspaces
    -; Example: code;♚ will apply the icon to all workspaces
    -; containing 'code' in the label
    -fuzzy-match = false
    +; Example: code;♚ will apply the icon to all workspaces
    +; containing 'code' in the label
    +fuzzy-match = false
     
     
    -ws-icon-0 = code;
    -ws-icon-1 = web;
    -ws-icon-2 = mail;
    -ws-icon-3 = misc;
    -ws-icon-4 = figs;ﬧ
    -ws-icon-default =
    +ws-icon-0 = code;
    +ws-icon-1 = web;
    +ws-icon-2 = mail;
    +ws-icon-3 = misc;
    +ws-icon-4 = figs;ﬧ
    +ws-icon-default =
     
    -label-focused = %icon%
    -label-focused-foreground = ${colors.bg}
    -label-focused-background = ${colors.aqua}
    -label-focused-underline= ${colors.aqua}
    -label-focused-padding = 1
    +label-focused = %icon%
    +label-focused-foreground = ${colors.bg}
    +label-focused-background = ${colors.aqua}
    +label-focused-underline= ${colors.aqua}
    +label-focused-padding = 1
     
    -label-occupied = %icon%
    -label-occupied-underline = ${colors.fg}
    -label-occupied-padding = 1
    +label-occupied = %icon%
    +label-occupied-underline = ${colors.fg}
    +label-occupied-padding = 1
     
    -label-urgent = %icon%
    -label-urgent-background = ${colors.red}
    -label-urgent-padding = 1
    +label-urgent = %icon%
    +label-urgent-background = ${colors.red}
    +label-urgent-padding = 1
     
    -label-empty = %icon%
    -label-empty-foreground = ${colors.fg}
    -label-empty-padding = 1
    +label-empty = %icon%
    +label-empty-foreground = ${colors.fg}
    +label-empty-padding = 1
     
    @@ -313,38 +313,38 @@ label-empty-padding = 1

    Music using MPD

    -
    [module/mpd]
    -type = internal/mpd
    -format-online = <icon-prev> <toggle> <icon-next> %{A1:$TERMINAL -e "ncmpcpp" &:}<label-song>%{A}
    +
    [module/mpd]
    +type = internal/mpd
    +format-online = <icon-prev> <toggle> <icon-next> %{A1:$TERMINAL -e "ncmpcpp" &:}<label-song>%{A}
     
    -format-online-spacing = 0
    -format-online-padding = 0
    +format-online-spacing = 0
    +format-online-padding = 0
     
    -label-offline = mpd is offline
    -format-offline = <label-offline>
    -format-offline-foreground = #777
    +label-offline = mpd is offline
    +format-offline = <label-offline>
    +format-offline-foreground = #777
     
    -label-song = %artist% - %title%
    -label-song-maxlen = 30
    -label-song-ellipsis = true
    +label-song = %artist% - %title%
    +label-song-maxlen = 30
    +label-song-ellipsis = true
     
    -icon-prev = 寧
    -icon-stop = 栗
    -icon-play = 契
    -icon-pause = 
    -icon-next = 嶺
    -icon-random = 咽
    -icon-repeat = 凌
    +icon-prev = 寧
    +icon-stop = 栗
    +icon-play = 契
    +icon-pause = 
    +icon-next = 嶺
    +icon-random = 咽
    +icon-repeat = 凌
     
    -# Used to display the state of random/repeat/repeatone/single
    -# Only applies if <icon-[random|repeat|repeatone|single]> is used
    -toggle-on-foreground = ${colors.fg}
    -toggle-off-foreground = ${colors.gray}
    +# Used to display the state of random/repeat/repeatone/single
    +# Only applies if <icon-[random|repeat|repeatone|single]> is used
    +toggle-on-foreground = ${colors.fg}
    +toggle-off-foreground = ${colors.gray}
     
    -bar-progress-width = 15
    -bar-progress-indicator = |
    -bar-progress-fill = ─
    -bar-progress-empty = ─
    +bar-progress-width = 15
    +bar-progress-indicator = |
    +bar-progress-fill = ─
    +bar-progress-empty = ─
     
    @@ -354,22 +354,22 @@ bar-progress-empty = ─

    Backlight level

    -
    [module/xbacklight]
    -type = internal/xbacklight
    +
    [module/xbacklight]
    +type = internal/xbacklight
     
    -format = <ramp>
    -ramp-0 = 
    -ramp-1 = 
    -ramp-2 = 
    -ramp-3 = 
    -ramp-4 = 
    -ramp-5 = 
    -ramp-6 = 
    -ramp-7 = 
    -ramp-8 = 
    -ramp-9 = 
    -ramp-10 = 
    -ramp-11 = 
    +format = <ramp>
    +ramp-0 = 
    +ramp-1 = 
    +ramp-2 = 
    +ramp-3 = 
    +ramp-4 = 
    +ramp-5 = 
    +ramp-6 = 
    +ramp-7 = 
    +ramp-8 = 
    +ramp-9 = 
    +ramp-10 = 
    +ramp-11 = 
     
    @@ -379,14 +379,14 @@ ramp-11 = 

    CPU Usage

    -
    [module/cpu]
    -type = internal/cpu
    -interval = 2
    +
    [module/cpu]
    +type = internal/cpu
    +interval = 2
     
    -format-prefix-foreground = ${colors.fg}
    -format-underline = ${colors.bg}
    +format-prefix-foreground = ${colors.fg}
    +format-underline = ${colors.bg}
     
    -label = %{A1:$TERMINAL -e "htop" &:}﬙ %percentage:2%%%{A}
    +label = %{A1:$TERMINAL -e "htop" &:}﬙ %percentage:2%%%{A}
     
    @@ -396,18 +396,18 @@ label = %{A1:$TERMINAL -e "htop" &:}﬙ %percentage:2%%%{A}

    Date

    -
    [module/date]
    -type = internal/date
    -interval = 1
    +
    [module/date]
    +type = internal/date
    +interval = 1
     
    -# Open google calendar on left right
    -date = %{A1:$TERMINAL -e "ikhal" &:} %d-%m%{A}
    -date-alt = "%{A1:$TERMINAL -e \"ikhal\" &:} %d-%m-%Y%{A}"
    +# Open google calendar on left right
    +date = %{A1:$TERMINAL -e "ikhal" &:} %d-%m%{A}
    +date-alt = "%{A1:$TERMINAL -e \"ikhal\" &:} %d-%m-%Y%{A}"
     
    -time =  %H:%M
    -time-alt =  %H:%M:%S
    +time =  %H:%M
    +time-alt =  %H:%M:%S
     
    -label = %date% %time%
    +label = %date% %time%
     
    @@ -417,35 +417,35 @@ label = %date% %time%

    Sound Volume

    -
    [module/pulseaudio]
    -type = internal/pulseaudio
    +
    [module/pulseaudio]
    +type = internal/pulseaudio
     
    -sink = alsa_output.pci-0000_00_1f.3.analog-stereo
    +sink = alsa_output.pci-0000_00_1f.3.analog-stereo
     
    -# Open pavucontrol on left right
    -format-volume =%{A1:pavucontrol &:}<label-volume> <bar-volume>%{A}
    +# Open pavucontrol on left right
    +format-volume =%{A1:pavucontrol &:}<label-volume> <bar-volume>%{A}
     
    -label-volume = %percentage%%
    -label-volume-foreground = ${root.foreground}
    +label-volume = %percentage%%
    +label-volume-foreground = ${root.foreground}
     
    -label-muted = ﱝ muted
    +label-muted = ﱝ muted
     
    -bar-volume-width = 10
    -bar-volume-foreground-0 = ${colors.green}
    -bar-volume-foreground-1 = ${colors.green}
    -bar-volume-foreground-2 = ${colors.blue}
    -bar-volume-foreground-3 = ${colors.blue}
    -bar-volume-foreground-4 = ${colors.red}
    -bar-volume-foreground-5 = ${colors.red}
    -bar-volume-foreground-6 = ${colors.red}
    -bar-volume-gradient = false
    -bar-volume-indicator = |
    -bar-volume-indicator-font = 2
    -bar-volume-fill = ─
    -bar-volume-fill-font = 2
    -bar-volume-empty = ─
    -bar-volume-empty-font = 2
    -bar-volume-empty-foreground = ${colors.fg}
    +bar-volume-width = 10
    +bar-volume-foreground-0 = ${colors.green}
    +bar-volume-foreground-1 = ${colors.green}
    +bar-volume-foreground-2 = ${colors.blue}
    +bar-volume-foreground-3 = ${colors.blue}
    +bar-volume-foreground-4 = ${colors.red}
    +bar-volume-foreground-5 = ${colors.red}
    +bar-volume-foreground-6 = ${colors.red}
    +bar-volume-gradient = false
    +bar-volume-indicator = |
    +bar-volume-indicator-font = 2
    +bar-volume-fill = ─
    +bar-volume-fill-font = 2
    +bar-volume-empty = ─
    +bar-volume-empty-font = 2
    +bar-volume-empty-foreground = ${colors.fg}
     
    @@ -455,27 +455,27 @@ bar-volume-empty-foreground = ${colors.fg}

    Battery

    -
    [module/battery]
    -type = internal/battery
    +
    [module/battery]
    +type = internal/battery
     
    -battery = BAT0
    -adapter = AC
    -full-at = 95
    +battery = BAT0
    +adapter = AC
    +full-at = 95
     
    -format-charging = %{A1:xfce4-power-manager-settings &:}<ramp-capacity>  <label-charging>%{A}
    -format-charging-underline = ${colors.blue}
    +format-charging = %{A1:xfce4-power-manager-settings &:}<ramp-capacity>  <label-charging>%{A}
    +format-charging-underline = ${colors.blue}
     
    -format-discharging = %{A1:xfce4-power-manager-settings &:}<ramp-capacity>  <label-discharging>%{A}
    -format-discharging-underline = ${colors.red}
    +format-discharging = %{A1:xfce4-power-manager-settings &:}<ramp-capacity>  <label-discharging>%{A}
    +format-discharging-underline = ${colors.red}
     
    -label-full = %{A1:xfce4-power-manager-settings &:} %{A}
    -format-full-underline = ${colors.bg}
    +label-full = %{A1:xfce4-power-manager-settings &:} %{A}
    +format-full-underline = ${colors.bg}
     
    -ramp-capacity-0 = 
    -ramp-capacity-1 = 
    -ramp-capacity-2 = 
    -ramp-capacity-3 = 
    -ramp-capacity-4 = 
    +ramp-capacity-0 = 
    +ramp-capacity-1 = 
    +ramp-capacity-2 = 
    +ramp-capacity-3 = 
    +ramp-capacity-4 = 
     
    @@ -485,25 +485,25 @@ ramp-capacity-4 = 

    Temperature

    -
    [module/temperature]
    -type = internal/temperature
    -interval = 2
    -thermal-zone = 0
    -warn-temperature = 70
    -hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
    -units = false
    -format = %{A1:$TERMINAL --class="Floating" -e "watch sensors" &:}<ramp> <label>%{A}
    -format-warn = <ramp> <label-warn>
    -label = %temperature-c%°C
    -label-warn = %temperature-c%°C
    -label-warn-foreground = ${colors.fg}
    -format-warn-underline = ${colors.red}
    -ramp-0 = 
    -ramp-1 = 
    -ramp-2 = 
    -ramp-3 = 
    -ramp-4 = 
    -ramp-foreground = ${colors.fg}
    +
    [module/temperature]
    +type = internal/temperature
    +interval = 2
    +thermal-zone = 0
    +warn-temperature = 70
    +hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
    +units = false
    +format = %{A1:$TERMINAL --class="Floating" -e "watch sensors" &:}<ramp> <label>%{A}
    +format-warn = <ramp> <label-warn>
    +label = %temperature-c%°C
    +label-warn = %temperature-c%°C
    +label-warn-foreground = ${colors.fg}
    +format-warn-underline = ${colors.red}
    +ramp-0 = 
    +ramp-1 = 
    +ramp-2 = 
    +ramp-3 = 
    +ramp-4 = 
    +ramp-foreground = ${colors.fg}
     
    @@ -513,15 +513,15 @@ ramp-foreground = ${colors.fg}

    Unread Mails

    -
    [module/unread_mail]
    -type = custom/script
    +
    [module/unread_mail]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/mail-open.sh >/dev/null 2>%1 &
    -click-right = ~/.config/polybar/scripts/mail-refresh.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/mail-status.sh
    -interval = 2
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/mail-open.sh >/dev/null 2>%1 &
    +click-right = ~/.config/polybar/scripts/mail-refresh.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/mail-status.sh
    +interval = 2
     
    @@ -530,13 +530,13 @@ interval = 2

    Unread Mail Scripts

    -
    mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l`
    +
    mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l`
     
    -if [ "$mail_nb" -eq "0" ]; then
    -  echo "";
    -else
    -  echo "%{F#859900} $mail_nb%{F-}";
    -fi
    +if [ "$mail_nb" -eq "0" ]; then
    +  echo "";
    +else
    +  echo "%{F#859900} $mail_nb%{F-}";
    +fi
     
    @@ -546,12 +546,12 @@ fi

    Refresh Mail Scripts

    -
    dunstify --replace=98465 "Mails " "Syncing...";
    -checkmail -q && \
    -    mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
    -    if [ "$mail_nb" -eq "0" ]; then
    -        dunstify --replace=98465 "Mails " "No new mail";
    -    fi
    +
    dunstify --replace=98465 "Mails " "Syncing...";
    +checkmail -q && \
    +    mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
    +    if [ "$mail_nb" -eq "0" ]; then
    +        dunstify --replace=98465 "Mails " "No new mail";
    +    fi
     
    @@ -561,7 +561,7 @@ checkmail -q && \

    Open Mails

    -
    $TERMINAL -e "tmux new-session -A -s neomutt neomutt"
    +
    $TERMINAL -e "tmux new-session -A -s neomutt neomutt"
     
    @@ -572,15 +572,15 @@ checkmail -q && \

    Unread News

    -
    [module/unread_news]
    -type = custom/script
    +
    [module/unread_news]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/news-open.sh >/dev/null 2>%1 &
    -click-right = ~/.config/polybar/scripts/news-refresh.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/news-status.sh
    -interval = 60
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/news-open.sh >/dev/null 2>%1 &
    +click-right = ~/.config/polybar/scripts/news-refresh.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/news-status.sh
    +interval = 60
     
    @@ -589,13 +589,13 @@ interval = 60

    Unread News Scripts

    -
     news_nb=`newsboat -x print-unread 2>/dev/null | cut -d " " -f1`
    +
     news_nb=`newsboat -x print-unread 2>/dev/null | cut -d " " -f1`
     
    -if [ -z "$news_nb" ] || [ "$news_nb" -eq "0" ]; then
    -   echo "";
    - else
    -   echo "%{F#859900}  $news_nb%{F-}";
    - fi
    +if [ -z "$news_nb" ] || [ "$news_nb" -eq "0" ]; then
    +   echo "";
    + else
    +   echo "%{F#859900}  $news_nb%{F-}";
    + fi
     
    @@ -605,16 +605,16 @@ if [ -z "$news_nb" ] || [ "$news_nb" -eq "0" ]; then

    Refresh News Scripts

    -
    dunstify --replace=38492 "Newsboat " "Reloading...";
    +
    dunstify --replace=38492 "Newsboat " "Reloading...";
     
    -if pgrep -x "newsboat" >/dev/null; then
    -  # If newsboat is already running, try to refresh in the tmux session
    +if pgrep -x "newsboat" >/dev/null; then
    +  # If newsboat is already running, try to refresh in the tmux session
       tmux send-keys -t newsboat R
    -else
    +else
       newsboat -x reload && /
    -      news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
    -      dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
    -fi
    +      news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
    +      dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
    +fi
     
    @@ -624,7 +624,7 @@ fi

    Open Newsboat

    -
    $TERMINAL -e "tmux new-session -A -s newsboat newsboat"
    +
    $TERMINAL -e "tmux new-session -A -s newsboat newsboat"
     
    @@ -635,14 +635,14 @@ fi

    Calendar

    -
    [module/calendar]
    -type = custom/script
    +
    [module/calendar]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/calendar-open.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/calendar-status.sh
    -interval = 5
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/calendar-open.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/calendar-status.sh
    +interval = 5
     
    @@ -651,29 +651,29 @@ interval = 5

    Calendar Status Scripts

    -
    next_events=$(khal list "$(date +"%H:%M")" 23:59 --format "{start-time} - {title}" -df 'SKIPME' | grep -v 'SKIPME' | grep -v 'No events')
    +
    next_events=$(khal list "$(date +"%H:%M")" 23:59 --format "{start-time} - {title}" -df 'SKIPME' | grep -v 'SKIPME' | grep -v 'No events')
     
    -cal_icon=""
    -cal_nb=""
    -cal_desc=""
    +cal_icon=""
    +cal_nb=""
    +cal_desc=""
     
    -if [ -n "$next_events" ]; then
    -    events_number="$(echo "$next_events" | wc -l)"
    +if [ -n "$next_events" ]; then
    +    events_number="$(echo "$next_events" | wc -l)"
     
    -    if [ "$events_number" -gt "1" ]; then
    -        cal_nb=" ($events_number)"
    -    fi
    +    if [ "$events_number" -gt "1" ]; then
    +        cal_nb=" ($events_number)"
    +    fi
     
    -    next_timed_events=$(echo "$next_events" | sed -e '/^[^0-9]/d')
    -    if [ -z "$next_timed_events" ]; then
    -        # Only full day events
    -        cal_desc=" $(echo "$next_events" | sed -e '/^[0-9]/d;s/^ - //' | head -n 1 | cut -c 1-15)"
    -    else
    -        cal_desc=" $(echo "$next_timed_events" | head -n 1 | cut -c 1-20)"
    -    fi
    -fi
    +    next_timed_events=$(echo "$next_events" | sed -e '/^[^0-9]/d')
    +    if [ -z "$next_timed_events" ]; then
    +        # Only full day events
    +        cal_desc=" $(echo "$next_events" | sed -e '/^[0-9]/d;s/^ - //' | head -n 1 | cut -c 1-15)"
    +    else
    +        cal_desc=" $(echo "$next_timed_events" | head -n 1 | cut -c 1-20)"
    +    fi
    +fi
     
    -echo "${cal_icon}${cal_nb}${cal_desc}"
    +echo "${cal_icon}${cal_nb}${cal_desc}"
     
    @@ -683,7 +683,7 @@ echo "${cal_icon}${cal_nb}${cal_desc}"

    Open Calendar

    -
    $TERMINAL --class="Floating" -e "khal interactive"
    +
    $TERMINAL --class="Floating" -e "khal interactive"
     
    @@ -694,14 +694,14 @@ echo "${cal_icon}${cal_nb}${cal_desc}"

    Redshift

    -
    [module/redshift]
    -type = custom/script
    +
    [module/redshift]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/redshift-toggle.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/redshift-status.sh
    -interval = 2
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/redshift-toggle.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/redshift-status.sh
    +interval = 2
     
    @@ -710,11 +710,11 @@ interval = 2

    Redshift - Status

    -
    if pgrep -x "redshift" >/dev/null; then
    -    echo "望";
    -else
    -    echo "盛";
    -fi
    +
    if pgrep -x "redshift" >/dev/null; then
    +    echo "望";
    +else
    +    echo "盛";
    +fi
     
    @@ -724,13 +724,13 @@ fi

    Toggle Redshift

    -
    if pgrep -x "redshift" >/dev/null; then
    -    killall redshift && \
    -        dunstify --replace=36492 "Redshift 望" "Turned off";
    -else
    -    nohup redshift > /dev/null 2>&1 &
    -    dunstify --replace=36492 "Redshift 望" "Starting...";
    -fi
    +
    if pgrep -x "redshift" >/dev/null; then
    +    killall redshift && \
    +        dunstify --replace=36492 "Redshift 望" "Turned off";
    +else
    +    nohup redshift > /dev/null 2>&1 &
    +    dunstify --replace=36492 "Redshift 望" "Starting...";
    +fi
     
    @@ -741,14 +741,14 @@ fi

    NordVPN

    -
    [module/nordvpn]
    -type = custom/script
    +
    [module/nordvpn]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/nordvpn-status.sh
    -interval = 2
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/nordvpn-status.sh
    +interval = 2
     
    @@ -757,13 +757,13 @@ interval = 2

    Nordvpn Status script

    -
    tmpfile="/tmp/vpnstatus";
    +
    tmpfile="/tmp/vpnstatus";
     
    -if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
    -  echo "%{F#859900}%{F-}";
    -else
    -  echo "";
    -fi
    +if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
    +  echo "%{F#859900}%{F-}";
    +else
    +  echo "";
    +fi
     
    @@ -773,19 +773,19 @@ fi

    Nordvpn Toggle

    -
    tmpfile="/tmp/vpnstatus";
    +
    tmpfile="/tmp/vpnstatus";
     
    -if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
    -  nordvpn disconnect && \
    -      dunstify --replace=23198 "VPN" "Disconnected" && \
    -      echo "off" > $tmpfile;
    -else
    -  country=`cat ~/.local/data/nordvpn_countries.txt | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`;
    -  dunstify --replace=23198 "VPN" "Connecting to $country...";
    -  nordvpn connect $country && \
    -      dunstify --replace=23198 "VPN" "Connected to $country" && \
    -      echo "on" > $tmpfile;
    -fi
    +if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
    +  nordvpn disconnect && \
    +      dunstify --replace=23198 "VPN" "Disconnected" && \
    +      echo "off" > $tmpfile;
    +else
    +  country=`cat ~/.local/data/nordvpn_countries.txt | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`;
    +  dunstify --replace=23198 "VPN" "Connecting to $country...";
    +  nordvpn connect $country && \
    +      dunstify --replace=23198 "VPN" "Connected to $country" && \
    +      echo "on" > $tmpfile;
    +fi
     
    @@ -796,15 +796,15 @@ fi

    Packages

    -
    [module/packages]
    -type = custom/script
    +
    [module/packages]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/packages-update.sh >/dev/null 2>%1 &
    -click-right = ~/.config/polybar/scripts/packages-refresh.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/packages-status.sh
    -interval = 600
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/packages-update.sh >/dev/null 2>%1 &
    +click-right = ~/.config/polybar/scripts/packages-refresh.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/packages-status.sh
    +interval = 600
     
    @@ -813,16 +813,16 @@ interval = 600

    Packages Status script

    -
    yay -Sy > /dev/null 2>&1 && \
    -    package_nb=`yay -Qu 2> /dev/null | wc -l` || \
    -    package_nb=0
    +
    yay -Sy > /dev/null 2>&1 && \
    +    package_nb=`yay -Qu 2> /dev/null | wc -l` || \
    +    package_nb=0
     
     
    -if [ "$package_nb" -eq "0" ]; then
    -    echo "";
    -else
    -    echo "%{F#859900} $package_nb%{F-}";
    -fi
    +if [ "$package_nb" -eq "0" ]; then
    +    echo "";
    +else
    +    echo "%{F#859900} $package_nb%{F-}";
    +fi
     
    @@ -832,16 +832,16 @@ fi

    Refresh New Packages script

    -
    dunstify --replace=64654 'Packages ' "Refreshing..."
    +
    dunstify --replace=64654 'Packages ' "Refreshing..."
     
    -yay -Sy > /dev/null 2>&1 && \
    -    package_nb=`yay -Qu 2> /dev/null | wc -l`;
    +yay -Sy > /dev/null 2>&1 && \
    +    package_nb=`yay -Qu 2> /dev/null | wc -l`;
     
    -if [ "$package_nb" -eq "0" ]; then
    -  dunstify --replace=64654 'Packages ' "No upgrade available"
    -else
    -  dunstify --replace=64654 'Packages ' "$(package_nb) upgrade(s) available"
    -fi
    +if [ "$package_nb" -eq "0" ]; then
    +  dunstify --replace=64654 'Packages ' "No upgrade available"
    +else
    +  dunstify --replace=64654 'Packages ' "$(package_nb) upgrade(s) available"
    +fi
     
    @@ -851,7 +851,7 @@ fi

    Packages Update

    -
    $TERMINAL -e "yay"
    +
    $TERMINAL -e "yay"
     
    @@ -862,14 +862,14 @@ fi

    Dunst

    -
    [module/dunst]
    -type = custom/script
    +
    [module/dunst]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/dunst-toggle.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/dunst-status.sh
    -interval = 2
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/dunst-toggle.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/dunst-status.sh
    +interval = 2
     
    @@ -878,17 +878,17 @@ interval = 2

    Dunst Status script

    -
    tmpfile="/tmp/dunststatus";
    +
    tmpfile="/tmp/dunststatus";
     
    -if [ -f $tmpfile ]; then
    -  if grep -q "on" $tmpfile; then
    -    echo "";
    -  elif grep -q "off" $tmpfile; then
    -    echo "";
    -  fi
    -else
    -  echo "";
    -fi
    +if [ -f $tmpfile ]; then
    +  if grep -q "on" $tmpfile; then
    +    echo "";
    +  elif grep -q "off" $tmpfile; then
    +    echo "";
    +  fi
    +else
    +  echo "";
    +fi
     
    @@ -898,18 +898,18 @@ fi

    Dunst Toggle

    -
    tmpfile="/tmp/dunststatus";
    +
    tmpfile="/tmp/dunststatus";
     
    -if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
    -    killall -SIGUSR2 dunst && \
    -        echo "on" > $tmpfile;
    -    dunstify --replace=16549 "Notifications " "Activated";
    -else
    -    dunstify --replace=16549 "Notifications " "Deactivated";
    -    sleep 1 && \
    -        killall -SIGUSR1 dunst && \
    -        echo "off" > $tmpfile;
    -fi
    +if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
    +    killall -SIGUSR2 dunst && \
    +        echo "on" > $tmpfile;
    +    dunstify --replace=16549 "Notifications " "Activated";
    +else
    +    dunstify --replace=16549 "Notifications " "Deactivated";
    +    sleep 1 && \
    +        killall -SIGUSR1 dunst && \
    +        echo "off" > $tmpfile;
    +fi
     
    @@ -920,16 +920,16 @@ fi

    Lock Screen

    -
    [module/lockscreen]
    -type = custom/script
    +
    [module/lockscreen]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/lockscreen-toggle.sh >/dev/null 2>%1 &
    -click-right = ~/.local/bin/lockscreen >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/lockscreen-status.sh
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/lockscreen-toggle.sh >/dev/null 2>%1 &
    +click-right = ~/.local/bin/lockscreen >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/lockscreen-status.sh
     
    -interval = 2
    +interval = 2
     
    @@ -938,12 +938,12 @@ interval = 2

    Lock screen Status script

    -
    if pgrep -x "xautolock" >/dev/null
    -then
    -    echo "";
    -else
    -    echo "";
    -fi
    +
    if pgrep -x "xautolock" >/dev/null
    +then
    +    echo "";
    +else
    +    echo "";
    +fi
     
    @@ -953,13 +953,13 @@ fi

    Toggle Automatic Lock Screen

    -
    if pgrep -x "xautolock" >/dev/null ; then
    -    pkill xautolock && \
    -        dunstify --replace=13602 'Lock Screen ' 'Desactivated'
    -else
    -    xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
    -    dunstify --replace=13602 'Lock Screen ' 'Activated'
    -fi
    +
    if pgrep -x "xautolock" >/dev/null ; then
    +    pkill xautolock && \
    +        dunstify --replace=13602 'Lock Screen ' 'Desactivated'
    +else
    +    xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
    +    dunstify --replace=13602 'Lock Screen ' 'Activated'
    +fi
     
    @@ -970,31 +970,31 @@ fi

    Network

    -
    [module/wired-network]
    -type = internal/network
    -interface = enp0s20f0u6u4
    +
    [module/wired-network]
    +type = internal/network
    +interface = enp0s20f0u6u4
     
    -label-connected =  %local_ip%
    -label-connected-foreground = ${colors.fg}
    +label-connected =  %local_ip%
    +label-connected-foreground = ${colors.fg}
     
    -label-disconnected = 
    -label-disconnected-foreground = #777
    +label-disconnected = 
    +label-disconnected-foreground = #777
     
    -
    [module/wireless-network]
    -type = internal/network
    -interface = wlp2s0
    +
    [module/wireless-network]
    +type = internal/network
    +interface = wlp2s0
     
    -format-connected = <label-connected>
    -format-disconnected = <label-disconnected>
    +format-connected = <label-connected>
    +format-disconnected = <label-disconnected>
     
    -label-connected = 直 %essid%
    -label-connected-foreground = ${colors.fg}
    +label-connected = 直 %essid%
    +label-connected-foreground = ${colors.fg}
     
    -label-disconnected = 睊
    -label-disconnected-foreground = #777
    +label-disconnected = 睊
    +label-disconnected-foreground = #777
     
    @@ -1004,15 +1004,15 @@ label-disconnected-foreground = #777

    Wireguard

    -
    [module/wireguard]
    -type = custom/script
    +
    [module/wireguard]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/wireguard-toggle.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/wireguard-status.sh
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/wireguard-toggle.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/wireguard-status.sh
     
    -interval = 2
    +interval = 2
     
    @@ -1021,15 +1021,15 @@ interval = 2

    Wireguard Connection Status

    -
    config="pivpn"
    +
    config="homelab"
     
    -connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
    +connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
     
    -if [ "$connection" = "$config" ]; then
    -    echo "%{F#859900}%{F-}"
    -else
    -    echo ""
    -fi
    +if [ "$connection" = "$config" ]; then
    +    echo "%{F#859900}%{F-}"
    +else
    +    echo ""
    +fi
     
    @@ -1039,17 +1039,17 @@ fi

    Toggle Wireguard Connection

    -
    config="pivpn"
    +
    config="homelab"
     
    -connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
    +connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
     
    -if [ "$connection" = "$config" ]; then
    -    sudo wg-quick down "$config" && \
    -        dunstify --replace=83244 "Wireguard" "Disconnected from $config"
    -else
    -    sudo wg-quick up "$config" && \
    -        dunstify --replace=83244 "Wireguard" "Connected to $config"
    -fi
    +if [ "$connection" = "$config" ]; then
    +    sudo wg-quick down "$config" && \
    +        dunstify --replace=83244 "Wireguard" "Disconnected from $config"
    +else
    +    sudo wg-quick up "$config" && \
    +        dunstify --replace=83244 "Wireguard" "Connected to $config"
    +fi
     
    @@ -1060,15 +1060,15 @@ fi

    Microphone loopback

    -
    [module/loopback]
    -type = custom/script
    +
    [module/loopback]
    +type = custom/script
     
    -format-underline = ${colors.bg}
    -click-left = ~/.config/polybar/scripts/loopback-toggle.sh >/dev/null 2>%1 &
    -format = <label>
    -exec = ~/.config/polybar/scripts/loopback-status.sh
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/loopback-toggle.sh >/dev/null 2>%1 &
    +format = <label>
    +exec = ~/.config/polybar/scripts/loopback-status.sh
     
    -interval = 2
    +interval = 2
     
    @@ -1077,13 +1077,13 @@ interval = 2

    Loopback Status

    -
    loopback=$(pactl list 2>/dev/null | grep module-loopback | wc -l)
    +
    loopback=$(pactl list 2>/dev/null | grep module-loopback | wc -l)
     
    -if [ "$loopback" -eq "0" ]; then
    -    echo ""
    -else
    -    echo "%{F#859900}%{F-}"
    -fi
    +if [ "$loopback" -eq "0" ]; then
    +    echo ""
    +else
    +    echo "%{F#859900}%{F-}"
    +fi
     
    @@ -1093,15 +1093,15 @@ fi

    Toggle Loopback

    -
    loopback=$(pactl list 2>/dev/null | grep module-loopback | wc -l)
    +
    loopback=$(pactl list 2>/dev/null | grep module-loopback | wc -l)
     
    -if [ "$loopback" -eq "0" ]; then
    -    pactl load-module module-loopback latency_msec=1 && \
    -        dunstify --replace=82244 "Loopback" "Enabled"
    -else
    -    pactl unload-module module-loopback && \
    -        dunstify --replace=82244 "Loopback" "Disabled"
    -fi
    +if [ "$loopback" -eq "0" ]; then
    +    pactl load-module module-loopback latency_msec=1 && \
    +        dunstify --replace=82244 "Loopback" "Enabled"
    +else
    +    pactl unload-module module-loopback && \
    +        dunstify --replace=82244 "Loopback" "Disabled"
    +fi
     
    @@ -1113,10 +1113,10 @@ fi

    Screenshot

    -
    [module/screenshot]
    -type = custom/text
    -content = ""
    -click-left = ~/.local/bin/screenshot >/dev/null 2>%1 &
    +
    [module/screenshot]
    +type = custom/text
    +content = ""
    +click-left = ~/.local/bin/screenshot >/dev/null 2>%1 &
     
    @@ -1130,17 +1130,17 @@ click-left = ~/.local/bin/screenshot >/dev/null 2>%1 &

    Launch

    -
    # Terminate already running bar instances
    +
    # Terminate already running bar instances
     killall -q polybar
     
    -# Wait until the processes have been shut down
    -while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
    +# Wait until the processes have been shut down
    +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
     
    -# Launch Polybar, using default config location ~/.config/polybar/config
    -polybar top >>/tmp/polybar.log 2>&1 &
    -# polybar bottom &
    +# Launch Polybar, using default config location ~/.config/polybar/config
    +polybar top >>/tmp/polybar.log 2>&1 &
    +# polybar bottom &
     
    -echo "Polybar launched..."
    +echo "Polybar launched..."
     
    @@ -1150,13 +1150,13 @@ echo "Polybar launched..."

    Toggle

    -
    # Usage : toggle.sh top
    +
    # Usage : toggle.sh top
     
    -pid=$(pgrep -f "polybar $1")
    +pid=$(pgrep -f "polybar $1")
     
    -if [ ! -z "$pid" ]; then
    -    polybar-msg -p $pid cmd toggle >/dev/null 2>&1
    -fi
    +if [ ! -z "$pid" ]; then
    +    polybar-msg -p $pid cmd toggle >/dev/null 2>&1
    +fi
     
    @@ -1165,7 +1165,7 @@ fi

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/qutebrowser.html b/docs/qutebrowser.html index da23bda..d585826 100644 --- a/docs/qutebrowser.html +++ b/docs/qutebrowser.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Qutebrowser Configuration @@ -50,6 +50,9 @@
  • Add Url to Buku using Rofi
  • Add Url to Buku without asking for information
  • Download with aria2c
  • +
  • Download with aria2c on the Homelab
  • +
  • Screenshot
  • +
  • Save to PDF
  • @@ -60,10 +63,10 @@

    Import

    -
    from qutebrowser.config.configfiles import ConfigAPI
    -from qutebrowser.config.config import ConfigContainer
    +
    from qutebrowser.config.configfiles import ConfigAPI
    +from qutebrowser.config.config import ConfigContainer
     
    -import sys, os
    +import sys, os
     
    @@ -73,10 +76,10 @@ import sys, os

    General config

    -
    c.aliases = {'w': 'session-save', 'q': 'quit', 'wq': 'quit --save'}
    -c.auto_save.session = False
    -c.backend = 'webengine'
    -c.confirm_quit = ['downloads']
    +
    c.aliases = {'w': 'session-save', 'q': 'quit', 'wq': 'quit --save'}
    +c.auto_save.session = False
    +c.backend = 'webengine'
    +c.confirm_quit = ['downloads']
     
    @@ -86,14 +89,14 @@ c.confirm_quit = ['downloads']

    Content

    -
    c.content.autoplay = False
    -c.content.notifications = False
    -c.content.geolocation = 'ask'
    -c.content.javascript.alert = True
    -c.content.javascript.can_access_clipboard = True
    -c.content.media_capture = 'ask'
    -c.content.pdfjs = False
    -c.content.proxy = 'system'
    +
    c.content.autoplay = False
    +c.content.notifications = False
    +c.content.geolocation = 'ask'
    +c.content.javascript.alert = True
    +c.content.javascript.can_access_clipboard = True
    +c.content.media_capture = 'ask'
    +c.content.pdfjs = False
    +c.content.proxy = 'system'
     
    @@ -103,7 +106,7 @@ c.content.proxy = 'system'

    Editor

    -
    c.editor.command = ['/usr/bin/termite', '--class="Floating"', '-e', 'nvim {}']
    +
    c.editor.command = ['/usr/bin/termite', '--class="Floating"', '-e', 'nvim {}']
     
    @@ -113,12 +116,12 @@ c.content.proxy = 'system'

    Downloads

    -
    c.downloads.location.directory = '$HOME/Downloads/'
    -c.downloads.location.prompt = True
    -c.downloads.location.remember = True
    -c.downloads.location.suggestion = 'path'
    -c.downloads.position = 'bottom'
    -c.downloads.remove_finished = 10000
    +
    c.downloads.location.directory = '$HOME/Downloads/'
    +c.downloads.location.prompt = True
    +c.downloads.location.remember = True
    +c.downloads.location.suggestion = 'path'
    +c.downloads.position = 'bottom'
    +c.downloads.remove_finished = 10000
     
    @@ -128,10 +131,9 @@ c.downloads.remove_finished = 10000

    Fonts

    -
    c.fonts.default_family = ["Hack Nerd Font Mono", "DejaVu Sans Mono", "Monaco"]
    -c.fonts.prompts = '10pt monospace'
    -c.fonts.statusbar = '10pt monospace'
    -c.fonts.tabs = '10pt monospace'
    +
    c.fonts.default_family = ["Hack Nerd Font Mono", "DejaVu Sans Mono", "Monaco"]
    +c.fonts.prompts = '10pt monospace'
    +c.fonts.statusbar = '10pt monospace'
     
    @@ -141,10 +143,10 @@ c.fonts.tabs = '10pt monospace'

    Input

    -
    c.input.insert_mode.auto_enter = True
    -c.input.insert_mode.auto_leave = True
    -c.input.insert_mode.auto_load = False
    -c.input.insert_mode.plugins = True
    +
    c.input.insert_mode.auto_enter = True
    +c.input.insert_mode.auto_leave = True
    +c.input.insert_mode.auto_load = False
    +c.input.insert_mode.plugins = True
     
    @@ -154,8 +156,8 @@ c.input.insert_mode.plugins = True

    New Instance Options

    -
    c.new_instance_open_target = 'tab'
    -c.new_instance_open_target_window = 'last-focused'
    +
    c.new_instance_open_target = 'tab'
    +c.new_instance_open_target_window = 'last-focused'
     
    @@ -165,7 +167,7 @@ c.new_instance_open_target_window = 'last-focused'

    Spell Check

    -
    c.spellcheck.languages = ['en-US', 'fr-FR']
    +
    c.spellcheck.languages = ['en-US', 'fr-FR']
     
    @@ -175,20 +177,19 @@ c.new_instance_open_target_window = 'last-focused'

    Status Bar

    -
    # Hide the statusbar unless a message is shown.
    -c.statusbar.hide = False
    -c.statusbar.position = 'bottom'
    +
    # Hide the statusbar unless a message is shown.
    +c.statusbar.position = 'bottom'
     
    -# List of widgets displayed in the statusbar.
    -# Valid values:
    -#   - url: Current page URL.
    -#   - scroll: Percentage of the current page position like `10%`.
    -#   - scroll_raw: Raw percentage of the current page position like `10`.
    -#   - history: Display an arrow when possible to go back/forward in history.
    -#   - tabs: Current active tab, e.g. `2`.
    -#   - keypress: Display pressed keys when composing a vi command.
    -#   - progress: Progress bar for the current page loading.
    -c.statusbar.widgets = ['keypress', 'url', 'scroll', 'history', 'progress']
    +# List of widgets displayed in the statusbar.
    +# Valid values:
    +#   - url: Current page URL.
    +#   - scroll: Percentage of the current page position like `10%`.
    +#   - scroll_raw: Raw percentage of the current page position like `10`.
    +#   - history: Display an arrow when possible to go back/forward in history.
    +#   - tabs: Current active tab, e.g. `2`.
    +#   - keypress: Display pressed keys when composing a vi command.
    +#   - progress: Progress bar for the current page loading.
    +c.statusbar.widgets = ['keypress', 'url', 'scroll', 'history', 'progress']
     
    @@ -198,45 +199,45 @@ c.statusbar.widgets = ['keypress', 'url', 'scroll', 'history', 'progress']

    Tabs

    -
    # Open new tabs (middleclick/ctrl+click) in the background.
    -c.tabs.background = True
    +
    # Open new tabs (middleclick/ctrl+click) in the background.
    +c.tabs.background = True
     
    -# Mouse button with which to close tabs.
    -c.tabs.close_mouse_button = 'right'
    +# Mouse button with which to close tabs.
    +c.tabs.close_mouse_button = 'right'
     
    -# How to behave when the last tab is closed.
    -c.tabs.last_close = 'close'
    +# How to behave when the last tab is closed.
    +c.tabs.last_close = 'close'
     
    -# Switch between tabs using the mouse wheel.
    -c.tabs.mousewheel_switching = False
    +# Switch between tabs using the mouse wheel.
    +c.tabs.mousewheel_switching = False
     
    -# Position of new tabs opened from another tab.
    -# Valid values:
    -#   - prev: Before the current tab.
    -#   - next: After the current tab.
    -#   - first: At the beginning.
    -#   - last: At the end.
    -c.tabs.new_position.related = 'next'
    +# Position of new tabs opened from another tab.
    +# Valid values:
    +#   - prev: Before the current tab.
    +#   - next: After the current tab.
    +#   - first: At the beginning.
    +#   - last: At the end.
    +c.tabs.new_position.related = 'next'
     
    -# Position of new tabs which aren't opened from another tab.
    -# Valid values:
    -#   - prev: Before the current tab.
    -#   - next: After the current tab.
    -#   - first: At the beginning.
    -#   - last: At the end.
    -c.tabs.new_position.unrelated = 'last'
    +# Position of new tabs which aren't opened from another tab.
    +# Valid values:
    +#   - prev: Before the current tab.
    +#   - next: After the current tab.
    +#   - first: At the beginning.
    +#   - last: At the end.
    +c.tabs.new_position.unrelated = 'last'
     
    -# Position of the tab bar.
    -c.tabs.position = 'left'
    +# Position of the tab bar.
    +c.tabs.position = 'left'
     
    -# Which tab to select when the focused tab is removed.
    -c.tabs.select_on_remove = 'next'
    +# Which tab to select when the focused tab is removed.
    +c.tabs.select_on_remove = 'next'
     
    -# Width (in pixels or as percentage of the window) of the tab bar if it's vertical.
    -c.tabs.width = 30
    +# Width (in pixels or as percentage of the window) of the tab bar if it's vertical.
    +c.tabs.width = 30
     
    -# Wrap when changing tabs.
    -c.tabs.wrap = False
    +# Wrap when changing tabs.
    +c.tabs.wrap = False
     
    @@ -246,30 +247,30 @@ c.tabs.wrap = False

    Urls and Search Engines

    -
    c.url.searchengines = {
    -    'DEFAULT': 'https://www.duckduckgo.org/?q={}',
    -    'aw': 'https://wiki.archlinux.org/?search={}',
    -    'wi': 'https://en.wikipedia.org/wiki/Special:Search?search={}',
    -    'go': 'https://www.google.com/search?q={}',
    -    'gc': 'https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q={}&btnG=',
    -    'gm': 'https://www.google.com/maps/search/{}/',
    -    'yt': 'https://www.youtube.com/results?search_query={}',
    -    'gh': 'https://github.com/search?q={}',
    -    're': 'https://www.reddit.com/search?q={}',
    -    'lb': 'http://gen.lib.rus.ec/search.php?req={}',
    -    'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}',
    -    'sm': 'https://www.openstreetmap.org/search?query={}',
    -    'am': 'https://www.amazon.fr/s?k={}',
    -    'md': 'https://fr.mathworks.com/help/search.html?qdoc={}&submitsearch=',
    -    'js': 'https://developer.mozilla.org/en-US/search?q={}',
    -    'tf': 'https://translate.google.com/#view=home&op=translate&sl=en&tl=fr&text={}',
    -    'te': 'https://translate.google.com/#view=home&op=translate&sl=fr&tl=en&text={}',
    +
    c.url.searchengines = {
    +    'DEFAULT': 'https://www.duckduckgo.org/?q={}',
    +    'aw': 'https://wiki.archlinux.org/?search={}',
    +    'wi': 'https://en.wikipedia.org/wiki/Special:Search?search={}',
    +    'go': 'https://www.google.com/search?q={}',
    +    'gc': 'https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q={}&btnG=',
    +    'gm': 'https://www.google.com/maps/search/{}/',
    +    'yt': 'https://www.youtube.com/results?search_query={}',
    +    'gh': 'https://github.com/search?q={}',
    +    're': 'https://www.reddit.com/search?q={}',
    +    'lb': 'http://gen.lib.rus.ec/search.php?req={}',
    +    'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}',
    +    'sm': 'https://www.openstreetmap.org/search?query={}',
    +    'am': 'https://www.amazon.fr/s?k={}',
    +    'md': 'https://fr.mathworks.com/help/search.html?qdoc={}&submitsearch=',
    +    'js': 'https://developer.mozilla.org/en-US/search?q={}',
    +    'tf': 'https://translate.google.com/#view=home&op=translate&sl=en&tl=fr&text={}',
    +    'te': 'https://translate.google.com/#view=home&op=translate&sl=fr&tl=en&text={}',
     }
     
    -
    c.url.start_pages = ['qute://bookmarks']
    +
    c.url.start_pages = ['https://homer.tdehaeze.xyz/']
     
    @@ -282,9 +283,9 @@ c.tabs.wrap = False Zooming

    -
    config.bind('+', 'zoom-in')
    -config.bind('-', 'zoom-out')
    -config.bind('=', 'zoom')
    +
    config.bind('+', 'zoom-in')
    +config.bind('-', 'zoom-out')
    +config.bind('=', 'zoom')
     
    @@ -292,8 +293,8 @@ config.bind('=', 'zoom') Inputs blocks

    -
    config.bind(';t', 'hint inputs')
    -config.bind('gi', 'hint inputs --first')
    +
    config.bind(';t', 'hint inputs')
    +config.bind('gi', 'hint inputs --first')
     
    @@ -301,7 +302,7 @@ config.bind('gi', 'hint inputs --first') Opening New Window

    -
    config.bind('<Ctrl-N>', 'open -w')
    +
    config.bind('<Ctrl-N>', 'open -w')
     
    @@ -309,8 +310,8 @@ Opening New Window History

    -
    config.bind('H', 'back')
    -config.bind('L', 'forward')
    +
    config.bind('H', 'back')
    +config.bind('L', 'forward')
     
    @@ -318,12 +319,12 @@ config.bind('L', 'forward') Move tabs around

    -
    config.bind('d', 'tab-close')
    -config.bind('<', 'tab-move -')
    -config.bind('>', 'tab-move +')
    -config.bind('gO', 'tab-give') # Open current tab in a new window
    -config.bind('J', 'tab-next')
    -config.bind('K', 'tab-prev')
    +
    config.bind('d', 'tab-close')
    +config.bind('<', 'tab-move -')
    +config.bind('>', 'tab-move +')
    +config.bind('gO', 'tab-give') # Open current tab in a new window
    +config.bind('J', 'tab-next')
    +config.bind('K', 'tab-prev')
     
    @@ -331,8 +332,8 @@ config.bind('K', 'tab-prev') Bookmarks and Quickmark

    -
    config.bind('M', 'bookmark-add')
    -config.bind('m', 'quickmark-save')
    +
    config.bind('M', 'bookmark-add')
    +config.bind('m', 'quickmark-save')
     
    @@ -340,8 +341,8 @@ config.bind('m', 'quickmark-save') Open New Pages/Tabs

    -
    config.bind('o', 'set-cmd-text -s :open')
    -config.bind('O', 'set-cmd-text -s :open -t')
    +
    config.bind('o', 'set-cmd-text -s :open')
    +config.bind('O', 'set-cmd-text -s :open -t')
     
    @@ -349,8 +350,8 @@ config.bind('O', 'set-cmd-text -s :open -t') Open new page/tab with clipboard content

    -
    config.bind('pp', 'open -- {clipboard}')
    -config.bind('pP', 'open -t -- {clipboard}')
    +
    config.bind('pp', 'open -- {clipboard}')
    +config.bind('pP', 'open -t -- {clipboard}')
     
    @@ -358,8 +359,8 @@ config.bind('pP', 'open -t -- {clipboard}') Link Hinting

    -
    config.bind('f', 'hint')
    -config.bind('F', 'hint all tab')
    +
    config.bind('f', 'hint')
    +config.bind('F', 'hint all tab')
     
    @@ -367,7 +368,7 @@ config.bind('F', 'hint all tab') Yanking url

    -
    config.bind('yy', 'yank')
    +
    config.bind('yy', 'yank')
     
    @@ -375,13 +376,15 @@ Yanking url Go to specific websites

    -
    config.bind('gy', 'open -t https://www.youtube.com/feed/subscriptions')
    -config.bind('gf', 'open -t https://feedly.com/i/my')
    -config.bind('gr', 'open -t https://www.reddit.com/')
    +
    config.bind('gy', 'open -t https://www.youtube.com/feed/subscriptions')
    +config.bind('gf', 'open -t https://rss.tdehaeze.xyz/')
    +config.bind('gr', 'open -t https://www.reddit.com/')
     
    -config.bind('gb', 'open qute://bookmarks')
    -config.bind('gh', 'open qute://history')
    -config.bind('gs', 'open qute://settings')
    +config.bind('gh', 'open -t https://homer.tdehaeze.xyz/')
    +
    +config.bind('gb', 'open -t qute://bookmarks')
    +config.bind('gH', 'open -t qute://history')
    +config.bind('gs', 'open -t qute://settings')
     
    @@ -394,7 +397,7 @@ config.bind('gs', 'open qute://settings') Create a Password for the current website

    -
    config.bind(',P', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-passowrd.sh')
    +
    config.bind(',P', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-passowrd.sh')
     
    @@ -402,7 +405,7 @@ Create a Password for the current website Use Pass to fill password and username (configuration is done in ~/.config/qutebrowser/password_fill_rc)

    -
    config.bind(',p', 'spawn --userscript password_fill')
    +
    config.bind(',p', 'spawn --userscript password_fill')
     
    @@ -410,8 +413,8 @@ Use Pass to fill password and username (configuration is done in ~/.config Open Youtube video using mpv

    -
    config.bind(',m', 'spawn --detach mpv --force-window yes {url}')
    -config.bind(',M', 'hint links spawn --detach mpv --force-window yes {hint-url}')
    +
    config.bind(',m', 'spawn --detach mpv --force-window yes {url}')
    +config.bind(',M', 'hint links spawn --detach mpv --force-window yes {hint-url}')
     
    @@ -419,8 +422,8 @@ config.bind(',M', 'hint links spawn --detach mpv --force-window yes {hint-url}') Download Youtube video / entire playlist

    -
    config.bind(',v', 'spawn --userscript ~/.config/qutebrowser/userscripts/yt-download.sh {url}')
    -config.bind(',V', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/yt-download.sh {hint-url}')
    +
    config.bind(',v', 'spawn --userscript ~/.config/qutebrowser/userscripts/yt-download.sh {url}')
    +config.bind(',V', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/yt-download.sh {hint-url}')
     
    @@ -428,8 +431,8 @@ config.bind(',V', 'hint links spawn --userscript ~/.config/qutebrowser/userscrip Add page to Bookmarks using buku

    -
    config.bind(',b', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-add.sh')
    -config.bind(',B', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-rofi.sh')
    +
    config.bind(',b', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-add.sh')
    +config.bind(',B', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-rofi.sh')
     
    @@ -437,7 +440,8 @@ config.bind(',B', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-rof Download with aria2c

    -
    config.bind(',d', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/aria2c-add.sh {hint-url}')
    +
    config.bind(',d', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/aria2c-add.sh {hint-url}')
    +config.bind(',D', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh {hint-url}')
     
    @@ -445,7 +449,7 @@ Download with aria2c Open bookmark using buku

    -
    config.bind(',o', 'spawn ~/.local/bin/bukurun')
    +
    config.bind(',o', 'spawn ~/.local/bin/bukurun')
     
    @@ -453,8 +457,17 @@ Open bookmark using buku Org Capture

    -
    config.bind(',r', 'spawn --userscript ~/.config/qutebrowser/userscripts/org-capture.sh')
    -config.bind(',R', 'hint links userscript ~/.config/qutebrowser/userscripts/org-capture.sh')
    +
    config.bind(',r', 'spawn --userscript ~/.config/qutebrowser/userscripts/org-capture.sh')
    +config.bind(',R', 'hint links userscript ~/.config/qutebrowser/userscripts/org-capture.sh')
    +
    +
    + +

    +Screenshot of webpage to png +

    +
    +
    config.bind(',s', 'spawn --userscript ~/.config/qutebrowser/userscripts/html-to-pdf.sh')
    +config.bind(',S', 'spawn --userscript ~/.config/qutebrowser/userscripts/html-to-png.sh')
     
    @@ -462,7 +475,7 @@ config.bind(',R', 'hint links userscript ~/.config/qutebrowser/userscripts/org-c Download a torrent

    -
    config.bind(',t', 'hint links spawn torrent-add {hint-url}')
    +
    config.bind(',t', 'hint links spawn torrent-add {hint-url}')
     
    @@ -470,7 +483,7 @@ Download a torrent Annotate with Hypothesis

    -
    config.bind(',a', "jseval javascript:(function(){window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s)})();")
    +
    config.bind(',a', "jseval javascript:(function(){window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s)})();")
     
    @@ -478,7 +491,7 @@ Annotate with Hypothesis See Amazon price history using CamelCamelCamel

    -
    config.bind(',A', ":open -t https://fr.camelcamelcamel.com/search?sq={url}")
    +
    config.bind(',A', ":open -t https://fr.camelcamelcamel.com/search?sq={url}")
     
    @@ -486,7 +499,7 @@ See Amazon price history using CamelCamelCamel Org Roam Entry for the current page

    -
    config.bind(',R', "open javascript:void(location.href='org-protocol://roam-ref?template=r&ref='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))")
    +
    config.bind(',R', "open javascript:void(location.href='org-protocol://roam-ref?template=r&ref='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))")
     
    @@ -501,18 +514,18 @@ Org Roam Entry for the current page

    Create a new password

    -
    url=$(echo "$QUTE_URL" | awk -F[/:] '{print $4}' | rofi -p "URL" -dmenu -lines 1)
    -username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze" | rofi -p "Username" -dmenu -lines 5)
    -password=$(rofi -p "Password" -dmenu -password -lines 1)
    +
    url=$(echo "$QUTE_URL" | awk -F[/:] '{print $4}' | rofi -p "URL" -dmenu -lines 1)
    +username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze" | rofi -p "Username" -dmenu -lines 5)
    +password=$(rofi -p "Password" -dmenu -password -lines 1)
     
    -if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
    -    dunstify --urgency=critical "Pass" "Failed to Add Password"
    -else
    -    echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
    -    pass insert --multiline "$url/$username" < /tmp/add-password.txt;
    -    rm /tmp/add-password.txt
    -    dunstify "Pass " "Password Added"
    -fi
    +if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
    +    dunstify --urgency=critical "Pass" "Failed to Add Password"
    +else
    +    echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
    +    pass insert --multiline "$url/$username" < /tmp/add-password.txt;
    +    rm /tmp/add-password.txt
    +    dunstify "Pass " "Password Added"
    +fi
     
    @@ -522,23 +535,23 @@ fi

    Download Youtube Video

    -
    cd ~/Documents/to-watch/;
    +
    cd ~/Documents/to-watch/;
     
    -if [[ "$1" == *"list"* ]]; then
    -    choice=$(echo -e "Video\nPlaylist" | rofi -dmenu -only-match -i)
    -fi
    +if [[ "$1" == *"list"* ]]; then
    +    choice=$(echo -e "Video\nPlaylist" | rofi -dmenu -only-match -i)
    +fi
     
    -if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
    -    dunstify --replace=19243 "Youtube " "Downloading Playlist...";
    -    youtube-dl -i -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" -o "%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s" && \
    -        dunstify --replace=19243 "Youtube " "Downloaded" || \
    -        dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
    -else
    -    dunstify --replace=19243 "Youtube " "Downloading Video...";
    -    youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
    -        dunstify --replace=19243 "Youtube " "Downloaded" || \
    -        dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
    -fi
    +if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
    +    dunstify --replace=19243 "Youtube " "Downloading Playlist...";
    +    youtube-dl -i -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" -o "%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s" && \
    +        dunstify --replace=19243 "Youtube " "Downloaded" || \
    +        dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
    +else
    +    dunstify --replace=19243 "Youtube " "Downloading Video...";
    +    youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
    +        dunstify --replace=19243 "Youtube " "Downloaded" || \
    +        dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
    +fi
     
    @@ -548,25 +561,25 @@ fi

    Password_fill_rc

    -
    # Show all password fields in the menu
    -query_entries() {
    -    # safe queried url for choose_entry
    -    # the subdomains are removed
    -    export queried_url=$(expr match ".$1" '.*\.\(.*\..*\)')
    -    mapfile -t files < <(find -L "$PREFIX" -iname '*.gpg' -printf '%P\n' |sed 's,\.gpg$,,')
    -}
    +
    # Show all password fields in the menu
    +query_entries() {
    +    # safe queried url for choose_entry
    +    # the subdomains are removed
    +    export queried_url=$(expr match ".$1" '.*\.\(.*\..*\)')
    +    mapfile -t files < <(find -L "$PREFIX" -iname '*.gpg' -printf '%P\n' |sed 's,\.gpg$,,')
    +}
     
    -# Even if there is only one entry, always show a menu
    -# for user confirmation.
    -choose_entry() {
    -    MENU_COMMAND=(
    +# Even if there is only one entry, always show a menu
    +# for user confirmation.
    +choose_entry() {
    +    MENU_COMMAND=(
             rofi -dmenu
    -            -p "qutebrowser> "
    -            -filter "$queried_url"
    -            -mesg $'Pick a password entry for <b>'"${QUTE_URL//&/&amp;}"'</b>'
    -    )
    -    file=$( printf "%s\n" "${files[@]}" | "${MENU_COMMAND[@]}" )
    -}
    +            -p "qutebrowser> "
    +            -filter "$queried_url"
    +            -mesg $'Pick a password entry for <b>'"${QUTE_URL//&/&amp;}"'</b>'
    +    )
    +    file=$( printf "%s\n" "${files[@]}" | "${MENU_COMMAND[@]}" )
    +}
     
    @@ -576,18 +589,18 @@ choose_entry() {

    Org-Capture

    -
    readonly CAPTURE_SCRIPT=~/.config/qutebrowser/userscripts/org-protocol-capture-html.sh
    +
    readonly CAPTURE_SCRIPT=~/.config/qutebrowser/userscripts/org-protocol-capture-html.sh
     
    -if [[ "$QUTE_MODE" = "hints" ]]; then
    -    # if we start with hints, we juste want to capture the URL
    -    $CAPTURE_SCRIPT --template "pu" --url "${QUTE_URL}"
    -elif [[ -n "$QUTE_SELECTED_TEXT" ]]; then
    -    # if text is selected, we want to capture the text
    -    $CAPTURE_SCRIPT --template "pt" --heading "${QUTE_TITLE}" --url "${QUTE_URL}" "${QUTE_SELECTED_TEXT}"
    -else
    -    # if no text is selected, we want to capture the url
    -    $CAPTURE_SCRIPT --template "pu" --heading "${QUTE_TITLE}" --url "${QUTE_URL}"
    -fi
    +if [[ "$QUTE_MODE" = "hints" ]]; then
    +    # if we start with hints, we juste want to capture the URL
    +    $CAPTURE_SCRIPT --template "pu" --url "${QUTE_URL}"
    +elif [[ -n "$QUTE_SELECTED_TEXT" ]]; then
    +    # if text is selected, we want to capture the text
    +    $CAPTURE_SCRIPT --template "pt" --heading "${QUTE_TITLE}" --url "${QUTE_URL}" "${QUTE_SELECTED_TEXT}"
    +else
    +    # if no text is selected, we want to capture the url
    +    $CAPTURE_SCRIPT --template "pu" --heading "${QUTE_TITLE}" --url "${QUTE_URL}"
    +fi
     
    @@ -600,9 +613,9 @@ fi Defaults

    -
    heading="link"
    -template="pu"
    -url="https://google.com/"
    +
    heading="link"
    +template="pu"
    +url="https://google.com/"
     
    @@ -610,33 +623,33 @@ url="https://google.com/" Functions

    -
    function debug {
    -    if [[ -n $debug ]]
    -    then
    -        function debug {
    -            echo "DEBUG: $@" >&2
    -        }
    -        debug "$@"
    -    else
    -        function debug {
    +
    function debug {
    +    if [[ -n $debug ]]
    +    then
    +        function debug {
    +            echo "DEBUG: $@" >&2
    +        }
    +        debug "$@"
    +    else
    +        function debug {
                 true
    -        }
    -    fi
    -}
    -function die {
    -    echo "$@" >&2
    -    exit 1
    -}
    -function urlencode {
    -    python -c "
    -from __future__ import print_function
    -try:
    -    from urllib import quote  # Python 2
    -except ImportError:
    -    from urllib.parse import quote  # Python 3
    -import sys
    -print(quote(sys.stdin.read()[:-1], safe=''))"
    -}
    +        }
    +    fi
    +}
    +function die {
    +    echo "$@" >&2
    +    exit 1
    +}
    +function urlencode {
    +    python -c "
    +from __future__ import print_function
    +try:
    +    from urllib import quote  # Python 2
    +except ImportError:
    +    from urllib.parse import quote  # Python 3
    +import sys
    +print(quote(sys.stdin.read()[:-1], safe=''))"
    +}
     
    @@ -644,22 +657,22 @@ print(quote(sys.stdin.read()[:-1], safe=''))" Documentation

    -
    function usage {
    -    cat <<EOF
    -$0 [OPTIONS] [HTML]
    -html | $0 [OPTIONS]
    -Send HTML to Emacs through org-protocol, passing it through Pandoc to
    -convert HTML to Org-mode.  HTML may be passed as an argument or
    -through STDIN.  If only URL is given, it will be downloaded and its
    -contents used.
    -Options:
    -    -h, --heading HEADING     Heading
    -    -t, --template TEMPLATE   org-capture template key (default: pu)
    -    -u, --url URL             URL
    -    --debug  Print debug info
    -    --help   I need somebody!
    -EOF
    -}
    +
    function usage {
    +    cat <<EOF
    +$0 [OPTIONS] [HTML]
    +html | $0 [OPTIONS]
    +Send HTML to Emacs through org-protocol, passing it through Pandoc to
    +convert HTML to Org-mode.  HTML may be passed as an argument or
    +through STDIN.  If only URL is given, it will be downloaded and its
    +contents used.
    +Options:
    +    -h, --heading HEADING     Heading
    +    -t, --template TEMPLATE   org-capture template key (default: pu)
    +    -u, --url URL             URL
    +    --debug  Print debug info
    +    --help   I need somebody!
    +EOF
    +}
     
    @@ -667,46 +680,46 @@ EOF Arguments

    -
    args=$(getopt -n "$0" -o dh:rt:u: -l debug,help,heading:,template:,url: -- "$@") \
    -    || die "Unable to parse args.  Is getopt installed?"
    -eval set -- "$args"
    +
    args=$(getopt -n "$0" -o dh:rt:u: -l debug,help,heading:,template:,url: -- "$@") \
    +    || die "Unable to parse args.  Is getopt installed?"
    +eval set -- "$args"
     
    -while true
    -do
    -    case "$1" in
    +while true
    +do
    +    case "$1" in
             -d|--debug)
    -            debug=true
    -            debug "Debugging on"
    +            debug=true
    +            debug "Debugging on"
                 ;;
             --help)
                 usage
    -            exit
    +            exit
                 ;;
             -h|--heading)
    -            shift
    -            heading="$1"
    +            shift
    +            heading="$1"
                 ;;
             -t|--template)
    -            shift
    -            template="$1"
    +            shift
    +            template="$1"
                 ;;
             -u|--url)
    -            shift
    -            url="$1"
    +            shift
    +            url="$1"
                 ;;
             --)
    -            # Remaining args
    -            shift
    -            rest=("$@")
    -            break
    +            # Remaining args
    +            shift
    +            rest=("$@")
    +            break
                 ;;
    -    esac
    +    esac
     
    -    shift
    -done
    +    shift
    +done
     
    -debug "ARGS: $args"
    -debug "Remaining args: ${rest[@]}"
    +debug "ARGS: $args"
    +debug "Remaining args: ${rest[@]}"
     
    @@ -714,12 +727,12 @@ debug "Remaining args: ${rest[@]}" Get HTML

    -
    if [[ -n $@ ]]
    -then
    -    debug "Text from args"
    +
    if [[ -n $@ ]]
    +then
    +    debug "Text from args"
     
    -    body="$@"
    -fi
    +    body="$@"
    +fi
     
    @@ -727,9 +740,9 @@ fi URL-encode

    -
    heading=$(urlencode <<<"$heading") || die "Unable to urlencode heading."
    -url=$(urlencode <<<"$url") || die "Unable to urlencode URL."
    -body=$(urlencode <<<"$body") || die "Unable to urlencode text."
    +
    heading=$(urlencode <<<"$heading") || die "Unable to urlencode heading."
    +url=$(urlencode <<<"$url") || die "Unable to urlencode URL."
    +body=$(urlencode <<<"$body") || die "Unable to urlencode text."
     
    @@ -737,7 +750,7 @@ body=$(urlencode <<<"$body") || die "Unable to urlencode text." Send to Emacs

    -
    emacsclient "org-protocol://capture?template=$template&url=$url&title=$heading&body=$body"
    +
    emacsclient "org-protocol://capture?template=$template&url=$url&title=$heading&body=$body"
     
    @@ -747,12 +760,12 @@ Send to Emacs

    Add Url to Buku using Rofi

    -
    title=$(echo "$QUTE_TITLE" | rofi -p "Title" -dmenu -lines 1)
    -tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -multi-select -p "Tags" -dmenu | tr "\n" "," | sed 's/\s*,\s*$//')
    +
    title=$(echo "$QUTE_TITLE" | rofi -p "Title" -dmenu -lines 1)
    +tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -multi-select -p "Tags" -dmenu | tr "\n" "," | sed 's/\s*,\s*$//')
     
    -buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
    -    dunstify "Buku" "Bookmark Added" || \
    -    dunstify --urgency=critical "Buku" " Bookmark Added"
    +buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
    +    dunstify "Buku" "Bookmark Added" || \
    +    dunstify --urgency=critical "Buku" " Bookmark Added"
     
    @@ -762,16 +775,67 @@ buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \

    Add Url to Buku without asking for information

    -
    buku --add $QUTE_URL --title "$QUTE_TITLE" && dunstify "Buku" "📑 Bookmark Added"
    +
    buku --add $QUTE_URL --title "$QUTE_TITLE" && \
    +  dunstify "Buku" "📑 Bookmark Added"
     
    +

    Download with aria2c

    -
    aria2p add "$1"
    +
    aria2p add "$1" && \
    +  dunstify "Aria2" "Download Started" || \
    +  dunstify "Aria2" "Error"
    +
    +
    +
    +
    + +
    +

    Download with aria2c on the Homelab

    +
    +
    +
    # Remove the =&af= from 1fichier.
    +$url=$(echo "$1" | sed 's/\&af=.*$//g') 
    +
    +dlab add "$url" && \
    +  dunstify "Aria2" "Download Started" || \
    +  dunstify "Aria2" "Error"
    +
    +
    +
    +
    + +
    +

    Screenshot

    +
    +
    +
    filename=$(rofi -p "filename" -dmenu -lines 1)
    +
    +if [ -n "filename" ]; then
    +    cd ~/Pictures/ && \
    +        firefox-developer-edition -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
    +        dunstify "Screenshot" "Taken successfully"
    +fi
    +
    +
    +
    +
    + +
    +

    Save to PDF

    +
    +
    +
    filename=$(rofi -p "filename" -dmenu -lines 1)
    +
    +if [ -n "filename" ]; then
    +    cd ~/Pictures/ && \
    +        percollate pdf --css "@page { size: A4 portrait }" --output "$filename.pdf" "$QUTE_URL" && \
    +        dunstify "Percollate" "Successfully saved to pdf"
    +fi
     
    @@ -780,7 +844,7 @@ buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/ranger.html b/docs/ranger.html index d32c824..9714de7 100644 --- a/docs/ranger.html +++ b/docs/ranger.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Ranger Configuration @@ -26,6 +26,7 @@

    Table of Contents

    +
    +

    Documentation

    +
    +
    +

    +%f the highlighted file +%d the path of the current directory +%s the selected files in the current directory +%t all tagged files in the current directory +%c the full paths of the currently copied/cut files +%p the full paths of selected files +

    +
    +
    +
    +

    Config

    @@ -90,150 +109,150 @@

    Options

    -
    # Which viewmode should be used?  Possible values are:
    -#     miller: Use miller columns which show multiple levels of the hierarchy
    -#     multipane: Midnight-commander like multipane view showing all tabs next
    -#                to each other
    +
    # Which viewmode should be used?  Possible values are:
    +#     miller: Use miller columns which show multiple levels of the hierarchy
    +#     multipane: Midnight-commander like multipane view showing all tabs next
    +#                to each other
     set viewmode miller
     
    -# How many columns are there, and what are their relative widths?
    -set column_ratios 1,1
    +# How many columns are there, and what are their relative widths?
    +set column_ratios 1,1
     
    -# Which files should be hidden? (regular expression)
    +# Which files should be hidden? (regular expression)
     set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
     
    -# Show hidden files? You can toggle this by typing 'zh'
    +# Show hidden files? You can toggle this by typing 'zh'
     set show_hidden false
     
    -# Ask for a confirmation when running the "delete" command?
    -# Valid values are "always", "never", "multiple" (default)
    -# With "multiple", ranger will ask only if you delete multiple files at once.
    +# Ask for a confirmation when running the "delete" command?
    +# Valid values are "always", "never", "multiple" (default)
    +# With "multiple", ranger will ask only if you delete multiple files at once.
     set confirm_on_delete multiple
     
    -# Which script is used to generate file previews?
    -# ranger ships with scope.sh, a script that calls external programs (see
    -# README.md for dependencies) to preview images, archives, etc.
    +# Which script is used to generate file previews?
    +# ranger ships with scope.sh, a script that calls external programs (see
    +# README.md for dependencies) to preview images, archives, etc.
     set preview_script /home/thomas/.config/ranger/scope.sh
     
    -# Use the external preview script or display simple plain text or image previews?
    +# Use the external preview script or display simple plain text or image previews?
     set use_preview_script true
     
    -# Automatically count files in the directory, even before entering them?
    +# Automatically count files in the directory, even before entering them?
     set automatically_count_files true
     
    -# Open all images in this directory when running certain image viewers
    +# Open all images in this directory when running certain image viewers
     set open_all_images true
     
    -# Be aware of version control systems and display information.
    +# Be aware of version control systems and display information.
     set vcs_aware false
     
    -# Use one of the supported image preview protocols
    +# Use one of the supported image preview protocols
     set preview_images true
     
    -# Set the preview image method
    +# Set the preview image method
     set preview_images_method ueberzug
     
     set colorscheme default
     
    -# Preview files on the rightmost column?
    -# And collapse (shrink) the last column if there is nothing to preview?
    +# Preview files on the rightmost column?
    +# And collapse (shrink) the last column if there is nothing to preview?
     set preview_files true
     set preview_directories true
     set collapse_preview true
     
    -# Draw the status bar on top of the browser window (default: bottom)
    +# Draw the status bar on top of the browser window (default: bottom)
     set status_bar_on_top false
     
    -# Draw a progress bar in the status bar which displays the average state of all
    -# currently running tasks which support progress bars?
    +# Draw a progress bar in the status bar which displays the average state of all
    +# currently running tasks which support progress bars?
     set draw_progress_bar_in_status_bar true
     
    -# Draw borders around columns?
    +# Draw borders around columns?
     set draw_borders true
     
    -# Display the directory name in tabs?
    +# Display the directory name in tabs?
     set dirname_in_tabs false
     
    -# Enable the mouse support?
    +# Enable the mouse support?
     set mouse_enabled true
     
    -# Display the file size in the main column or status bar?
    +# Display the file size in the main column or status bar?
     set display_size_in_main_column true
     set display_size_in_status_bar false
     
    -# Display files tags in all columns or only in main column?
    +# Display files tags in all columns or only in main column?
     set display_tags_in_all_columns false
     
    -# Set a title for the window?
    +# Set a title for the window?
     set update_title false
     
    -# Set the title to "ranger" in the tmux program?
    +# Set the title to "ranger" in the tmux program?
     set update_tmux_title true
     
    -# Shorten the title if it gets long?  The number defines how many
    -# directories are displayed at once, 0 turns off this feature.
    -set shorten_title 3
    +# Shorten the title if it gets long?  The number defines how many
    +# directories are displayed at once, 0 turns off this feature.
    +set shorten_title 3
     
    -# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
    +# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
     set tilde_in_titlebar true
     
    -# How many directory-changes or console-commands should be kept in history?
    -set max_history_size 20
    -set max_console_history_size 50
    +# How many directory-changes or console-commands should be kept in history?
    +set max_history_size 20
    +set max_console_history_size 50
     
    -# Try to keep so much space between the top/bottom border when scrolling:
    -set scroll_offset 8
    +# Try to keep so much space between the top/bottom border when scrolling:
    +set scroll_offset 8
     
    -# Flush the input after each key hit?  (Noticeable when ranger lags)
    +# Flush the input after each key hit?  (Noticeable when ranger lags)
     set flushinput true
     
    -# Padding on the right when there's no preview?
    -# This allows you to click into the space to run the file.
    +# Padding on the right when there's no preview?
    +# This allows you to click into the space to run the file.
     set padding_right true
     
     set autosave_bookmarks false
     set autoupdate_cumulative_size false
     
    -# Turning this on makes sense for screen readers:
    +# Turning this on makes sense for screen readers:
     set show_cursor false
     
    -# One of: size, natural, basename, atime, ctime, mtime, type, random
    +# One of: size, natural, basename, atime, ctime, mtime, type, random
     set sort natural
     
    -# Additional sorting options
    +# Additional sorting options
     set sort_reverse false
     set sort_case_insensitive true
     set sort_directories_first true
     set sort_unicode false
     
    -# Enable this if key combinations with the Alt Key don't work for you.
    -# (Especially on xterm)
    +# Enable this if key combinations with the Alt Key don't work for you.
    +# (Especially on xterm)
     set xterm_alt_key false
     
    -# Whether to include bookmarks in cd command
    +# Whether to include bookmarks in cd command
     set cd_bookmarks false
     
    -# Avoid previewing files larger than this size, in bytes.  Use a value of 0 to
    -# disable this feature.
    -set preview_max_size 5000000
    +# Avoid previewing files larger than this size, in bytes.  Use a value of 0 to
    +# disable this feature.
    +set preview_max_size 5000000
     
    -# Add the highlighted file to the path in the titlebar
    +# Add the highlighted file to the path in the titlebar
     set show_selection_in_titlebar true
     
    -# The delay that ranger idly waits for user input, in milliseconds, with a
    -# resolution of 100ms.  Lower delay reduces lag between directory updates but
    -# increases CPU load.
    -set idle_delay 2000
    +# The delay that ranger idly waits for user input, in milliseconds, with a
    +# resolution of 100ms.  Lower delay reduces lag between directory updates but
    +# increases CPU load.
    +set idle_delay 2000
     
    -# When the metadata manager module looks for metadata, should it only look for
    -# a ".metadata.json" file in the current directory, or do a deep search and
    -# check all directories above the current one as well?
    +# When the metadata manager module looks for metadata, should it only look for
    +# a ".metadata.json" file in the current directory, or do a deep search and
    +# check all directories above the current one as well?
     set metadata_deep_search false
     
    -# Clear all existing filters when leaving a directory
    +# Clear all existing filters when leaving a directory
     set clear_filters_on_dir_change false
     
    -# Disable displaying line numbers in main column
    +# Disable displaying line numbers in main column
     set line_numbers false
     
    @@ -285,7 +304,6 @@ Get Bibtex from PDF
    -

    Delete first page of pdf

    @@ -306,15 +324,24 @@ Convert PDF to PNG Magit Status

    -
    map ,gs shell emacsclient -create-frame --alternate-editor="" -n --eval '(magit-status)'
    +
    map ,gs shell emacsclient -create-frame --alternate-editor="" -n --eval '(magit-status)'
     

    -Upload with 0x0 (previously Tansfer.sh) +Open SXIV on current directory +

    +
    +
    map ,s shell nohup sxiv -t %d &
    +
    +
    + +

    +Upload with 0x0 / self hosted Tansfer.sh

    map ,t shell upload %f
    +map ,T shell share %f
     
    @@ -330,7 +357,7 @@ Open current folder with PCManFM Open with Emacs

    -
    map ,e shell emacsclient -create-frame --alternate-editor="" -n %f
    +
    map ,e shell emacsclient -create-frame --alternate-editor="" -n %f
     
    @@ -341,6 +368,14 @@ Print on Rnice
    map ,p shell print-rnice %f &
     
    + +

    +Backup to NAS +

    +
    +
    map ,B shell ~/.config/ranger/scripts/backup-to-nas.sh %s &
    +
    +
    @@ -352,11 +387,11 @@ Print on Rnice

    Extract Script

    -
    if [ $TMUX ]; then
    -    tmux split -v -l 2 atool -x $1 && tmux select-pane -U
    -else
    -    atool -x $1
    -fi
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 2 atool -x $1 && tmux select-pane -U
    +else
    +    atool -x $1
    +fi
     
    @@ -366,11 +401,49 @@ fi

    Compress Script

    -
    if [ $TMUX ]; then
    -    tmux split -v -l 2 apack ${1%.*}.zip $1 && tmux select-pane -U
    -else
    -    apack ${1%.*}.zip $1
    -fi
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 2 apack ${1%.*}.zip $1 && tmux select-pane -U
    +else
    +    apack ${1%.*}.zip $1
    +fi
    +
    +
    +
    +
    + + +
    +

    Backup to NAS

    +
    +
      +
    • Arguments are the files to be backup to the NAS
    • +
    + +
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 2 rsync -a --inplace --info=progress2 --rsh='ssh -p10022' "$@" nas:/volume1/Data/Downloads/Backup/ && tmux select-pane -U
    +else
    +    rsync -a --info=progress2 --inplace --rsh='ssh -p10022' "$@" nas:/volume1/Data/Downloads/Backup/
    +fi
    +
    +
    +
    +
    + +
    +

    Paste with Rsync

    +
    +
      +
    • First argument is the directory where to copy files
    • +
    • All other arguments are files that are to be copied
    • +
    + +
    +
    if [ $TMUX ]; then
    +    tmux split -v -l 1 rsync -a --info=progress2 "${@:2}" "$1" && tmux select-pane -U
    +else
    +    rsync -a --info=progress2 "${@:2}" "$1"
    +fi
     
    @@ -382,12 +455,12 @@ fi

    Define keys for the browser

    -
    -

    Basic

    -
    +
    +

    Basic

    +
    map Q quit!
    -map q eval fm.execute_console("shell tmux detach") if 'TMUX' in os.environ.keys() else fm.execute_console("quit")
    +map q eval fm.execute_console("shell tmux detach") if 'TMUX' in os.environ.keys() else fm.execute_console("quit")
     
    @@ -447,7 +520,7 @@ map S shell nohup $TERMINAL &
    map f console filter%space
    -# Reset filter
    +# Reset filter
     map F filter
     
    @@ -458,8 +531,8 @@ map F filter

    Tagging / Marking

    -
    map <Space> mark_files toggle=True
    -map v       mark_files all=True toggle=True
    +
    map <Space> mark_files toggle=True
    +map v       mark_files all=True toggle=True
     
    @@ -485,12 +558,12 @@ copymap <END> G
    map H     history_go -1
    -map L     history_go 1
    +map L     history_go 1
     
    -
    map ]     move_parent 1
    +
    map ]     move_parent 1
     map [     move_parent -1
     
    @@ -529,10 +602,10 @@ map gV cd ~/.config/literate-dotfiles

    Get size of folders

    -
    # Get size of all folders
    -map du shell -p du --max-depth=1 -h --apparent-size
    -# Get size of all folders and sort them
    -map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
    +
    # Get size of all folders
    +map du shell -p du --max-depth=1 -h --apparent-size
    +# Get size of all folders and sort them
    +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
     
    @@ -542,11 +615,11 @@ map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh

    Yank path of directory/file

    -
    # Yank path of current directory/file
    +
    # Yank path of current directory/file
     map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
    -# Yank path of directory
    +# Yank path of directory
     map yd shell -f echo -n %d    | xsel -i; xsel -o | xsel -i -b
    -# Yank filename
    +# Yank filename
     map yn shell -f echo -n %f    | xsel -i; xsel -o | xsel -i -b
     
    @@ -568,9 +641,9 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
    map a  rename_append
    -map C  eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
    -map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
    -map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
    +map C  eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
    +map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
    +map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
     
    @@ -581,15 +654,23 @@ map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "
    map pp paste
    -map po paste overwrite=True
    -map pP paste append=True
    -map pO paste overwrite=True append=True
    -map pl paste_symlink relative=False
    -map pL paste_symlink relative=True
    +map po paste overwrite=True
    +map pP paste append=True
    +map pO paste overwrite=True append=True
    +map pl paste_symlink relative=False
    +map pL paste_symlink relative=True
     map phl paste_hardlink
     map pht paste_hardlinked_subtree
     
    + +

    +Paste with Rsync +

    +
    +
    map pr shell ~/.config/ranger/scripts/paste-rsync.sh %d %c
    +
    +
    @@ -622,7 +703,7 @@ map yu uncut
    map /  console search%space
     map n  search_next
    -map N  search_next forward=False
    +map N  search_next forward=False
     
    @@ -635,11 +716,11 @@ map N search_next forward=False
    map <C-n>     tab_new ~
     map <C-w>     tab_close
     
    -map <TAB>     tab_move 1
    +map <TAB>     tab_move 1
     map <S-TAB>   tab_move -1
     
     map gn        tab_new ~
    -map gt        tab_move 1
    +map gt        tab_move 1
     
    @@ -663,12 +744,12 @@ map zv set use_preview_script!
    map `<any>  enter_bookmark %any
    -map '<any>  enter_bookmark %any
    -map m<any>  set_bookmark %any
    -map um<any> unset_bookmark %any
    +map '<any>  enter_bookmark %any
    +map m<any>  set_bookmark %any
    +map um<any> unset_bookmark %any
     
    -map m<bg>   draw_bookmarks
    -copymap m<bg>  um<bg> `<bg> '<bg>
    +map m<bg>   draw_bookmarks
    +copymap m<bg>  um<bg> `<bg> '<bg>
     
    @@ -689,9 +770,9 @@ copymap m<bg> um<bg> `<bg> '<bg>

    Define keys for the console

    -
    -

    Basic

    -
    +
    +

    Basic

    +
    cmap <tab>   eval fm.ui.console.tab()
     cmap <s-tab> eval fm.ui.console.tab(-1)
    @@ -711,11 +792,11 @@ copycmap <CR>  <C-j>
     
    cmap <up>    eval fm.ui.console.history_move(-1)
    -cmap <down>  eval fm.ui.console.history_move(1)
    -cmap <left>  eval fm.ui.console.move(left=1)
    -cmap <right> eval fm.ui.console.move(right=1)
    -cmap <home>  eval fm.ui.console.move(right=0, absolute=True)
    -cmap <end>   eval fm.ui.console.move(right=-1, absolute=True)
    +cmap <down>  eval fm.ui.console.history_move(1)
    +cmap <left>  eval fm.ui.console.move(left=1)
    +cmap <right> eval fm.ui.console.move(right=1)
    +cmap <home>  eval fm.ui.console.move(right=0, absolute=True)
    +cmap <end>   eval fm.ui.console.move(right=-1, absolute=True)
     
    @@ -726,7 +807,7 @@ cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
    cmap <backspace>  eval fm.ui.console.delete(-1)
    -cmap <delete>     eval fm.ui.console.delete(0)
    +cmap <delete>     eval fm.ui.console.delete(0)
     cmap <C-w>        eval fm.ui.console.delete_word()
     cmap <C-y>        eval fm.ui.console.paste()
     copycmap <home>      <C-a>
    @@ -742,209 +823,209 @@ copycmap <end>       <C-e>
     

    Rifle

    -
    # This is the configuration file of "rifle", ranger's file executor/opener.
    -# Each line consists of conditions and a command.  For each line the conditions
    -# are checked and if they are met, the respective command is run.
    -#
    -# Syntax:
    -#   <condition1> , <condition2> , ... = command
    -#
    -# The command can contain these environment variables:
    -#   $1-$9 | The n-th selected file
    -#   $@    | All selected files
    -#
    -# If you use the special command "ask", rifle will ask you what program to run.
    -#
    -# Prefixing a condition with "!" will negate its result.
    -# These conditions are currently supported:
    -#   match <regexp> | The regexp matches $1
    -#   ext <regexp>   | The regexp matches the extension of $1
    -#   mime <regexp>  | The regexp matches the mime type of $1
    -#   name <regexp>  | The regexp matches the basename of $1
    -#   path <regexp>  | The regexp matches the absolute path of $1
    -#   has <program>  | The program is installed (i.e. located in $PATH)
    -#   env <variable> | The environment variable "variable" is non-empty
    -#   file           | $1 is a file
    -#   directory      | $1 is a directory
    -#   number <n>     | change the number of this command to n
    -#   terminal       | stdin, stderr and stdout are connected to a terminal
    -#   X              | $DISPLAY is not empty (i.e. Xorg runs)
    -#
    -# There are also pseudo-conditions which have a "side effect":
    -#   flag <flags>  | Change how the program is run. See below.
    -#   label <label> | Assign a label or name to the command so it can
    -#                 | be started with :open_with <label> in ranger
    -#                 | or `rifle -p <label>` in the standalone executable.
    -#   else          | Always true.
    -#
    -# Flags are single characters which slightly transform the command:
    -#   f | Fork the program, make it run in the background.
    -#     |   New command = setsid $command >& /dev/null &
    -#   r | Execute the command with root permissions
    -#     |   New command = sudo $command
    -#   t | Run the program in a new terminal.  If $TERMCMD is not defined,
    -#     | rifle will attempt to extract it from $TERM.
    -#     |   New command = $TERMCMD -e $command
    -# Note: The "New command" serves only as an illustration, the exact
    -# implementation may differ.
    -# Note: When using rifle in ranger, there is an additional flag "c" for
    -# only running the current file even if you have marked multiple files.
    +
    # This is the configuration file of "rifle", ranger's file executor/opener.
    +# Each line consists of conditions and a command.  For each line the conditions
    +# are checked and if they are met, the respective command is run.
    +#
    +# Syntax:
    +#   <condition1> , <condition2> , ... = command
    +#
    +# The command can contain these environment variables:
    +#   $1-$9 | The n-th selected file
    +#   $@    | All selected files
    +#
    +# If you use the special command "ask", rifle will ask you what program to run.
    +#
    +# Prefixing a condition with "!" will negate its result.
    +# These conditions are currently supported:
    +#   match <regexp> | The regexp matches $1
    +#   ext <regexp>   | The regexp matches the extension of $1
    +#   mime <regexp>  | The regexp matches the mime type of $1
    +#   name <regexp>  | The regexp matches the basename of $1
    +#   path <regexp>  | The regexp matches the absolute path of $1
    +#   has <program>  | The program is installed (i.e. located in $PATH)
    +#   env <variable> | The environment variable "variable" is non-empty
    +#   file           | $1 is a file
    +#   directory      | $1 is a directory
    +#   number <n>     | change the number of this command to n
    +#   terminal       | stdin, stderr and stdout are connected to a terminal
    +#   X              | $DISPLAY is not empty (i.e. Xorg runs)
    +#
    +# There are also pseudo-conditions which have a "side effect":
    +#   flag <flags>  | Change how the program is run. See below.
    +#   label <label> | Assign a label or name to the command so it can
    +#                 | be started with :open_with <label> in ranger
    +#                 | or `rifle -p <label>` in the standalone executable.
    +#   else          | Always true.
    +#
    +# Flags are single characters which slightly transform the command:
    +#   f | Fork the program, make it run in the background.
    +#     |   New command = setsid $command >& /dev/null &
    +#   r | Execute the command with root permissions
    +#     |   New command = sudo $command
    +#   t | Run the program in a new terminal.  If $TERMCMD is not defined,
    +#     | rifle will attempt to extract it from $TERM.
    +#     |   New command = $TERMCMD -e $command
    +# Note: The "New command" serves only as an illustration, the exact
    +# implementation may differ.
    +# Note: When using rifle in ranger, there is an additional flag "c" for
    +# only running the current file even if you have marked multiple files.
     
    -#-------------------------------------------
    -# Websites
    -#-------------------------------------------
    -# Rarely installed browsers get higher priority; It is assumed that if you
    -# install a rare browser, you probably use it.  Firefox/konqueror/w3m on the
    -# other hand are often only installed as fallback browsers.
    +#-------------------------------------------
    +# Websites
    +#-------------------------------------------
    +# Rarely installed browsers get higher priority; It is assumed that if you
    +# install a rare browser, you probably use it.  Firefox/konqueror/w3m on the
    +# other hand are often only installed as fallback browsers.
     
    -ext x?html?, has qutebrowser,    X, flag f = qutebrowser -- "$@"
    -ext x?html?, has firefox,        X, flag f = firefox -- "$@"
    -ext x?html?, has elinks,          terminal = elinks "$@"
    -ext x?html?, has links2,          terminal = links2 "$@"
    -ext x?html?, has links,           terminal = links "$@"
    -ext x?html?, has lynx,            terminal = lynx -- "$@"
    -ext x?html?, has w3m,             terminal = w3m "$@"
    +ext x?html?, has qutebrowser,    X, flag f = qutebrowser -- "$@"
    +ext x?html?, has firefox,        X, flag f = firefox -- "$@"
    +ext x?html?, has elinks,          terminal = elinks "$@"
    +ext x?html?, has links2,          terminal = links2 "$@"
    +ext x?html?, has links,           terminal = links "$@"
    +ext x?html?, has lynx,            terminal = lynx -- "$@"
    +ext x?html?, has w3m,             terminal = w3m "$@"
     
    -#Spreadsheets for scim
    -ext sc|csv|sxc|xlsx?|xlt|xlw|gnm|gnumeric, = sc-im -- "$@"
    +#Spreadsheets for scim
    +ext sc|csv|sxc|xlsx?|xlt|xlw|gnm|gnumeric, = sc-im -- "$@"
     
    -#-------------------------------------------
    -# Misc
    -#-------------------------------------------
    -ext org                       = emacsclient -c "$1"
    +#-------------------------------------------
    +# Misc
    +#-------------------------------------------
    +ext org                       = emacsclient -c "$1"
     
    -# Define the "editor" for text files as first action
    -mime ^text,  label editor = $EDITOR -- "$@"
    -mime ^text,  label pager  = "$PAGER" -- "$@"
    -!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
    -!mime ^text, label pager,  ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
    +# Define the "editor" for text files as first action
    +mime ^text,  label editor = $EDITOR -- "$@"
    +mime ^text,  label pager  = "$PAGER" -- "$@"
    +!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
    +!mime ^text, label pager,  ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
     
    -ext 1                         = man "$1"
    -ext s[wmf]c, has zsnes, X     = zsnes "$1"
    -ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
    -ext nes, has fceux, X         = fceux "$1"
    -ext exe                       = wine "$1"
    -name ^[mM]akefile$            = make
    +ext 1                         = man "$1"
    +ext s[wmf]c, has zsnes, X     = zsnes "$1"
    +ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
    +ext nes, has fceux, X         = fceux "$1"
    +ext exe                       = wine "$1"
    +name ^[mM]akefile$            = make
     
    -#--------------------------------------------
    -# Code
    -#-------------------------------------------
    -ext py  = python -- "$1"
    -ext pl  = perl -- "$1"
    -ext rb  = ruby -- "$1"
    -ext js  = node -- "$1"
    -ext sh  = sh -- "$1"
    -ext php = php -- "$1"
    +#--------------------------------------------
    +# Code
    +#-------------------------------------------
    +ext py  = python -- "$1"
    +ext pl  = perl -- "$1"
    +ext rb  = ruby -- "$1"
    +ext js  = node -- "$1"
    +ext sh  = sh -- "$1"
    +ext php = php -- "$1"
     
    -#--------------------------------------------
    -# Video/Audio with a GUI
    -#-------------------------------------------
    -mime ^video,       has mpv,      X, flag f = mpv -- "$@"
    -mime ^video,       has mpv,      X, flag f = mpv --fs -- "$@"
    -mime ^video,       has mpv,      X, flag f = mpv --loop -- "$@"
    +#--------------------------------------------
    +# Video/Audio with a GUI
    +#-------------------------------------------
    +mime ^video,       has mpv,      X, flag f = mpv -- "$@"
    +mime ^video,       has mpv,      X, flag f = mpv --fs -- "$@"
    +mime ^video,       has mpv,      X, flag f = mpv --loop -- "$@"
     
    -#--------------------------------------------
    -# Audio without X
    -#-------------------------------------------
    -mime ^audio|ogg$, terminal, has mpv      = mpv --no-audio-display -- "$@"
    -mime ^audio|ogg$   = tag "$@"
    -mime ^audio|ogg$, terminal, has mpv      = mpv -- "$@"
    +#--------------------------------------------
    +# Audio without X
    +#-------------------------------------------
    +mime ^audio|ogg$, terminal, has mpv      = mpv --no-audio-display -- "$@"
    +mime ^audio|ogg$   = tag "$@"
    +mime ^audio|ogg$, terminal, has mpv      = mpv -- "$@"
     
    -#--------------------------------------------
    -# Video without X:
    -#-------------------------------------------
    -mime ^video, terminal, !X, has mpv       = mpv -- "$@"
    -mime ^video, terminal, !X, has mplayer2  = mplayer2 -- "$@"
    -mime ^video, terminal, !X, has mplayer   = mplayer -- "$@"
    +#--------------------------------------------
    +# Video without X:
    +#-------------------------------------------
    +mime ^video, terminal, !X, has mpv       = mpv -- "$@"
    +mime ^video, terminal, !X, has mplayer2  = mplayer2 -- "$@"
    +mime ^video, terminal, !X, has mplayer   = mplayer -- "$@"
     
    -#-------------------------------------------
    -# Documents
    -#-------------------------------------------
    -ext pdf, has zathura,  X, flag f = zathura -- "$@"
    -ext pdf, has llpp,     X, flag f = llpp "$@"
    -ext pdf, has mupdf,    X, flag f = mupdf "$@"
    -ext pdf, has mupdf,    X, flag f = mupdf -I "$@"
    -ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
    -ext pdf, has apvlv,    X, flag f = apvlv -- "$@"
    -ext pdf, has xpdf,     X, flag f = xpdf -- "$@"
    -ext pdf, has evince,   X, flag f = evince -- "$@"
    -ext pdf, has atril,    X, flag f = atril -- "$@"
    -ext pdf, has okular,   X, flag f = okular -- "$@"
    -ext pdf, has epdfview, X, flag f = epdfview -- "$@"
    -ext pdf, has qpdfview, X, flag f = qpdfview "$@"
    +#-------------------------------------------
    +# Documents
    +#-------------------------------------------
    +ext pdf, has zathura,  X, flag f = zathura -- "$@"
    +ext pdf, has llpp,     X, flag f = llpp "$@"
    +ext pdf, has mupdf,    X, flag f = mupdf "$@"
    +ext pdf, has mupdf,    X, flag f = mupdf -I "$@"
    +ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
    +ext pdf, has apvlv,    X, flag f = apvlv -- "$@"
    +ext pdf, has xpdf,     X, flag f = xpdf -- "$@"
    +ext pdf, has evince,   X, flag f = evince -- "$@"
    +ext pdf, has atril,    X, flag f = atril -- "$@"
    +ext pdf, has okular,   X, flag f = okular -- "$@"
    +ext pdf, has epdfview, X, flag f = epdfview -- "$@"
    +ext pdf, has qpdfview, X, flag f = qpdfview "$@"
     
    -ext epub, has zathura,  X, flag f = zathura -- "$@"
    -ext epub, has mupdf, X, flag f = mupdf "$@"
    +ext epub, has zathura,  X, flag f = zathura -- "$@"
    +ext epub, has mupdf, X, flag f = mupdf "$@"
     
     
    -ext docx?, has wps, X, flag f = wps "$@"
    +ext docx?, has wps, X, flag f = wps "$@"
     
    -ext docx?, has catdoc,       terminal = catdoc -- "$@" | "$PAGER"
    +ext docx?, has catdoc,       terminal = catdoc -- "$@" | "$PAGER"
     
    -  ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has wpp,         X, flag f = wpp "$@"
    -ext                        sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric,    X, flag f = gnumeric -- "$@"
    -ext                        sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread,     X, flag f = kspread -- "$@"
    -ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
    -ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice,     X, flag f = soffice "$@"
    -ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice,     X, flag f = ooffice "$@"
    +  ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has wpp,         X, flag f = wpp "$@"
    +ext                        sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric,    X, flag f = gnumeric -- "$@"
    +ext                        sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread,     X, flag f = kspread -- "$@"
    +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
    +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice,     X, flag f = soffice "$@"
    +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice,     X, flag f = ooffice "$@"
     
    -ext djvu, has zathura,X, flag f = zathura -- "$@"
    -ext djvu, has evince, X, flag f = evince -- "$@"
    -ext djvu, has atril,  X, flag f = atril -- "$@"
    +ext djvu, has zathura,X, flag f = zathura -- "$@"
    +ext djvu, has evince, X, flag f = evince -- "$@"
    +ext djvu, has atril,  X, flag f = atril -- "$@"
     
    -#-------------------------------------------
    -# Image Viewing:
    -#-------------------------------------------
    -mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
    -mime ^image/svg, has display,  X, flag f = display -- "$@"
    -mime ^image/gif, has mpv, X, flag f = mpv --loop -- "$@"
    -mime ^image/gif, has viewnior, X, flag f = viewnior -- "$@"
    -mime ^image/gif, has qutebrowser, X, flag f = qutebrowser -- "$@"
    +#-------------------------------------------
    +# Image Viewing:
    +#-------------------------------------------
    +mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
    +mime ^image/svg, has display,  X, flag f = display -- "$@"
    +mime ^image/gif, has mpv, X, flag f = mpv --loop -- "$@"
    +mime ^image/gif, has viewnior, X, flag f = viewnior -- "$@"
    +mime ^image/gif, has qutebrowser, X, flag f = qutebrowser -- "$@"
     
    -ext xcf,                    X, flag f = gimp -- "$@"
    -mime ^image, has sxiv,      X, flag f = sxiv -- "$@"
    -mime ^image, has feh,       X, flag f = feh --scale-down --auto-zoom --image-bg black -- "$@"
    -mime ^image, has feh,       X, flag f = feh --scale-down --auto-zoom -- "$@"
    -mime ^image, has mirage,    X, flag f = mirage -- "$@"
    -mime ^image, has ristretto, X, flag f = ristretto "$@"
    -mime ^image, has eog,       X, flag f = eog -- "$@"
    -mime ^image, has eom,       X, flag f = eom -- "$@"
    -mime ^image, has gimp,      X, flag f = gimp -- "$@"
    -mime ^image, has pinta,     X, flag f = pinta -- "$@"
    -mime ^image, has mypaint,     X, flag f = mypaint -- "$@"
    -mime ^image, has kolourpaint,     X, flag f = kolourpaint -- "$@"
    +ext xcf,                    X, flag f = gimp -- "$@"
    +mime ^image, has sxiv,      X, flag f = sxiv -- "$@"
    +mime ^image, has feh,       X, flag f = feh --scale-down --auto-zoom --image-bg black -- "$@"
    +mime ^image, has feh,       X, flag f = feh --scale-down --auto-zoom -- "$@"
    +mime ^image, has mirage,    X, flag f = mirage -- "$@"
    +mime ^image, has ristretto, X, flag f = ristretto "$@"
    +mime ^image, has eog,       X, flag f = eog -- "$@"
    +mime ^image, has eom,       X, flag f = eom -- "$@"
    +mime ^image, has gimp,      X, flag f = gimp -- "$@"
    +mime ^image, has pinta,     X, flag f = pinta -- "$@"
    +mime ^image, has mypaint,     X, flag f = mypaint -- "$@"
    +mime ^image, has kolourpaint,     X, flag f = kolourpaint -- "$@"
     
    -#-------------------------------------------
    -# Archives
    -#-------------------------------------------
    -# This requires atool
    -ext jar = java -jar "$@"
    +#-------------------------------------------
    +# Archives
    +#-------------------------------------------
    +# This requires atool
    +ext jar = java -jar "$@"
     
    -ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has als     = als -- "$@" | "$PAGER"
    -ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als     = als -- "$@" | "$PAGER"
    -ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has aunpack = aunpack -- "$@"
    -ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack = aunpack -- "$@"
    +ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has als     = als -- "$@" | "$PAGER"
    +ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als     = als -- "$@" | "$PAGER"
    +ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has aunpack = aunpack -- "$@"
    +ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack = aunpack -- "$@"
     
    -# Fallback:
    -ext tar|gz, has tar = tar vvtf "$@" | "$PAGER"
    -ext tar|gz, has tar = tar vvxf "$@"
    +# Fallback:
    +ext tar|gz, has tar = tar vvtf "$@" | "$PAGER"
    +ext tar|gz, has tar = tar vvxf "$@"
     
    -#-------------------------------------------
    -# Misc
    -#-------------------------------------------
    -label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
    -label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
    -label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
    -label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
    +#-------------------------------------------
    +# Misc
    +#-------------------------------------------
    +label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
    +label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
    +label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
    +label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
     
    -# Define the editor for non-text files + pager as last action
    -              !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = ask
    -label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = $EDITOR -- "$@"
    -label pager,  !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = "$PAGER" -- "$@"
    +# Define the editor for non-text files + pager as last action
    +              !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = ask
    +label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = $EDITOR -- "$@"
    +label pager,  !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = "$PAGER" -- "$@"
     
    -ext blend, has blender, X, flag f =  blender -- "$@"
    +ext blend, has blender, X, flag f =  blender -- "$@"
     
    -has dragon-drag-and-drop, X, flag f = dragon-drag-and-drop -a -x "$@"
    +has dragon-drag-and-drop, X, flag f = dragon-drag-and-drop -a -x "$@"
     
    @@ -958,9 +1039,9 @@ has dragon-drag-and-drop, X, flag f = dragon-drag-and-drop -a -x "$@"

    Import

    -
    from ranger.api.commands import *
    +
    from ranger.api.commands import *
     
    -import os
    +import os
     
    @@ -970,35 +1051,35 @@ import os

    fzf_select

    -
    class fzf_select(Command):
    -    """
    -    :fzf_select
    +
    class fzf_select(Command):
    +    """
    +    :fzf_select
     
    -    Find a file using fzf.
    +    Find a file using fzf.
     
    -    With a prefix argument select only directories.
    +    With a prefix argument select only directories.
     
    -    See: https://github.com/junegunn/fzf
    -    """
    -    def execute(self):
    -        import subprocess
    -        import os.path
    -        if self.quantifier:
    -            # match only directories
    -            command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
    -            -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
    -        else:
    -            # match files and directories
    -            command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
    -            -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
    -        fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE)
    -        stdout, stderr = fzf.communicate()
    -        if fzf.returncode == 0:
    -            fzf_file = os.path.abspath(stdout.rstrip('\n'))
    -            if os.path.isdir(fzf_file):
    -                self.fm.cd(fzf_file)
    -            else:
    -                self.fm.select_file(fzf_file)
    +    See: https://github.com/junegunn/fzf
    +    """
    +    def execute(self):
    +        import subprocess
    +        import os.path
    +        if self.quantifier:
    +            # match only directories
    +            command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
    +            -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
    +        else:
    +            # match files and directories
    +            command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
    +            -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
    +        fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE)
    +        stdout, stderr = fzf.communicate()
    +        if fzf.returncode == 0:
    +            fzf_file = os.path.abspath(stdout.rstrip('\n'))
    +            if os.path.isdir(fzf_file):
    +                self.fm.cd(fzf_file)
    +            else:
    +                self.fm.select_file(fzf_file)
     
    @@ -1007,7 +1088,7 @@ import os

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:39

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/systemd.html b/docs/systemd.html index d8e0863..0f9883a 100644 --- a/docs/systemd.html +++ b/docs/systemd.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Systemd services and timers @@ -26,52 +26,52 @@

    Table of Contents

    @@ -81,126 +81,69 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units

    -
    -

    Pass Git

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=Sync Passwords every day
    -RefuseManualStart=no
    -RefuseManualStop=yes
    -
    -[Service]
    -Type=oneshot
    -ExecStart=%h/.local/bin/pass_git_sync
    -
    -
    -
    -
    - -
    -

    Timer

    -
    -
    -
    [Unit]
    -Description=Sync Passwords every day
    -RefuseManualStart=no
    -RefuseManualStop=no
    -Wants=network-online.target
    -After=network-online.target
    -
    -[Timer]
    -OnCalendar=*-*-* 16:00:00
    -Persistent=true
    -Unit=passgit.service
    -
    -[Install]
    -WantedBy=default.target
    -
    -
    -
    -
    - -
    -

    Script

    -
    -
    -
    cd ~/.local/share/buku/ || exit
    -
    -if [[ ! -z $(git status -s bookmarks.db) ]]
    -then
    -    git add bookmarks.db
    -    git commit -m "Changed bookmarks - $(date +%F)"
    -    git push
    -    exit
    -fi
    -
    -
    -
    -
    -
    -

    Buku Git

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=Sync Bookmarks every day
    -RefuseManualStart=no
    -RefuseManualStop=yes
    +
    [Unit]
    +Description=Sync Bookmarks every day
    +RefuseManualStart=no
    +RefuseManualStop=yes
     
    -[Service]
    -Type=oneshot
    -ExecStart=%h/.local/bin/buku_git_push
    +[Service]
    +Type=oneshot
    +ExecStart=%h/.local/bin/buku_git_push
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    -
    [Unit]
    -Description=Sync All Mails every x hours
    -RefuseManualStart=no
    -RefuseManualStop=no
    -Wants=network-online.target
    -After=network-online.target
    +
    [Unit]
    +Description=Sync All Mails every x hours
    +RefuseManualStart=no
    +RefuseManualStop=no
    +Wants=network-online.target
    +After=network-online.target
     
    -[Timer]
    -OnCalendar=*-*-* 16:00:00
    -Persistent=true
    -Unit=bukugit.service
    +[Timer]
    +OnCalendar=*-*-* 16:00:00
    +Persistent=true
    +Unit=bukugit.service
     
    -[Install]
    -WantedBy=default.target
    +[Install]
    +WantedBy=default.target
     
    -
    -

    Script

    -
    +
    +

    Script

    +
    -
    cd ~/.local/share/buku/
    +
    cd ~/.local/share/buku/
     
    -if [[ ! -z $(git status -s bookmarks.db) ]]
    -then
    -    git add bookmarks.db
    -    git commit -m "Changed bookmarks - $(date +%F)"
    -    git push
    -    exit
    -fi
    +if [[ ! -z $(git status -s bookmarks.db) ]]
    +then
    +    rm bookmarks.org;
    +    buku -e bookmarks.org && \
    +        cat header.org bookmarks.org > index.org && \
    +        emacs index.org --batch -f org-html-export-to-html --kill && \
    +        git add index.html
    +
    +    git add bookmarks.db && \
    +        git commit -m "Changed bookmarks - $(date +%F)" && \
    +        git push
    +    exit
    +fi
     
    @@ -211,106 +154,106 @@ fi

    Check mail

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=Check new mails
    -RefuseManualStart=no
    -RefuseManualStop=yes
    +
    [Unit]
    +Description=Check new mails
    +RefuseManualStart=no
    +RefuseManualStop=yes
     
    -[Service]
    -Type=oneshot
    -ExecStart=%h/.local/bin/checkmail -q
    +[Service]
    +Type=oneshot
    +ExecStart=%h/.local/bin/checkmail -q
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    -
    [Unit]
    -Description=Check Mail every x minutes
    -RefuseManualStart=no
    -RefuseManualStop=no
    -Wants=network-online.target
    -After=network-online.target
    -Requires=checkmail.service
    +
    [Unit]
    +Description=Check Mail every x minutes
    +RefuseManualStart=no
    +RefuseManualStop=no
    +Wants=network-online.target
    +After=network-online.target
    +Requires=checkmail.service
     
    -[Timer]
    -Persistent=false
    -OnBootSec=2min
    -OnUnitActiveSec=5min
    -AccuracySec=2min
    -Unit=checkmail.service
    +[Timer]
    +Persistent=false
    +OnBootSec=2min
    +OnUnitActiveSec=5min
    +AccuracySec=2min
    +Unit=checkmail.service
     
    -[Install]
    -WantedBy=default.target
    +[Install]
    +WantedBy=default.target
     
    -
    -

    Script

    -
    +
    +

    Script

    +
    -
    while [ -n "$1" ]; do # while loop starts
    -    case "$1" in
    -    -a) opt_all='--all' ;; # Check All inboxes
    -    -v) opt_verbose='--verbose' ;; # Verbose
    -    -q) opt_quiet='--quiet' ;; # Quiet
    -    *) echo "Option $1 not recognized" ;; # In case you typed a different option
    -    esac
    -    shift
    -done
    +
    while [ -n "$1" ]; do # while loop starts
    +    case "$1" in
    +    -a) opt_all='--all' ;; # Check All inboxes
    +    -v) opt_verbose='--verbose' ;; # Verbose
    +    -q) opt_quiet='--quiet' ;; # Quiet
    +    *) echo "Option $1 not recognized" ;; # In case you typed a different option
    +    esac
    +    shift
    +done
     
     
    -# =============================================================
    -# Count number of mails
    -gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
    -esrf_old="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
    -ulg_old="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
    -uliege_old="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
    -# =============================================================
    +# =============================================================
    +# Count number of mails
    +gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
    +esrf_old="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
    +ulg_old="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
    +uliege_old="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
    +# =============================================================
     
    -# =============================================================
    -# Retreive mails
    -mbsync $opt_all $opt_verbose gmail-Home esrf-Home ulg-Home uliege-Home 2>/tmp/mbsync.log
    -# =============================================================
    +# =============================================================
    +# Retreive mails
    +mbsync $opt_all $opt_verbose gmail-Home esrf-Home ulg-Home uliege-Home 2>/tmp/mbsync.log
    +# =============================================================
     
    -# =============================================================
    -# Count number of mails
    -gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
    -esrf_new="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
    -ulg_new="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
    -uliege_new="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
    -# =============================================================
    +# =============================================================
    +# Count number of mails
    +gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
    +esrf_new="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
    +ulg_new="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
    +uliege_new="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
    +# =============================================================
     
    -# =============================================================
    -# Total Number of new mails since last checking
    -new="$(($gmail_new+$esrf_new+$ulg_new+$uliege_new))"
    -old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
    -# =============================================================
    +# =============================================================
    +# Total Number of new mails since last checking
    +new="$(($gmail_new+$esrf_new+$ulg_new+$uliege_new))"
    +old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
    +# =============================================================
     
    -# =============================================================
    -# Notification
    -if [ "$new" -gt 0 ]; then
    -  dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
    -fi
    -# =============================================================
    +# =============================================================
    +# Notification
    +if [ "$new" -gt 0 ]; then
    +  dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
    +fi
    +# =============================================================
     
    -# =============================================================
    -# Indexation and Tags
    -if pgrep -f 'mu server'; then
    -    emacsclient --eval '(mu4e-update-index)'
    -else
    -    mu index $opt_verbose $opt_quiet
    -fi
    -# =============================================================
    +# =============================================================
    +# Indexation and Tags
    +if pgrep -f 'mu server'; then
    +    emacsclient --eval '(mu4e-update-index)'
    +else
    +    mu index $opt_verbose $opt_quiet
    +fi
    +# =============================================================
     
    @@ -321,44 +264,44 @@ fi

    Sync mail

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=Sync all mails
    -RefuseManualStart=no
    -RefuseManualStop=yes
    +
    [Unit]
    +Description=Sync all mails
    +RefuseManualStart=no
    +RefuseManualStop=yes
     
    -[Service]
    -Type=oneshot
    -ExecStart=%h/.local/bin/checkmail -a -q
    +[Service]
    +Type=oneshot
    +ExecStart=%h/.local/bin/checkmail -a -q
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    -
    [Unit]
    -Description=Sync All Mails every x hours
    -RefuseManualStart=no
    -RefuseManualStop=no
    -Wants=network-online.target
    -After=network-online.target
    -Requires=syncmail.service
    +
    [Unit]
    +Description=Sync All Mails every x hours
    +RefuseManualStart=no
    +RefuseManualStop=no
    +Wants=network-online.target
    +After=network-online.target
    +Requires=syncmail.service
     
    -[Timer]
    -Persistent=false
    -OnBootSec=30min
    -OnUnitActiveSec=300min
    -AccuracySec=10min
    -Unit=syncmail.service
    +[Timer]
    +Persistent=false
    +OnBootSec=30min
    +OnUnitActiveSec=300min
    +AccuracySec=10min
    +Unit=syncmail.service
     
    -[Install]
    -WantedBy=default.target
    +[Install]
    +WantedBy=default.target
     
    @@ -369,38 +312,38 @@ WantedBy=default.target

    Vdirsyncer

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=Synchronize calendars and contacts
    -Documentation=https://vdirsyncer.readthedocs.org/
    -Wants=network-online.target
    -After=network-online.target
    +
    [Unit]
    +Description=Synchronize calendars and contacts
    +Documentation=https://vdirsyncer.readthedocs.org/
    +Wants=network-online.target
    +After=network-online.target
     
    -[Service]
    -ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync
    -Type=oneshot
    +[Service]
    +ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync
    +Type=oneshot
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    -
    [Unit]
    -Description=Synchronize vdirs
    +
    [Unit]
    +Description=Synchronize vdirs
     
    -[Timer]
    -OnBootSec=5m
    -OnUnitActiveSec=15m
    -AccuracySec=5m
    +[Timer]
    +OnBootSec=5m
    +OnUnitActiveSec=15m
    +AccuracySec=5m
     
    -[Install]
    -WantedBy=timers.target
    +[Install]
    +WantedBy=timers.target
     
    @@ -411,20 +354,20 @@ WantedBy=timers.target

    SSH Agent

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=SSH key agent
    +
    [Unit]
    +Description=SSH key agent
     
    -[Service]
    -Type=simple
    -Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
    -ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
    +[Service]
    +Type=simple
    +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
    +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
     
    -[Install]
    -WantedBy=default.target
    +[Install]
    +WantedBy=default.target
     
    @@ -435,19 +378,19 @@ WantedBy=default.target

    Powertop

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=Powertop tunings
    +
    [Unit]
    +Description=Powertop tunings
     
    -[Service]
    -ExecStart=/usr/bin/powertop --auto-tune
    -RemainAfterExit=true
    +[Service]
    +ExecStart=/usr/bin/powertop --auto-tune
    +RemainAfterExit=true
     
    -[Install]
    -WantedBy=multi-user.target
    +[Install]
    +WantedBy=multi-user.target
     
    @@ -458,25 +401,88 @@ WantedBy=multi-user.target

    Mopidy

    -
    -

    Service

    -
    +
    +

    Service

    +
    -
    [Unit]
    -Description=Mopidy music server
    -After=avahi-daemon.service
    -After=dbus.service
    -After=network.target
    -After=nss-lookup.target
    -After=pulseaudio.service
    -After=remote-fs.target
    -After=sound.target
    +
    [Unit]
    +Description=Mopidy music server
    +After=avahi-daemon.service
    +After=dbus.service
    +After=network.target
    +After=nss-lookup.target
    +After=pulseaudio.service
    +After=remote-fs.target
    +After=sound.target
     
    -[Service]
    -ExecStart=/usr/bin/mopidy --config ~/.config/mopidy/mopidy.conf
    +[Service]
    +ExecStart=/usr/bin/mopidy --config ~/.config/mopidy/mopidy.conf
     
    -[Install]
    -WantedBy=multi-user.target
    +[Install]
    +WantedBy=multi-user.target
    +
    +
    +
    +
    +
    + +
    +

    Brain Website

    +
    +
    +
    +

    Service

    +
    +
    +
    [Unit]
    +Description=Sync Brain Website everyday
    +RefuseManualStart=no
    +RefuseManualStop=yes
    +
    +[Service]
    +Type=oneshot
    +ExecStart=%h/.local/bin/brain_git_push
    +
    +
    +
    +
    + +
    +

    Timer

    +
    +
    +
    [Unit]
    +Description=Sync Brain Website everyday
    +RefuseManualStart=no
    +RefuseManualStop=no
    +Wants=network-online.target
    +After=network-online.target
    +
    +[Timer]
    +OnCalendar=*-*-* 16:00:00
    +Persistent=true
    +Unit=braingit.service
    +
    +[Install]
    +WantedBy=default.target
    +
    +
    +
    +
    + +
    +

    Script

    +
    +
    +
    cd ~/Cloud/brain-website/
    +
    +if [[ ! -z $(git status -s content/) ]]
    +then
    +    git add content static && \
    +        git commit -m "Update Content - $(date +%F)" && \
    +        git push
    +    exit
    +fi
     
    @@ -485,7 +491,7 @@ WantedBy=multi-user.target

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/termite.html b/docs/termite.html index 58a149b..e923e09 100644 --- a/docs/termite.html +++ b/docs/termite.html @@ -1,251 +1,19 @@ - - + - Termite Configuration - -
    @@ -395,7 +163,7 @@ for the JavaScript code in this tag.

    Author: Dehaeze Thomas

    -

    Created: 2020-01-11 sam. 22:19

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/torrent.html b/docs/torrent.html index 38db958..f003d78 100644 --- a/docs/torrent.html +++ b/docs/torrent.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Torrent Configuration @@ -52,50 +52,51 @@

    -
    [Connection]
    -password = <<get-password(passname="nas/transmission")>>
    -username = tdehaeze
    -port = 9091
    -host = 82.64.103.2
    -path = /transmission/rpc
    -ssl = False
    +
    [Connection]
    +password = <<get-password(passname="nas/transmission")>>
    +username = tdehaeze
    +port = 9091
    +host = 82.64.103.2
    +path = /transmission/rpc
    +ssl = False
     
    -[Sorting]
    -order = name
    +[Sorting]
    +order = name
     
    -[Filtering]
    -filter =
    -invert = False
    +[Filtering]
    +filter =
    +invert = False
     
    -[Misc]
    -compact_list = False
    -torrentname_is_progressbar = True
    -file_viewer = xdg-open %%s
    -file_open_in_terminal = True
    +[Misc]
    +compact_list = False
    +torrentname_is_progressbar = True
    +file_viewer = xdg-open %%s
    +file_open_in_terminal = True
     
    -[Colors]
    -title_seed = bg:green,fg:black
    -title_download = bg:blue,fg:black
    -title_idle = bg:cyan,fg:black
    -title_verify = bg:magenta,fg:black
    -title_paused = bg:black,fg:white
    -title_error = bg:red,fg:white
    -download_rate = bg:black,fg:blue
    -upload_rate = bg:black,fg:red
    -eta+ratio = bg:black,fg:white
    -filter_status = bg:red,fg:black
    -dialog = bg:black,fg:white
    -dialog_important = bg:red,fg:black
    -button = bg:white,fg:black
    -button_focused = bg:black,fg:white
    -file_prio_high = bg:red,fg:black
    -file_prio_normal = bg:white,fg:black
    -file_prio_low = bg:yellow,fg:black
    -file_prio_off = bg:blue,fg:black
    +[Colors]
    +title_seed = bg:green,fg:black
    +title_download = bg:blue,fg:black
    +title_idle = bg:cyan,fg:black
    +title_verify = bg:magenta,fg:black
    +title_paused = bg:black,fg:white
    +title_error = bg:red,fg:white
    +download_rate = bg:black,fg:blue
    +upload_rate = bg:black,fg:red
    +eta+ratio = bg:black,fg:white
    +filter_status = bg:red,fg:black
    +dialog = bg:black,fg:white
    +dialog_important = bg:red,fg:black
    +button = bg:white,fg:black
    +button_focused = bg:black,fg:white
    +file_prio_high = bg:red,fg:black
    +file_prio_normal = bg:white,fg:black
    +file_prio_low = bg:yellow,fg:black
    +file_prio_off = bg:blue,fg:black
     
    +

    Aria2

    @@ -105,17 +106,17 @@ file_prio_off = bg:blue,fg:black
    continue
    -daemon=true
    -dir=/home/thomas/Downloads
    -max-connection-per-server=4
    -max-concurrent-downloads=3
    -enable-rpc=true
    -rpc-listen-all=true
    -http-user=dehaeze.thomas@gmail.com
    -http-passwd=<<get-password(passname="1fichier.com/dehaeze.thomas@gmail.com")>>
    -on-download-start=/home/thomas/.config/aria2/download-start.sh
    -on-download-complete=/home/thomas/.config/aria2/download-complete.sh
    -on-download-error=/home/thomas/.config/aria2/download-error.sh
    +daemon=true
    +dir=/home/thomas/Downloads
    +max-connection-per-server=4
    +max-concurrent-downloads=3
    +enable-rpc=true
    +rpc-listen-all=true
    +http-user=dehaeze.thomas@gmail.com
    +http-passwd=<<get-password(passname="1fichier.com/dehaeze.thomas@gmail.com")>>
    +on-download-start=/home/thomas/.config/aria2/download-start.sh
    +on-download-complete=/home/thomas/.config/aria2/download-complete.sh
    +on-download-error=/home/thomas/.config/aria2/download-error.sh
     
    @@ -125,7 +126,7 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh

    Download Start Script

    -
    dunstify "DL Started" "$(basename \"$3\" 2> /dev/null)"
    +
    dunstify "DL Started" "$(basename \"$3\" 2> /dev/null)"
     
    @@ -135,7 +136,7 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh

    Download Complete Script

    -
    dunstify "DL Completed" "$(basename \"$3\" 2> /dev/null)"
    +
    dunstify "DL Completed" "$(basename \"$3\" 2> /dev/null)"
     
    @@ -145,7 +146,7 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh

    Download Error Script

    -
    dunstify --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
    +
    dunstify --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
     
    @@ -154,7 +155,7 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/vim.html b/docs/vim.html index 17b4e6a..45f5606 100644 --- a/docs/vim.html +++ b/docs/vim.html @@ -1,229 +1,19 @@ - - + - Vim Config - -
    -
    -

    LaTeX

    -
    +
    +

    LaTeX

    +
    Plug 'lervag/vimtex', { 'for': 'tex' } " A modern vim plugin for editing LaTeX files.
     
    @@ -564,9 +353,9 @@ Plug 'nelstrom/vim-markdown-folding' " Fold markdown
    -
    -

    Matlab

    -
    +
    +

    Matlab

    +
    Plug 'tdehaeze/matlab-vim', { 'for': 'matlab' }     " Edit Matlab M-files in Vim editor
     Plug 'djoshea/vim-matlab-fold', { 'for': 'matlab' } " Vim code folding for Matlab files
    @@ -1098,9 +887,9 @@ snoremap <C-K> <Esc>b[sviw<C-G>
     

    Filetypes

    -
    -

    Vim Which Key

    -
    +
    +

    Vim Which Key

    +
    nnoremap <silent> <localleader> :<c-u>WhichKey  ','<CR>
     
    @@ -1130,13 +919,12 @@ au BufRead,BufNewFile *.md setlocal spell spelllang=fr,en
     
    -
    -

    LaTeX

    -
    +
    +

    LaTeX

    +
    -
    " TODO : améliorer ça
    -au BufRead,BufNewFile *.tikz set filetype=tex
    -let tex_no_error=1 " TODO: used to not highlight underscores
    +
    au BufRead,BufNewFile *.tikz set filetype=tex
    +let tex_no_error=1 " used to not highlight underscores
     au BufRead,BufNewFile *.tex set filetype=tex
     au BufRead,BufNewFile *.tex let b:AutoPairs={'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`', '$':'$'}
     
    @@ -1195,8 +983,6 @@ au FileType python nmap <buffer> <localleader><localleader> &l
     au FileType python vmap <buffer> <localleader><localleader> <Plug>SlimeRegionSend
     
     " CD to directory of current file
    -" TODO - Should enter the command. This just output the command without runing
    -" it...
     au FileType python nmap <buffer> <localleader>c :SlimeSend0('cd '.expand('%:p:h'))<CR>
     
     " let python_highlight_all = 1
    @@ -1220,11 +1006,11 @@ au FileType python nmap <buffer> <localleader>c :SlimeSend0('cd '.ex
     
    -
    -

    Matlab

    -
    +
    +

    Matlab

    +
    -
    " TODO Run Section (delimited by %%)
    +
    " Run Section (delimited by %%)
     au FileType matlab nmap <buffer> <localleader>mm <Plug>SlimeParagraphSend
     let g:which_key_map_local.m = { 'name' : '+matlab' }
     
    @@ -1233,10 +1019,10 @@ au FileType matlab vmap <buffer> <localleader>mm <Plug>SlimeRe
     let g:which_key_map_local.mm = 'run-code'
     
     func! GetSelectedText()
    -  normal gv"xy
    -  let result = getreg("x")
    -  normal gv
    -  return result
    +normal gv"xy
    +let result = getreg("x")
    +normal gv
    +return result
     endfunc
     
     " Help on the current selection
    @@ -1267,23 +1053,9 @@ let g:which_key_map_local.mr = 'workspace'
     
    -
    -

    Sage

    -
    -
    -
    " TODO Run Section
    -au FileType sage.python nmap <buffer> <localleader><localleader> <Plug>SlimeParagraphSend
    -
    -" Run Selected text
    -au FileType sage.python vmap <buffer> <localleader><localleader> <Plug>SlimeRegionSend
    -
    -
    -
    -
    - -
    -

    Save Which Key Configuration

    -
    +
    +

    Save Which Key Configuration

    +
    call which_key#register(',', "g:which_key_map_local")
     
    @@ -1661,9 +1433,9 @@ let g:EditorConfig_exclude_patterns = ['fugitive://.*']

    Bindings

    -
    -

    Vim Which Key

    -
    +
    +

    Vim Which Key

    +
    nnoremap <silent> <leader> :WhichKey '<Space>'<cr>
     
    @@ -1731,10 +1503,8 @@ let g:which_key_map.f.f = 'find-file'
     
     " Find File corresping to Word
     nnoremap <leader>fw
    -  \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', expand('<cword>')]}))<cr>
    -" TODO - Add visual keymap
    -" vnoremap <leader>fw
    -  " \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', <C-r>0]}))<cr>
    +\ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', expand('<cword>')]}))<cr>
    +
     let g:which_key_map.f.w = 'find-file-word'
     
    @@ -1902,19 +1672,19 @@ nnoremap <leader>wm :call MaximizeToggle()<CR> let g:which_key_map.w.m = 'win-maximize' function! MaximizeToggle() - if exists("s:maximize_session") - exec "source " . s:maximize_session - call delete(s:maximize_session) - unlet s:maximize_session - let &hidden=s:maximize_hidden_save - unlet s:maximize_hidden_save - else - let s:maximize_hidden_save = &hidden - let s:maximize_session = tempname() - set hidden - exec "mksession! " . s:maximize_session - only - endif +if exists("s:maximize_session") +exec "source " . s:maximize_session +call delete(s:maximize_session) +unlet s:maximize_session +let &hidden=s:maximize_hidden_save +unlet s:maximize_hidden_save +else +let s:maximize_hidden_save = &hidden +let s:maximize_session = tempname() +set hidden +exec "mksession! " . s:maximize_session +only +endif endfunction
    @@ -2020,7 +1790,6 @@ noremap <leader>sw :exe ':Rg ' . expand('<cword>')<CR> let g:which_key_map.s.w = 'search-word' " Search todo keyboard -" TODO - should not have to press enter nnoremap <leader>st :Grepper -tool rg -query TODO<CR> let g:which_key_map.s.t = 'search-todos'
    @@ -2259,9 +2028,9 @@ let g:which_key_map.i.s = 'insert-snippet'
    -
    -

    Save Which Key Configuration

    -
    +
    +

    Save Which Key Configuration

    +
    call which_key#register('<Space>', "g:which_key_map")
     
    @@ -2272,7 +2041,7 @@ let g:which_key_map.i.s = 'insert-snippet'

    Author: Dehaeze Thomas

    -

    Created: 2020-04-05 dim. 11:29

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/xconfig.html b/docs/xconfig.html index 133c2bf..f03be6d 100644 --- a/docs/xconfig.html +++ b/docs/xconfig.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Configuration Files related to Xorg @@ -49,29 +49,29 @@

    Colors

    -
    #define base00 #32302f
    -#define base01 #3c3836
    -#define base02 #504945
    -#define base03 #665c54
    -#define base04 #bdae93
    -#define base05 #d5c4a1
    -#define base06 #ebdbb2
    -#define base07 #fbf1c7
    -#define base08 #fb4934
    -#define base09 #fe8019
    -#define base0A #fabd2f
    -#define base0B #b8bb26
    -#define base0C #8ec07c
    -#define base0D #83a598
    -#define base0E #d3869b
    -#define base0F #d65d0e
    +
    #define base00 #32302f
    +#define base01 #3c3836
    +#define base02 #504945
    +#define base03 #665c54
    +#define base04 #bdae93
    +#define base05 #d5c4a1
    +#define base06 #ebdbb2
    +#define base07 #fbf1c7
    +#define base08 #fb4934
    +#define base09 #fe8019
    +#define base0A #fabd2f
    +#define base0B #b8bb26
    +#define base0C #8ec07c
    +#define base0D #83a598
    +#define base0E #d3869b
    +#define base0F #d65d0e
     
     *foreground:   base05
    -#ifdef background_opacity
    +#ifdef background_opacity
     *background:   [background_opacity]base00
    -#else
    +#else
     *background:   base00
    -#endif
    +#endif
     *cursorColor:  base05
     
     *color0:       base00
    @@ -92,8 +92,8 @@
     *color14:      base0C
     *color15:      base07
     
    -! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
    -! use 'shell' template to set these if necessary
    +! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
    +! use 'shell' template to set these if necessary
     *color16:      base09
     *color17:      base0F
     *color18:      base01
    @@ -109,12 +109,12 @@
     

    Fonts

    -
    Xft.dpi:       96
    -Xft.autohint:  0
    +
    Xft.dpi:       96
    +Xft.autohint:  0
     Xft.lcdfilter: lcddefault
     Xft.hintstyle: hintfull
    -Xft.hinting:   1
    -Xft.antialias: 1
    +Xft.hinting:   1
    +Xft.antialias: 1
     Xft.rgba:      rgb
     
    @@ -126,7 +126,7 @@ Xft.rgba: rgb
    Xcursor.theme: Breeze
    -Xcursor.size:  0
    +Xcursor.size:  0
     
    @@ -137,254 +137,254 @@ Xcursor.size: 0

    Xmodmap

    -
    keycode   8 =
    -keycode   9 = Escape NoSymbol Escape
    -keycode  10 = 1 exclam 1 exclam
    -keycode  11 = 2 at 2 at
    -keycode  12 = 3 numbersign 3 numbersign
    -keycode  13 = 4 dollar 4 dollar
    -keycode  14 = 5 percent 5 percent
    -keycode  15 = 6 asciicircum 6 asciicircum
    -keycode  16 = 7 ampersand 7 ampersand
    -keycode  17 = 8 asterisk 8 asterisk
    -keycode  18 = 9 parenleft 9 parenleft
    -keycode  19 = 0 parenright 0 parenright
    -keycode  20 = minus underscore minus underscore
    -keycode  21 = equal plus equal plus
    -keycode  22 = BackSpace BackSpace BackSpace BackSpace
    -keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
    -keycode  24 = q Q q Q
    -keycode  25 = w W w W
    -keycode  26 = e E e E
    -keycode  27 = r R r R
    -keycode  28 = t T t T
    -keycode  29 = y Y y Y
    -keycode  30 = u U u U
    -keycode  31 = i I i I
    -keycode  32 = o O o O
    -keycode  33 = p P p P
    -keycode  34 = bracketleft braceleft bracketleft braceleft
    -keycode  35 = bracketright braceright bracketright braceright
    -keycode  36 = Return NoSymbol Return
    -keycode  37 = Control_L NoSymbol Control_L
    -keycode  38 = a A a A
    -keycode  39 = s S s S
    -keycode  40 = d D d D
    -keycode  41 = f F f F
    -keycode  42 = g G g G
    -keycode  43 = h H h H
    -keycode  44 = j J j J
    -keycode  45 = k K k K
    -keycode  46 = l L l L
    -keycode  47 = semicolon colon semicolon colon
    -keycode  48 = apostrophe quotedbl apostrophe quotedbl
    -keycode  49 = grave asciitilde grave asciitilde
    -keycode  50 = Shift_L NoSymbol Shift_L
    -keycode  51 = backslash bar backslash bar
    -keycode  52 = z Z z Z
    -keycode  53 = x X x X
    -keycode  54 = c C c C
    -keycode  55 = v V v V
    -keycode  56 = b B b B
    -keycode  57 = n N n N
    -keycode  58 = m M m M
    -keycode  59 = comma less comma less
    -keycode  60 = period greater period greater
    -keycode  61 = slash question slash question
    -keycode  62 = Shift_R NoSymbol Shift_R
    -keycode  63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
    -keycode  64 = Alt_L Meta_L Alt_L Meta_L
    -keycode  65 = space NoSymbol space
    -keycode  66 = Caps_Lock NoSymbol Caps_Lock
    -keycode  67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
    -keycode  68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
    -keycode  69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
    -keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
    -keycode  71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
    -keycode  72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
    -keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
    -keycode  74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
    -keycode  75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
    -keycode  76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10
    -keycode  77 = Num_Lock NoSymbol Num_Lock
    -keycode  78 = Scroll_Lock NoSymbol Scroll_Lock
    -keycode  79 = KP_Home KP_7 KP_Home KP_7
    -keycode  80 = KP_Up KP_8 KP_Up KP_8
    -keycode  81 = KP_Prior KP_9 KP_Prior KP_9
    -keycode  82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode
    -keycode  83 = KP_Left KP_4 KP_Left KP_4
    -keycode  84 = KP_Begin KP_5 KP_Begin KP_5
    -keycode  85 = KP_Right KP_6 KP_Right KP_6
    -keycode  86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode
    -keycode  87 = KP_End KP_1 KP_End KP_1
    -keycode  88 = KP_Down KP_2 KP_Down KP_2
    -keycode  89 = KP_Next KP_3 KP_Next KP_3
    -keycode  90 = KP_Insert KP_0 KP_Insert KP_0
    -keycode  91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
    -keycode  92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
    -keycode  93 =
    -keycode  94 = less greater less greater bar brokenbar bar
    -keycode  95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11
    -keycode  96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12
    -keycode  97 =
    -keycode  98 = Katakana NoSymbol Katakana
    -keycode  99 = Hiragana NoSymbol Hiragana
    -keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
    -keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
    -keycode 102 = Muhenkan NoSymbol Muhenkan
    -keycode 103 =
    -keycode 104 = KP_Enter NoSymbol KP_Enter
    -keycode 105 = Control_R NoSymbol Control_R
    -keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
    -keycode 107 = Print Sys_Req Print Sys_Req
    -keycode 108 = Alt_R Meta_R Alt_R Meta_R
    -keycode 109 = Linefeed NoSymbol Linefeed
    -keycode 110 = Home NoSymbol Home
    -keycode 111 = Up NoSymbol Up
    -keycode 112 = Prior NoSymbol Prior
    -keycode 113 = Left NoSymbol Left
    -keycode 114 = Right NoSymbol Right
    -keycode 115 = End NoSymbol End
    -keycode 116 = Down NoSymbol Down
    -keycode 117 = Next NoSymbol Next
    -keycode 118 = Insert NoSymbol Insert
    -keycode 119 = Delete NoSymbol Delete
    -keycode 120 =
    -keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
    -keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
    -keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
    -keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
    -keycode 125 = KP_Equal NoSymbol KP_Equal
    -keycode 126 = plusminus NoSymbol plusminus
    -keycode 127 = Pause Break Pause Break
    -keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
    -keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
    -keycode 130 = Hangul NoSymbol Hangul
    -keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
    -keycode 132 =
    -keycode 133 =
    -keycode 134 = Super_R NoSymbol Super_R
    -keycode 135 = Menu NoSymbol Menu
    -keycode 136 = Cancel NoSymbol Cancel
    -keycode 137 = Redo NoSymbol Redo
    -keycode 138 = SunProps NoSymbol SunProps
    -keycode 139 = Undo NoSymbol Undo
    -keycode 140 = SunFront NoSymbol SunFront
    -keycode 141 = XF86Copy NoSymbol XF86Copy
    -keycode 142 = XF86Open NoSymbol XF86Open
    -keycode 143 = XF86Paste NoSymbol XF86Paste
    -keycode 144 = Find NoSymbol Find
    -keycode 145 = XF86Cut NoSymbol XF86Cut
    -keycode 146 = Help NoSymbol Help
    -keycode 147 = xf86menukb nosymbol xf86menukb
    -keycode 148 = XF86Calculator NoSymbol XF86Calculator
    -keycode 149 =
    -keycode 150 = XF86Sleep NoSymbol XF86Sleep
    -keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
    -keycode 152 = XF86Explorer NoSymbol XF86Explorer
    -keycode 153 = XF86Send NoSymbol XF86Send
    -keycode 154 =
    -keycode 155 = XF86Xfer NoSymbol XF86Xfer
    -keycode 156 = XF86Launch1 NoSymbol XF86Launch1
    -keycode 157 = XF86Launch2 NoSymbol XF86Launch2
    -keycode 158 = XF86WWW NoSymbol XF86WWW
    -keycode 159 = XF86DOS NoSymbol XF86DOS
    -keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
    -keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
    -keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
    -keycode 163 = XF86Mail NoSymbol XF86Mail
    -keycode 164 = XF86Favorites NoSymbol XF86Favorites
    -keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
    -keycode 166 = XF86Back NoSymbol XF86Back
    -keycode 167 = XF86Forward NoSymbol XF86Forward
    -keycode 168 =
    -keycode 169 = XF86Eject NoSymbol XF86Eject
    -keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject
    -keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
    -keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
    -keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
    -keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
    -keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
    -keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
    -keycode 177 = XF86Phone NoSymbol XF86Phone
    -keycode 178 =
    -keycode 179 = XF86Tools NoSymbol XF86Tools
    -keycode 180 = XF86HomePage NoSymbol XF86HomePage
    -keycode 181 = XF86Reload NoSymbol XF86Reload
    -keycode 182 = XF86Close NoSymbol XF86Close
    -keycode 183 =
    -keycode 184 =
    -keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
    -keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
    -keycode 187 = parenleft NoSymbol parenleft
    -keycode 188 = parenright NoSymbol parenright
    -keycode 189 = XF86New NoSymbol XF86New
    -keycode 190 = Redo NoSymbol Redo
    -keycode 191 = XF86Tools NoSymbol XF86Tools
    -keycode 192 = XF86Launch5 NoSymbol XF86Launch5
    -keycode 193 = XF86Launch6 NoSymbol XF86Launch6
    -keycode 194 = XF86Launch7 NoSymbol XF86Launch7
    -keycode 195 = XF86Launch8 NoSymbol XF86Launch8
    -keycode 196 = XF86Launch9 NoSymbol XF86Launch9
    -keycode 197 =
    -keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
    -keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
    -keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
    -keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
    -keycode 202 =
    -keycode 203 = Mode_switch NoSymbol Mode_switch
    -keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
    -keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
    -keycode 206 = NoSymbol Super_L NoSymbol Super_L
    -keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
    -keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
    -keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
    -keycode 210 = XF86Launch3 NoSymbol XF86Launch3
    -keycode 211 = XF86Launch4 NoSymbol XF86Launch4
    -keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
    -keycode 213 = XF86Suspend NoSymbol XF86Suspend
    -keycode 214 = XF86Close NoSymbol XF86Close
    -keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
    -keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
    -keycode 217 =
    -keycode 218 = Print NoSymbol Print
    -keycode 219 =
    -keycode 220 = XF86WebCam NoSymbol XF86WebCam
    -keycode 221 =
    -keycode 222 =
    -keycode 223 = XF86Mail NoSymbol XF86Mail
    -keycode 224 = XF86Messenger NoSymbol XF86Messenger
    -keycode 225 = XF86Search NoSymbol XF86Search
    -keycode 226 = XF86Go NoSymbol XF86Go
    -keycode 227 = XF86Finance NoSymbol XF86Finance
    -keycode 228 = XF86Game NoSymbol XF86Game
    -keycode 229 = XF86Shop NoSymbol XF86Shop
    -keycode 230 =
    -keycode 231 = Cancel NoSymbol Cancel
    -keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
    -keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
    -keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
    -keycode 235 = XF86Display NoSymbol XF86Display
    -keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
    -keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
    -keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
    -keycode 239 = XF86Send NoSymbol XF86Send
    -keycode 240 = XF86Reply NoSymbol XF86Reply
    -keycode 241 = XF86MailForward NoSymbol XF86MailForward
    -keycode 242 = XF86Save NoSymbol XF86Save
    -keycode 243 = XF86Documents NoSymbol XF86Documents
    -keycode 244 = XF86Battery NoSymbol XF86Battery
    -keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
    -keycode 246 = XF86WLAN NoSymbol XF86WLAN
    -keycode 247 =
    -keycode 248 = XF86Display NoSymbol XF86Display
    -keycode 249 =
    -keycode 250 =
    -keycode 251 =
    -keycode 252 =
    -keycode 253 =
    -keycode 254 = XF86WWAN NoSymbol XF86WWAN
    -keycode 255 = XF86RFKill NoSymbol XF86RFKill
    +
    keycode   8 =
    +keycode   9 = Escape NoSymbol Escape
    +keycode  10 = 1 exclam 1 exclam
    +keycode  11 = 2 at 2 at
    +keycode  12 = 3 numbersign 3 numbersign
    +keycode  13 = 4 dollar 4 dollar
    +keycode  14 = 5 percent 5 percent
    +keycode  15 = 6 asciicircum 6 asciicircum
    +keycode  16 = 7 ampersand 7 ampersand
    +keycode  17 = 8 asterisk 8 asterisk
    +keycode  18 = 9 parenleft 9 parenleft
    +keycode  19 = 0 parenright 0 parenright
    +keycode  20 = minus underscore minus underscore
    +keycode  21 = equal plus equal plus
    +keycode  22 = BackSpace BackSpace BackSpace BackSpace
    +keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
    +keycode  24 = q Q q Q
    +keycode  25 = w W w W
    +keycode  26 = e E e E
    +keycode  27 = r R r R
    +keycode  28 = t T t T
    +keycode  29 = y Y y Y
    +keycode  30 = u U u U
    +keycode  31 = i I i I
    +keycode  32 = o O o O
    +keycode  33 = p P p P
    +keycode  34 = bracketleft braceleft bracketleft braceleft
    +keycode  35 = bracketright braceright bracketright braceright
    +keycode  36 = Return NoSymbol Return
    +keycode  37 = Control_L NoSymbol Control_L
    +keycode  38 = a A a A
    +keycode  39 = s S s S
    +keycode  40 = d D d D
    +keycode  41 = f F f F
    +keycode  42 = g G g G
    +keycode  43 = h H h H
    +keycode  44 = j J j J
    +keycode  45 = k K k K
    +keycode  46 = l L l L
    +keycode  47 = semicolon colon semicolon colon
    +keycode  48 = apostrophe quotedbl apostrophe quotedbl
    +keycode  49 = grave asciitilde grave asciitilde
    +keycode  50 = Shift_L NoSymbol Shift_L
    +keycode  51 = backslash bar backslash bar
    +keycode  52 = z Z z Z
    +keycode  53 = x X x X
    +keycode  54 = c C c C
    +keycode  55 = v V v V
    +keycode  56 = b B b B
    +keycode  57 = n N n N
    +keycode  58 = m M m M
    +keycode  59 = comma less comma less
    +keycode  60 = period greater period greater
    +keycode  61 = slash question slash question
    +keycode  62 = Shift_R NoSymbol Shift_R
    +keycode  63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
    +keycode  64 = Alt_L Meta_L Alt_L Meta_L
    +keycode  65 = space NoSymbol space
    +keycode  66 = Caps_Lock NoSymbol Caps_Lock
    +keycode  67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
    +keycode  68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
    +keycode  69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
    +keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
    +keycode  71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
    +keycode  72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
    +keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
    +keycode  74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
    +keycode  75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
    +keycode  76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10
    +keycode  77 = Num_Lock NoSymbol Num_Lock
    +keycode  78 = Scroll_Lock NoSymbol Scroll_Lock
    +keycode  79 = KP_Home KP_7 KP_Home KP_7
    +keycode  80 = KP_Up KP_8 KP_Up KP_8
    +keycode  81 = KP_Prior KP_9 KP_Prior KP_9
    +keycode  82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode
    +keycode  83 = KP_Left KP_4 KP_Left KP_4
    +keycode  84 = KP_Begin KP_5 KP_Begin KP_5
    +keycode  85 = KP_Right KP_6 KP_Right KP_6
    +keycode  86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode
    +keycode  87 = KP_End KP_1 KP_End KP_1
    +keycode  88 = KP_Down KP_2 KP_Down KP_2
    +keycode  89 = KP_Next KP_3 KP_Next KP_3
    +keycode  90 = KP_Insert KP_0 KP_Insert KP_0
    +keycode  91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
    +keycode  92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
    +keycode  93 =
    +keycode  94 = less greater less greater bar brokenbar bar
    +keycode  95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11
    +keycode  96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12
    +keycode  97 =
    +keycode  98 = Katakana NoSymbol Katakana
    +keycode  99 = Hiragana NoSymbol Hiragana
    +keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
    +keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
    +keycode 102 = Muhenkan NoSymbol Muhenkan
    +keycode 103 =
    +keycode 104 = KP_Enter NoSymbol KP_Enter
    +keycode 105 = Control_R NoSymbol Control_R
    +keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
    +keycode 107 = Print Sys_Req Print Sys_Req
    +keycode 108 = Alt_R Meta_R Alt_R Meta_R
    +keycode 109 = Linefeed NoSymbol Linefeed
    +keycode 110 = Home NoSymbol Home
    +keycode 111 = Up NoSymbol Up
    +keycode 112 = Prior NoSymbol Prior
    +keycode 113 = Left NoSymbol Left
    +keycode 114 = Right NoSymbol Right
    +keycode 115 = End NoSymbol End
    +keycode 116 = Down NoSymbol Down
    +keycode 117 = Next NoSymbol Next
    +keycode 118 = Insert NoSymbol Insert
    +keycode 119 = Delete NoSymbol Delete
    +keycode 120 =
    +keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
    +keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
    +keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
    +keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
    +keycode 125 = KP_Equal NoSymbol KP_Equal
    +keycode 126 = plusminus NoSymbol plusminus
    +keycode 127 = Pause Break Pause Break
    +keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
    +keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
    +keycode 130 = Hangul NoSymbol Hangul
    +keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
    +keycode 132 =
    +keycode 133 =
    +keycode 134 = Super_R NoSymbol Super_R
    +keycode 135 = Menu NoSymbol Menu
    +keycode 136 = Cancel NoSymbol Cancel
    +keycode 137 = Redo NoSymbol Redo
    +keycode 138 = SunProps NoSymbol SunProps
    +keycode 139 = Undo NoSymbol Undo
    +keycode 140 = SunFront NoSymbol SunFront
    +keycode 141 = XF86Copy NoSymbol XF86Copy
    +keycode 142 = XF86Open NoSymbol XF86Open
    +keycode 143 = XF86Paste NoSymbol XF86Paste
    +keycode 144 = Find NoSymbol Find
    +keycode 145 = XF86Cut NoSymbol XF86Cut
    +keycode 146 = Help NoSymbol Help
    +keycode 147 = xf86menukb nosymbol xf86menukb
    +keycode 148 = XF86Calculator NoSymbol XF86Calculator
    +keycode 149 =
    +keycode 150 = XF86Sleep NoSymbol XF86Sleep
    +keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
    +keycode 152 = XF86Explorer NoSymbol XF86Explorer
    +keycode 153 = XF86Send NoSymbol XF86Send
    +keycode 154 =
    +keycode 155 = XF86Xfer NoSymbol XF86Xfer
    +keycode 156 = XF86Launch1 NoSymbol XF86Launch1
    +keycode 157 = XF86Launch2 NoSymbol XF86Launch2
    +keycode 158 = XF86WWW NoSymbol XF86WWW
    +keycode 159 = XF86DOS NoSymbol XF86DOS
    +keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
    +keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
    +keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
    +keycode 163 = XF86Mail NoSymbol XF86Mail
    +keycode 164 = XF86Favorites NoSymbol XF86Favorites
    +keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
    +keycode 166 = XF86Back NoSymbol XF86Back
    +keycode 167 = XF86Forward NoSymbol XF86Forward
    +keycode 168 =
    +keycode 169 = XF86Eject NoSymbol XF86Eject
    +keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject
    +keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
    +keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
    +keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
    +keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
    +keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
    +keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
    +keycode 177 = XF86Phone NoSymbol XF86Phone
    +keycode 178 =
    +keycode 179 = XF86Tools NoSymbol XF86Tools
    +keycode 180 = XF86HomePage NoSymbol XF86HomePage
    +keycode 181 = XF86Reload NoSymbol XF86Reload
    +keycode 182 = XF86Close NoSymbol XF86Close
    +keycode 183 =
    +keycode 184 =
    +keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
    +keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
    +keycode 187 = parenleft NoSymbol parenleft
    +keycode 188 = parenright NoSymbol parenright
    +keycode 189 = XF86New NoSymbol XF86New
    +keycode 190 = Redo NoSymbol Redo
    +keycode 191 = XF86Tools NoSymbol XF86Tools
    +keycode 192 = XF86Launch5 NoSymbol XF86Launch5
    +keycode 193 = XF86Launch6 NoSymbol XF86Launch6
    +keycode 194 = XF86Launch7 NoSymbol XF86Launch7
    +keycode 195 = XF86Launch8 NoSymbol XF86Launch8
    +keycode 196 = XF86Launch9 NoSymbol XF86Launch9
    +keycode 197 =
    +keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
    +keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
    +keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
    +keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
    +keycode 202 =
    +keycode 203 = Mode_switch NoSymbol Mode_switch
    +keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
    +keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
    +keycode 206 = NoSymbol Super_L NoSymbol Super_L
    +keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
    +keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
    +keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
    +keycode 210 = XF86Launch3 NoSymbol XF86Launch3
    +keycode 211 = XF86Launch4 NoSymbol XF86Launch4
    +keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
    +keycode 213 = XF86Suspend NoSymbol XF86Suspend
    +keycode 214 = XF86Close NoSymbol XF86Close
    +keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
    +keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
    +keycode 217 =
    +keycode 218 = Print NoSymbol Print
    +keycode 219 =
    +keycode 220 = XF86WebCam NoSymbol XF86WebCam
    +keycode 221 =
    +keycode 222 =
    +keycode 223 = XF86Mail NoSymbol XF86Mail
    +keycode 224 = XF86Messenger NoSymbol XF86Messenger
    +keycode 225 = XF86Search NoSymbol XF86Search
    +keycode 226 = XF86Go NoSymbol XF86Go
    +keycode 227 = XF86Finance NoSymbol XF86Finance
    +keycode 228 = XF86Game NoSymbol XF86Game
    +keycode 229 = XF86Shop NoSymbol XF86Shop
    +keycode 230 =
    +keycode 231 = Cancel NoSymbol Cancel
    +keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
    +keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
    +keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
    +keycode 235 = XF86Display NoSymbol XF86Display
    +keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
    +keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
    +keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
    +keycode 239 = XF86Send NoSymbol XF86Send
    +keycode 240 = XF86Reply NoSymbol XF86Reply
    +keycode 241 = XF86MailForward NoSymbol XF86MailForward
    +keycode 242 = XF86Save NoSymbol XF86Save
    +keycode 243 = XF86Documents NoSymbol XF86Documents
    +keycode 244 = XF86Battery NoSymbol XF86Battery
    +keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
    +keycode 246 = XF86WLAN NoSymbol XF86WLAN
    +keycode 247 =
    +keycode 248 = XF86Display NoSymbol XF86Display
    +keycode 249 =
    +keycode 250 =
    +keycode 251 =
    +keycode 252 =
    +keycode 253 =
    +keycode 254 = XF86WWAN NoSymbol XF86WWAN
    +keycode 255 = XF86RFKill NoSymbol XF86RFKill
     
    @@ -402,7 +402,7 @@ keycode 255 = XF86RFKill NoSymbol XF86RFKill Fix for Matlab.

    -
    export _JAVA_AWT_WM_NONREPARENTING=1
    +
    export _JAVA_AWT_WM_NONREPARENTING=1
     
    @@ -418,31 +418,31 @@ Set DISPLAY for dunst when started with systemd< Merge in defaults and keymaps

    -
    userresources=$HOME/.Xresources
    -usermodmap=$HOME/.Xmodmap
    -sysresources=/etc/X11/xinit/.Xresources
    -sysmodmap=/etc/X11/xinit/.Xmodmap
    +
    userresources=$HOME/.Xresources
    +usermodmap=$HOME/.Xmodmap
    +sysresources=/etc/X11/xinit/.Xresources
    +sysmodmap=/etc/X11/xinit/.Xmodmap
     
    -if [ -f $sysresources ]; then
    -    xrdb -merge $sysresources
    -fi
    +if [ -f $sysresources ]; then
    +    xrdb -merge $sysresources
    +fi
     
    -if [ -f $sysmodmap ]; then
    -    xmodmap $sysmodmap
    -fi
    +if [ -f $sysmodmap ]; then
    +    xmodmap $sysmodmap
    +fi
     
    -if [ -f "$userresources" ]; then
    -    xrdb -merge "$userresources"
    -fi
    +if [ -f "$userresources" ]; then
    +    xrdb -merge "$userresources"
    +fi
     
    -if [ -f "$usermodmap" ]; then
    -    xmodmap "$usermodmap"
    -fi
    +if [ -f "$usermodmap" ]; then
    +    xmodmap "$usermodmap"
    +fi
     
    -
    [ -f ~/.xprofile ] && . ~/.xprofile
    +
    [ -f ~/.xprofile ] && . ~/.xprofile
     
    @@ -455,10 +455,10 @@ fi Keyboard Options

    -
    # Set repetition keyboard rate
    -xset r rate 200 40 &
    +
    # Set repetition keyboard rate
    +xset r rate 200 40 &
     
    -# Set International US keyboard layout
    +# Set International US keyboard layout
     setxkbmap -layout us -variant intl -option caps:escape &
     
    @@ -467,24 +467,24 @@ setxkbmap -layout us -variant intl -option caps:escape & Start programs related to display.

    -
    # Screen options
    -xrandr --output eDP1 --mode 1920x1080 --dpi 192 &
    +
    # Screen options
    +xrandr --output eDP1 --mode 1920x1080 --dpi 192 &
     
    -# Set custom wallpaper script
    +# Set custom wallpaper script
     setbg &
     
    -# Hide mouse cursor after x seconds
    -pgrep -xu "$USER" unclutter >/dev/null || \
    -  unclutter --timeout 5 &
    +# Hide mouse cursor after x seconds
    +pgrep -xu "$USER" unclutter >/dev/null || \
    +  unclutter --timeout 5 &
     
    -# Autolock screen after x minutes
    -xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
    +# Autolock screen after x minutes
    +xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
     
    -# Redshift
    -pgrep -xu "$USER" redshift >/dev/null || \
    +# Redshift
    +pgrep -xu "$USER" redshift >/dev/null || \
         redshift &
     
    -# Run Picom (compositor)
    +# Run Picom (compositor)
     picom --daemon &
     
    @@ -493,18 +493,11 @@ picom --daemon & Start the applications related to the top bar (polybar + applet).

    -
    # Start Network Management Framework
    -# nm-applet &
    +
    # Bluetooth Manager
    +blueman-applet &
     
    -# Bluetooth Manager
    -# blueman-applet &
    -
    -# Synology Cloud Station Drive
    +# Synology Cloud Station Drive
     synology-drive &
    -
    -# Udiskie to automount usb keys
    -pgrep -xu "$USER" udiskie >/dev/null || \
    -  udiskie --automount --notify --tray &
     
    @@ -512,14 +505,15 @@ pgrep -xu "$USER" udiskie >/dev/null || \ Start other applications

    -
    # Start Power Manager
    +
    # Start Power Manager
     xfce4-power-manager &
     
    -# Aria2c daemon
    +# Aria2c daemon
     aria2c &
     
    -# Mopidy
    -mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
    +# Mopidy
    +# mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
    +systemctl --user start mopidy
     
    @@ -527,9 +521,9 @@ mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 & Finally, run SXHKD for the key bindings.

    -
    # Start sxhkd
    -pgrep -xu "$USER" sxhkd >/dev/null || \
    -  sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc &
    +
    # Start sxhkd
    +pgrep -xu "$USER" sxhkd >/dev/null || \
    +  sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc &
     
    @@ -537,7 +531,7 @@ pgrep -xu "$USER" sxhkd >/dev/null || \

    Author: Dehaeze Thomas

    -

    Created: 2020-05-26 mar. 08:40

    +

    Created: 2020-11-03 mar. 16:26

    diff --git a/docs/zathura.html b/docs/zathura.html index e2c6d4b..4f98470 100644 --- a/docs/zathura.html +++ b/docs/zathura.html @@ -1,251 +1,19 @@ - - + - Zathura - -
    @@ -261,6 +29,11 @@ for the JavaScript code in this tag.
  • Configuration
  • Bindings
  • Colors
  • +
  • Scripts + +
  • @@ -303,10 +76,11 @@ map H zoom out map i recolor map p print -map m toggle_statusbar +map t toggle_statusbar map <Space> scroll full-down map <BackSpace> scroll full-up +map <C-s> feedkeys ":exec /home/thomas/.config/zathura/scripts/extract-pdf-page.sh $FILE<Return>"
    @@ -355,10 +129,34 @@ set recolor-keephue "false"
    + +
    +

    Scripts

    +
    +
    + +
    +

    Extract one page as a PDF

    +
    +
    +
    tmpfile=/tmp/pdf_page.pdf
    +
    +# Ask for page number
    +# Ideally would get the page from Zathura...
    +pagenum=$(rofi -dmenu -p "Page Number")
    +
    +pdftk $1 cat $pagenum output $tmpfile.pdf && \
    +    pdf2svg $tmpfile.pdf $tmpfile.svg && \
    +    inkscape $tmpfile.svg
    +
    +
    +
    +
    +

    Author: Dehaeze Thomas

    -

    Created: 2020-01-11 sam. 22:19

    +

    Created: 2020-11-03 mar. 16:26