Skip to content

Commit

Permalink
update setup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Pustelto committed Oct 14, 2024
1 parent 4e597ab commit c44bc27
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
1 change: 0 additions & 1 deletion npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
save-exact=true
; node-linker=hoisted
13 changes: 11 additions & 2 deletions setup_scripts/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
44 changes: 26 additions & 18 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ 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
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)
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -118,26 +121,31 @@ 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
# -------------------------------------
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

0 comments on commit c44bc27

Please sign in to comment.