From 3698bde8f52003dd5a20d6a9a4a2b5e1063f4eaa Mon Sep 17 00:00:00 2001 From: Saibotk Date: Sun, 29 Oct 2023 18:21:00 +0100 Subject: [PATCH] mac: Cleanup & adjust macos defaults --- macos/.macos | 131 ++------------------------------------------------- 1 file changed, 5 insertions(+), 126 deletions(-) diff --git a/macos/.macos b/macos/.macos index d80289f..2269dd9 100644 --- a/macos/.macos +++ b/macos/.macos @@ -58,7 +58,7 @@ defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true # Save to disk (not to iCloud) by default -# defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false +defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false # Automatically quit printer app once the print jobs complete defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true @@ -345,10 +345,6 @@ chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library # Show the /Volumes folder # sudo chflags nohidden /Volumes -# Remove Dropbox’s green checkmark icons in Finder -# file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns -# [ -e "${file}" ] && mv -f "${file}" "${file}.bak" - # Expand the following File Info panes: # “General”, “Open with”, and “Sharing & Permissions” defaults write com.apple.finder FXInfoPanesExpanded -dict \ @@ -450,9 +446,9 @@ sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator ( # Top left screen corner → Mission Control # defaults write com.apple.dock wvous-tl-corner -int 2 # defaults write com.apple.dock wvous-tl-modifier -int 0 -# Top right screen corner → Desktop -defaults write com.apple.dock wvous-tr-corner -int 10 -defaults write com.apple.dock wvous-tr-modifier -int 0 +# Bottom right screen corner → Disable quick note +defaults write com.apple.dock wvous-br-corner -int 0 +defaults write com.apple.dock wvous-br-modifier -int 0 # Bottom left screen corner → Start screen saver # defaults write com.apple.dock wvous-bl-corner -int 5 # defaults write com.apple.dock wvous-bl-modifier -int 0 @@ -571,54 +567,6 @@ defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false # Disable automatic spell checking # defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" -############################################################################### -# Spotlight # -############################################################################### - -# Hide Spotlight tray-icon (and subsequent helper) -#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search -# Disable Spotlight indexing for any volume that gets mounted and has not yet -# been indexed before. -# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. -# sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" -# Change indexing order and disable some search results -# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): -# MENU_DEFINITION -# MENU_CONVERSION -# MENU_EXPRESSION -# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) -# MENU_WEBSEARCH (send search queries to Apple) -# MENU_OTHER -# defaults write com.apple.spotlight orderedItems -array \ -# '{"enabled" = 1;"name" = "APPLICATIONS";}' \ -# '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ -# '{"enabled" = 1;"name" = "DIRECTORIES";}' \ -# '{"enabled" = 1;"name" = "PDF";}' \ -# '{"enabled" = 1;"name" = "FONTS";}' \ -# '{"enabled" = 0;"name" = "DOCUMENTS";}' \ -# '{"enabled" = 0;"name" = "MESSAGES";}' \ -# '{"enabled" = 0;"name" = "CONTACT";}' \ -# '{"enabled" = 0;"name" = "EVENT_TODO";}' \ -# '{"enabled" = 0;"name" = "IMAGES";}' \ -# '{"enabled" = 0;"name" = "BOOKMARKS";}' \ -# '{"enabled" = 0;"name" = "MUSIC";}' \ -# '{"enabled" = 0;"name" = "MOVIES";}' \ -# '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ -# '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ -# '{"enabled" = 0;"name" = "SOURCE";}' \ -# '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ -# '{"enabled" = 0;"name" = "MENU_OTHER";}' \ -# '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ -# '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ -# '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ -# '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' -# Load new settings before rebuilding the index -# killall mds > /dev/null 2>&1 -# Make sure indexing is enabled for the main volume -# sudo mdutil -i on / > /dev/null -# Rebuild the index from scratch -# sudo mdutil -E / > /dev/null - ############################################################################### # Terminal & iTerm 2 # ############################################################################### @@ -680,7 +628,7 @@ defaults write com.apple.terminal StringEncodings -array 4 # Enable Secure Keyboard Entry in Terminal.app # See: https://security.stackexchange.com/a/47786/8918 -# defaults write com.apple.terminal SecureKeyboardEntry -bool true +defaults write com.apple.terminal SecureKeyboardEntry -bool true # Disable the annoying line marks # defaults write com.apple.Terminal ShowLineMarks -int 0 @@ -822,38 +770,6 @@ defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool t # Disable signing emails by default defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false -############################################################################### -# Opera & Opera Developer # -############################################################################### - -# Expand the print dialog by default -# defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true -# defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true - -############################################################################### -# SizeUp.app # -############################################################################### - -# Start SizeUp at login -# defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true - -# Don’t show the preferences window on next start -# defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false - -############################################################################### -# Sublime Text # -############################################################################### - -# Install Sublime Text settings -# cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null - -############################################################################### -# Spectacle.app # -############################################################################### - -# Set up my preferred keyboard shortcuts -# cp -r init/spectacle.json ~/Library/Application\ Support/Spectacle/Shortcuts.json 2> /dev/null - ############################################################################### # Transmission.app # ############################################################################### @@ -889,38 +805,6 @@ defaults write org.m0k.transmission BlocklistAutoUpdate -bool true # Randomize port on launch defaults write org.m0k.transmission RandomPort -bool true -############################################################################### -# Twitter.app # -############################################################################### - -# Disable smart quotes as it’s annoying for code tweets -# defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false - -# Show the app window when clicking the menu bar icon -defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 - -# Enable the hidden ‘Develop’ menu -defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true - -# Open links in the background -defaults write com.twitter.twitter-mac openLinksInBackground -bool true - -# Allow closing the ‘new tweet’ window by pressing `Esc` -defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true - -# Show full names rather than Twitter handles -defaults write com.twitter.twitter-mac ShowFullNames -bool true - -# Hide the app in the background if it’s not the front-most window -defaults write com.twitter.twitter-mac HideInBackground -bool true - -############################################################################### -# Tweetbot.app # -############################################################################### - -# Bypass the annoyingly slow t.co URL shortener -defaults write com.tapbots.TweetbotMac OpenURLsDirectly -bool true - ############################################################################### # Kill affected applications # ############################################################################### @@ -936,16 +820,11 @@ for app in "Activity Monitor" \ "Google Chrome" \ "Mail" \ "Messages" \ - "Opera" \ "Photos" \ "Safari" \ - "SizeUp" \ - "Spectacle" \ "SystemUIServer" \ "Terminal" \ "Transmission" \ - "Tweetbot" \ - "Twitter" \ "iCal"; do killall "${app}" &> /dev/null done