Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions bootstrap.zsh
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env bash
# this script initialises a new computer with shell settings I am familar with

set -e

echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
set -ex

echo "Installing xcode CLI tools"
xcode-select --install || true
Expand All @@ -15,7 +12,6 @@ then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi


echo "Linking RC files "
mkdir -p ~/.dotfiles_backup

Expand All @@ -34,19 +30,19 @@ for f in rc_files/*; do
done


echo "link Sublime Text"
if [ -f "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ] \
&& [ ! -e /usr/local/bin/subl ]; then
ln -sv "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
else
echo "already exists, skipping"
fi
# echo "link Sublime Text"
# if [ -f "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ] \
# && [ ! -e /usr/local/bin/subl ]; then
# ln -sv "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
# else
# echo "already exists, skipping"
# fi


echo "brew installs"
software_list=( gcc bash tig icdiff
software_list=( bash tig icdiff
vim zsh-syntax-highlighting \
zsh-autosuggestions python kubectx watch )
zsh-autosuggestions watch )
for item in "${software_list[@]}"; do
if ! brew list | grep -q "$item"; then
echo "Installing fresh $item"
Expand All @@ -73,6 +69,6 @@ fi
echo "Configuring VIM"
vim +PlugInstall +qall

cp patches/minimap_settings.py ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User
# cp patches/minimap_settings.py ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User

echo "Done configuring the system......."
4 changes: 4 additions & 0 deletions install_zsh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set -e

echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
3 changes: 0 additions & 3 deletions rc_files/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,3 @@ alias dc='docker-compose'
alias dcr='docker-compose run --rm'
alias dcb='docker-compose build'
alias dcu='docker-compose up'

alias python="python3"
alias pip="pip3"
24 changes: 5 additions & 19 deletions rc_files/exports
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,14 @@ export MANPAGER='less -X';
export DOCKER_ID_USER='songgithub'


# for Py env
export PYENV_VERSION='3.6.3'
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

## Prefer to use Pyvenv instead of virtualenv
export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true"


# virtualenv wrapper
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv


# GOPATH
export GOPATH=$HOME/go-workspace
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/go
export GOROOT=/usr/local/go/bin
export GOBIN=$GOPATH/bin
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$GOROOT/bin"
export PATH="$PATH:$HOME/bin"


# NAB - brew without need for root permission
export PATH=~/apps/homebrew/bin:$PATH
export GOROOT=/Users/p783881/apps/homebrew/Cellar/go/1.12.5/libexec
3 changes: 3 additions & 0 deletions rc_files/functions
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,6 @@ function fetch-all() {
git branch --track "${branch##*/}" "$branch"
done
}

# open VsCode from terminal
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
7 changes: 7 additions & 0 deletions rc_files/nab_rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export PATH=~/apps/homebrew/bin:$PATH
export PATH=/Users/$(whoami)/apps/homebrew/Cellar/go/1.12.5/bin:$PATH

. ~/.profile
# run_cntlm

source /Users/$(whoami)/apps/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
38 changes: 0 additions & 38 deletions rc_files/reece_rc

This file was deleted.

6 changes: 3 additions & 3 deletions rc_files/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ plugins=(
export PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
source $ZSH/oh-my-zsh.sh

custom_list=(.aliases .functions .exports .kuberc .admin_kuberc .myob_rc .reece_rc)
custom_list=(.aliases .functions .exports .kuberc .admin_kuberc .myob_rc .nab_rc)
for item in ${custom_list[@]}; do
source ~/"$item"
done
Expand All @@ -60,7 +60,7 @@ done
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

# kb auto suggestions
source <(kubectl completion zsh)
# source <(kubectl completion zsh)

# adding zsh-autosuggestions.zsh
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh