zsh/zshenv

133 lines
3.4 KiB
Plaintext
Raw Permalink Normal View History

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/
# Colors definition {{{
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'
export MAGENTAB='\033[1;35m'
export CYAN='\033[36;40m'
export WHITE='\033[0;37m'
export WHITEB='\033[1;37m'
export RESET='\033[0m'
# }}}
# Ensure to use ZSH for this session
export SHELL='/bin/zsh'
# 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
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,…) {{{
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
# 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
# }}}
2014-08-17 22:54:05 +02:00
# Limitation de la taille de la pile de dossier:
DIRSTACKSIZE=10
export DIRSTACKSIZE
# Default PDF viewer {{{
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"
fi
# }}}
# Permissions for new files
## rw-r--r-- files
## rwxr-xr-x directories
2014-08-17 22:54:05 +02:00
umask 022
# 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"
# }}}
# 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"
# }}}
# Ne pas passer par le proxy pour les domaines locaux {{{
2014-08-17 22:54:05 +02:00
#export no_proxy="exemple.org"
# }}}
2014-08-17 22:54:05 +02:00
# Lock unused session after 10 minutes {{{
2014-08-17 22:54:05 +02:00
#export TMOUT=600
# }}}
# Close unused root session after 30 minutes {{{
2014-08-17 22:54:05 +02:00
if [ ${USER} = "root" ]; then
export TMOUT=1800
fi
# }}}
2014-08-17 22:54:05 +02:00
# Tmux {{{
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}"
fi
# }}}
# SSH {{{
## Specify ssh-agent socket path
SSH_AGENT_SOCK="${HOME}/.ssh/socks/ssh_auth"
SSH_AGENT_ENV="${HOME}/.ssh/socks/ssh_agent_env"
## ssh-keys path
SSH_ED25519_KEY="${HOME}/.ssh/id_ed25519"
SSH_RSA_KEY="${HOME}/.ssh/id_rsa"
# }}}
# GPG {{{
2021-09-19 23:21:52 +02:00
GPG_PRIV_KEY="${HOME}/.gnupg/secring.gpg"
GPG_TEST_FILE="${HOME}/.password-store/test"
# }}}
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
# }}}