macOS prefs

This commit is contained in:
Marley Rae 2024-02-01 21:27:49 -08:00
parent 8145d91b4b
commit 56f5e407b9
18 changed files with 211 additions and 11 deletions

View file

@ -2,7 +2,14 @@
mar does dotfiles mar does dotfiles
# post install # Pre Install
## macOS
- Grant full disk access to iTerm2 (System Preferences -> Security & Privacy ->
Full Disk Access -> `+` Add iTerm2)
# Post Install
## Casks ## Casks

View file

@ -6,16 +6,6 @@
<true/> <true/>
<key>AlternateMouseScroll</key> <key>AlternateMouseScroll</key>
<true/> <true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>
<key>AppleScrollAnimationEnabled</key>
<integer>0</integer>
<key>AppleSmoothFixedFontsSizeThreshold</key>
<integer>1</integer>
<key>AppleWindowTabbingMode</key>
<string>manual</string>
<key>AutoHideTmuxClientSession</key> <key>AutoHideTmuxClientSession</key>
<true/> <true/>
<key>Custom Color Presets</key> <key>Custom Color Presets</key>

0
os/install.fish Normal file → Executable file
View file

0
os/macos/app_store.pref.fish Normal file → Executable file
View file

0
os/macos/close_prefs.applescript Normal file → Executable file
View file

0
os/macos/dock.pref.fish Normal file → Executable file
View file

48
os/macos/finder.pref.fish Executable file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Finder"
execute "defaults write com.apple.finder _FXShowPosixPathInTitle -bool true" \
"Use full POSIX path as window title"
execute "defaults write com.apple.finder WarnOnEmptyTrash -bool false" \
"Disable the warning before emptying the trash"
execite "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 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 -g AppleShowAllExtensions -bool true" \
"Show all filename extensions"
execute "defaults write com.apple.finder AppleShowAllFiles -bool true" \
"Show hidden files"
execite "defaults write com.apple.finder _FXSortFoldersFirst -bool true" \
"Keep folders on top when sorting by name"
execute "defaults write com.apple.finder FXRemoveOldTrashItems -bool true" \
"Delete trash items after 30 days"
execute "defaults write com.apple.universalaccess showWindowTitlebarIcons -bool true" \
"Show folder icons in the title bar"
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" \
"Set sort method"
killall "Finder" &>/dev/null
killall "cfprefsd" &>/dev/null

19
os/macos/keyboard.pref.fish Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Keyboard"
execute "defaults write -g AppleKeyboardUIMode -int 3" \
"Enable full keyboard access for all controls"
execute "defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false" \
"Disable automatic capitalization"
execute "defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false" \
"Disable automatic correction"
execute "defaults write com.apple.HIToolbox AppleFnUsageType -int 2" \
"Remap the emoji picker to the Fn key"

View file

@ -0,0 +1,13 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Language & Region"
execute "defaults write -g AppleLanguages -array 'en'" \
"Set language"
execute "defaults write -g AppleICUDateFormatStrings -dict '{2 = 'd MMM y'; 3 = 'd MMMM y'; 4 = 'EEEE, d MMMM y'}'" \
"Set date formats"

13
os/macos/photos.pref.fish Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Photos"
execute "defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true" \
"Prevent Photos from opening automatically when devices are plugged in"
killall "Photos" &>/dev/null

13
os/macos/safari.pref.fish Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Safari"
execute "defaults write com.apple.Safari SuppressSearchSuggestions -bool true && \
defaults write com.apple.Safari UniversalSearchEnabled -bool false" \
"Dont send search queries to Apple"
killall "Safari" &>/dev/null

View file

@ -0,0 +1,10 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Security & Privacy"
execute "defaults write com.apple.AdLib allowApplePersonalizedAdvertising -int 0" \
"Disable personalized ads"

12
os/macos/terminal.pref.fish Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "Terminal"
if ! grep -q "pam_tid.so" "/etc/pam.d/sudo"
execute "sudo sh -c 'echo \"auth sufficient pam_tid.so\" >> /etc/pam.d/sudo'" \
"Use Touch ID to authenticate sudo"
end

16
os/macos/textedit.pref.fish Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "TextEdit"
execute "defaults write com.apple.TextEdit PlainTextEncoding -int 4 && \
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4" \
"Open and save files as UTF-8 encoded"
execute "defaults write com.apple.TextEdit RichText 0" \
"Use plain text mode for new documents"
killall "TextEdit" &>/dev/null

22
os/macos/trackpad.pref.fish Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle Trackpad
execute "defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true && \
defaults write com.apple.AppleMultitouchTrackpad Clicking -int 1 && \
defaults write -g com.apple.mouse.tapBehavior -int 1 && \
defaults -currentHost write -g com.apple.mouse.tapBehavior -int 1" \
"Enable 'Tap to click'"
execute "defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true && \
defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -int 1 && \
defaults -currentHost write -g com.apple.trackpad.enableSecondaryClick -bool true && \
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 0 && \
defaults write com.apple.AppleMultitouchTrackpad TrackpadCornerSecondaryClick -int 0 && \
defaults -currentHost write -g com.apple.trackpad.trackpadCornerClickBehavior -int 0" \
"Map 'click or tap with two fingers' to the secondary click"

34
os/macos/ui_and_ux.pref.fish Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env fish
source "$DOT/script/utils.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_subtitle "UI & UX"
execute "defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true && \
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true" \
"Avoid creating '.DS_Store' files on network or USB volumes"
execute "defaults write com.apple.menuextra.battery ShowPercent -string 'YES'" \
"Show battery percentage in the menu bar"
execute "defaults write com.apple.CrashReporter UseUNC 1" \
"Make crash reports appear as notifications"
execute "defaults write com.apple.LaunchServices LSQuarantine -bool false" \
"Disable 'Are you sure you want to open this application?' dialog"
execute "defaults write com.apple.screencapture location -string '$HOME/Desktop'" \
"Save screenshots to the Desktop"
execute "defaults write com.apple.screencapture type -string 'png'" \
"Save screenshots as PNGs"
execute "defaults write -g AppleFontSmoothing -int 2" \
"Enable subpixel font rendering on non-Apple LCDs"
execute "defaults write -g NSNavPanelExpandedStateForSaveMode -bool true" \
"Expand save panel by default"
killall SystemUIServer &>/dev/null

0
php/install.fish Normal file → Executable file
View file

View file

@ -5,3 +5,6 @@ indent_style = space
indent_size = 2 indent_size = 2
trim_trailing_whitespace = true trim_trailing_whitespace = true
max_line_length = 80 max_line_length = 80
[*.fish]
indent_size = 4