-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.zsh
More file actions
executable file
·95 lines (74 loc) · 2.7 KB
/
setup.zsh
File metadata and controls
executable file
·95 lines (74 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env zsh
echo $ZSH_VERSION
# Install Homebrew. Homebrew is the equivalent of apt-get for linux. Its required to install tools such as git and wget.
# Mac OS 10.9 will automatically prompt user to install XCode command line tools which is a pre-requisite.
which brew
RETSTATUS=$?
if [ $RETSTATUS -ne 0 ]
then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> ~/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
else
tput setaf 1 && tput smul
echo Warning:
tput sgr0
echo Homebrew already installed.
echo Updating formulae and homebrew itself.....
(set -x; brew update;)
fi
#Homebrew will show warning message if already installed.
#Install Vim
brew install vim
# Install Git
brew install git
git config --global pull.rebase true
# Install python (comes with Setuptools and pip)
brew install python
# Install IntelliJ Ulitmate
brew install --cask intellij-idea
# Install Raycast
brew install --cask raycast
# Install xmind for mind mapping
brew install --cask xmind
# Install Zoom.us
#brew install --cask zoomus
# Install Chrome
#brew install --cask google-chrome
# Install postman
brew install --cask postman
# Install reflector
brew install --cask reflector
# Install github command line tool
brew install gh
# Install 1password
brew install --cask 1password
# Install slack
brew install --cask slack
# Install Visual Studio Code
brew install --cask visual-studio-code
# Install node version manager
if [ -s "$(brew --prefix nvm)/nvm.sh" ]; then
echo "NVM is already installed via Homebrew."
else
#: Do something because cask is not installed
brew install nvm
export NVM_DIR="$HOME/.nvm"
echo '[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"' >> ~/.zprofile # This loads nvm
echo '[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"' >> ~/.zprofile # This loads nvm bash_completion
fi
# Install dotfiles
DOTFILES_REMOTE='https://github.com/johnlim/dotfiles.git'
DOTFILES_LOCAL=~/git/dotfiles
git clone $DOTFILES_REMOTE $DOTFILES_LOCAL
chmod +x $DOTFILES_LOCAL/setup.sh
$DOTFILES_LOCAL/setup.sh
#install NVM (Node Version Manager) - the script adds the source line to your prfile (~/bash_profile etc) so pls install dotfiles first.
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
#source $HOME/.bash_profile
nvm install node
#increase key repeat rate
defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 0 # normal minimum is 2 (30 ms)
defaults write NSGlobalDomain KeyRepeat -int 1