-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
72 lines (59 loc) · 2.39 KB
/
setup.sh
File metadata and controls
72 lines (59 loc) · 2.39 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
#!/bin/bash
# Function to display messages
display_message() {
echo "----------------------------------------------------"
echo "$1"
echo "----------------------------------------------------"
}
# Check if Homebrew is installed, and install it if not
if ! command -v brew &> /dev/null; then
display_message "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
display_message "Homebrew is already installed."
fi
# Install or update iTerm2
display_message "Installing/updating iTerm2..."
brew install --cask iterm2
# Install or update Zsh
display_message "Installing/updating Zsh..."
brew install zsh
# Set Zsh as the default shell
display_message "Setting Zsh as the default shell..."
sudo chsh -s /usr/local/bin/zsh
# Install or update Oh My Zsh
display_message "Installing/updating Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install or update Powerlevel10k theme for Oh My Zsh
display_message "Installing/updating Powerlevel10k theme..."
git -C ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k pull || git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
# Set Zsh theme to Powerlevel10k
display_message "Setting Zsh theme to Powerlevel10k..."
sed -i '' 's/ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc
# Install Zsh plugins
display_message "Installing Zsh plugins..."
brew install zsh-autosuggestions
brew install zsh-syntax-highlighting
# Add lines to enable Zsh plugins in ~/.zshrc
echo 'source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
echo 'source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc
# Install other software via Homebrew
display_message "Installing other software via Homebrew..."
brew install zsh-autosuggestions
brew install zsh-syntax-highlighting
brew install --cask visual-studio-code
brew install --cask slack
brew install --cask google-chrome
brew install --cask notion
brew install --cask docker
brew install xz
brew install pyenv
brew install nvm
brew install git
brew install git-lfs
# Install Python versions via pyenv
display_message "Installing Python versions via pyenv..."
pyenv install 3.9.13
pyenv install 3.11.0
# Print installation status
display_message "Installation completed."