Skip to content

Instantly share code, notes, and snippets.

@brra
Forked from ryanpcmcquen/.osx
Last active May 26, 2021 06:09
Show Gist options
  • Save brra/22c8e9cd822b0dacd5d301f8489e0979 to your computer and use it in GitHub Desktop.
Save brra/22c8e9cd822b0dacd5d301f8489e0979 to your computer and use it in GitHub Desktop.
.osx
#!/usr/bin/env bash
# curl -o ~/.osx https://gist.githubusercontent.com/brra/22c8e9cd822b0dacd5d301f8489e0979/raw/7eed8901dc8c537ecd8a5cce3918df14a3ca9022/.osx && bash ~/.osx
###############################################################################
# General UI/UX #
###############################################################################
# Disable smart dashes as they’re annoying when typing code.
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Disable automatic periods with a double space:
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# Disable smart quotes as they’re annoying when typing code.
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Set a shorter delay until key repeat:
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Set a blazingly fast keyboard repeat rate:
defaults write NSGlobalDomain KeyRepeat -int 2
# set finder to display full path in title bar
defaults write com.apple.finder '_FXShowPosixPathInTitle' -bool true
# stop Photos from opening automatically
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
#to revert use defaults -currentHost delete com.apple.ImageCapture disableHotPlug
##########
# Config #
##########
# Get the command line tools!
[ ! "`xcodebuild -version`" ] && \
xcodebuild -versionxcode-select --install && \
sudo xcodebuild -license accept
# Install homebrew:
[ ! "`which brew`" ] && \
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade && brew upgrade --cask
# Emacs customizations for Prelude:
if [ -d ~/.emacs.d/personal ]; then
curl -o ~/.emacs.d/personal/McQuen.el https://gist.githubusercontent.com/ryanpcmcquen/1ca6d1d7b5c8580aebef4f840e29f83a/raw/McQuen.el
else
curl -o ~/.emacs https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.emacs
fi
# Hammerspoon config:
[ -d ~/.hammerspoon ] && \
curl -o ~/.hammerspoon/init.lua https://gist.githubusercontent.com/ryanpcmcquen/3a745e30455945f43e824f70c645942d/raw/init.lua
# Sublime!
SUBLIME_MERGE_CONFIG_DIR=~/Library/Application\ Support/Sublime\ Merge/Packages/User
if [ -d "${SUBLIME_MERGE_CONFIG_DIR}" ]; then
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeMerge/Preferences.sublime-settings -P "${SUBLIME_MERGE_CONFIG_DIR}"
fi
SUBLIME_TEXT_CONFIG_DIR=~/Library/Application\ Support/Sublime\ Text/Packages/User
if [ -d "${SUBLIME_TEXT_CONFIG_DIR}" ]; then
wget -N https://raw.githubusercontent.com/ryanpcmcquen/sublime_witness/master/Witness.sublime-color-scheme -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Default.sublime-keymap -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Default.sublime-mousemap -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Preferences.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/C.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/C++.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Doxy.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/orgmode.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
fi
# Textadept:
wget -N https://gist.githubusercontent.com/ryanpcmcquen/655cb3cc60f9d064738903e59504a5fd/raw/.installLatestTextadeptMac.sh -P ~/
# Vim!
curl -o ~/.vimrc https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.vimrc
# modify appearance of dock: remove standard icons, add chrome and iTerm
if [ ! -e /usr/local/bin/dockutil ]; then
curl https://raw.githubusercontent.com/kcrawford/dockutil/master/scripts/dockutil > /usr/local/bin/dockutil
fi
chmod a+rx,go-w /usr/local/bin/dockutil
dockutil --list | awk -F\t '{print "dockutil --remove \""$1"\" --no-restart"}' | sh
dockutil --add /Applications/iTerm.app
# ZeroBrane Studio config:
[ -d ~/.zbstudio ] && \
curl -o ~/.zbstudio/user.lua https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.zbstudio/user.lua
curl -o /usr/local/bin/sync_all https://gist.githubusercontent.com/brra/22c8e9cd822b0dacd5d301f8489e0979/raw/7eed8901dc8c537ecd8a5cce3918df14a3ca9022/sync_all && chmod +x /usr/local/bin/sync_all
npm update -g
curl -o ~/.osx https://gist.githubusercontent.com/brra/22c8e9cd822b0dacd5d301f8489e0979/raw/7eed8901dc8c537ecd8a5cce3918df14a3ca9022/.osx && bash ~/.osx
git_sync
fl_sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment