2014-08-17 22:54:05 +02:00
|
|
|
|
# /etc/zsh/zshenv ou ~/.zshenv
|
|
|
|
|
# Fichier de configuration de zsh, lu au lancement de tout shell Zsh
|
|
|
|
|
# Formation Debian GNU/Linux par Alexis de Lattre
|
|
|
|
|
# http://formation-debian.via.ecp.fr/
|
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Colors definition {{{
|
2015-09-07 23:40:46 +02:00
|
|
|
|
export BLACK='\033[30;40m'
|
|
|
|
|
export RED='\033[0;31m'
|
|
|
|
|
export REDB='\033[1;31m'
|
|
|
|
|
export GREEN='\033[1;32m'
|
|
|
|
|
export YELLOW='\033[1;33m'
|
|
|
|
|
export BLUE='\033[34;40m'
|
|
|
|
|
export MAGENTA='\033[0;35m'
|
2021-10-07 16:53:17 +02:00
|
|
|
|
export MAGENTAB='\033[1;35m'
|
2015-09-07 23:40:46 +02:00
|
|
|
|
export CYAN='\033[36;40m'
|
|
|
|
|
export WHITE='\033[0;37m'
|
|
|
|
|
export WHITEB='\033[1;37m'
|
|
|
|
|
export RESET='\033[0m'
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2015-09-07 23:40:46 +02:00
|
|
|
|
|
2017-01-17 18:28:32 +01:00
|
|
|
|
# Ensure to use ZSH for this session
|
|
|
|
|
export SHELL='/bin/zsh'
|
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# PATH
|
2020-07-21 16:13:19 +02:00
|
|
|
|
export PATH="/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/games:/sbin:$HOME/bin:/opt:/usr/local/games:$HOME/.virtualenvs/bin:$HOME/.local/bin"
|
2014-08-17 22:54:05 +02:00
|
|
|
|
|
2022-12-02 10:38:57 +01:00
|
|
|
|
# Default soft
|
2014-08-17 22:54:05 +02:00
|
|
|
|
export VISUAL=vim
|
|
|
|
|
export EDITOR=vim
|
2022-12-02 10:38:57 +01:00
|
|
|
|
## web browser {{{
|
2016-10-09 15:11:08 +02:00
|
|
|
|
if [ $(command -v qutebrowser) ]; then
|
|
|
|
|
export BROWSER=qutebrowser
|
|
|
|
|
elif [ $(command -v firefox) ]; then
|
2015-09-04 14:47:42 +02:00
|
|
|
|
export BROWSER=firefox
|
|
|
|
|
fi
|
2022-12-02 10:38:57 +01:00
|
|
|
|
## }}}
|
2023-01-27 19:07:55 +01:00
|
|
|
|
## Terminal emulator {{{
|
|
|
|
|
if [ $(command -v alacritty) ]; then
|
|
|
|
|
export TERM_EMULATOR=alacritty
|
|
|
|
|
fi
|
|
|
|
|
## }}}
|
2022-12-02 10:38:57 +01:00
|
|
|
|
## Pager (man,…) {{{
|
2015-09-04 14:47:42 +02:00
|
|
|
|
if [ $(command -v vimmanpager) ]; then
|
|
|
|
|
export PAGER=vimmanpager
|
|
|
|
|
else
|
|
|
|
|
export PAGER=less
|
|
|
|
|
fi
|
|
|
|
|
alias zless=$PAGER
|
2022-12-02 10:38:57 +01:00
|
|
|
|
## }}}
|
|
|
|
|
## Git pager {{{
|
|
|
|
|
if [ $(command -v bat) ]; then
|
|
|
|
|
export GIT_PAGER=bat
|
|
|
|
|
else
|
|
|
|
|
export GIT_PAGER="less -F -X"
|
|
|
|
|
fi
|
|
|
|
|
## }}}
|
2014-08-17 22:54:05 +02:00
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Colors definition for less {{{
|
2014-08-17 22:54:05 +02:00
|
|
|
|
export LESS_TERMCAP_mb=$'\E[01;31m' # début de blink
|
|
|
|
|
export LESS_TERMCAP_md=$'\E[01;31m' # début de gras
|
|
|
|
|
export LESS_TERMCAP_me=$'\E[0m' # fin
|
|
|
|
|
export LESS_TERMCAP_so=$'\E[01;44;33m' # début de la ligne d`état
|
|
|
|
|
export LESS_TERMCAP_se=$'\E[0m' # fin
|
|
|
|
|
export LESS_TERMCAP_us=$'\E[01;32m' # début de souligné
|
|
|
|
|
export LESS_TERMCAP_ue=$'\E[0m' # fin
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2014-08-17 22:54:05 +02:00
|
|
|
|
|
|
|
|
|
# Limitation de la taille de la pile de dossier:
|
|
|
|
|
DIRSTACKSIZE=10
|
|
|
|
|
export DIRSTACKSIZE
|
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Default PDF viewer {{{
|
2019-01-08 14:13:54 +01:00
|
|
|
|
if [ $(command -v zathura) ]; then
|
2019-10-21 13:24:31 +02:00
|
|
|
|
export PDF_VIEWER="zathura"
|
|
|
|
|
elif [ $(command -v evince) ]; then
|
|
|
|
|
export PDF_VIEWER="evince"
|
2019-01-08 14:13:54 +01:00
|
|
|
|
fi
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2019-01-08 14:13:54 +01:00
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Permissions for new files
|
|
|
|
|
## rw-r--r-- − files
|
|
|
|
|
## rwxr-xr-x − directories
|
2014-08-17 22:54:05 +02:00
|
|
|
|
umask 022
|
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Proxy HTTP / FTP sans mot de passe {{{
|
2014-08-17 22:54:05 +02:00
|
|
|
|
#export http_proxy="http://localhost:8118"
|
|
|
|
|
#export ftp_proxy="ftp://proxy.exemple.org:8080"
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
|
|
|
|
# Proxy HTTP / FTP avec mot de passe {{{
|
2014-08-17 22:54:05 +02:00
|
|
|
|
#export http_proxy="http://login:password@proxy.exemple.org:8080"
|
|
|
|
|
#export ftp_proxy="ftp://login:password@proxy.exemple.org:8080"
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
|
|
|
|
# Ne pas passer par le proxy pour les domaines locaux {{{
|
2014-08-17 22:54:05 +02:00
|
|
|
|
#export no_proxy="exemple.org"
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2014-08-17 22:54:05 +02:00
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Lock unused session after 10 minutes {{{
|
2014-08-17 22:54:05 +02:00
|
|
|
|
#export TMOUT=600
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
|
|
|
|
# Close unused root session after 30 minutes {{{
|
2014-08-17 22:54:05 +02:00
|
|
|
|
if [ ${USER} = "root" ]; then
|
|
|
|
|
export TMOUT=1800
|
|
|
|
|
fi
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2014-08-17 22:54:05 +02:00
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# Tmux {{{
|
2015-11-25 18:27:57 +01:00
|
|
|
|
if [ $(command -v tmux) ]; then
|
|
|
|
|
export TMUX_TMPDIR=~/.tmux/socks/
|
2019-10-21 13:25:13 +02:00
|
|
|
|
[ ! -d "${TMUX_TMPDIR}" ] && mkdir -p -- "${TMUX_TMPDIR}" || chmod 0700 -- "${TMUX_TMPDIR}"
|
2015-11-25 18:27:57 +01:00
|
|
|
|
fi
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2021-09-19 17:58:44 +02:00
|
|
|
|
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# SSH {{{
|
2021-09-19 17:58:44 +02:00
|
|
|
|
## Specify ssh-agent socket path
|
|
|
|
|
SSH_AGENT_SOCK="${HOME}/.ssh/socks/ssh_auth"
|
|
|
|
|
SSH_AGENT_ENV="${HOME}/.ssh/socks/ssh_agent_env"
|
2021-09-19 18:43:53 +02:00
|
|
|
|
## ssh-keys path
|
|
|
|
|
SSH_ED25519_KEY="${HOME}/.ssh/id_ed25519"
|
2021-09-19 18:56:04 +02:00
|
|
|
|
SSH_RSA_KEY="${HOME}/.ssh/id_rsa"
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
|
|
|
|
# GPG {{{
|
2021-09-19 23:21:52 +02:00
|
|
|
|
GPG_PRIV_KEY="${HOME}/.gnupg/secring.gpg"
|
|
|
|
|
GPG_TEST_FILE="${HOME}/.password-store/test"
|
2022-07-19 10:54:08 +02:00
|
|
|
|
# }}}
|
2022-12-02 10:39:25 +01:00
|
|
|
|
|
|
|
|
|
# Bemoji {{{
|
|
|
|
|
# Emoji picker https://github.com/marty-oehme/bemoji
|
|
|
|
|
if [ $(command -v bemoji) ]; then
|
|
|
|
|
## Set rofi options
|
|
|
|
|
export BEMOJI_PICKER_CMD="rofi -theme solarized_alternate -location 2 -p 🧐 -i -dmenu"
|
|
|
|
|
fi
|
|
|
|
|
# }}}
|