Skip to content

Commit

Permalink
Update to newes
Browse files Browse the repository at this point in the history
  • Loading branch information
hffmnn committed Apr 10, 2015
1 parent 01374c1 commit 5e62d71
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions macSetup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################

# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "hffmnn MBA"
sudo scutil --set HostName "hffmnn MBA"
sudo scutil --set LocalHostName "hffmnn-MBA"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "hffmnn-MBA"
sudo scutil --set ComputerName "hffmnn MBP"
sudo scutil --set HostName "hffmnn MBP"
sudo scutil --set LocalHostName "hffmnn-MBP"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "hffmnn-MBP"

# Set standby delay to 2 hours (default is 1 hour)
sudo pmset -a standbydelay 7200
sudo pmset -a standbydelay 3600

# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
Expand Down Expand Up @@ -134,8 +134,8 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeF
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

# Enable access for assistive devices
echo -n 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled > /dev/null 2>&1
sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled
#echo -n 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled > /dev/null 2>&1
#sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled
# TODO: avoid GUI password prompt somehow (http://apple.stackexchange.com/q/60476/4408)
#sudo osascript -e 'tell application "System Events" to set UI elements enabled to true'

Expand Down Expand Up @@ -276,8 +276,8 @@ defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
#/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist

# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`, `Nlsv`
defaults write com.apple.finder FXPreferredViewStyle -string "Flwv"

# Disable the warning before emptying the Trash
#defaults write com.apple.finder WarnOnEmptyTrash -bool false
Expand All @@ -289,14 +289,14 @@ defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true

# Enable the MacBook Air SuperDrive on any Mac
sudo nvram boot-args="mbasd=1"
#sudo nvram boot-args="mbasd=1"

# Show the ~/Library folder
chflags nohidden ~/Library

# 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"
#file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns
#[ -e "$file" ] && mv -f "$file" "$file.bak"

###############################################################################
# Dock, Dashboard, and hot corners #
Expand Down Expand Up @@ -347,7 +347,7 @@ defaults write com.apple.dock autohide-delay -float 0
#defaults write com.apple.dock no-glass -bool true

# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
#defaults write com.apple.dock autohide -bool true

# Make Dock icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
Expand Down Expand Up @@ -445,8 +445,8 @@ defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
###############################################################################

# Disable send and reply animations in Mail.app
defaults write com.apple.mail DisableReplyAnimations -bool true
defaults write com.apple.mail DisableSendAnimations -bool true
#defaults write com.apple.mail DisableReplyAnimations -bool true
#defaults write com.apple.mail DisableSendAnimations -bool true

# Copy email addresses as `[email protected]` instead of `Foo Bar <[email protected]>` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
Expand All @@ -465,29 +465,29 @@ defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
# 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 file types
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";}'
#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";}'
# Load new settings before rebuilding the index
killall mds
# Make sure indexing is enabled for the main volume
sudo mdutil -i on /
# Rebuild the index from scratch
sudo mdutil -E /
#sudo mdutil -E /

###############################################################################
# Terminal #
Expand All @@ -499,8 +499,8 @@ defaults write com.apple.terminal StringEncodings -array 4
# Use a modified version of the Pro theme by default in Terminal.app
#open "$HOME/init/Mathias.terminal"
#sleep 1 # Wait a bit to make sure the theme is loaded
defaults write com.apple.terminal "Default Window Settings" -string "Homebrew"
defaults write com.apple.terminal "Startup Window Settings" -string "Homebrew"
#defaults write com.apple.terminal "Default Window Settings" -string "Homebrew"
#defaults write com.apple.terminal "Startup Window Settings" -string "Homebrew"

# Enable “focus follows mouse” for Terminal.app and all X11 apps
# i.e. hover over a window and start typing in it without clicking first
Expand Down

0 comments on commit 5e62d71

Please sign in to comment.