-
-
Save m3ta4a/5191758 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://gist.github.com/jakeva/5191758/raw/hack.sh | sh | |
# | |
sudo -v | |
echo "Setting your computer name (as done via System Preferences Sharing)" | |
echo "What would you like it to be?" | |
read -p "Enter Name: " COMPUTER_NAME | |
echo "Setting ComputerName to $COMPUTER_NAME" | |
sudo scutil --set ComputerName $COMPUTER_NAME | |
echo "Setting HostName to $COMPUTER_NAME" | |
sudo scutil --set HostName $COMPUTER_NAME | |
echo "Setting LocalHostName to $COMPUTER_NAME" | |
sudo scutil --set LocalHostName $COMPUTER_NAME | |
echo "Setting NetBIOSName to $COMPUTER_NAME" | |
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $COMPUTER_NAME | |
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)" | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
#echo "Enable subpixel font rendering on non-Apple LCDs" | |
#defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
echo "Enable iTunes track notifications in the Dock" | |
defaults write com.apple.dock itunes-notifications -bool true | |
echo "Show all filename extensions in Finder" | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
echo "Use current directory as default search scope in Finder" | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
echo "Show Path bar in Finder" | |
defaults write com.apple.finder ShowPathbar -bool true | |
echo "Show Status bar in Finder" | |
defaults write com.apple.finder ShowStatusBar -bool true | |
echo "Expanding the save panel by default" | |
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true | |
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true | |
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true | |
echo "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 | |
echo "Disable the “Are you sure you want to open this application?” dialog" | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
echo "Disable auto-correct" | |
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false | |
echo "Display full POSIX path as Finder window title" | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
echo "Avoid creating .DS_Store files on network volumes" | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
echo "Disable the warning when changing a file extension" | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
echo "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 | |
echo "Enable tap to click (Trackpad)" | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | |
echo "Enable Safari’s debug menu" | |
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true | |
echo "Make Safari’s search banners default to Contains instead of Starts With" | |
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false | |
echo "Add a context menu item for showing the Web Inspector in web views" | |
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true | |
echo "Only use UTF-8 in Terminal.app" | |
defaults write com.apple.terminal StringEncodings -array 4 | |
echo "Show the ~/Library folder" | |
chflags nohidden ~/Library | |
echo "Use column view in all Finder windows by default" | |
defaults write com.apple.finder FXPreferredViewStyle Clmv | |
echo "Disabling OS X Gate Keeper" | |
echo "(You'll be able to install any app you want from here on, not just Mac App Store apps)" | |
sudo spctl --master-disable | |
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
############################################################################### | |
# Transmission.app # | |
############################################################################### | |
echo "Auto download from ~/Downloads" | |
defaults write org.m0k.transmission AutoImport -bool true | |
defaults write org.m0k.transmission AutoImportDirectory -string "${HOME}/Downloads" | |
echo "Use `~/Downloads/Torrents/Incomplete` to store incomplete downloads" | |
defaults write def UseIncompleteDownloadFolder -bool true | |
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Torrents/Incomplete" | |
defaults write org.m0k.transmission DownloadFolder -string "${HOME}/Downloads/Torrents" | |
echo "Don't prompt for confirmation before downloading" | |
defaults write org.m0k.transmission DownloadAsk -bool false | |
defaults write org.m0k.transmission MagnetOpenAsk -bool false | |
echo "Trash original torrent files" | |
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true | |
echo "Hide the donate message" | |
defaults write org.m0k.transmission WarningDonate -bool false | |
echo "Hide the legal disclaimer" | |
defaults write org.m0k.transmission WarningLegal -bool false | |
echo "Kill affected applications" | |
for app in "Safari" "Transmission" "Finder" "Dock" "Mail" "SystemUIServer"; do killall "$app" >/dev/null 2>&1; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment