From 3d1a41f3dbf4d7dfb7a9712927a2c7ab5362634f Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 11 Jun 2023 11:47:14 +0100 Subject: [PATCH] Import cargo if present, removed duplicate code --- config/zsh/.zshrc | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 7aba112..c6e93d1 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -17,28 +17,6 @@ utils_dir="${XDG_CONFIG_HOME}/utils" # If not running interactively, don't do anything [[ $- != *i* ]] && return -# MacOS-specific services -if [ "$(uname -s)" = "Darwin" ]; then - # Add Brew to path, if it's installed - if [[ -d /opt/homebrew/bin ]]; then - export PATH=/opt/homebrew/bin:$PATH - fi - - # If using iTerm, import the shell integration if availible - if [[ -f "${XDG_CONFIG_HOME}/zsh/.iterm2_shell_integration.zsh" ]]; then - source "${XDG_CONFIG_HOME}/zsh/.iterm2_shell_integration.zsh" - fi - - # Append the Android SDK locations to path - if [[ -d "${HOME}/Library/Android/" ]]; then - export PATH="${HOME}/Library/Android/sdk/emulator:${PATH}" - export ANDROID_HOME="${HOME}/Library/Android/sdk" - export ANDROID_SDK_ROOT="${HOME}/Library/Android/sdk" - export ANDROID_AVD_HOME="${ANDROID_SDK_ROOT}/tools/emulator" - export NODE_BINARY="/usr/local/bin/node" - fi -fi - # Source all ZSH config files (if present) if [[ -d $zsh_dir ]]; then # Import alias files @@ -101,6 +79,16 @@ if [ "$(uname -s)" = "Darwin" ]; then fi fi +# If using Tilix, import the shell integration if availible +if [ $TILIX_ID ] || [ $VTE_VERSION ] && [[ -f "/etc/profile.d/vte.sh" ]]; then + source /etc/profile.d/vte.sh +fi + +# Append Cargo to path, if it's installed +if [[ -d "$HOME/.cargo/bin" ]]; then + export PATH="$HOME/.cargo/bin:$PATH" +fi + # Add Zoxide (for cd, quick jump) to shell if hash zoxide 2> /dev/null; then eval "$(zoxide init zsh)"