From 68c7f32d182be0d8fc344752a25a7c074bf20e31 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 21 Feb 2023 11:14:03 +0000 Subject: [PATCH] mac stuff --- config/zsh/.zshrc | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 8387b75..9143e2e 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -17,6 +17,28 @@ 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 @@ -57,28 +79,6 @@ fi # Import P10k config for command prompt, run `p10k configure` or edit [[ ! -f ${zsh_dir}/.p10k.zsh ]] || source ${zsh_dir}/.p10k.zsh -# 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 - # If not running in nested shell, then show nice welcome message :) if [[ "${SHLVL}" -lt 2 ]] && [[ -z "$SKIP_WELCOME" ]]; then welcome