forked from pinktrink/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.osx
158 lines (109 loc) · 5.74 KB
/
.osx
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
#!/usr/bin/env bash
#This file sets up a bunch of preferences
plist='/usr/libexec/PlistBuddy -c'
finderplist=~/Library/Preferences/com.apple.finder.plist
# Always show scrollbars
# defaults write -g AppleShowScrollBars -string Always
# Expand save panel by default
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write -g PMPrintingExpandedStateForPrint -bool true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable asking about opening untrusted applications
defaults write com.appleLaunchServices LSQuarantine -bool false
# Bottom right corner click to right clicK
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
# Enable control tabbing
defaults write -g AppleKeyboardUIMode -int 3
# Enable ctrl + scroll to zoom
defaults write com.apple.universalaccess closeViewScrollWheeltoggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
# Enable key repeat
defaults write -g ApplePressAndHoldEnabled -bool false
# Fast keyboard repeat
defaults write -g KeyRepeat -int 0
# Illuminate keyboard backlight in low light
defaults write com.apple.BezelServices kDim -bool true
# Dim off keyboard backlight after 5 seconds
defaults write com.apple.BezelServices kDimTime -int 5
# Disable autocorrect
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
# No shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Enable font antialiasing
defaults write -g AppleFontSmoothing -int 2
# Show path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true
# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# Show full path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Search current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string SCcf
# Disable the worning for changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Don't create .DS_Store on network drives
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Remove sprint loading delay
defaults write -g com.apple.springing.delay -float 0
# Display items in Finder as columns
defaults write com.apple.finder FXPreferredViewStyle -string clmv
# Empty trash securely
defaults write com.apple.finder EmptyTrashSecurely -bool true
# AirDrop over other interfaces than just wireless
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Don't rearrange spaces
defaults write com.apple.dock mru-spaces -bool false
# Enable Twitter debug mode
defaults write com.twitter.twitter-mac DebugMode -bool true
# Enable quitting Finder
defaults write com.apple.finder QuitMenuItem -bool true
# Show all filename extensions in Finder
defaults write -g AppleShowAllExtensions -bool true
# Enable grid snapping for icons
#$plist "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" $finderplist
#$plist "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" $finderplist
#$plist "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" $finderplist
# Set default Terminal theme to Pro
defaults write com.apple.Terminal "Startup Window Settings" -string Pro
if [[ -e /usr/local/bin/bash ]]; then
if ! [ $(grep /usr/local/bin/bash /etc/shells) ]; then
echo /usr/local/bin/bash | sudo tee -a /etc/shells
fi
# Set default Terminal shell
defaults write com.apple.Terminal Shell -string /usr/local/bin/bash
# Set the default login shell
sudo dscl . -create $HOME UserShell /usr/local/bin/bash
fi
# Tiny-ass Dock icons
defaults write com.apple.dock tilesize -int 14
# Magnify those tiny-ass icons when I roll over them
defaults write com.apple.dock magnification -int 1
defaults write com.apple.dock largesize -float 52.78473
# Enable list view for stacks
defaults write com.apple.dock use-new-list-stack -bool true
# Enable the Disk Utility debug menu
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
# Enable the Safari debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -int 1
# Change the highlight color to Bubblegum
defaults write -g AppleHighlightColor -string "1.000000 0.400000 1.000000"
# Only show open apps in Dock
defaults write com.apple.dock persistent-apps -array
# Do show an applications list in Dock
defaults write com.apple.dock persistent-others -array
defaults write com.apple.dock persistent-others -array-add '{tile-data={arrangement=1; displayas=0; file-data={_CFURLString="file:///Applications/"; _CFURLStringType=15; _CFURLAliasData=<00000000 00940003 00010000 cb69ed6f 0000482b 00000000 00000002 04c70d78 0000cdc1 84210000 00000920 fffe0000 00000000 0000ffff ffff0001 0000000e 001a000c 00410070 0070006c 00690063 00610074 0069006f 006e0073 000f001a 000c004d 00610063 0069006e 0074006f 00730068 00200048 00440012 000c4170 706c6963 6174696f 6e730013 00012f00 ffff0000>;}; file-label="Applications"; file-type=2; preferreditemsize=-1; showas=0;}; tile-type="directory-tile";}'
tokill=(Dock Finder Twitter "Disk Utility" Safari Terminal)
# Only kill/reopen apps that are currently open
iter=0
while [[ ! -z "${tokill[iter]}" ]]; do
if [[ -n $(pgrep ${tokill[iter]}) ]]; then
killall "${tokill[iter]}"
open -a "${tokill[iter]}"
fi
iter=$(( $iter + 1 ))
done