Enable templating for dotfiles

This commit is contained in:
2018-08-17 19:44:31 +02:00
parent 153d16d540
commit 2654e28869
10 changed files with 79 additions and 9 deletions

22
zsh/zshrc.j2 Normal file
View File

@@ -0,0 +1,22 @@
[[ -z "$PS1" ]] && return
_zshdir="$HOME/.zshrc.d"
{% if machine.gpg_agent %}
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
{% endif %}
{% if machine.ssh_agent %}
if $(ssh-add -l 2>/dev/null | grep -q "no identities") ; then
ssh-add
fi
{% endif %}
for file in "${_zshdir}"/* ; do
if [[ -e "$file" ]] ; then
source "$file"
fi
done
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh