ansible-zsh-chic/templates/zshrc.j2

99 lines
2.2 KiB
Django/Jinja

# Local pre scripts
if [[ -d $HOME/.config/zsh/pre ]] && [[ "$(ls $HOME/.config/zsh/pre)" ]] ; then
for script in $HOME/.config/zsh/pre/*; do
. $script
done
fi
# Locales
export LANG={{ locale }}
export LANGUAGE={{ locale.split(".")[0] }}
export LC_CTYPE="{{ locale }}"
export LC_NUMERIC="{{ locale }}"
export LC_TIME="{{ locale }}"
export LC_COLLATE="{{ locale }}"
export LC_MONETARY="{{ locale }}"
export LC_MESSAGES="{{ locale }}"
export LC_PAPER="{{ locale }}"
export LC_NAME="{{ locale }}"
export LC_ADDRESS="{{ locale }}"
export LC_TELEPHONE="{{ locale }}"
export LC_MEASUREMENT="{{ locale }}"
export LC_IDENTIFICATION="{{ locale }}"
export LC_ALL=
{% if term is defined and term != "" %}
export TERM={{ term }}
{% endif -%}
{% if antibody %}
autoload -Uz compinit
compinit
source <(antibody init)
source /usr/share/doc/fzf/examples/key-bindings.zsh
antibody bundle < /usr/share/zsh/antibody.plugins.zsh
{% endif -%}
{% if starship %}
autoload -U select-word-style
select-word-style bash
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
export STARSHIP_CONFIG=${HOME}/.starship.toml
eval "$(starship init zsh)"
{% endif -%}
source /opt/fzf/shell/completion.zsh
source /opt/fzf/shell/key-bindings.zsh
eval "$(fasd --init auto)"
alias t="tmux -2"
alias sy="systemctl"
alias ssy="sudo systemctl"
alias syu="systemctl --user"
alias ls="ls --color=tty"
alias l="ls -1"
alias lt="ls -lt"
alias lh="ls -lh"
alias la="ls -la"
alias ll="ls -l"
alias lrt="ls -lrt"
alias vf="cd \$(git rev-parse --show-toplevel)"
alias vvf="cd \$(${HOME}/.bin/vvf.sh)"
{% if localbin is defined %}
if [ -d ${HOME}/{{ localbin }} ]; then
export PATH=${HOME}/{{ localbin }}:$PATH
fi
{% endif %}
{% if powerline %}
if which powerline-daemon > /dev/null; then
powerline-daemon -q
POWERLINE_ZSH=/usr/share/powerline/bindings/zsh/powerline.zsh
if [ -f ${POWERLINE_ZSH} ]; then
. ${POWERLINE_ZSH}
fi
fi
{% endif %}
# Local post scripts
if [[ -d $HOME/.config/zsh/post ]] && [[ "$(ls $HOME/.config/zsh/post)" ]] ; then
for script in $HOME/.config/zsh/post/*; do
. $script
done
fi
if [ -f ${HOME}/.zshrc.local ]; then
source ${HOME}/.zshrc.local
fi
# vim: et sw=2 ts=2