mirror of
https://gitlab.com/thebiblelover7/dotfiles.git
synced 2025-12-14 04:03:50 +00:00
Clean up, update configs to be actually useful now...
This commit is contained in:
191
.osx
vendored
191
.osx
vendored
@@ -37,6 +37,61 @@ fi
|
||||
# General UI/UX #
|
||||
###############################################################################
|
||||
|
||||
if [[ $RUN_AS_ROOT ]]; then
|
||||
# Set computer name (as done via System Preferences → Sharing)
|
||||
sudo scutil --set ComputerName "Charles III"
|
||||
sudo scutil --set HostName "Charles III"
|
||||
sudo scutil --set LocalHostName "Charles III"
|
||||
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "Charles III"
|
||||
|
||||
# Reveal IP address, hostname, OS version, etc. when clicking the clock
|
||||
# in the login window
|
||||
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
|
||||
|
||||
# Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and
|
||||
# all wallpapers are in `/Library/Desktop Pictures/`.
|
||||
rm -rf ~/Library/Application Support/Dock/desktoppicture.db
|
||||
sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg
|
||||
sudo ln -s $HOME/clone/dotfiles/images/nord.png /System/Library/CoreServices/DefaultDesktop.jpg
|
||||
fi
|
||||
|
||||
# Set language and text formats
|
||||
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
|
||||
# `Inches`, `en_GB` with `en_US`, and `true` with `false`.
|
||||
defaults write NSGlobalDomain AppleLanguages -array "en" "eo" "es" "pt"
|
||||
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD"
|
||||
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
|
||||
defaults write NSGlobalDomain AppleMetricUnits -bool true
|
||||
|
||||
# Show language menu in the top right corner of the boot screen
|
||||
sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true
|
||||
|
||||
# Enable full keyboard access for all controls
|
||||
# (e.g. enable Tab in modal dialogs)
|
||||
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
|
||||
|
||||
# Use scroll gesture with the Ctrl (^) modifier key to zoom
|
||||
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
|
||||
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
|
||||
# Follow the keyboard focus while zoomed in
|
||||
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true
|
||||
|
||||
# Set highlight color to green
|
||||
defaults write NSGlobalDomain AppleHighlightColor -string "0.184300 0.937200 0.937200"
|
||||
|
||||
# Always show scrollbars
|
||||
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
|
||||
# Possible values: `WhenScrolling`, `Automatic` and `Always`
|
||||
|
||||
# Disable the “Are you sure you want to open this application?” dialog
|
||||
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||||
|
||||
# Set Help Viewer windows to non-floating mode
|
||||
defaults write com.apple.helpviewer DevMode -bool true
|
||||
|
||||
# Disable Notification Center and remove the menu bar icon
|
||||
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null
|
||||
|
||||
# Expand save panel by default
|
||||
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
|
||||
|
||||
@@ -71,6 +126,82 @@ defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
|
||||
defaults write NSGlobalDomain InitialKeyRepeat -int 20
|
||||
defaults write NSGlobalDomain KeyRepeat -int 1
|
||||
|
||||
# Change keyboard layout to Dvorak by default
|
||||
defaults import com.apple.HIToolbox - <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AppleCurrentKeyboardLayoutInputSourceID</key>
|
||||
<string>com.apple.keylayout.Dvorak</string>
|
||||
<key>AppleEnabledInputSources</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Bundle ID</key>
|
||||
<string>com.apple.CharacterPaletteIM</string>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Non Keyboard Input Method</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Bundle ID</key>
|
||||
<string>com.apple.inputmethod.EmojiFunctionRowItem</string>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Non Keyboard Input Method</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Keyboard Layout</string>
|
||||
<key>KeyboardLayout ID</key>
|
||||
<integer>16300</integer>
|
||||
<key>KeyboardLayout Name</key>
|
||||
<string>Dvorak</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Keyboard Layout</string>
|
||||
<key>KeyboardLayout ID</key>
|
||||
<integer>0</integer>
|
||||
<key>KeyboardLayout Name</key>
|
||||
<string>U.S.</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>AppleInputSourceHistory</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Keyboard Layout</string>
|
||||
<key>KeyboardLayout ID</key>
|
||||
<integer>16300</integer>
|
||||
<key>KeyboardLayout Name</key>
|
||||
<string>Dvorak</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Keyboard Layout</string>
|
||||
<key>KeyboardLayout ID</key>
|
||||
<integer>0</integer>
|
||||
<key>KeyboardLayout Name</key>
|
||||
<string>U.S.</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>AppleSelectedInputSources</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>InputSourceKind</key>
|
||||
<string>Keyboard Layout</string>
|
||||
<key>KeyboardLayout ID</key>
|
||||
<integer>16300</integer>
|
||||
<key>KeyboardLayout Name</key>
|
||||
<string>Dvorak</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
# Increase sound quality for Bluetooth headphones/headsets
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
|
||||
|
||||
# Disable auto-correct
|
||||
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
|
||||
|
||||
@@ -81,8 +212,12 @@ hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc": 0x7
|
||||
# Screen #
|
||||
###############################################################################
|
||||
|
||||
# Require password immediately after sleep or screen saver begins
|
||||
defaults write com.apple.screensaver askForPassword -int 1
|
||||
defaults write com.apple.screensaver askForPasswordDelay -int 0
|
||||
|
||||
# Save screenshots to Downloads folder.
|
||||
defaults write com.apple.screencapture location -string "${HOME}/Downloads"
|
||||
defaults write com.apple.screencapture location -string "${HOME}/Documents/04 - Pictures/Screenshots"
|
||||
|
||||
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
|
||||
defaults write com.apple.screencapture type -string "png"
|
||||
@@ -149,6 +284,12 @@ chflags nohidden ~/Library
|
||||
# Set the icon size of Dock items
|
||||
defaults write com.apple.dock tilesize -int 30
|
||||
|
||||
# Don't automatically rearrange spaces...
|
||||
defaults write com.apple.dock mru-spaces -bool false
|
||||
|
||||
# Automatically hide and show the Dock
|
||||
defaults write com.apple.dock autohide -bool true
|
||||
|
||||
# Speed up Mission Control animations
|
||||
defaults write com.apple.dock expose-animation-duration -float 0.15
|
||||
|
||||
@@ -176,19 +317,28 @@ defaults write com.apple.dock wvous-br-modifier -int 0
|
||||
# Top right screen corner → Put display to sleep
|
||||
defaults write com.apple.dock wvous-tr-corner -int 10
|
||||
defaults write com.apple.dock wvous-tr-modifier -int 0
|
||||
# Bottom left screen corner → Desktop
|
||||
defaults write com.apple.dock wvous-bl-corner -int 4
|
||||
# Bottom left screen corner → Launchpad
|
||||
defaults write com.apple.dock wvous-bl-corner -int 11
|
||||
defaults write com.apple.dock wvous-bl-modifier -int 0
|
||||
|
||||
###############################################################################
|
||||
# Safari & WebKit #
|
||||
###############################################################################
|
||||
|
||||
# Enable Safari’s debug menu
|
||||
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
|
||||
|
||||
# Set Safari’s home page to `about:blank` for faster loading
|
||||
defaults write com.apple.Safari HomePage -string "about:blank"
|
||||
|
||||
# Enable the Develop menu and the Web Inspector in Safari
|
||||
defaults write com.apple.Safari IncludeDevelopMenu -bool true
|
||||
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
|
||||
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
|
||||
|
||||
# Enable “Do Not Track”
|
||||
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true
|
||||
|
||||
# Add a context menu item for showing the Web Inspector in web views
|
||||
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
|
||||
|
||||
@@ -199,10 +349,45 @@ defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
|
||||
# Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
|
||||
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Photos #
|
||||
###############################################################################
|
||||
|
||||
# Prevent Photos from opening automatically when devices are plugged in
|
||||
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Spotlight #
|
||||
###############################################################################
|
||||
|
||||
# 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" = 0;"name" = "DIRECTORIES";}' \
|
||||
'{"enabled" = 0;"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";}' \
|
||||
|
||||
if [[ "$RUN_AS_ROOT" = true ]]; then
|
||||
# Disable Spotlight indexing for any volume that gets mounted and has not yet
|
||||
# been indexed before.
|
||||
|
||||
Reference in New Issue
Block a user