-
Notifications
You must be signed in to change notification settings - Fork 0
/
.macos
executable file
·116 lines (93 loc) · 3.6 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
110
111
112
113
114
115
116
#!/bin/bash
# to get an idea of what to change for a particular setting
# defaults read > before.txt
# { MAKE CHANGE IN SETTINGS }
# defaults read > after.txt
# diff before.txt after.txt
# https://macos-defaults.com/
# https://gist.github.com/brandonb927/3195465/
# https://emmer.dev/blog/automate-your-macos-defaults/
# https://gist.github.com/sickcodes/912973b2153b0738ff97621cde4c2bb5
########
# DOCK #
########
# orient dock to the left of the screen
defaults write com.apple.dock "orientation" -string "left"
# autohide dock
defaults write com.apple.dock autohide -bool "true"
# set dock autohide animation time
defaults write com.apple.dock "autohide-time-modifier" -float "0.3"
# set dock icon size
defaults write com.apple.dock "tilesize" -int "48"
# don't show recent apps in dock
defaults write com.apple.dock "show-recents" -bool "false"
# set animation effect for maximizing and minimizing windows
defaults write com.apple.dock "mineffect" -string "scale"
##########
# FINDER #
##########
# show file extensions
defaults write NSGlobalDomain "AppleShowAllExtensions" -bool "true"
# show hidden files
defaults write com.apple.finder "AppleShowAllFiles" -bool "true"
# use list view
defaults write com.apple.finder "FXPreferredViewStyle" -string "Nlsv"
# empty bin after 30 days
defaults write com.apple.finder "FXRemoveOldTrashItems" -bool "true"
# don't warn when changing file extension
defaults write com.apple.finder "FXEnableExtensionChangeWarning" -bool "false"
# hide all icons on desktop
defaults write com.apple.finder "CreateDesktop" -bool "false"
#########
# MOUSE #
#########
# set mouse speed
defaults write NSGlobalDomain com.apple.mouse.scaling -float "0.875"
############
# KEYBOARD #
############
# set key repeat rate
defaults write -g InitialKeyRepeat -int "30"
defaults write -g KeyRepeat -int "2"
defaults write -g KeyRepeatDelay -float "0.5"
defaults write -g KeyRepeatEnabled -bool "true"
defaults write -g KeyRepeatInterval -float "0.083333333"
# disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool "false"
#########
# SOUND #
#########
# increase sound quality for Bluetooth headphones/headsets
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int "40"
############
# MENU BAR #
############
# always show bluetooth
defaults -currentHost write com.apple.controlcenter Bluetooth -int "18"
# show battery percentage
defaults -currentHost write com.apple.controlcenter BatteryShowPercentage -bool "true"
################
# STARTUP APPS #
################
# SEE ALL STARTUP ITEMS: osascript -e 'tell application "System Events" to get the name of every login item'
# docker
osascript -e 'tell application "System Events" to make login item at end with properties {name:"Docker", path:"/Applications/Docker.app", hidden:false}' >/dev/null
# firefox
osascript -e 'tell application "System Events" to make login item at end with properties {name:"Firefox", path:"/Applications/Firefox.app", hidden:false}' >/dev/null
# alacritty
osascript -e 'tell application "System Events" to make login item at end with properties {name:"Alacritty", path:"/Applications/Alacritty.app", hidden:false}' >/dev/null
###########
# GENERAL #
###########
# disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool "false"
# set to dark theme
osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to true'
# save screenshots to downloads folder
defaults write com.apple.screencapture location ~/Downloads
#################
# RESTART STUFF #
#################
killall Dock
killall Finder
killall SystemUIServer