From 7744794b9f557e7aa3e7e198778f7fd46665223c Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 20 Jul 2022 20:10:30 -0400 Subject: [PATCH] ENH don't use hostname to control zsh templating --- dot_config/zsh/dot_zshrc.tmpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dot_config/zsh/dot_zshrc.tmpl b/dot_config/zsh/dot_zshrc.tmpl index b95758d..35e4279 100644 --- a/dot_config/zsh/dot_zshrc.tmpl +++ b/dot_config/zsh/dot_zshrc.tmpl @@ -350,7 +350,7 @@ man() { man "$@" } -{{- if eq .chezmoi.hostname "petrucci4prez" }} +{{- if .desktop }} ## -------------------------------------------------- # enable x11 clipboard sync @@ -391,6 +391,8 @@ local paste_widgets=( x11-clip-wrap-widgets copy $copy_widgets x11-clip-wrap-widgets paste $paste_widgets +{{- end }} + ## -------------------------------------------------- ## Python/Ruby Virtual Environments ## -------------------------------------------------- @@ -399,6 +401,7 @@ x11-clip-wrap-widgets paste $paste_widgets # involve a) adding a "shims" directory to PATH and then b) adding some shell # magic to automatically call the shims +{{ if .development.python -}} zsh-pyenv () { export PATH=$PYENV_ROOT/shims:$PATH @@ -410,8 +413,9 @@ zsh-pyenv () { echo "pyenv not installed" fi } +{{- end }} - +{{ if .development.ruby -}} zsh-rbenv () { gempaths="$(/usr/bin/gem env gempath):" export PATH="${gempaths//:/\/bin:}:$PATH" @@ -424,7 +428,9 @@ zsh-rbenv () { echo "rbenv not installed" fi } +{{- end }} +{{ if .development.conda -}} zsh-conda () { if [[ -x $XDG_DATA_HOME/mambaforge/bin/conda ]]; then eval "$($XDG_DATA_HOME/mambaforge/bin/conda shell.zsh hook)"