dotfiles/os/macos/finder.pref.fish

67 lines
3.1 KiB
Fish
Raw Normal View History

2024-02-01 21:27:49 -08:00
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2024-02-03 12:05:02 -08:00
print_subtitle Finder
2024-02-01 21:27:49 -08:00
2024-02-04 15:52:43 -08:00
execute "defaults write com.apple.finder NewWindowTarget -string 'PfHm' && \
defaults write com.apple.finder NewWindowTargetPath -string 'file:///Users/marley/'" \
"Set ~ as the default location for new Finder windows"
2024-02-01 21:27:49 -08:00
execute "defaults write com.apple.finder _FXShowPosixPathInTitle -bool true" \
2024-02-03 12:05:02 -08:00
"Use full POSIX path as window title"
2024-02-01 21:27:49 -08:00
execute "defaults write com.apple.finder WarnOnEmptyTrash -bool false" \
2024-02-03 12:05:02 -08:00
"Disable the warning before emptying the trash"
2024-02-01 21:27:49 -08:00
2024-02-03 15:49:09 -08:00
execute "defaults write com.apple.finder FXDefaultSearchScope -string 'SCcf'" \
2024-02-03 12:05:02 -08:00
"Search the current directory by default"
2024-02-01 21:27:49 -08:00
execute "defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false" \
2024-02-03 12:05:02 -08:00
"Disable warning when changing a file extension"
2024-02-01 21:27:49 -08:00
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" \
2024-02-03 12:05:02 -08:00
"Show icons for hard drives, servers, and removable media on the desktop"
2024-02-01 21:27:49 -08:00
execute "defaults write -g AppleShowAllExtensions -bool true" \
"Show all filename extensions"
execute "defaults write com.apple.finder AppleShowAllFiles -bool true" \
2024-02-03 12:05:02 -08:00
"Show hidden files"
2024-02-01 21:27:49 -08:00
2024-02-03 15:49:09 -08:00
execute "defaults write com.apple.finder _FXSortFoldersFirst -bool true" \
2024-02-03 12:05:02 -08:00
"Keep folders on top when sorting by name"
2024-02-01 21:27:49 -08:00
execute "defaults write com.apple.finder FXRemoveOldTrashItems -bool true" \
2024-02-03 12:05:02 -08:00
"Delete trash items after 30 days"
2024-02-01 21:27:49 -08:00
execute "defaults write com.apple.universalaccess showWindowTitlebarIcons -bool true" \
2024-02-03 12:05:02 -08:00
"Show folder icons in the title bar"
2024-02-01 21:27:49 -08:00
2024-02-04 15:52:43 -08:00
execute "defaults write com.apple.finder FXPreferredViewStyle -string 'icnv'" \
"Use icon view by default"
2024-02-01 21:27:49 -08:00
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:arrangeBy name' ~/Library/Preferences/com.apple.finder.plist && \
2024-02-04 15:52:43 -08:00
/usr/libexec/PlistBuddy -c 'Set :FK_StandardViewSettings:IconViewSettings:arrangeBy name' ~/Library/Preferences/com.apple.finder.plist && \
2024-02-01 21:27:49 -08:00
/usr/libexec/PlistBuddy -c 'Set :StandardViewSettings:IconViewSettings:arrangeBy name' ~/Library/Preferences/com.apple.finder.plist" \
2024-02-03 12:05:02 -08:00
"Set sort method"
2024-02-01 21:27:49 -08:00
2024-02-04 15:52:43 -08:00
execute "defaults write -g com.apple.springing.enabled -bool true" \
"Enable spring loading for directories"
execute "defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true && \
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true" \
"Don't create .DS_Store files on network or USB volumes"
execute "defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool false && \
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool false && \
defaults write com.apple.finder OpenWindowForNewRemoveableDisk -bool true" \
"Don't automatically open a Finder window when a volume is mounted"
2024-02-03 12:05:02 -08:00
killall Finder &>/dev/null