diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..a023099f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,15 @@ +[submodule "zsh/pure"] + path = zsh/pure + url = https://github.com/sindresorhus/pure.git +[submodule "zsh/dircolors-solarized"] + path = zsh/dircolors-solarized + url = https://github.com/seebi/dircolors-solarized.git +[submodule "zsh/zsh-syntax-highlighting"] + path = zsh/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git +[submodule "tmux/tmuxifier"] + path = tmux/tmuxifier + url = https://github.com/jimeh/tmuxifier.git +[submodule "zsh/zsh-completions"] + path = zsh/zsh-completions + url = https://github.com/zsh-users/zsh-completions.git diff --git a/Jakefile.js b/Jakefile.js index fb0472eb..e994dea7 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -20,21 +20,19 @@ namespace('setup', function() { console.log('Linking files and dirs to your home directory...'); var cmds = [ - 'ln -s ~/dotfiles/oh-my-zsh ~/.oh-my-zsh', 'ln -s ~/dotfiles/vifm ~/.vifm', 'ln -s ~/dotfiles/vim ~/.vim', 'ln -s ~/dotfiles/agignore ~/.agignore', - 'ln -s ~/dotfiles/aliases ~/.aliases', - 'ln -s ~/dotfiles/exports ~/.exports', - 'ln -s ~/dotfiles/functions ~/.functions', 'ln -s ~/dotfiles/gitconfig ~/.gitconfig', 'ln -s ~/dotfiles/gitignore ~/.gitignore', - 'ln -s ~/dotfiles/hgignore_global ~/.hgignore_global', 'ln -s ~/dotfiles/jshintrc ~/.jshintrc', + 'ln -s ~/dotfiles/editorconf ~/.editorconf', 'ln -s ~/dotfiles/slate.js ~/.slate.js', 'ln -s ~/dotfiles/tmux.conf ~/.tmux.conf', 'ln -s ~/dotfiles/vimrc ~/.vimrc', - 'ln -s ~/dotfiles/zshrc ~/.zshrc' + 'ln -s ~/dotfiles/zshrc ~/.zshrc', + + 'ln -s ~/dotfiles/zsh/pure/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup' ]; jake.exec(cmds, function() { @@ -49,8 +47,6 @@ namespace('setup', function() { var cmds = [ 'git submodule init', 'git submodule update', - 'git submodule foreach git checkout master', - 'git submodule foreach git pull' ]; jake.exec(cmds, function() { diff --git a/README.md b/README.md index 9bf4a8b9..ef8a7aed 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,11 @@ # My dotfiles -This is a collection of my dotfiles. Requirements are: -installed and working homebrew with installed node, npm -and the node jake-plugin. And zsh :-) +This is a collection of my dotfiles. ``` git clone git://github.com/webgefrickel/dotfiles ~/dotfiles cd ~/dotfiles -jake -``` - -If you haven't configured ZSH to be your default shell yet: -restart your terminal and type - -``` -cd ~/dotfiles -jake zsh +./install/_install.sh ``` Now change the file `.gitconfig.user` in your home-folder and @@ -32,11 +22,6 @@ provide your git credentials, such as: Finally restart your terminal and vim again, and you are ready to go. -## oh-my-zsh - -I use a custom fork of the famous oh-my-zsh framework. -Have a look at the zshrc-file for custom aliases and functions. - ## VIM I use a lot of plugins and custom syntaxes. They are all diff --git a/aliases b/aliases index 758fc5c8..87380e45 100644 --- a/aliases +++ b/aliases @@ -1,23 +1,49 @@ -# aliases for apache and mysql -alias apachestart='_ /usr/sbin/apachectl start' -alias apachestop='_ /usr/sbin/apachectl stop' -alias mysqlstart='mysql.server start' -alias mysqlstop='mysql.server stop' -alias dev='apachestart && mysqlstart' -alias devs='apachestop && mysqlstop' -alias devr='devs && dev' +# always use macvim but for 'vim' +alias vim=$EDITOR +alias vi=$EDITOR +alias v=$EDITOR +alias vd='vimdiff' +alias diff='vimdiff' +alias vf='vifm' -# noglobbing aliases -alias jake='noglob jake' -alias g="noglob git" +# Easier navigation: .., ..., ~ and - +alias ~="cd ~" +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' +alias e='exit' +alias md='mkdir -p' +alias rd=rmdir +alias d='dirs -v | head -10' + + +# gnu coreutils +alias ls="gls -al --color=auto" +alias l='gls -al --color=auto' -# Gitty gitgit -- use aliases from oh-my-zsh plugins +# Gitty gitgit +alias g="git" +alias gst="git status" +alias ggpl='git pull origin $(current_branch)' +alias ggps='git push origin $(current_branch)' +alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' alias gitrm='git rm $(git ls-files --deleted)' alias gsmu='git submodule init && git submodule update' -alias em='$EDITOR $(git ls-files -m)' alias gsvn='git checkout master && git svn fetch && git merge dev && git svn rebase && git svn dcommit' +alias gmo='$EDITOR $(git ls-files -m)' + + +# aliases for apache and mysql +alias apachestart='sudo /usr/sbin/apachectl start' +alias apachestop='sudo /usr/sbin/apachectl stop' +alias mysqlstart='mysql.server start' +alias mysqlstop='mysql.server stop' +alias dev='apachestart && mysqlstart' +alias devs='apachestop && mysqlstop' +alias devr='devs && dev' # dandelion deployment shortcuts @@ -51,15 +77,6 @@ alias sysup='_ softwareupdate -i -a' alias upall='sysup && brewup && rvmup && gemup && npmup' -# always use macvim but for 'vim' -alias vim=$EDITOR -alias vi=$EDITOR -alias v=$EDITOR -alias vd='vimdiff' -alias diff='vimdiff' -alias vf='vifm' - - # easy hosts / apache / php editing alias hosts='_ vim /etc/hosts' alias vhosts='_ vim /etc/apache2/extra/httpd-vhosts.conf' @@ -74,15 +91,6 @@ vp='vagrant provision' vh='vagrant halt' -# Easier navigation: .., ..., ~ and - -alias ..='cd ..' -alias ...='cd ../..' -alias ....='cd ../../..' -alias .....='cd ../../../..' -alias l='ls -al' -alias e='exit' - - # often used folder shortcuts alias drop='cd ~/Dropbox && ls -al' alias web='cd ~/Sites && ls -al' diff --git a/editorconfig b/editorconfig new file mode 100644 index 00000000..a73c0902 --- /dev/null +++ b/editorconfig @@ -0,0 +1,16 @@ +; editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.rst] +trim_trailing_whitespace = false diff --git a/exports b/exports index 3193d898..79c90656 100644 --- a/exports +++ b/exports @@ -8,10 +8,12 @@ export SHELL=/usr/local/bin/zsh export HOMEBREW_CASK_OPTS="--appdir=/Applications" # paths +export PATH=$HOME/.rbenv/shims:$PATH export PATH=/usr/local/bin:/usr/local/sbin:$PATH -export PATH=$HOME/.rvm/bin:$PATH export PATH=$HOME/.tmuxifier/bin:$PATH +fpath=($HOME/dotfiles/zsh/zsh-completions/src $fpath) + export MANPATH=/usr/local/share/man:$MANPATH # disable stupid ._ and dsstore files @@ -28,3 +30,17 @@ export NODE_PATH=/usr/local/lib/jsctags/:$NODE_PATH # disable auto titling fixes tmux window export DISABLE_AUTO_TITLE=true +# tmuxifier +export TMUXIFIER_LAYOUT_PATH="$HOME/dotfiles/tmux" + +# grep +export GREP_OPTIONS='--color=auto' +export GREP_COLOR='1;32' + +## pager +export PAGER="less" +export LESS="-R" + +export LC_CTYPE=$LANG + +export RBENV_VERSION="2.0.0-p247" diff --git a/functions b/functions index 0a519075..f66c305c 100644 --- a/functions +++ b/functions @@ -4,6 +4,12 @@ function fname() { } +function take() { + mkdir -p $1 + cd $1 +} + + # find process by name and kill them function grepkill() { ps -axf | grep -v grep | grep "$@" | awk '{print $2}' | xargs kill @@ -16,6 +22,13 @@ function gch () { } +function current_branch() { + ref=$(git symbolic-ref HEAD 2> /dev/null) || \ + ref=$(git rev-parse --short HEAD 2> /dev/null) || return + echo ${ref#refs/heads/} +} + + # creates an archive from given directory mktar() { tar cvf "${1%%/}.tar" "${1%%/}"; } mktgz() { tar cvzf "${1%%/}.tgz" "${1%%/}"; } diff --git a/hgignore_global b/hgignore_global deleted file mode 100644 index 69b11c1a..00000000 --- a/hgignore_global +++ /dev/null @@ -1,38 +0,0 @@ -syntax: glob - -*.diff -*.err -*.orig -*.log -*.rej -*.swo -*.swp -*.vi -*.bak -*~ -.~lock* -.tmp_* -.sass-cache -*.sass-cache -.revision -_srcs -log -tmp -node_modules -.DS_Store -Thumbs.db -.cache -.project -.settings -.tmproj -*.esproj -nbproject -*.komodoproject -.komodotools -NERD_tree* -*.iws -*.ipr -*.iml -.hg -.svn -.CVS diff --git a/install/_install.sh b/install/_install.sh new file mode 100755 index 00000000..e16602bf --- /dev/null +++ b/install/_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +ln -s ~/dotfiles/agignore ~/.agignore +ln -s ~/dotfiles/editorconf ~/.editorconf +ln -s ~/dotfiles/gitconfig ~/.gitconfig +ln -s ~/dotfiles/gitignore ~/.gitignore +ln -s ~/dotfiles/jshintrc ~/.jshintrc +ln -s ~/dotfiles/slate.js ~/.slate.js +ln -s ~/dotfiles/tmux.conf ~/.tmux.conf +ln -s ~/dotfiles/vifm ~/.vifm +ln -s ~/dotfiles/vim ~/.vim +ln -s ~/dotfiles/vimrc ~/.vimrc +ln -s ~/dotfiles/zshrc ~/.zshrc +ln -s ~/dotfiles/zsh/pure/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup + +git submoulde init +git submodule update + +chsh -s `which zsh` +/usr/bin/env/ zsh +source ~/.zshrc +sudo mv /etc/zshenv /etc/zprofile diff --git a/install/brew.sh b/install/brew.sh index 14afcc4b..1972f9ac 100755 --- a/install/brew.sh +++ b/install/brew.sh @@ -12,36 +12,29 @@ brew tap phinze/homebrew-cask brew install ack brew install brew-cask brew install composer -brew install ctags +brew install coreutils brew install curl -brew install encfs -brew install fontforge brew install ghostscript brew install git brew install git-flow -brew install jpegoptim -brew install lynx brew install macvim brew install markdown brew install mcrypt -brew install mercurial brew install mysql brew install node -brew install optipng brew install phake brew install php55 brew install php55-mcrypt brew install php55-xdebug +brew install rbenv brew install reattach-to-user-namespace +brew install ruby-build brew install ssh-copy-id brew install subversion brew install the_silver_searcher brew install tmux -brew install ttf2eot brew install unrar -brew install vifm brew install wget -brew install z brew install zsh # brew cask and install software @@ -50,14 +43,12 @@ brew cask install adium brew cask install alfred brew cask install amadeus-pro brew cask install carbon-copy-cloner -brew cask install charles brew cask install doxie brew cask install dropbox brew cask install firefox brew cask install f-lux brew cask install forklift brew cask install google-chrome -brew cask install handbrake brew cask install imagealpha brew cask install imageoptim brew cask install istat-menus @@ -66,16 +57,13 @@ brew cask install key-remap4-mac-book brew cask install libre-office brew cask install miro-video-converter brew cask install opera -brew cask install osxfuse brew cask install pc-keyboardhack brew cask install sequel-pro brew cask install simple-comic brew cask install skype brew cask install slate -brew cask install sourcetree brew cask install things brew cask install timings -brew cask install tor-browser brew cask install transmission brew cask install true-crypt brew cask install vagrant diff --git a/install/osx.sh b/install/osx.sh index 54e97501..54ce8bfe 100755 --- a/install/osx.sh +++ b/install/osx.sh @@ -1,88 +1,205 @@ #!/usr/bin/env zsh - -# Disable menu bar transparency +# +# Thanks a lot to http://mths.be/osx +# +# 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 & + +############################################################################### +# General UI/UX # +############################################################################### + +# Set computer name (as done via System Preferences → Sharing) +sudo scutil --set ComputerName "frickelbook" +sudo scutil --set HostName "frickelbook" +sudo scutil --set LocalHostName "frickelbook" +sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "frickelbook" + +# Menu bar: disable transparency defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false +# Menu bar: show remaining battery time (on pre-10.8); hide percentage +defaults write com.apple.menuextra.battery ShowPercent -string "NO" +defaults write com.apple.menuextra.battery ShowTime -string "YES" + +# Disable opening and closing window animations +defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false + +# Increase window resize speed for Cocoa applications +defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 + # Expand save panel by default defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true # Expand print panel by default defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true -# Disable opening and closing window animations -defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false +# Save to disk (not to iCloud) by default +defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false -# Increase window resize speed for Cocoa applications -defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 +# Automatically quit printer app once the print jobs complete +defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true + +# Disable the “Are you sure you want to open this application?” dialog +defaults write com.apple.LaunchServices LSQuarantine -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 Resume system-wide defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false -# Disable the “reopen windows when logging back in” option -# This works, although the checkbox will still appear to be checked, -# and the command needs to be entered again for every restart. -defaults write com.apple.loginwindow TALLogoutSavesState -bool false -defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false +# Disable automatic termination of inactive apps +defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true + +# 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 + +# Disable smart quotes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false + +# Disable smart dashes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false -# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) +# Disable hibernation (speeds up entering sleep mode) +sudo pmset -a hibernatemode 0 + +# Disable the sudden motion sensor as it’s not useful for SSDs +sudo pmset -a sms 0 + +# 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 + +# Disable “natural” (Lion-style) scrolling +defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false + +# Enable full keyboard access for all controls +# (e.g. enable Tab in modal dialogs) defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 -# Enable subpixel font rendering on non-Apple LCDs -defaults write NSGlobalDomain AppleFontSmoothing -int 2 +# 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 + +# Set a blazingly fast keyboard repeat rate +defaults write NSGlobalDomain KeyRepeat -int 0 # Disable auto-correct defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false -# Disable window animations and Get Info animations in Finder +# Require password immediately after sleep or screen saver begins +defaults write com.apple.screensaver askForPassword -int 1 +defaults write com.apple.screensaver askForPasswordDelay -int 0 + +# Save screenshots to the desktop +defaults write com.apple.screencapture location -string "${HOME}/Desktop" + +# 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 + + +# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons +defaults write com.apple.finder QuitMenuItem -bool true + +# Finder: disable window animations and Get Info animations defaults write com.apple.finder DisableAllAnimations -bool true -# Show all filename extensions in 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: show hidden files by default +defaults write com.apple.finder AppleShowAllFiles -bool true + +# Finder: show all filename extensions defaults write NSGlobalDomain AppleShowAllExtensions -bool true -# Show status bar in Finder +# Finder: show status bar defaults write com.apple.finder ShowStatusBar -bool true -# Allow text selection in Quick Look -defaults write com.apple.finder QLEnableTextSelection -bool true +# Finder: show path bar +defaults write com.apple.finder ShowPathbar -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 +# Finder: allow text selection in Quick Look +defaults write com.apple.finder QLEnableTextSelection -bool true # Display full POSIX path as Finder window title defaults write com.apple.finder _FXShowPosixPathInTitle -bool true -# Avoid creating .DS_Store files on network volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true +# When performing a search, search the current folder by default +defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" # Disable the warning when changing a file extension defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false -# Show item info below desktop icons -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +# Enable spring loading for directories +defaults write NSGlobalDomain com.apple.springing.enabled -bool true -# Enable snap-to-grid for desktop icons -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy kind" ~/Library/Preferences/com.apple.finder.plist +# Remove the spring loading delay for directories +defaults write NSGlobalDomain com.apple.springing.delay -float 0 + +# Avoid creating .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores -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 + +# 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 + +# 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" # Disable the warning before emptying the Trash defaults write com.apple.finder WarnOnEmptyTrash -bool false +# Empty Trash securely by default +defaults write com.apple.finder EmptyTrashSecurely -bool true + +# Enable AirDrop over Ethernet and on unsupported Macs running Lion +defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true + # Show the ~/Library folder chflags nohidden ~/Library -# Enable highlight hover effect for the grid view of a stack (Dock) -defaults write com.apple.dock mouse-over-hilte-stack -bool true - # Enable spring loading for all Dock items defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true -# Show indicator lights for open applications in the Dock -defaults write com.apple.dock show-process-indicators -bool true +# Speed up Mission Control animations +defaults write com.apple.dock expose-animation-duration -float 0.1 -# Remove the auto-hiding Dock delay -defaults write com.apple.Dock autohide-delay -float 10000 +# Disable Dashboard +defaults write com.apple.dashboard mcx-disabled -bool true +# Don’t show Dashboard as a Space +defaults write com.apple.dock dashboard-in-overlay -bool true + +# Remove the auto-hiding Dock delay +defaults write com.apple.dock autohide-delay -float 0 # Remove the animation when hiding/showing the Dock defaults write com.apple.dock autohide-time-modifier -float 0 @@ -92,30 +209,103 @@ defaults write com.apple.dock autohide -bool true # Make Dock icons of hidden applications translucent defaults write com.apple.dock showhidden -bool true +# Reset Launchpad +find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete + +# Set Safari’s home page to `about:blank` for faster loading +defaults write com.apple.Safari HomePage -string "about:blank" + +# Prevent Safari from opening ‘safe’ files automatically after downloading +defaults write com.apple.Safari AutoOpenSafeDownloads -bool false + +# Allow hitting the Backspace key to go to the previous page in history +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true + +# Hide Safari’s bookmarks bar by default +defaults write com.apple.Safari ShowFavoritesBar -bool false + +# Disable Safari’s thumbnail cache for History and Top Sites +defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 + # Enable Safari’s debug menu defaults write com.apple.Safari IncludeInternalDebugMenu -bool true -# Add a context menu item for showing the Web Inspector in web views -defaults write NSGlobalDomain WebKitDeveloperExtras -bool true +# Make Safari’s search banners default to Contains instead of Starts With +defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false -# Only use UTF-8 in Terminal.app -defaults write com.apple.terminal StringEncodings -array 4 - -# Disable the Ping sidebar in iTunes -defaults write com.apple.iTunes disablePingSidebar -bool true +# Remove useless icons from Safari’s bookmarks bar +defaults write com.apple.Safari ProxiesInBookmarksBar "()" -# Disable all the other Ping stuff in iTunes -defaults write com.apple.iTunes disablePing -bool true +# Enable the Develop menu and the Web Inspector in Safari +defaults write com.apple.Safari IncludeDevelopMenu -bool true +defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true -# Make ⌘ + F focus the search input in iTunes -defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F" +# Add a context menu item for showing the Web Inspector in web views +defaults write NSGlobalDomain WebKitDeveloperExtras -bool true # Disable send and reply animations in Mail.app -defaults write com.apple.Mail DisableReplyAnimations -bool true -defaults write com.apple.Mail DisableSendAnimations -bool true +defaults write com.apple.mail DisableReplyAnimations -bool true +defaults write com.apple.mail DisableSendAnimations -bool true # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false +# Disable inline attachments (just show the icons) +defaults write com.apple.mail DisableInlineAttachmentViewing -bool true + +# Disable automatic spell checking +defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" + +# Only use UTF-8 in Terminal.app +defaults write com.apple.terminal StringEncodings -array 4 + +# Don’t display the annoying prompt when quitting iTerm +defaults write com.googlecode.iterm2 PromptOnQuit -bool false + # Prevent Time Machine from prompting to use new hard drives as backup volume defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true + +# Use plain text mode for new TextEdit documents +defaults write com.apple.TextEdit RichText -int 0 +# Open and save files as UTF-8 in TextEdit +defaults write com.apple.TextEdit PlainTextEncoding -int 4 +defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 + +# Disable smart quotes as it’s annoying for messages that contain code +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false + +# Disable continuous spell checking +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false + +############################################################################### +# Transmission.app # +############################################################################### + +# Use `~/Downloads/Torrents` to store incomplete downloads +defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true +defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Torrents" + +# Don’t prompt for confirmation before downloading +defaults write org.m0k.transmission DownloadAsk -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 + + +############################################################################### +# Kill affected applications # +############################################################################### + +for app in "Address Book" "Calendar" "Contacts" "Dock" "Finder" "Mail" \ + "Messages" "Safari" "SizeUp" "SystemUIServer" "Terminal" "Transmission" \ + "Twitter" "iCal"; do + killall "${app}" > /dev/null 2>&1 +done +echo "Done. Note that some of these changes require a logout/restart to take effect." + diff --git a/install/ruby.sh b/install/ruby.sh new file mode 100755 index 00000000..6aa8bc5b --- /dev/null +++ b/install/ruby.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +rbenv install 2.0.0-p247 + +gem install bundler --no-ri --no-rdoc +gem install sass --no-ri --no-rdoc +gem install compass --no-ri --no-rdoc +gem install dandelion --no-ri --no-rdoc +gem install capistrano --no-ri --no-rdoc +gem install chef --no-ri --no-rdoc +gem install berkshelf --no-ri --no-rdoc + + diff --git a/tmux.conf b/tmux.conf index 2223920c..25898160 100644 --- a/tmux.conf +++ b/tmux.conf @@ -9,7 +9,11 @@ set -g prefix C-a unbind-key C-b bind-key a send-prefix +# reparing copy & paste by default +set-option -g default-command "reattach-to-user-namespace -l zsh" +# Fix for sending keys to Vim +setw -g xterm-keys on # use vim motions :-) setw -g mode-keys vi diff --git a/tmux/devshell.window.sh b/tmux/devshell.window.sh new file mode 100644 index 00000000..86c421fc --- /dev/null +++ b/tmux/devshell.window.sh @@ -0,0 +1,17 @@ +# Set window root path. Default is `$session_root`. +# Must be called before `new_window`. +window_root "./" + +# Create new window. If no argument is given, window name will be based on +# layout file name. +new_window "devshell" + +# Split window into panes. +split_h 50 + +# Run commands. +run_cmd "git status" 1 # runs in active pane +run_cmd "grunt watch" 2 # runs in pane 1 + +# Set active pane. +select_pane 1 diff --git a/tmux/tmuxifier b/tmux/tmuxifier new file mode 160000 index 00000000..966e500b --- /dev/null +++ b/tmux/tmuxifier @@ -0,0 +1 @@ +Subproject commit 966e500b40d250ba5b341939804c21f098bb4b0f diff --git a/zsh/dircolors-solarized b/zsh/dircolors-solarized new file mode 160000 index 00000000..2719a15b --- /dev/null +++ b/zsh/dircolors-solarized @@ -0,0 +1 @@ +Subproject commit 2719a15b779eef0bfb1d11816c25192ae9ee99b9 diff --git a/zsh/forklift/forklift.plugin.zsh b/zsh/forklift/forklift.plugin.zsh new file mode 100755 index 00000000..b0e60a43 --- /dev/null +++ b/zsh/forklift/forklift.plugin.zsh @@ -0,0 +1,69 @@ +# Open folder in ForkLift.app of ForkLift2.app from console +# Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de +# Updated to support ForkLift2 by Johan Kaving +# +# Usage: +# fl [] +# +# Opens specified directory or current working directory in ForkLift.app +# +# Notes: +# It assumes Shift+Cmd+G launches go to folder panel and Cmd+N opens new +# app window. +# +# https://gist.github.com/3313481 +function fl { + if [ ! -z "$1" ]; then + DIR=$1 + if [ ! -d "$DIR" ]; then + DIR=$(dirname $DIR) + fi + if [ "$DIR" != "." ]; then + PWD=`cd "$DIR";pwd` + fi + fi + osascript 2>&1 1>/dev/null < /dev/null; then eval "$(rbenv init -)"; fi