forked from alrra/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinder.sh
executable file
·81 lines (58 loc) · 4.26 KB
/
finder.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
78
79
80
81
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")" \
&& . "../../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_in_purple "\n Finder\n\n"
execute "defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true && \
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true && \
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true" \
"Automatically open a new Finder window when a volume is mounted"
execute "defaults write com.apple.finder _FXShowPosixPathInTitle -bool true" \
"Use full POSIX path as window title"
execute "defaults write com.apple.finder DisableAllAnimations -bool true" \
"Disable all animations"
execute "defaults write com.apple.finder WarnOnEmptyTrash -bool false" \
"Disable the warning before emptying the Trash"
execute "defaults write com.apple.finder FXDefaultSearchScope -string 'SCcf'" \
"Search the current directory by default"
execute "defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false" \
"Disable warning when changing a file extension"
execute "defaults write com.apple.finder FXPreferredViewStyle -string 'Nlsv'" \
"Use list view in all Finder windows by default"
execute "defaults write com.apple.finder NewWindowTarget -string 'PfDe' && \
defaults write com.apple.finder NewWindowTargetPath -string 'file://$HOME/Desktop/'" \
"Set 'Desktop' as the default location for new Finder windows"
execute "defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true && \
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true && \
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true && \
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true" \
"Show icons for hard drives, servers, and removable media on the desktop"
execute "defaults write com.apple.finder ShowRecentTags -bool false" \
"Do not show recent tags"
execute "defaults write -g AppleShowAllExtensions -bool true" \
"Show all filename extensions"
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:iconSize 72' ~/Library/Preferences/com.apple.finder.plist && \
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:iconSize 72' ~/Library/Preferences/com.apple.finder.plist" \
"Set icon size"
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:gridSpacing 1' ~/Library/Preferences/com.apple.finder.plist && \
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:gridSpacing 1' ~/Library/Preferences/com.apple.finder.plist" \
"Set icon grid spacing size"
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:textSize 13' ~/Library/Preferences/com.apple.finder.plist && \
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:textSize 13' ~/Library/Preferences/com.apple.finder.plist" \
"Set icon label text size"
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:labelOnBottom true' ~/Library/Preferences/com.apple.finder.plist && \
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:labelOnBottom true' ~/Library/Preferences/com.apple.finder.plist" \
"Set icon label position"
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:showItemInfo true' ~/Library/Preferences/com.apple.finder.plist && \
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:showItemInfo true' ~/Library/Preferences/com.apple.finder.plist" \
"Show item info"
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:arrangeBy none' ~/Library/Preferences/com.apple.finder.plist && \
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:arrangeBy none' ~/Library/Preferences/com.apple.finder.plist" \
"Set sort method"
killall "Finder" &> /dev/null
# Starting with Mac OS X Mavericks preferences are cached,
# so in order for things to get properly set using `PlistBuddy`,
# the `cfprefsd` process also needs to be killed.
#
# https://github.com/alrra/dotfiles/commit/035dda057ddc6013ba21db3d2c30eeb51ba8f200
killall "cfprefsd" &> /dev/null