Skip to content

Commit

Permalink
Adding updates for El Cap
Browse files Browse the repository at this point in the history
  • Loading branch information
Joey Hoer committed Sep 29, 2015
1 parent cae3b7c commit 45dba1c
Show file tree
Hide file tree
Showing 20 changed files with 221 additions and 57 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2014 Joey Hoer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Take the monotony out of OS X system setup.

When configuring new Mac, or when performing a clean installation of OS X, there are a number of step tasks that may be automated, including:
When configuring a new Mac, or when performing a clean installation of OS X, there are a number of setup tasks that may be automated, including:

- The installation of 3rd party applications.
- The installation of command line tools.
Expand All @@ -16,11 +16,15 @@ Installation

Simply clone the repository, `cd` into the local `starter` repository and then:

source installer

To configure the various system and application preferences, `cd` into the local `starter` repository and then:

source starter

Tools
=====

Starter relys on Homebrew and Cask to install 3rd party applications.
Starter uses Homebrew and Cask to install 3rd party applications.

While Starter will install these tools prior to launch, it is recommended that any 'dotfiles' that may affect the the configuration of these tools be installed prior to initializing Starter.
35 changes: 35 additions & 0 deletions accept-xcode-eula.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env expect -f

set timeout -1
spawn sudo xcodebuild -license

expect {
"Password"
{
stty -echo
expect_user -re "(.*)\n"
stty echo
set pass $expect_out(1,string)
send -- "$pass\r"
exp_continue
}
"incorrect password attempts"
{
exit 1
}
"Hit the Enter key to view the license agreements"
{
send "\r"
exp_continue
}
"Press 'space' for more"
{
send " "
exp_continue
}
"By typing 'agree'"
{
send "agree\r"
exp_continue
}
}
5 changes: 4 additions & 1 deletion apps/finder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ chflags nohidden "${HOME}/Library"
mkdir -p "$HOME/bin"

# Hide user `bin` folder
chflags hidden "${HOME}/bin"
chflags -h hidden "${HOME}/bin"

# Quitting via ⌘ + Q; doing so will also hide desktop icons
#defaults write com.apple.finder QuitMenuItem -bool true
Expand Down Expand Up @@ -99,6 +99,9 @@ done
# List View : `Nlsv`
# Column View : `clmv`
# Cover Flow : `Flwv`
# After configuring preferred view style, clear all `.DS_Store` files
# to ensure settings are applied for every directory
# sudo find / -name ".DS_Store" --delete
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"

# New window target
Expand Down
9 changes: 9 additions & 0 deletions apps/hipchat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

###############################################################################
# HipChat #
###############################################################################

# Swap hotkeys for "Close Tab" and "Close Window"
defaults write com.hipchat.HipChat NSUserKeyEquivalents -dict-add "Close Tab" '@$w'
defaults write com.hipchat.HipChat NSUserKeyEquivalents -dict-add "Close Window" '@w'
45 changes: 37 additions & 8 deletions apps/terminal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,44 @@
# Only use UTF-8 in Terminal
defaults write com.apple.terminal StringEncodings -array 4

