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