├── Brewfile ├── Caskfile ├── README.md ├── Taps ├── bootstrap.sh ├── cask-upgrade.sh ├── dotfiles ├── .tmux.conf └── .zshrc ├── install.sh ├── settings.sh └── symlink-dotfiles.sh /Brewfile: -------------------------------------------------------------------------------- 1 | ## Productive stuff 2 | ack 3 | httpie 4 | wget 5 | packer 6 | watch 7 | 8 | ## Programming stuff 9 | rbenv 10 | ruby-build 11 | ngrok 12 | nvm 13 | npm 14 | python 15 | git 16 | git-flow 17 | 18 | ## Shell stuff 19 | zsh 20 | zsh-completions 21 | zsh-syntax-highlighting 22 | tmux 23 | tmate 24 | 25 | ## VPN stuff 26 | #tuntap 27 | #openconnect 28 | 29 | ## brew cask and more versions of casks 30 | caskroom/cask/brew-cask 31 | 32 | ## Pivotal CF cli 33 | cloudfoundry-cli 34 | 35 | ## Time-waste stuff 36 | #fortune 37 | #cowsay 38 | youtube-dl 39 | 40 | ## Games 41 | homebrew/games/ckan 42 | -------------------------------------------------------------------------------- /Caskfile: -------------------------------------------------------------------------------- 1 | ## Install a ton of great apps using Homebrew cask instead of downloading, clicking and manually installing :) 2 | 3 | ## Standard app replacements 4 | # Web 5 | google-chrome 6 | # Terminal 7 | iterm2 8 | 9 | ## Boxes 10 | # Virtualization 11 | vagrant 12 | virtualbox 13 | # Containers 14 | dockertoolbox 15 | 16 | ## Coding 17 | # SourceTree 18 | #sourcetree 19 | # Text editing 20 | #sublime-text3 21 | atom 22 | # Markdown 23 | #macdown 24 | 25 | ## Desktop 26 | # Proper screen ligthing 27 | flux 28 | # QuickLook plugins 29 | qlcolorcode qlstephen qlmarkdown quicklook-json betterzipql suspicious-package 30 | # Window management 31 | spectacle 32 | # Logitech Unifying software for keyboard and trackball 33 | logitech-unifying 34 | 35 | ## Media 36 | # Video player 37 | vlc 38 | # PDF reader 39 | skim 40 | # Picture viewer 41 | xee 42 | # Comic reader 43 | #simple-comic 44 | # Sonos music manager 45 | sonos 46 | # Soundcloud client (yes, that's the correct spelling) 47 | soundcleod 48 | # Adobe Flash 49 | flash 50 | # Podcast player 51 | #instacast 52 | # Music player - install vox from App Store instead 53 | # Spotify player 54 | spotify 55 | 56 | 57 | ## Work 58 | # Screen recording 59 | screenflow 60 | # Note taking 61 | #evernote 62 | #nvalt 63 | # VMware View 64 | vmware-horizon-view-client 65 | # Collaboration 66 | #slack - use App store instead 67 | # Podcast cleanup 68 | #levelator 69 | audio-hijack 70 | 71 | ## Cloud resources 72 | google-cloud-sdk 73 | 74 | ## Social 75 | # Skype 76 | skype 77 | 78 | ## Storage 79 | # Online storage 80 | dropbox 81 | google-drive 82 | # Compression 83 | keka 84 | # Management 85 | filezilla 86 | 87 | ## Games 88 | # Steam client - now possible to stream games from the gaming rig to the Mac! 89 | steam 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | osx-bootstrap 2 | ============= 3 | 4 | *Updated to work on OS X Yosemite 10.10.1* 5 | 6 | #### Bootstrap for new OS X installs 7 | 8 | These files will install a bunch of great tools on your newly installed Mac. If it's not a brand new install of OS X you'll most probably be able to use these anyway :) 9 | 10 | ## Quick Start 11 | 12 | (**Not recommended:** Customized to my environment) 13 | 14 | Run the following command to do a proper install of Homebrew, cask, oh-my-zsh, and a bunch of great tools and apps: 15 | 16 | ``` 17 | curl --silent https://raw.githubusercontent.com/jonasrosland/osx-bootstrap/master/install.sh | sh 18 | ``` 19 | 20 | ## Customize Install 21 | 22 | Names and directories are hardcoded into this project right now, so it makes more sense to take a few steps before leveraging this tool. To make it yours be sure to: 23 | 24 | * `git clone https://github.com/jonasrosland/osx-bootstrap.git` to get these files locally 25 | * Edit `install.sh` and define your `$dir` directory 26 | * Edit `settings.sh` and name your computer 27 | * Edit `symlink-dotfiles.sh` and define your `$dev` directory 28 | * Review and customize the apps installed from Brewfile & Caskfile 29 | 30 | When you're all set, run `bash bootstrap.sh` to let the games begin! 31 | 32 | ## Requirements 33 | 34 | You'll need to have OS X Command Line Tools installed to use git, which will be installed automatically when you're trying to use git for the first time (during homebrew installation); you'll get a nice pop-up window asking you to install it, so let it do that for you. If you want to you can remove the OSX CLT afterwards as you'll probably install newer versions of these tools anyway. 35 | 36 | ## settings.sh 37 | 38 | Some sane settings for me, use them at your own risk! 39 | 40 | ## Cask upgrades 41 | 42 | You can use the `cask-upgrade.sh` script to upgrade your Casks! 43 | -------------------------------------------------------------------------------- /Taps: -------------------------------------------------------------------------------- 1 | ## brew cask and more versions of casks 2 | caskroom/versions 3 | 4 | ## Add tap for Pivotal 5 | pivotal/tap 6 | 7 | ## Tap for packer 8 | homebrew/binary 9 | 10 | ## Tap for tmate 11 | nviennot/tmate 12 | -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | # Install Homebrew (http://brew.sh) 2 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 3 | 4 | # Update Homebrew 5 | brew update 6 | 7 | # Install oh-my-zsh to beautify and manage zsh 8 | curl -L http://install.ohmyz.sh | sh 9 | 10 | # install brew taps, needs to be fixed properly later 11 | while read in; do brew tap "$in"; done < Taps 12 | 13 | # Install brews 14 | brew install $(cat Brewfile|grep -v "#") 15 | 16 | # Install casks 17 | brew cask install $(cat Caskfile|grep -v "#") 18 | 19 | # Set standard settings 20 | source 'settings.sh' 21 | source 'symlink-dotfiles.sh' 22 | 23 | # Update OS X 24 | sudo softwareupdate -i -a 25 | -------------------------------------------------------------------------------- /cask-upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # From https://github.com/caskroom/homebrew-cask/issues/309#issuecomment-17972519 by vitorgalvao 4 | 5 | brew cask update 6 | 7 | caskApps=$(ls /opt/homebrew-cask/Caskroom/) # Lists the casks in the Caskroom 8 | 9 | echo "Apps to check: " $caskApps 10 | 11 | for app in ${caskApps}; do # For every app there, do this 12 | echo "Checking: " $app 13 | 14 | appToCheck=$(brew cask list | grep "${app}") # If the app is not present in `brew cask list`, this variable will be empty 15 | 16 | if [[ -z "${appToCheck}" ]]; then # If the variable is empty, then 17 | echo $app " is not in your list of installed apps, so will install it" 18 | brew cask install --force "${app}" # Force an install of the app 19 | fi 20 | done 21 | -------------------------------------------------------------------------------- /dotfiles/.tmux.conf: -------------------------------------------------------------------------------- 1 | # remap prefix to Control + a 2 | unbind C-b 3 | set -g prefix C-a 4 | bind C-a send-prefix 5 | 6 | # force a reload of the config file 7 | unbind r 8 | bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." 9 | 10 | bind -n M-Left select-pane -L 11 | bind -n M-Right select-pane -R 12 | bind -n M-Up select-pane -U 13 | bind -n M-Down select-pane -D 14 | 15 | 16 | set -g base-index 1 17 | 18 | unbind '"' 19 | unbind % 20 | 21 | bind-key | split-window -h 22 | bind-key - split-window -v 23 | bind-key + resize-pane -Z 24 | 25 | 26 | 27 | set -g history-limit 5000 28 | 29 | #set -g mode-mouse on 30 | #set -g mouse-select-window on 31 | #set -g mouse-select-pane on 32 | #set -g mouse-resize-pane on 33 | 34 | 35 | #setw -g monitor-activity on 36 | #set -g visual-activity on 37 | 38 | set-option -g pane-border-fg green 39 | set-option -g pane-border-bg black 40 | 41 | 42 | 43 | 44 | set-option -g display-time 1000 45 | set-window-option -g pane-base-index 1 46 | 47 | setw -g automatic-rename on 48 | setw -g allow-rename off 49 | 50 | 51 | #set -g status-right-length 60 52 | #set -g status-right 'B: #(~/.battery.zsh) | %a %I:%M' 53 | 54 | # set-option -g default-command "reattach-to-user-namespace -l zsh" 55 | # bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" 56 | # bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" 57 | 58 | # Clear the current pane AND clear the pane's history 59 | 60 | bind C-k send-keys 'C-l'\; clear-history 61 | # 62 | # if-shell '[[ `uname` == "Linux" ]]' 'source-file /usr/lib/python2.6/site-packages/Powerline-beta-py2.6.egg/powerline/bindings/tmux/powerline.conf' 63 | # if-shell '[[ `uname` == "Darwin" ]]' 'source-file /Library/Python/2.7/site-packages/Powerline-beta-py2.7.egg/powerline/bindings/tmux/powerline.conf' 64 | # 65 | 66 | 67 | 68 | #set -g status on 69 | 70 | #set -g status-left-length 20 71 | #if-shell '[[ `uname` == "Darwin" ]]' 'set -g status-right "#(eval powerline -p /Volumes/DataDisk/mcowger/.config/powerline.osx tmux right)"' 72 | #if-shell '[[ `uname` == "Linux" ]]' 'set -g status-right "#(eval powerline -p /home/mcowger/.config/powerline.linux tmux right)"' 73 | 74 | #if-shell '[[ `uname` == "Darwin" ]]' 'display-message "Darwin"' 75 | #if-shell '[[ `uname` == "Linux" ]]' 'display-message "Linux"' 76 | 77 | 78 | #set -g status-right-length 150 79 | 80 | set-window-option -g window-status-fg colour249 81 | set-window-option -g window-status-activity-attr none 82 | set-window-option -g window-status-bell-attr none 83 | set-window-option -g window-status-activity-fg yellow 84 | set-window-option -g window-status-bell-fg red 85 | set-window-option -g xterm-keys on 86 | 87 | set -g status-interval 10 88 | set -g status-fg white 89 | set -g status-bg black 90 | set -g status-left '(#S) ' 91 | set -g status-utf8 on 92 | 93 | set -g window-status-format '#I:#W#F' 94 | set -g window-status-current-format '#[fg=red,bold]#I:#W#F' 95 | 96 | bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" 97 | bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" 98 | bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' 99 | 100 | 101 | -------------------------------------------------------------------------------- /dotfiles/.zshrc: -------------------------------------------------------------------------------- 1 | # Path to your oh-my-zsh installation. 2 | export ZSH=$HOME/.oh-my-zsh 3 | fpath=(/usr/local/share/zsh-completions $fpath) 4 | 5 | # Set name of the theme to load. 6 | # Look in ~/.oh-my-zsh/themes/ 7 | # Optionally, if you set this to "random", it'll load a random theme each 8 | # time that oh-my-zsh is loaded. 9 | ZSH_THEME="ys" 10 | 11 | # Example aliases 12 | # alias zshconfig="mate ~/.zshrc" 13 | # alias ohmyzsh="mate ~/.oh-my-zsh" 14 | 15 | # Uncomment the following line to use case-sensitive completion. 16 | # CASE_SENSITIVE="true" 17 | 18 | # Uncomment the following line to disable bi-weekly auto-update checks. 19 | # DISABLE_AUTO_UPDATE="true" 20 | 21 | # Uncomment the following line to change how often to auto-update (in days). 22 | # export UPDATE_ZSH_DAYS=13 23 | 24 | # Uncomment the following line to disable colors in ls. 25 | # DISABLE_LS_COLORS="true" 26 | 27 | # Uncomment the following line to disable auto-setting terminal title. 28 | # DISABLE_AUTO_TITLE="true" 29 | 30 | # Uncomment the following line to disable command auto-correction. 31 | # DISABLE_CORRECTION="true" 32 | 33 | # Uncomment the following line to display red dots whilst waiting for completion. 34 | # COMPLETION_WAITING_DOTS="true" 35 | 36 | # Uncomment the following line if you want to disable marking untracked files 37 | # under VCS as dirty. This makes repository status check for large repositories 38 | # much, much faster. 39 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 40 | 41 | # Uncomment the following line if you want to change the command execution time 42 | # stamp shown in the history command output. 43 | # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 44 | # HIST_STAMPS="mm/dd/yyyy" 45 | 46 | # Would you like to use another custom folder than $ZSH/custom? 47 | # ZSH_CUSTOM=/path/to/new-custom-folder 48 | 49 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 50 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 51 | # Example format: plugins=(rails git textmate ruby lighthouse) 52 | plugins=(git brew brew-cask history-substring-search) 53 | 54 | source $ZSH/oh-my-zsh.sh 55 | if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi 56 | # User configuration 57 | 58 | # export MANPATH="/usr/local/man:$MANPATH" 59 | 60 | # You may need to manually set your language environment 61 | # export LANG=en_US.UTF-8 62 | 63 | # Preferred editor for local and remote sessions 64 | # if [[ -n $SSH_CONNECTION ]]; then 65 | # export EDITOR='vim' 66 | # else 67 | # export EDITOR='mvim' 68 | # fi 69 | 70 | # Compilation flags 71 | # export ARCHFLAGS="-arch x86_64" 72 | 73 | # ssh 74 | # export SSH_KEY_PATH="~/.ssh/dsa_id" 75 | 76 | source $(brew --prefix nvm)/nvm.sh 77 | eval "$(docker-machine env local 2>/dev/null)" 78 | 79 | #bindkey "\e[1~" beginning-of-line 80 | #bindkey "\e[4~" end-of-line 81 | 82 | # Skip forward/back a word with opt-arrow 83 | bindkey '[C' forward-word 84 | bindkey '[D' backward-word 85 | 86 | # Skip to start/end of line with cmd-arrow 87 | bindkey '[E' beginning-of-line 88 | bindkey '[F' end-of-line 89 | 90 | # Delete word with opt-backspace/opt-delete 91 | bindkey '[G' backward-kill-word 92 | bindkey '[H' kill-word 93 | 94 | # Delete line with cmd-backspace 95 | bindkey '[I' kill-whole-line 96 | 97 | # added by travis gem 98 | [ -f /Users/jonas/.travis/travis.sh ] && source /Users/jonas/.travis/travis.sh 99 | source '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc' 100 | source '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc' 101 | 102 | export PATH="/usr/local/sbin:$PATH" 103 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | dir="$HOME/Developer/jonasrosland" 2 | mkdir -p $dir 3 | cd $dir 4 | git clone --recursive https://github.com/jonasrosland/osx-bootstrap.git 5 | cd osx-bootstrap 6 | bash bootstrap.sh 7 | -------------------------------------------------------------------------------- /settings.sh: -------------------------------------------------------------------------------- 1 | # Some stuff was taken from 2 | # https://github.com/mathiasbynens/dotfiles/blob/master/.osx 3 | # and 4 | # https://github.com/paulmillr/dotfiles/blob/master/etc/osx.sh 5 | 6 | # General 7 | # ======= 8 | # Set computer name (as done via System Preferences → Sharing) 9 | sudo scutil --set ComputerName "earth" 10 | sudo scutil --set HostName "earth" 11 | sudo scutil --set LocalHostName "earth" 12 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "earth" 13 | 14 | # Restart automatically if the computer freezes 15 | sudo systemsetup -setrestartfreeze on 16 | 17 | # Check for software updates daily, not just once per week 18 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 19 | 20 | #Enabling full keyboard access for all controls (e.g. enable Tab in modal dialogs 21 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 22 | 23 | 24 | # Screen 25 | # ====== 26 | 27 | # Save screenshots to the downlaods. 28 | defaults write com.apple.screencapture location "$HOME/Downloads/" 29 | 30 | # Bottom right screen corner → Start screen saver 31 | defaults write com.apple.dock wvous-br-corner -int 5 32 | defaults write com.apple.dock wvous-br-modifier -int 0 33 | 34 | # Sound 35 | # ===== 36 | #Disable the Startup Chime 37 | sudo nvram SystemAudioVolume=" " 38 | 39 | 40 | # Trackpad 41 | # ======== 42 | 43 | # Trackpad: enable tap to click for this user and for the login screen 44 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 45 | defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 46 | defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 47 | sudo defaults write com.apple.AppleMultitouchTrackpad Clicking 1 48 | 49 | #Secondary click 50 | defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -bool true 51 | 52 | 53 | # Finder 54 | # ====== 55 | 56 | # Finder: show all filename extensions 57 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 58 | 59 | # Finder: show status bar 60 | defaults write com.apple.finder ShowStatusBar -bool true 61 | 62 | # Finder: show path bar 63 | defaults write com.apple.finder ShowPathbar -bool true 64 | 65 | # When performing a search, search the current folder by default 66 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 67 | 68 | # Disable the warning when changing a file extension 69 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 70 | 71 | # Disable the warning before emptying the Trash 72 | defaults write com.apple.finder WarnOnEmptyTrash -bool false 73 | 74 | # Avoid creating .DS_Store files on network volumes 75 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 76 | 77 | # Use list view in all Finder windows by default 78 | # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` 79 | defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" 80 | 81 | # Show the ~/Library folder 82 | chflags nohidden ~/Library 83 | 84 | # Remove duplicates in the “Open With” menu (also see `lscleanup` alias) 85 | /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /symlink-dotfiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Most of this is from https://github.com/paulmillr/dotfiles/blob/master/symlink-dotfiles.sh 3 | 4 | dev="$HOME/Developer" 5 | dotfiles="$dev/jonasrosland/osx-bootstrap/dotfiles" 6 | 7 | if [[ -d "$dotfiles" ]]; then 8 | echo "Symlinking dotfiles from $dotfiles" 9 | else 10 | echo "$dotfiles does not exist" 11 | exit 1 12 | fi 13 | 14 | link() { 15 | from="$1" 16 | to="$2" 17 | echo "Linking '$from' to '$to'" 18 | rm -f "$to" 19 | ln -s "$from" "$to" 20 | } 21 | 22 | for location in $dotfiles/.{zshrc,tmux.conf} ; do 23 | file="${location##*/}" 24 | file="${file%.sh}" 25 | link "$location" "$HOME/$file" 26 | done 27 | --------------------------------------------------------------------------------