forked from GMGStudio/MacSetup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
164 lines (128 loc) Β· 5.05 KB
/
Copy pathsetup.sh
File metadata and controls
164 lines (128 loc) Β· 5.05 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
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
# ------- SSH Key for GitHub -------
#echo "Creating an SSH key for you... π"
#ssh-keygen -t ed25519 -C "a309585@MAC-VL64TQ0DXP"
#echo "Please add this public key to Github π» \n"
#cat ~/.ssh/id_ed25519.pub
#open -a Safari https://github.com/settings/keys
#open -a Safari https://git-vce.srv.volvo.com/plugins/servlet/ssh/account/keys
#open -a Safari https://stash.srv.volvo.com/plugins/servlet/ssh/account/keys
#open -a Safari https://esw-github.33858.volvo.net/settings/keys
#read -p "Press [Enter] key after this... β¨οΈ"
# ------- SSH Key for GitHub -------
# ------- Xcode -------
#echo "Installing xcode-stuff π¨βπ»"
#xcode-select --install
# ------- Xcode -------
# ------- Install things from the App Store -------
#echo "Install things from the App Store e. g. Final Cut"
#open /System/Applications/App\ Store.app
#read -p "Press [Enter] key after you are done... β¨οΈ"
# ------- Install things from the App Store -------
# ------- Homebrew -------
# 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)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$user/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Update homebrew recipes
echo "Updating homebrew... π"
brew update
# ------- Homebrew -------
# ------- Git -------
echo "Installing Git... π¦ΈββοΈ"
brew install git
echo "Git config πββοΈ - Enter your data and press Enter!"
echo -n 'Username: '
read username
git config --global user.name "$username"
echo -n 'Mail: '
read mail
git config --global user.email $mail
# ------- Git -------
# ------- Python 3.11-------
echo "Installing Python... π¦Έ"
brew install python-gdbm@3.11
# ------- Python 3.11 -------
# ------- Azure CLI -------
echo "Installing Azure CLI... π¦Έ"
brew install azure-cli
# ------- Azure CLI -------
# ------- Terraform-------
echo "Installing Terraform... π¦Έ"
brew install terraform
# ------- Terraform -------
# ------- Ansible -------
echo "Installing Ansible... π¦Έ"
brew install ansible
# ------- Ansible-------
# ------- Terminal Setup -------
#Install Zsh & Oh My Zsh
echo "Installing Oh My ZSH... π±"
curl -L http://install.ohmyz.sh | sh
echo "Setting up Oh My Zsh theme... π¨"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
open ~/.zshrc
read -p "Please set ZSH_THEME=\"powerlevel10k/powerlevel10k\" βοΈ and then press Enter!"
echo "Add some auto suggestions... π¨βπ"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
open ~/.zshrc
read -p "Please add zsh-autosuggestions & zsh-syntax-highlighting to your Plugins! e. g. plugins=(... zsh-autosuggestions zsh-syntax-highlighting) (WITHOUT comma) βοΈ and then press #Enter!"
echo "Setting ZSH as shell... π»"
chsh -s /usr/local/bin/zshd
# ------- Terminal Setup -------
echo "Cleaning up brew π§Ή"
brew cleanup
# ------- Apps -------
echo "Installing homebrew cask π§ββοΈ"
brew install homebrew/cask
apps=(
slack
whatsapp
signal
bitwarden
google-chrome
iterm2
tabby
gitkraken
commander-one
beyond-compare
visual-studio-code
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps with Cask... β³"
brew install --cask --appdir="/Applications" ${apps[@]}
brew cleanup
# ------- Apps -------
# ------- Mac Settings -------
echo "Setting some Mac settings... βοΈ"
#"Automatically quit printer app once the print jobs complete π¨"
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
#"Showing icons for hard drives, servers, and removable media on the desktop βΉοΈ"
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
#"Enabling UTF-8 ONLY in Terminal.app and setting the Pro theme by default π»"
defaults write com.apple.terminal StringEncodings -array 4
defaults write com.apple.Terminal "Default Window Settings" -string "Pro"
defaults write com.apple.Terminal "Startup Window Settings" -string "Pro"
#"Preventing Time Machine from prompting to use new hard drives as backup volume π«"
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
#"Setting screenshot format to PNG πΈ"
defaults write com.apple.screencapture type -string "png"
# ------- Mac Settings -------
killall Finder
# ------- Advertisment -------
echo "Done! π₯³"
echo "Thank you for using my script! π Feel free to subscribe to our YouTube channel! It would be so
cool! π"
while true; do
read -p "Do you want me to open my YouTube Channel for you? π₯ (y/n) " yn
case $yn in
[Yy]* ) open -a Safari https://www.youtube.com/channel/UChXpovO__JiZrbcfTDFt39w?sub_confirmation=1; exit;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done