-
Notifications
You must be signed in to change notification settings - Fork 0
/
macos-setup.sh
executable file
·164 lines (129 loc) · 3.47 KB
/
macos-setup.sh
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Update homebrew recipes
echo "Updating homebrew..."
brew update
echo "Installing Git..."
brew install git
echo "Git config"
git config --global user.name "namuan"
git config --global user.email [email protected]
echo "Installing brew git utilities..."
brew install git-extras
echo "Installing other brew stuff..."
tools=(
tree
wget
gron
jq
sd
ripgrep
fzf
imagemagick
pandoc
shellcheck
graphviz
git-lfs
plantuml
cookiecutter
yt-dlp
universal-ctags
bat
chromedriver
fd
yarn
pdm
duckdb
uv
jless
)
brew install "${tools[@]}"
echo "Installing homebrew cask"
# This may be required ? brew install --cask caskroom/cask/brew-cask
brew tap homebrew/cask-fonts
brew install cask font-fira-code font-jetbrains-mono font-input
#Install Zsh & Oh My Zsh
if test ! $(which zsh); then
echo "Installing Oh My ZSH..."
curl -L http://install.ohmyz.sh | sh
# jump using j
brew install autojump
echo "Setting up Zsh plugins..."
cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions
git clone https://github.com/nojhan/liquidprompt.git
echo "Setting ZSH as shell..."
chsh -s /bin/zsh
fi
# Apps
apps=(
diffmerge
keepingyouawake
spectacle
textmate
inkscape
)
echo "installing apps with Cask..."
brew install cask "${apps[@]}"
# Install Apps once as they manage the updates themselves
test -d "$HOME/Applications/JetBrains Toolbox.app" || brew install --cask jetbrains-toolbox
test -d "$HOME/Applications/Vivaldi.app" || brew install --cask vivaldi
test -d "$HOME/Applications/Alfred 5.app" || brew install --cask alfred
test -d "$HOME/Applications/Setapp.app" || brew install --cask setapp
test -d "$HOME/Applications/Telegram.app" || brew install --cask telegram
test -d "$HOME/Applications/draw.io.app" || brew install --cask drawio
test -d "$HOME/Applications/iTerm.app" || brew install --cask iterm2
Echo "Installing SDKMan for managing anything JVM"
curl -s "https://get.sdkman.io" | bash
echo "Installing NodeJS"
brew install node
# shellcheck disable=SC2046
test ! $(which npm) && npm install -g npx
echo "Installing GoLang"
brew install go
echo "Installing Rust"
brew install rust
echo "Installing Python"
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
echo "Installing Poetry"
brew install poetry
echo "Manim dependencies"
brew install py3cairo ffmpeg pango scipy
brew install cask mactex-no-gui
echo "Cleaning up brew"
brew cleanup
echo "Clone snippets-lib"
echo "ln -s "
echo "Symlink zsh files"
rm $HOME/.zshrc
ln -s $PWD/zshrc $HOME/.zshrc
rm $HOME/.zsh_paths
ln -s $PWD/zsh_paths $HOME/.zsh_paths
rm $HOME/shell_shortcuts
ln -s $PWD/shell_shortcuts.sh $HOME/shell_shortcuts
# Global GitIgnore
rm $HOME/.gitignore
ln -s $PWD/.gitignore $HOME/.gitignore
git config --global core.excludesFile "$HOME/.gitignore"
# Bin folder
mkdir -vp $HOME/bin
for file in $PWD/home-bin/*; do
echo "Symlinking $file"
ln -s $file $HOME/bin
done
echo "Done"