dotfiles/os/macos/finder.pref.fish

49 lines
2 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
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
execite "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
execite "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
execute "/usr/libexec/PlistBuddy -c 'Set :DesktopViewSettings:IconViewSettings:arrangeBy name' ~/Library/Preferences/com.apple.finder.plist && \
/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-03 12:05:02 -08:00
killall Finder &>/dev/null
killall cfprefsd &>/dev/null