-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacos_defaults.sh
executable file
·39 lines (30 loc) · 1.26 KB
/
macos_defaults.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
#!/bin/sh
echo 📌 Configuring macOS default settings
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# ファイアーウォール入
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1
# トラックパッド
# タップでクリック
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults -currentHost write -g com.apple.mouse.tapBehavior -bool true
killall SystemUIServer
# Dockの設定
defaults write com.apple.dock tilesize -int 20
defaults write com.apple.dock orientation -string "left"
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock launchanim -bool false
killall Dock
# Terminal profileの変更
TERM_PROFILE='MyTerminal';
TERM_PATH='./dotfiles';
CURRENT_PROFILE="$(defaults read com.apple.terminal 'Default Window Settings')";
echo ${TERM_PROFILE}
echo ${CURRENT_PROFILE}
if [ "${CURRENT_PROFILE}" != "${TERM_PROFILE}" ]; then
# open "$TERM_PATH$TERM_PROFILE.terminal"
defaults write com.apple.Terminal "Default Window Settings" -string "$TERM_PROFILE"
defaults write com.apple.Terminal "Startup Window Settings" -string "$TERM_PROFILE"
fi
sudo reboot