# Use a modified version of the Solarized Dark theme by default
# Use a custom theme by default in Terminal.app
TERM_PROFILE='Solarized Dark xterm-256color';
CURRENT_PROFILE="$(defaults read com.apple.terminal 'Default Window Settings')";
if [ "${CURRENT_PROFILE}" != "${TERM_PROFILE}" ]; then
open "${TERM_PROFILE}.terminal";
sleep 1; # Wait a bit to make sure the theme is loaded
defaults write com.apple.terminal 'Default Window Settings' -string "${TERM_PROFILE}";
defaults write com.apple.terminal 'Startup Window Settings' -string "${TERM_PROFILE}";
fi;
osascript <<EOD
tell application "Terminal"
local allOpenedWindows
local initialOpenedWindows
local windowID
set themeName to "$TERM_PROFILE"
# Store the IDs of all the open terminal windows.
set initialOpenedWindows to id of every window
# Open the custom theme so that it gets added to the list of available
# terminal themes (note: this will open two additional terminal windows).
do shell script "open '$HOME/init/" & themeName & ".terminal'"
# Wait a little bit to ensure that the custom theme is added.
delay 1
# Set the custom theme as the default terminal theme.
set default settings to settings set themeName
# Get the IDs of all the currently opened terminal windows.
set allOpenedWindows to id of every window
repeat with windowID in allOpenedWindows
# Close the additional windows that were opened in order to add
# the custom theme to the list of terminal themes.
if initialOpenedWindows does not contain windowID then
close (every window whose id is windowID)
# Change the theme for the initial opened terminal windows to remove
# the need to close them in order for the custom theme to be applied.
else
set current settings of tabs of (every window whose id is windowID) to settings set themeName
end if
end repeat
end tell
EOD

# Enable "focus follows mouse" for Terminal
# i.e. hover over a window and start typing in it without clicking first
Expand Down
2 changes: 1 addition & 1 deletion apps/transmission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Do

# Hide incomplete downloads folder
mkdir -p "${HOME}/Downloads/Torrents"
sudo chflags -v hidden "${HOME}/Downloads/Torrents"
sudo chflags -h hidden "${HOME}/Downloads/Torrents"

# Don’t prompt for confirmation before downloading
defaults write org.m0k.transmission DownloadAsk -bool false
Expand Down
21 changes: 13 additions & 8 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ sudo -v
# Keep-alive: update existing `sudo` time stamp until script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

# Install all available updates
sudo softwareupdate -iva

INSTALLERS=(
# Install Xcode tools
homebrew # Homebrew __must__ be installed first
ruby
node
google-fonts
xcode # XCode __must__ be installed before Homebrew
homebrew # Homebrew __must__ be installed before other tools
ruby
python
node
shells
google-fonts
)

# Sources all the preference files
function source_installers {
declare -a files=("${!1}")
echo "${files[@]}"
declare -a files=("${!1}")
echo "${files[@]}"
for file in "${files[@]}"; do
file="${2}${file}.sh"
file="${2}${file}.sh"
[ -r "$file" ] && [ -f "$file" ] && source "$file"
done;
}
Expand Down
9 changes: 6 additions & 3 deletions installers/google-fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
###############################################################################

# Install Google Fonts
mkdir -p "/Library/Fonts/Google Fonts"
git clone https://github.com/google/fonts.git "/Library/Fonts/Google Fonts"
GOOGLE_FONTS_DIR='/Library/Fonts/Google Fonts'
mkdir -p "$GOOGLE_FONTS_DIR"
if [ ! -d "$GOOGLE_FONTS_DIR"/.git ]; then
git clone https://github.com/google/fonts.git "$GOOGLE_FONTS_DIR"
fi

# Schedule Google Fonts Updates
(crontab -l 2>/dev/null; echo "0 */6 * * * sh -c \"" \
"cd '/Library/Fonts/Google Fonts' && git pull && git clean -dfqx" \
"cd '$GOOGLE_FONTS_DIR' && git pull && git clean -dfqx" \
"\" >/dev/null 2>&1") | crontab -
40 changes: 20 additions & 20 deletions installers/homebrew/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ brew update
# Upgrade any already-installed formulae
brew upgrade --all

# Install Shells
# Note: Don't forget to add shells to `/etc/shells` before running `chsh`.
brew install bash
brew install zsh
# brew install bash-completion

# Install wget with IRI support
brew install wget --with-iri

# Install GNU core utilities (those that come with OS X are outdated)
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
#brew install coreutils
Expand All @@ -24,11 +33,10 @@ brew upgrade --all
# Install GNU `sed`, overwriting the built-in `sed`
#brew install gnu-sed --default-names

