add java as cask.
This commit is contained in:
parent
7988eb7f6a
commit
a2646b035a
@ -6,12 +6,16 @@ var grid = slate.op("grid", {
|
||||
"1920x1080": {"width": 8, "height": 6}
|
||||
}
|
||||
});
|
||||
|
||||
slate.bindAll({
|
||||
"esc:cmd": hint,
|
||||
"space:alt": grid
|
||||
"space:alt": grid,
|
||||
"tab:cmd": slate.op("switch")
|
||||
});
|
||||
|
||||
slate.configAll({
|
||||
windowHintsIgnoreHiddenWindows: false,
|
||||
windowHintsShowIcons: true,
|
||||
windowHintsSpread: true
|
||||
windowHintsSpread: true,
|
||||
switchShowTitles: true
|
||||
});
|
483
resources/osx.sh
483
resources/osx.sh
@ -1,327 +1,326 @@
|
||||
function osx_config() {
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
|
||||
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
###############################################################################
|
||||
# General UI/UX #
|
||||
###############################################################################
|
||||
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
|
||||
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
||||
|
||||
# Menu bar: disable transparency
|
||||
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
|
||||
###############################################################################
|
||||
# General UI/UX #
|
||||
###############################################################################
|
||||
|
||||
# Menu bar: show remaining battery time (on pre-10.8); hide percentage
|
||||
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
|
||||
defaults write com.apple.menuextra.battery ShowTime -string "YES"
|
||||
# Menu bar: disable transparency
|
||||
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
|
||||
|
||||
# Menu bar: hide the useless Time Machine and Volume icons
|
||||
defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/Library/CoreServices/Menu Extras/AirPort.menu" "/System/Library/CoreServices/Menu Extras/Battery.menu" "/System/Library/CoreServices/Menu Extras/Clock.menu"
|
||||
# Menu bar: show remaining battery time (on pre-10.8); hide percentage
|
||||
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
|
||||
defaults write com.apple.menuextra.battery ShowTime -string "YES"
|
||||
|
||||
# Always show scrollbars
|
||||
defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic"
|
||||
# Menu bar: hide the useless Time Machine and Volume icons
|
||||
defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/Library/CoreServices/Menu Extras/AirPort.menu" "/System/Library/CoreServices/Menu Extras/Battery.menu" "/System/Library/CoreServices/Menu Extras/Clock.menu"
|
||||
|
||||
# Disable opening and closing window animations
|
||||
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
|
||||
# Always show scrollbars
|
||||
defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic"
|
||||
|
||||
# Increase window resize speed for Cocoa applications
|
||||
defaults write NSGlobalDomain NSWindowResizeTime -float 0.08
|
||||
# Disable opening and closing window animations
|
||||
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
|
||||
|
||||
# Disable the “Are you sure you want to open this application?” dialog
|
||||
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||||
# Increase window resize speed for Cocoa applications
|
||||
defaults write NSGlobalDomain NSWindowResizeTime -float 0.08
|
||||
|
||||
# Display ASCII control characters using caret notation in standard text views
|
||||
# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
|
||||
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
|
||||
# Disable the “Are you sure you want to open this application?” dialog
|
||||
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||||
|
||||
# Disable Resume system-wide
|
||||
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
|
||||
# Display ASCII control characters using caret notation in standard text views
|
||||
# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
|
||||
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
|
||||
|
||||
# Disable automatic termination of inactive apps
|
||||
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
|
||||
# Disable Resume system-wide
|
||||
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
|
||||
|
||||
# Set Help Viewer windows to non-floating mode
|
||||
defaults write com.apple.helpviewer DevMode -bool true
|
||||
# Disable automatic termination of inactive apps
|
||||
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
|
||||
|
||||
# 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 Help Viewer windows to non-floating mode
|
||||
defaults write com.apple.helpviewer DevMode -bool true
|
||||
|
||||
# Restart automatically if the computer freezes
|
||||
systemsetup -setrestartfreeze on
|
||||
# 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
|
||||
|
||||
# Never go into computer sleep mode
|
||||
systemsetup -setcomputersleep Off > /dev/null
|
||||
# Restart automatically if the computer freezes
|
||||
systemsetup -setrestartfreeze on
|
||||
|
||||
# Check for software updates daily, not just once per week
|
||||
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
|
||||
# Never go into computer sleep mode
|
||||
systemsetup -setcomputersleep Off > /dev/null
|
||||
|
||||
###############################################################################
|
||||
# Trackpad, mouse, keyboard, Bluetooth accessories, and input #
|
||||
###############################################################################
|
||||
# Check for software updates daily, not just once per week
|
||||
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
|
||||
|
||||
# Trackpad: enable tap to click for this user and for the login screen
|
||||
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
|
||||
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
|
||||
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
|
||||
###############################################################################
|
||||
# Trackpad, mouse, keyboard, Bluetooth accessories, and input #
|
||||
###############################################################################
|
||||
|
||||
# Increase sound quality for Bluetooth headphones/headsets
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
|
||||
# Trackpad: enable tap to click for this user and for the login screen
|
||||
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
|
||||
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
|
||||
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
|
||||
|
||||
# Enable full keyboard access for all controls
|
||||
# (e.g. enable Tab in modal dialogs)
|
||||
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
|
||||
# Increase sound quality for Bluetooth headphones/headsets
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
|
||||
|
||||
# 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
|
||||
# TODO: avoid GUI password prompt somehow (http://apple.stackexchange.com/q/60476/4408)
|
||||
# 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
|
||||
# Disable press-and-hold for keys in favor of key repeat
|
||||
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
|
||||
# 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
|
||||
# TODO: avoid GUI password prompt somehow (http://apple.stackexchange.com/q/60476/4408)
|
||||
|
||||
# Set a blazingly fast keyboard repeat rate
|
||||
defaults write NSGlobalDomain KeyRepeat -int 1
|
||||
# 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
|
||||
# Disable press-and-hold for keys in favor of key repeat
|
||||
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
|
||||
|
||||
# Automatically illuminate built-in MacBook keyboard in low light
|
||||
defaults write com.apple.BezelServices kDim -bool true
|
||||
# Turn off keyboard illumination when computer is not used for 5 minutes
|
||||
defaults write com.apple.BezelServices kDimTime -int 300
|
||||
# Set a blazingly fast keyboard repeat rate
|
||||
defaults write NSGlobalDomain KeyRepeat -int 1
|
||||
|
||||
# Set language and text formats
|
||||
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
|
||||
# `Inches`, and `true` with `false`.
|
||||
defaults write NSGlobalDomain AppleLanguages -array "en"
|
||||
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD"
|
||||
defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches"
|
||||
defaults write NSGlobalDomain AppleMetricUnits -bool false
|
||||
# Automatically illuminate built-in MacBook keyboard in low light
|
||||
defaults write com.apple.BezelServices kDim -bool true
|
||||
# Turn off keyboard illumination when computer is not used for 5 minutes
|
||||
defaults write com.apple.BezelServices kDimTime -int 300
|
||||
|
||||
# Disable auto-correct
|
||||
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
|
||||
# Set language and text formats
|
||||
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
|
||||
# `Inches`, and `true` with `false`.
|
||||
defaults write NSGlobalDomain AppleLanguages -array "en"
|
||||
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD"
|
||||
defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches"
|
||||
defaults write NSGlobalDomain AppleMetricUnits -bool false
|
||||
|
||||
###############################################################################
|
||||
# Screen #
|
||||
###############################################################################
|
||||
# Disable auto-correct
|
||||
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
|
||||
|
||||
# Save screenshots to the desktop
|
||||
defaults write com.apple.screencapture location -string "$HOME/Desktop"
|
||||
###############################################################################
|
||||
# Screen #
|
||||
###############################################################################
|
||||
|
||||
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
|
||||
defaults write com.apple.screencapture type -string "png"
|
||||
# Save screenshots to the desktop
|
||||
defaults write com.apple.screencapture location -string "$HOME/Desktop"
|
||||
|
||||
# Disable shadow in screenshots
|
||||
defaults write com.apple.screencapture disable-shadow -bool true
|
||||
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
|
||||
defaults write com.apple.screencapture type -string "png"
|
||||
|
||||
# Enable subpixel font rendering on non-Apple LCDs
|
||||
defaults write NSGlobalDomain AppleFontSmoothing -int 2
|
||||
# Disable shadow in screenshots
|
||||
defaults write com.apple.screencapture disable-shadow -bool true
|
||||
|
||||
# Enable HiDPI display modes (requires restart)
|
||||
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
|
||||
# Enable subpixel font rendering on non-Apple LCDs
|
||||
defaults write NSGlobalDomain AppleFontSmoothing -int 2
|
||||
|
||||
###############################################################################
|
||||
# Finder #
|
||||
###############################################################################
|
||||
# Enable HiDPI display modes (requires restart)
|
||||
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
|
||||
|
||||
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
|
||||
defaults write com.apple.finder QuitMenuItem -bool true
|
||||
###############################################################################
|
||||
# Finder #
|
||||
###############################################################################
|
||||
|
||||
# Show icons for hard drives, servers, and removable media on the desktop
|
||||
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
|
||||
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
|
||||
defaults write com.apple.finder QuitMenuItem -bool true
|
||||
|
||||
# Finder: show hidden files by default
|
||||
defaults write com.apple.finder AppleShowAllFiles -bool true
|
||||
# Show icons for hard drives, servers, and removable media on the desktop
|
||||
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
|
||||
|
||||
# Finder: show all filename extensions
|
||||
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
||||
# Finder: show hidden files by default
|
||||
defaults write com.apple.finder AppleShowAllFiles -bool true
|
||||
|
||||
# Finder: show status bar
|
||||
defaults write com.apple.finder ShowStatusBar -bool true
|
||||
# Finder: show all filename extensions
|
||||
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
||||
|
||||
# Finder: allow text selection in Quick Look
|
||||
defaults write com.apple.finder QLEnableTextSelection -bool true
|
||||
# Finder: show status bar
|
||||
defaults write com.apple.finder ShowStatusBar -bool true
|
||||
|
||||
# Display full POSIX path as Finder window title
|
||||
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
|
||||
# Finder: allow text selection in Quick Look
|
||||
defaults write com.apple.finder QLEnableTextSelection -bool true
|
||||
|
||||
# When performing a search, search the current folder by default
|
||||
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
|
||||
# Display full POSIX path as Finder window title
|
||||
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
|
||||
|
||||
# Disable the warning when changing a file extension
|
||||
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
|
||||
# When performing a search, search the current folder by default
|
||||
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
|
||||
|
||||
# Avoid creating .DS_Store files on network volumes
|
||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
|
||||
# Disable the warning when changing a file extension
|
||||
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
|
||||
|
||||
# Disable disk image verification
|
||||
defaults write com.apple.frameworks.diskimages skip-verify -bool true
|
||||
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
|
||||
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
|
||||
# Avoid creating .DS_Store files on network volumes
|
||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -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
|
||||
# Disable disk image verification
|
||||
defaults write com.apple.frameworks.diskimages skip-verify -bool true
|
||||
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
|
||||
defaults write com.apple.frameworks.diskimages skip-verify-remote -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
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
|
||||
# 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
|
||||
|
||||
# Show item info to the right of the icons on the desktop
|
||||
/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist
|
||||
# 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
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
|
||||
|
||||
# Enable snap-to-grid for icons on the desktop and in other icon views
|
||||
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
||||
# Show item info to the right of the icons on the desktop
|
||||
/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist
|
||||
|
||||
# Increase grid spacing for icons on the desktop and in other icon views
|
||||
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
|
||||
# Enable snap-to-grid for icons on the desktop and in other icon views
|
||||
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
||||
|
||||
# Increase the size of icons on the desktop and in other icon views
|
||||
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
|
||||
# Increase grid spacing for icons on the desktop and in other icon views
|
||||
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/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"
|
||||
# Increase the size of icons on the desktop and in other icon views
|
||||
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
|
||||
|
||||
# Disable the warning before emptying the Trash
|
||||
defaults write com.apple.finder WarnOnEmptyTrash -bool false
|
||||
# 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"
|
||||
|
||||
# Don't Empty Trash securely by default
|
||||
defaults write com.apple.finder EmptyTrashSecurely -bool false
|
||||
# Disable the warning before emptying the Trash
|
||||
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
|
||||
# Don't Empty Trash securely by default
|
||||
defaults write com.apple.finder EmptyTrashSecurely -bool false
|
||||
|
||||
# Show the ~/Library folder
|
||||
chflags nohidden ~/Library
|
||||
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
|
||||
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
|
||||
|
||||
# Remove Dropbox’s green checkmark icons in Finder
|
||||
file=/Applications/Dropbox.app/Contents/Resources/check.icns
|
||||
[ -e "$file" ] && mv -f "$file" "$file.bak"
|
||||
unset file
|
||||
# Show the ~/Library folder
|
||||
chflags nohidden ~/Library
|
||||
|
||||
###############################################################################
|
||||
# Dock & hot corners #
|
||||
###############################################################################
|
||||
# Remove Dropbox’s green checkmark icons in Finder
|
||||
file=/Applications/Dropbox.app/Contents/Resources/check.icns
|
||||
[ -e "$file" ] && mv -f "$file" "$file.bak"
|
||||
unset file
|
||||
|
||||
# Enable highlight hover effect for the grid view of a stack (Dock)
|
||||
defaults write com.apple.dock mouse-over-hilite-stack -bool true
|
||||
###############################################################################
|
||||
# Dock & hot corners #
|
||||
###############################################################################
|
||||
|
||||
# Set the icon size of Dock items to 36 pixels
|
||||
defaults write com.apple.dock tilesize -int 36
|
||||
# Enable highlight hover effect for the grid view of a stack (Dock)
|
||||
defaults write com.apple.dock mouse-over-hilite-stack -bool true
|
||||
|
||||
# Enable spring loading for all Dock items
|
||||
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
|
||||
# Set the icon size of Dock items to 36 pixels
|
||||
defaults write com.apple.dock tilesize -int 36
|
||||
|
||||
# Show indicator lights for open applications in the Dock
|
||||
defaults write com.apple.dock show-process-indicators -bool true
|
||||
# Enable spring loading for all Dock items
|
||||
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
|
||||
|
||||
# Don’t group windows by application in Mission Control
|
||||
# (i.e. use the old Exposé behavior instead)
|
||||
defaults write com.apple.dock expose-group-by-app -bool false
|
||||
# Show indicator lights for open applications in the Dock
|
||||
defaults write com.apple.dock show-process-indicators -bool true
|
||||
|
||||
# Don’t show Dashboard as a Space
|
||||
defaults write com.apple.dock dashboard-in-overlay -bool true
|
||||
# Don’t group windows by application in Mission Control
|
||||
# (i.e. use the old Exposé behavior instead)
|
||||
defaults write com.apple.dock expose-group-by-app -bool false
|
||||
|
||||
# Remove the auto-hiding Dock delay
|
||||
defaults write com.apple.Dock autohide-delay -float 0
|
||||
# Don’t show Dashboard as a Space
|
||||
defaults write com.apple.dock dashboard-in-overlay -bool true
|
||||
|
||||
# Enable the 2D Dock
|
||||
#defaults write com.apple.dock no-glass -bool true
|
||||
# Remove the auto-hiding Dock delay
|
||||
defaults write com.apple.Dock autohide-delay -float 0
|
||||
|
||||
# Automatically hide and show the Dock
|
||||
defaults write com.apple.dock autohide -bool true
|
||||
# Enable the 2D Dock
|
||||
#defaults write com.apple.dock no-glass -bool true
|
||||
|
||||
# Make Dock icons of hidden applications translucent
|
||||
defaults write com.apple.dock showhidden -bool true
|
||||
# Automatically hide and show the Dock
|
||||
defaults write com.apple.dock autohide -bool true
|
||||
|
||||
# Reset Launchpad
|
||||
find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
|
||||
# Make Dock icons of hidden applications translucent
|
||||
defaults write com.apple.dock showhidden -bool true
|
||||
|
||||
# Hot corners
|
||||
# Possible values:
|
||||
# 0: no-op
|
||||
# 2: Mission Control
|
||||
# 3: Show application windows
|
||||
# 4: Desktop
|
||||
# 5: Start screen saver
|
||||
# 6: Disable screen saver
|
||||
# 7: Dashboard
|
||||
# 10: Put display to sleep
|
||||
# 11: Launchpad
|
||||
# Top right screen corner → Desktop
|
||||
defaults write com.apple.dock wvous-tr-corner -int 4
|
||||
defaults write com.apple.dock wvous-tr-modifier -int 0
|
||||
defaults write com.apple.dock wvous-bl-corner -int 5
|
||||
defaults write com.apple.dock wvous-bl-modifier -int 0
|
||||
# Reset Launchpad
|
||||
find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
|
||||
|
||||
###############################################################################
|
||||
# Time Machine #
|
||||
###############################################################################
|
||||
# Hot corners
|
||||
# Possible values:
|
||||
# 0: no-op
|
||||
# 2: Mission Control
|
||||
# 3: Show application windows
|
||||
# 4: Desktop
|
||||
# 5: Start screen saver
|
||||
# 6: Disable screen saver
|
||||
# 7: Dashboard
|
||||
# 10: Put display to sleep
|
||||
# 11: Launchpad
|
||||
# Top right screen corner → Desktop
|
||||
defaults write com.apple.dock wvous-tr-corner -int 0
|
||||
defaults write com.apple.dock wvous-tr-modifier -int 0
|
||||
defaults write com.apple.dock wvous-bl-corner -int 0
|
||||
defaults write com.apple.dock wvous-bl-modifier -int 0
|
||||
|
||||
# Prevent Time Machine from prompting to use new hard drives as backup volume
|
||||
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
|
||||
###############################################################################
|
||||
# Time Machine #
|
||||
###############################################################################
|
||||
|
||||
# Disable local Time Machine backups
|
||||
hash tmutil &> /dev/null && sudo tmutil disablelocal
|
||||
# Prevent Time Machine from prompting to use new hard drives as backup volume
|
||||
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
|
||||
|
||||
###############################################################################
|
||||
# Address Book, Dashboard, iCal, TextEdit, and Disk Utility #
|
||||
###############################################################################
|
||||
# Disable local Time Machine backups
|
||||
hash tmutil &> /dev/null && sudo tmutil disablelocal
|
||||
|
||||
# Enable the debug menu in Disk Utility
|
||||
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
|
||||
defaults write com.apple.DiskUtility advanced-image-options -bool true
|
||||
###############################################################################
|
||||
# Address Book, Dashboard, iCal, TextEdit, and Disk Utility #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Mac App Store #
|
||||
###############################################################################
|
||||
# Enable the debug menu in Disk Utility
|
||||
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
|
||||
defaults write com.apple.DiskUtility advanced-image-options -bool true
|
||||
|
||||
# Enable the WebKit Developer Tools in the Mac App Store
|
||||
defaults write com.apple.appstore WebKitDeveloperExtras -bool true
|
||||
###############################################################################
|
||||
# Mac App Store #
|
||||
###############################################################################
|
||||
|
||||
# Enable Debug Menu in the Mac App Store
|
||||
defaults write com.apple.appstore ShowDebugMenu -bool true
|
||||
# Enable the WebKit Developer Tools in the Mac App Store
|
||||
defaults write com.apple.appstore WebKitDeveloperExtras -bool true
|
||||
|
||||
###############################################################################
|
||||
# Google Chrome & Google Chrome Canary #
|
||||
###############################################################################
|
||||
# Enable Debug Menu in the Mac App Store
|
||||
defaults write com.apple.appstore ShowDebugMenu -bool true
|
||||
|
||||
# Allow installing user scripts via GitHub or Userscripts.org
|
||||
defaults write com.google.Chrome ExtensionInstallSources -array "https://*.github.com/*" "http://userscripts.org/*"
|
||||
defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://*.github.com/*" "http://userscripts.org/*"
|
||||
###############################################################################
|
||||
# Google Chrome & Google Chrome Canary #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Transmission.app #
|
||||
###############################################################################
|
||||
# Allow installing user scripts via GitHub or Userscripts.org
|
||||
defaults write com.google.Chrome ExtensionInstallSources -array "https://*.github.com/*" "http://userscripts.org/*"
|
||||
defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://*.github.com/*" "http://userscripts.org/*"
|
||||
|
||||
# Use `~/Documents/Torrents` to store incomplete downloads
|
||||
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
|
||||
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents"
|
||||
###############################################################################
|
||||
# Transmission.app #
|
||||
###############################################################################
|
||||
|
||||
# Don’t prompt for confirmation before downloading
|
||||
defaults write org.m0k.transmission DownloadAsk -bool false
|
||||
# Use `~/Documents/Torrents` to store incomplete downloads
|
||||
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
|
||||
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents"
|
||||
|
||||
# Trash original torrent files
|
||||
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true
|
||||
# Don’t prompt for confirmation before downloading
|
||||
defaults write org.m0k.transmission DownloadAsk -bool false
|
||||
|
||||
# Hide the donate message
|
||||
defaults write org.m0k.transmission WarningDonate -bool false
|
||||
# Hide the legal disclaimer
|
||||
defaults write org.m0k.transmission WarningLegal -bool false
|
||||
}
|
||||
# Trash original torrent files
|
||||
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true
|
||||
|
||||
# Hide the donate message
|
||||
defaults write org.m0k.transmission WarningDonate -bool false
|
||||
# Hide the legal disclaimer
|
||||
defaults write org.m0k.transmission WarningLegal -bool false
|
||||
|
39
tasks/osx.py
39
tasks/osx.py
@ -12,19 +12,23 @@ def all(ctx):
|
||||
brew_install(ctx)
|
||||
brew_cask(ctx)
|
||||
setup_cocoa_emacs(ctx)
|
||||
enable_access_for_assistive_devices(ctx)
|
||||
osx_config(ctx)
|
||||
|
||||
|
||||
macvim_install = ("macvim --override-system-vim --custom-system-icons "
|
||||
"--with-features=huge --enable-rubyinterp "
|
||||
"--enable-pythoninterp --enable-perlinterp --enable-cscope")
|
||||
ESSENTIAL = (
|
||||
"emacs --cocoa --srgb --with-x", "tmux", "python --with-brewed-openssl", "htop", "zsh", "make",
|
||||
"macvim --override-system-vim --custom-system-icons --with-features=huge "
|
||||
"--enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-cscope"
|
||||
"emacs --cocoa --srgb --with-x", "tmux", "python --with-brewed-openssl",
|
||||
"htop", "zsh", "make", macvim_install
|
||||
)
|
||||
BASICS=(
|
||||
BASICS = (
|
||||
"findutils", "coreutils", "binutils", "diffutils", "ed --default-names",
|
||||
"gawk", "gnu-indent --default-names", "gnu-sed --default-names",
|
||||
"gnu-tar --default-names", "gnu-which --default-names", "gnutls --default-names",
|
||||
"grep --default-names", "gzip", "watch", "wdiff --with-gettext", "wget --enable-iri"
|
||||
"gnu-tar --default-names", "gnu-which --default-names",
|
||||
"gnutls --default-names", "grep --default-names", "gzip", "watch",
|
||||
"wdiff --with-gettext", "wget --enable-iri"
|
||||
)
|
||||
SHOULD_INSTALL = (
|
||||
"nmap", "readline", "netcat", "reattach-to-user-namespace", "daemonize",
|
||||
@ -34,15 +38,15 @@ SHOULD_INSTALL = (
|
||||
MISC = ("file-formula", "less", "openssh --with-brewed-openssl",
|
||||
"perl518", "rsync", "svn", "unzip", "docker", "boot2docker", "pandoc",
|
||||
"mercurial")
|
||||
CASKS = ('caffeine', 'flux', 'google-chrome', 'iterm2', 'spotify',
|
||||
'vlc', 'virtualbox', 'xquartz', 'synergy', 'slate', 'seil')
|
||||
CASKS = ('caffeine', 'flux', 'google-chrome', 'iterm2', 'spotify', 'synergy',
|
||||
'virtualbox', 'xquartz', 'slate', 'java', 'vlc', 'seil',)
|
||||
|
||||
|
||||
@ctask
|
||||
def osx_config(ctx):
|
||||
ctx.run('source {0}; osx_config'.format(
|
||||
ctx.run('sudo {0}'.format(
|
||||
os.path.join(util.RESOURCES_DIRECTORY, 'osx.sh')
|
||||
))
|
||||
), pty=True)
|
||||
|
||||
|
||||
@ctask
|
||||
@ -81,25 +85,26 @@ def setup_cocoa_emacs(ctx):
|
||||
|
||||
APPS_NEEDING_ASSISTIVE_DEVICE_ACCESS = ('Slate', 'Synergy', 'iTerm')
|
||||
@ctask
|
||||
def enable_access_for_assitive_devices(ctx):
|
||||
def enable_access_for_assistive_devices(ctx):
|
||||
for app in APPS_NEEDING_ASSISTIVE_DEVICE_ACCESS:
|
||||
app_string = '/Applications/{0}.app'.format(app)
|
||||
user_application = os.path.expanduser('~' + app_string)
|
||||
if os.path.exists(user_application):
|
||||
ctx.run(
|
||||
'source ~/.zshrc && '
|
||||
'enable_access_for_assitive_devices "{0}"'.format(
|
||||
'zsh -c "source ~/.zshrc && '
|
||||
'enable_access_for_assistive_devices \"{0}\""'.format(
|
||||
user_application
|
||||
)
|
||||
)
|
||||
|
||||
if os.path.exists(app_string):
|
||||
ctx.run(
|
||||
'source ~/.zshrc && '
|
||||
'enable_access_for_assitive_devices "{0}"'.format(app_string)
|
||||
'zsh -c "source ~/.zshrc && '
|
||||
'enable_access_for_assistive_devices \"{0}\""'.format(
|
||||
app_string
|
||||
)
|
||||
)
|
||||
|
||||
@ctask
|
||||
def get_command_line_tools(ctx):
|
||||
if not command_exists('gcc'):
|
||||
if not util.command_exists('gcc'):
|
||||
ctx.run('xcode-select --install')
|
||||
|
Loading…
Reference in New Issue
Block a user