diff --git a/npmrc b/npmrc index 240e64f..cffe8cd 100644 --- a/npmrc +++ b/npmrc @@ -1,2 +1 @@ save-exact=true -; node-linker=hoisted diff --git a/setup_scripts/setup.sh b/setup_scripts/setup.sh old mode 100644 new mode 100755 index 395d0aa..b562c30 --- a/setup_scripts/setup.sh +++ b/setup_scripts/setup.sh @@ -9,8 +9,14 @@ # Install brew echo "Installing Brew" -if /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +if NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" then + if ! brew -v; + then + echo >> $HOME/.zprofile + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile + eval "$(/opt/homebrew/bin/brew shellenv)" + fi echo "Brew installed successful" else echo "Error installing Brew" @@ -48,6 +54,9 @@ npm config set save-exact true # Install global npm modules sudo ~/Dotfiles/setup_scripts/npm_install.sh +# Enable pnpm +sudo corepack enable + # Bootstrap dot files requested by ZSH ./paths.sh @@ -74,7 +83,7 @@ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm # TODO # Restore vs code settings/plugins # Need to check if snippets folder exist, on fresh install it will not so we need to create it -~/Dotfiles/setup_scripts/code_install.sh +# ~/Dotfiles/setup_scripts/code_install.sh # TODO # Restore iterm settings diff --git a/zshrc b/zshrc index 41e74c7..ff21417 100644 --- a/zshrc +++ b/zshrc @@ -9,9 +9,12 @@ export LANGUAGE=en_US.UTF-8 # ENV AND PLUGINS # ------------------------------------- +# Init antidote +source $(brew --prefix)/opt/antidote/share/antidote/antidote.zsh + # Path to theme -# export PROMPT_SYMBOL='\u2192' -export THEME_PATH=$HOME/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-Pustelto-SLASH-shell_theme +# Has to be set before antidote otherwise the THEME_PATH will be incorrect +export THEME_PATH=$(antidote home)/https-COLON--SLASH--SLASH-github.com-SLASH-Pustelto-SLASH-shell_theme # Load autocompletitions # First load Brew autocompletions @@ -19,6 +22,7 @@ if type brew &>/dev/null; then FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH fi +# Need to init completitions commands as they may be used by some plugins autoload -Uz compaudit compinit typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null) @@ -31,6 +35,9 @@ fi # Load comp list module zmodload -i zsh/complist +# Load antidote plugins +antidote load + # Configure history HISTFILE=$HOME/.zsh_history HISTSIZE=100000 @@ -68,16 +75,12 @@ export LSCOLORS="Gxfxcxdxbxegedabagacad" zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} -# Load plugins -antibody bundle < ~/.zsh_plugins.txt > ~/.zsh_plugins.sh -source ~/.zsh_plugins.sh - # Binding for zsh-users/zsh-history-substring-search plugin bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down # Settings for zsh-notify plugin -zstyle ':notify:*' notifier /usr/local/bin/terminal-notifier +zstyle ':notify:*' notifier $(brew --prefix)/bin/terminal-notifier zstyle ':notify:*' error-title "Failed with #fail" zstyle ':notify:*' success-title "Ended with #success" # zstyle ':notify:*' error-icon "https://media3.giphy.com/media/10ECejNtM1GyRy/200_s.gif" @@ -118,7 +121,10 @@ export NODE_OPTIONS=--max-old-space-size=8192 source ~/Dotfiles/shell/git.zsh #shamelessly taken from oh-my-zsh source ~/Dotfiles/shell/.aliases source ~/Dotfiles/shell/.functions -source ~/.variables + +if [ -f ~/.variables ]; then + source ~/.variables +fi # RUST # ------------------------------------- @@ -126,18 +132,20 @@ export PATH=/Users/tomas.pustelnik/.cargo/bin:$PATH # ATACCAMA CONFIGURATION # ------------------------------------- -source ~/Dotfiles/ataccama - -export PATH=$HOME/.docker/bin:$PATH - -# Created by `pipx` on 2024-09-10 14:13:01 -export PATH="$PATH:/Users/Tomas.Pustelnik/.local/bin" +# source ~/Dotfiles/ataccama +# +# export PATH=$HOME/.docker/bin:$PATH +# +# # Created by `pipx` on 2024-09-10 14:13:01 +# export PATH="$PATH:/Users/Tomas.Pustelnik/.local/bin" +# +# export PATH="$HOME/.jenv/bin:$PATH" +# eval "$(jenv init -)" # allow custom path setup per device without commiting possibly sensitive data # (path_exports is not versioned) -source ~/.path_exports - -export PATH="$HOME/.jenv/bin:$PATH" -eval "$(jenv init -)" +if [ -f ~/.path_exports ]; then + source ~/.path_exports +fi export PATH=$CUSTOM_PATH$PATH