-
Notifications
You must be signed in to change notification settings - Fork 1
/
.macos
109 lines (91 loc) · 4.23 KB
/
.macos
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
#!/usr/bin/env bash
# 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'
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>/dev/null &
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
# Set DateTime format in Menu Bar
defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm"
defaults write com.apple.menuextra.clock FlashDateSeparators -bool true
defaults write com.apple.menuextra.clock IsAnalog -bool false
# Set Dock position
defaults write com.apple.dock orientation -string "bottom"
# Set Dock icon size
defaults write com.apple.dock tilesize -int 42
# Set Dock animation when minimizing windows
defaults write com.apple.dock mineffect -string "suck"
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Reduce the auto-hiding Dock delay
defaults write com.apple.dock autohide-delay -float 0.2
# Remove the animation when hiding/showing the Dock
defaults write com.apple.dock autohide-time-modifier -float 0
# Don’t show recent applications in Dock
defaults write com.apple.dock show-recents -bool false
# Add icons to the Dock
add_dock_item() {
printf '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>%s</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>', "$1"
}
add_dock_spacer() {
printf '<dict><key>tile-type</key><string>spacer-tile</string></dict>'
}
defaults write com.apple.dock persistent-apps -array \
"$(add_dock_item /System/Applications/Notes.app)" \
"$(add_dock_item /System/Applications/Reminders.app)" \
"$(add_dock_item /System/Applications/Calendar.app)" \
"$(add_dock_item /Applications/Trello.app)" \
"$(add_dock_item /Applications/Microsoft\ Outlook.app)" \
"$(add_dock_item /System/Applications/Mail.app)" \
"$(add_dock_item /Applications/1Password.app)" \
"$(add_dock_item /Applications/Authy\ Desktop.app)" \
"$(add_dock_spacer)" \
"$(add_dock_item /Applications/Spotify.app)" \
"$(add_dock_item /System/Applications/Music.app)" \
"$(add_dock_spacer)" \
"$(add_dock_item /Applications/Firefox.app)" \
"$(add_dock_item /Applications/Firefox\ Developer\ Edition.app)" \
"$(add_dock_item /Applications/Google\ Chrome.app)" \
"$(add_dock_item /Applications/Google\ Chrome\ Dev.app)" \
"$(add_dock_item /Applications/Microsoft\ Edge.app)" \
"$(add_dock_item /Applications/Brave\ Browser.app)" \
"$(add_dock_spacer)" \
"$(add_dock_item /Applications/iTerm.app)" \
"$(add_dock_item /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app)" \
"$(add_dock_item /Applications/BrowserStackLocal.app)" \
"$(add_dock_item ~/Applications/JetBrains\ Toolbox/Android\ Studio.app)" \
"$(add_dock_item ~/Applications/JetBrains\ Toolbox/IntelliJ\ IDEA\ Ultimate.app)" \
"$(add_dock_item /Applications/Visual\ Studio\ Code.app)" \
"$(add_dock_item /Applications/Sublime\ Text.app)" \
"$(add_dock_item /Applications/Altair\ GraphQL\ Client.app)" \
"$(add_dock_item /Applications/Postman.app)" \
"$(add_dock_item /Applications/Xcode.app/Contents/Applications/FileMerge.app)" \
"$(add_dock_spacer)" \
"$(add_dock_item /Applications/Adobe\ Photoshop\ 2023/Adobe\ Photoshop\ 2023.app)" \
"$(add_dock_item /Applications/Adobe\ Illustrator\ 2023/Adobe\ Illustrator.app)" \
"$(add_dock_spacer)" \
"$(add_dock_item /Applications/Slack.app)" \
"$(add_dock_item /Applications/Microsoft\ Teams.app)" \
"$(add_dock_item /Applications/Discord.app)" \
"$(add_dock_item /System/Applications/FaceTime.app)" \
"$(add_dock_item /Applications/Whatsapp.app)" \
"$(add_dock_item /Applications/Telegram.app)" \
"$(add_dock_item /Applications/Messenger.app)"
# Set folder location for iTerm2 preferences
defaults write com.googlecode.iterm2 "PrefsCustomFolder" -string "~/.dotfiles"
defaults write com.googlecode.iterm2 "LoadPrefsFromCustomFolder" -bool true
for app in "cfprefsd" \
"Dock" \
"Finder" \
"SystemUIServer"; do
killall "${app}" &>/dev/null
done