From a39f50bc24cded04f016067a1ad227d3b82c5f3e Mon Sep 17 00:00:00 2001 From: Junv Zhao Date: Sun, 13 Mar 2016 18:21:35 +0800 Subject: [PATCH] remove some useless configuration and add brew install htop and gitextras --- .osx | 112 ++++++++++++++++++++++++++++---------------------------- brew.sh | 7 +++- 2 files changed, 61 insertions(+), 58 deletions(-) diff --git a/.osx b/.osx index e7b0bc9..f5694db 100755 --- a/.osx +++ b/.osx @@ -47,7 +47,7 @@ defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.5 defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 # Always show scrollbars -defaults write NSGlobalDomain AppleShowScrollBars -string "Always" +defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic" # Possible values: `WhenScrolling`, `Automatic` and `Always` # Disable the over-the-top focus ring animation @@ -115,7 +115,7 @@ sudo systemsetup -setcomputersleep Off > /dev/null defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 # Disable Notification Center and remove the menu bar icon -launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null +# launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null # Disable smart quotes as they’re annoying when typing code defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false @@ -186,13 +186,13 @@ defaults write NSGlobalDomain KeyRepeat -int 0 # 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" "nl" -defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR" -defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" -defaults write NSGlobalDomain AppleMetricUnits -bool true +# defaults write NSGlobalDomain AppleLanguages -array "en" "nl" +# defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR" +# defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" +# defaults write NSGlobalDomain AppleMetricUnits -bool true # Set the timezone; see `sudo systemsetup -listtimezones` for other values -sudo systemsetup -settimezone "Europe/Brussels" > /dev/null +sudo systemsetup -settimezone "Asia/Chongqing" > /dev/null # Disable auto-correct defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false @@ -236,7 +236,7 @@ defaults write com.apple.finder DisableAllAnimations -bool true # Set Desktop as the default location for new Finder windows # For other paths, use `PfLo` and `file:///full/path/here/` defaults write com.apple.finder NewWindowTarget -string "PfDe" -defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" +defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/" # Show icons for hard drives, servers, and removable media on the desktop defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true @@ -245,7 +245,7 @@ defaults write com.apple.finder ShowMountedServersOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true # Finder: show hidden files by default -#defaults write com.apple.finder AppleShowAllFiles -bool true +defaults write com.apple.finder AppleShowAllFiles -bool true # Finder: show all filename extensions defaults write NSGlobalDomain AppleShowAllExtensions -bool true @@ -280,9 +280,9 @@ defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true # Automatically open a new Finder window when a volume is mounted -defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true -defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true -defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true +# defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true +# defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true +# defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true # Show item info near icons on the desktop and in other icon views /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist @@ -312,7 +312,7 @@ defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" # Disable the warning before emptying the Trash -defaults write com.apple.finder WarnOnEmptyTrash -bool false +# defaults write com.apple.finder WarnOnEmptyTrash -bool false # Enable AirDrop over Ethernet and on unsupported Macs running Lion defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true @@ -327,8 +327,8 @@ chflags nohidden ~/Library 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" +# 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” @@ -507,55 +507,55 @@ defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -stri defaults write com.apple.mail DisableInlineAttachmentViewing -bool true # Disable automatic spell checking -defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" +# defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" ############################################################################### # Spotlight # ############################################################################### - +# Don't config Spotlight instead of using alfred # 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 OS X 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 +# # 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 OS X 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 # diff --git a/brew.sh b/brew.sh index b47abce..2d8a476 100755 --- a/brew.sh +++ b/brew.sh @@ -38,8 +38,8 @@ brew install wget --with-iri # Install RingoJS and Narwhal. # Note that the order in which these are installed is important; # see http://git.io/brew-narwhal-ringo. -brew install ringojs -brew install narwhal +# brew install ringojs +# brew install narwhal # Install more recent versions of some OS X tools. brew install vim --override-system-vi @@ -101,5 +101,8 @@ brew install tree brew install webkit2png brew install zopfli +# Add by junv +brew install htop +brew install gitextras # Remove outdated versions from the cellar. brew cleanup