Skip to content

Commit

Permalink
zsh tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
feigner committed Dec 27, 2015
1 parent c6e5288 commit 279f3de
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 83 deletions.
6 changes: 6 additions & 0 deletions alias/aliasrc
@@ -0,0 +1,6 @@
# git helpers
alias glog="git log --graph --full-history --all --color --pretty=format:'%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s'"
alias glogg="git --no-pager log --graph --full-history --all --color --pretty=format:'%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s'"

# rand
alias vag="vagrant"
46 changes: 0 additions & 46 deletions bash/bash_profile

This file was deleted.

14 changes: 5 additions & 9 deletions install.sh
Expand Up @@ -3,16 +3,12 @@
# dotfiles checkout location
DOTFILES=$HOME/dotfiles

# shells
ln -s $DOTFILES/bash/bash_profile $HOME/.bash_profile
ln -s $DOTFILES/zsh/zshrc $HOME/.zshrc

# vim
# NOTE: some vim plugins might need to be compiled (command-t)
# separately
ln -s $DOTFILES/git/gitconfig $HOME/.gitconfig
ln -s $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
ln -s $DOTFILES/alias/aliasrc $HOME/.aliasrc
# NOTE: some vim plugins might need to be compiled separately
# eg: `command-t` via `rake make`
ln -s $DOTFILES/vim $HOME/.vim
ln -s $DOTFILES/vim/vimrc $HOME/.vimrc
ln -s $DOTFILES/vim/gvimrc $HOME/.gvimrc

# git
ln -s $DOTFILES/git/gitconfig $HOME/.gitconfig
16 changes: 10 additions & 6 deletions zsh/eff.zsh-theme
Expand Up @@ -4,16 +4,20 @@
# _ chop cwd to 45 chars

purp=$FG[097]
white=$FG[253]
gray=

# prompt
PROMPT='
%{$purp%}[%{$fg[$NCOLOR]%}%B%n%b%{$fb_bold[gray]%}@%{$fg[white]%}%m%{$reset_color%}:%45<...<%~%<<%{$purp%}]$reset_color $(git_prompt_info)
'
PROMPT='%{$purp%}[%{$fg[$NCOLOR]%}%B%n%b%{$fb_bold[gray]%}@%{$white%}%m%{$reset_color%}:%45<...<%~%<<%{$purp%}]$reset_color $(git_prompt_info)
%{$white%}→%{$reset_color%} '
RPROMPT=''

# git theming
ZSH_THEME_GIT_PROMPT_PREFIX="%{$purp%}(%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$purp%})%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[gray]%}(%{$fg_no_bold[yellow]%}%B"
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✱"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱"

# ls colors, stolen from r2 via http://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
39 changes: 17 additions & 22 deletions zsh/zshrc
Expand Up @@ -12,15 +12,17 @@ ZSH_THEME="eff"
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# import aliases
if [ -f ~/.aliasrc ]; then
. ~/.aliasrc
fi

# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"

# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"

# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13

# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"

Expand All @@ -37,14 +39,8 @@ plugins=(git osx)

source $ZSH/oh-my-zsh.sh

# project hotkeys
alias cdp="cd ~/Projects"
alias cds="cd ~/Projects/stumptown-v2"

# ALIAS
alias vag="vagrant"
alias glog="git log --graph --full-history --all --color --pretty=format:'%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s'"
alias glogg="git --no-pager log --graph --full-history --all --color --pretty=format:'%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s'"
# gtfo autocorrect
unsetopt correct

# FUNCTIONS
hr(){printf '=%.0s' $(seq $COLUMNS)} # horizontal rule
Expand All @@ -53,18 +49,17 @@ __git_files () { _wanted files expl 'local files' _files } # speed up git autoco
# syntax-highlighting `less` (requires source-highlight)
export LESSOPEN="| /usr/local/bin/src-hilite-lesspipe.sh %s"

# PATH

# homebrew
PATH="/usr/local/bin:${PATH}"
# PATH!
export PATH=~/bin/:/usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin

# postgres
PATH="/Library/PostgreSQL/9.1/bin:${PATH}"
# tmux list-sessions 2> /dev/null

# python
PATH="/usr/local/share/python:${PATH}"
# fzf <3
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# node
PATH="/usr/local/share/npm/bin:${PATH}"
# Base16 Shell
# BASE16_SHELL="$HOME/.config/base16-shell/base16-monokai.dark.sh"
# [[ -s $BASE16_SHELL ]] && source $BASE16_SHELL

export PATH
# direnv
# eval "$(direnv hook zsh)"

0 comments on commit 279f3de

Please sign in to comment.