-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_macos.sh
77 lines (61 loc) · 1.87 KB
/
setup_macos.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
#! /usr/bin/env zsh
if [ "$(uname)" != "Darwin" ]
then
echo "Aborting. These dotfiles are meant to be running on macOS"
exit 1
fi
REPO_NAME="dotfiles"
CURRENT_PATH=$(pwd)
DOTFILES_PATH="${CURRENT_PATH}/${REPO_NAME}"
DOTFILES_PATH="${DOTFILES_PATH}/dotfiles"
# Install applications
if [ ! -f "$(which brew)" ]
then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
CLI_BREWS=(
git
htop
nvm
python3
wget
z
)
APP_BREWS=(
1password
firefox
google-chrome
iterm2
pycharm-edu
microsoft-teams
visual-studio-code
)
brew install $CLI_BREWS
brew install --cask $APP_BREWS
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
autoload -Uz compinit
compinit
compaudit | xargs chmod g-w
# Setup
cd ~ && mkdir "5minds"
cd ~ && mkdir ".ssh"
git config --global core.excludesfile '~/.config/git/ignore'
git config --global init.defaultBranch main
git config --global pull.rebase true
git config --global advice.statusHints false
git clone https://github.com/5minds/Education.Basics.Dotfiles.git $REPO_NAME
cp "${DOTFILES_PATH}/git/.gitignore" $HOME
cp "${DOTFILES_PATH}/zsh/.zshrc" $HOME
rm -rf $REPO_NAME
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Finish
echo "You may stillt want to configure the following things:"
echo " - Request password after lock immediately"
echo " - Run: 'compaudit | xargs chmod g-w' if there are insecure directories"
echo "Reboot."