From 885da0256385369c59fb1423ca5a400879357069 Mon Sep 17 00:00:00 2001 From: "John F. Mercer" Date: Wed, 15 Nov 2023 19:30:04 -0300 Subject: [PATCH] Install direnv; fix grc --- .../linux/run_onchange_before_10_installs.sh.tmpl | 3 ++- system/alii.zsh | 1 - system/direnv.zsh | 3 +++ system/grc.zsh | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 system/direnv.zsh diff --git a/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl b/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl index b132b11..23a33a5 100644 --- a/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl +++ b/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl @@ -16,6 +16,7 @@ sudo apt update packages=( "bat" "colordiff" + "direnv" "expect" # needed to set shell on Parrot "fzf" "gh" @@ -81,7 +82,7 @@ else fi tar xf lazygit.tar.gz lazygit sudo install lazygit /usr/local/bin -rm -rf "$HOME"/lazygit* +sudo rm -rf "$HOME"/lazygit* # Remove packages rm_packages=("nano") diff --git a/system/alii.zsh b/system/alii.zsh index b9ad0a9..7aa57aa 100644 --- a/system/alii.zsh +++ b/system/alii.zsh @@ -9,7 +9,6 @@ alias ~="cd ~" # `cd` is probably faster to type though alias -- -="cd -" # Shortcuts -alias D="cd ~/Dropbox" alias C="cd ~/Code" alias c="code ." alias dl="cd ~/Downloads" diff --git a/system/direnv.zsh b/system/direnv.zsh new file mode 100644 index 0000000..cc00b16 --- /dev/null +++ b/system/direnv.zsh @@ -0,0 +1,3 @@ +if type direnv &>/dev/null; then + eval "$(direnv hook zsh)" +fi \ No newline at end of file diff --git a/system/grc.zsh b/system/grc.zsh index e9180ba..6d67d87 100644 --- a/system/grc.zsh +++ b/system/grc.zsh @@ -1,2 +1,6 @@ # GRC colorizes nifty unix tools all over the place -source $HOMEBREW_PREFIX/etc/grc.zsh +if type brew &>/dev/null; then + source $HOMEBREW_PREFIX/etc/grc.zsh +else + source /etc/grc.zsh +fi