diff --git a/install b/install index 1c665ac..984a155 100755 --- a/install +++ b/install @@ -24,7 +24,7 @@ ln -s $DOTFILES/my.cnf $HOME/.my.cnf ln -s $DOTFILES/tmux.conf $HOME/.tmux.conf ln -s $DOTFILES/tmuxinator $HOME/.tmuxinator ln -s $DOTFILES/vim $HOME/.vim -ln -s $DOTFILES/zsh/zshrc $HOME/.zshrc +ln -s $DOTFILES/zshrc $HOME/.zshrc if [[ `uname` == 'Darwin' ]]; then rm -rf $HOME/Library/Application\ Support/Karabiner diff --git a/zsh/Darwin.zshrc b/zsh/Darwin.zshrc deleted file mode 100644 index 2ac60f6..0000000 --- a/zsh/Darwin.zshrc +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env zsh - -export GREP_OPTIONS="--color=auto --exclude-dir=${GREP_EXCLUDE_DIR} --exclude-dir=.sass-cache" - -source "`brew --prefix`/etc/grc.bashrc" -source $HOME/.rvm/scripts/rvm - -# Requires sudo, saves a step -alias mtr="sudo mtr" - -# Because macOS is dumb -alias mux="tmuxinator" - -# Unquarantine files on OSX -alias unquarantine="xattr -r -d com.apple.quarantine *" - -# Because OS X returns all caps -function uuidgen() { - env uuidgen "$@" | awk '{print tolower($0)}' -} diff --git a/zsh/Linux.zshrc b/zsh/Linux.zshrc deleted file mode 100644 index 06c9fb1..0000000 --- a/zsh/Linux.zshrc +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/zsh - -alias pbcopy='xclip -selection clipboard' -alias pbpaste='xclip -selection clipboard -o' - -if [ -x /usr/bin/dircolors ]; then - test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)" - alias ls="ls --color=auto" - - GREP_FLAGS=" --color=auto --exclude-dir=${GREP_EXCLUDE_DIR}" - - alias grep="grep ${GREP_FLAGS}" - alias egrep="egrep ${GREP_FLAGS}" - alias fgrep="fgrep ${GREP_FLAGS}" -fi diff --git a/zsh/zshrc b/zshrc similarity index 72% rename from zsh/zshrc rename to zshrc index 71ee257..7fa567b 100644 --- a/zsh/zshrc +++ b/zshrc @@ -3,6 +3,7 @@ DOTFILES=$HOME/.dotfiles ADOTDIR=$DOTFILES/vendor/zsh-users/antigen/ GREP_EXCLUDE_DIR="{.git,.sass-cache,artwork,node_modules,vendor}" +OS=`uname` export CLICOLOR=1 export EDITOR=vim @@ -11,9 +12,40 @@ export TERM="xterm-256color" bindkey -v -source $DOTFILES/zsh/`uname`.zshrc -source $DOTFILES/vendor/zsh-users/antigen/antigen.zsh +if [ $OS = 'Linux' ]; then + alias pbcopy='xclip -selection clipboard' + alias pbpaste='xclip -selection clipboard -o' + if [ -x /usr/bin/dircolors ]; then + test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)" + alias ls="ls --color=auto" + + GREP_FLAGS=" --color=auto --exclude-dir=${GREP_EXCLUDE_DIR}" + + alias grep="grep ${GREP_FLAGS}" + alias egrep="egrep ${GREP_FLAGS}" + alias fgrep="fgrep ${GREP_FLAGS}" + fi +elif [ $OS = 'Darwin' ]; then + export GREP_OPTIONS="--color=auto --exclude-dir=${GREP_EXCLUDE_DIR} --exclude-dir=.sass-cache" + + source "`brew --prefix`/etc/grc.bashrc" + source $HOME/.rvm/scripts/rvm + + # Requires sudo, saves a step + alias mtr="sudo mtr" + + # Because macOS is dumb + alias mux="tmuxinator" + + # Unquarantine files on OSX + alias unquarantine="xattr -r -d com.apple.quarantine *" + + # Because OS X returns all caps + function uuidgen() { env uuidgen "$@" | awk '{print tolower($0)}'; } +fi + +source $DOTFILES/vendor/zsh-users/antigen/antigen.zsh antigen-use oh-my-zsh antigen-bundle zsh-users/zsh-completions antigen-bundle zsh-users/zsh-syntax-highlighting