# Install Shells
# Note: Don't forget to add shells to `/etc/shells` before running `chsh`.
brew install bash
#brew install bash-completion
brew install zsh
# Install more recent versions of some OS X tools
#brew install vim --override-system-vi
brew install homebrew/dupes/grep
brew install homebrew/dupes/screen

# Install Terminal Multiplexer
brew install tmux
Expand All @@ -37,19 +45,6 @@ brew install tmux
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
brew install reattach-to-user-namespace

# Install wget with IRI support
brew install wget --with-iri

# Install RingoJS and Narwhal
# Note that the order in which these are installed is important; see http://git.io/brew-narwhal-ringo.
brew install ringojs
brew install narwhal

# Install more recent versions of some OS X tools
#brew install vim --override-system-vi
brew install homebrew/dupes/grep
brew install homebrew/dupes/screen

# Install server stack
brew install homebrew/php/php56
brew install homebrew/php/php56-opcache
Expand All @@ -59,10 +54,15 @@ brew install mysql
brew install dnsmasq

# Install Python tools
#brew install python
# Installing python with Homebrew is unnecessary,
# as python will be installed and managed via pyenv
# brew install python
brew install pyenv

# Install Ruby tools
# Installing ruby with Homebrew is unnecessary,
# as python will be installed and managed via rbenv
# brew install ruby
brew install rbenv
brew install ruby-build

Expand Down Expand Up @@ -135,4 +135,4 @@ brew install pixz
brew install unar

# Remove outdated versions from the cellar
brew cleanup
brew cleanup && brew prune
1 change: 1 addition & 0 deletions installers/homebrew/Caskfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export HOMEBREW_CASK_OPTS="--appdir=/Applications"
# Install Cask
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
#brew tap caskroom/fonts

# Make sure we're using the latest Cask
brew cask update
Expand Down
12 changes: 6 additions & 6 deletions installers/mamp/mamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ cat > ${APACHE_CONF_DIR}/users/$(logname).conf <<EOF
</IfModule>
## HTTP/SSL
## HTTP `.dev`
################################################################################
<VirtualHost *:80>
<VirtualHost *.dev:80>
UseCanonicalName off
# Handle subdomains
Expand All @@ -125,7 +125,7 @@ cat > ${APACHE_CONF_DIR}/users/$(logname).conf <<EOF
VirtualDocumentRoot ${HOME}/Sites/%-2/%-3+/
</VirtualHost>
<VirtualHost *:80>
<VirtualHost *.dev:80>
UseCanonicalName off
# Handle subdomains
Expand All @@ -135,13 +135,13 @@ cat > ${APACHE_CONF_DIR}/users/$(logname).conf <<EOF
</VirtualHost>
## HTTPS/SSL
## HTTPS/SSL `.dev`
################################################################################
# Listen for secure traffic
Listen 443
<VirtualHost *:443>
<VirtualHost *.dev:443>
UseCanonicalName off
# Subdomains mapped to subdirectories
Expand All @@ -157,7 +157,7 @@ Listen 443
</IfModule>
</VirtualHost>
<VirtualHost *:443>
<VirtualHost *.dev:443>
UseCanonicalName off
# Primary domain mapped to www subdirectory
Expand Down
2 changes: 1 addition & 1 deletion installers/ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ rbenv global $ruby_latest
# Install gems from Gemfile
gem install bundler
rbenv rehash
bundle install --system
bundle install --gemfile=installers/homebrew/Gemfile --system
rbenv rehash
File renamed without changes.
2 changes: 1 addition & 1 deletion installers/xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Xcode #
###############################################################################

# Request automatic installation of the command line tools
# Install Xcode command line tools
xcode-select --install
6 changes: 6 additions & 0 deletions system/dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
# Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -bool true

# Dashboard:
# 1: Off
# 2: As Space
# 3: As Overlay
defaults write com.apple.dashboard enabled-state -int 1

# Don’t show Dashboard as a Space
defaults write com.apple.dock dashboard-in-overlay -bool true

Expand Down
Loading

0 comments on commit 45dba1c

Please sign in to comment.