Skip to content

Commit

Permalink
Refactor of the ZSH Files
Browse files Browse the repository at this point in the history
  • Loading branch information
amacgregor committed Jan 28, 2017
1 parent a48753d commit 409b49d
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 97 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vim/bundles/*
15 changes: 15 additions & 0 deletions zsh_files/functions.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
##########################################
# Custom ZSH functions
##########################################

# Man Command colorizer
man() {
env \
LESS_TERMCAP_md=$'\e[1;36m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[1;40;92m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[1;32m' \
man "$@"
}
23 changes: 23 additions & 0 deletions zsh_files/variables.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,44 @@ export EDITOR='vim'
export HOMEBREW_NO_ANALYTICS=1
export JEKYLL_ENV=development

##########################################
# NPM Varialbes
##########################################
NPM_PACKAGES="$HOME/.npm-packages"
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"

##########################################
# Setting up the Paths
##########################################
COMPOSERPATH="$HOME/.composer"
TMUXIFIERPATH="$HOME/.tmuxifier"
GOPATH="$HOME/go"
POWERLINE_PATH="$HOME/Projects/Utilities/powerline"
BASE16_SHELL="$HOME/.config/base16-shell/"

##########################################
# Setting up the Bin Paths
##########################################
GOBINPATH="$GOPATH/bin"
COMPOSERBINPATH="$COMPOSERPATH/vendor/bin"
NPMBINPATH="$NPM_PACKAGES/bin"
TMUXIFIERBINPATH="$TMUXIFIERPATH/bin"
HOMEBIN="$HOME/bin"

##########################################
# Build and Export the PATH
##########################################
export PATH="$GOBINPATH:$COMPOSERBINPATH:$TMUXIFIERBINPATH:$NPMBINPATH:$HOMEBIN:$PATH"


##########################################
# Experimental
##########################################
# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# SSH
# export SSH_KEY_PATH="~/.ssh/dsa_id"

# PHP-version switcher
# source $(brew --prefix php-version)/php-version.sh && php-version 5
133 changes: 36 additions & 97 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,96 +43,24 @@ HIST_STAMPS="mm/dd/yyyy"
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(brew git mix git-flow composer pyenv rake-fast python sudo aws debian docker git-extras)

source $ZSH/oh-my-zsh.sh
##########################################
# Load External configurationf files
##########################################

# Load oh-my-zsh
if [ -e $ZSH/oh-my-zsh.sh ]; then
source $ZSH/oh-my-zsh.sh
fi

# Load the secrets file
if [ -e ~/.secrets ]; then
source ~/.secrets
fi



##################
# Session Variables
##################
##export PULSE_LATENCY_MSEC=30
##export EDITOR='vim'
##export HOMEBREW_NO_ANALYTICS=1
##export PATH="~/.composer/vendor/bin:/home/amacgregor/bin:$PATH"
##export PATH="/Users/amacgregor/anaconda/bin:$PATH"
##export GOPATH="/Users/amacgregor/go"
##export PATH=$GOPATH/bin:$PATH
##export PATH="$HOME/.tmuxifier/bin:$PATH"

#export DOCKER_HOST=tcp://127.0.0.1:2376
#export DOCKER_CERT_PATH=/Users/amacgregor/.dinghy/certs
#export DOCKER_TLS_VERIFY=1

#eval "$(rbenv init -)"
#export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
#export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"


# export MANPATH="/usr/local/man:$MANPATH"

# # Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi

#if [[ -r ~/.local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh ]]; then
# source ~/.local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh
#fi

# Load the powerline bindings
source /Users/amacgregor/Projects/Github/powerline/powerline/bindings/zsh/powerline.zsh

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"

# OPAM configuration
. /home/amacgregor/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh


#export PATH="$(brew --prefix homebrew/php/php54)/bin:$PATH"
##export PATH="/usr/local/bin/npm:$PATH"

# Make Docker toolbox work
#eval "$(docker-machine env default)"
#

# Vim mode
#bindkey -v
#export KEYTIMEOUT=1

#PHP-version switcher
#source $(brew --prefix php-version)/php-version.sh && php-version 5

# Run Fortune on a new terminal
fortune quotes

# Base16 Shell
#BASE16_SHELL="$HOME/.config/base16-shell/base16-tomorrow.dark.sh"
#[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
#

BASE16_SHELL=$HOME/.config/base16-shell/
[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)" ]

$HOME/.config/base16-shell/base16-tomorrow.dark.sh

##NPM_PACKAGES=/Users/amacgregor/.npm-packages
##NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
##PATH="$NPM_PACKAGES/bin:$PATH"

test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

# Load the FZF completion
if [ -e ~/.fzf.zsh ]; then
source ~/.fzf.zsh
fi

# Load the Variables file
if [ -e ~/.zsh_files/variables.zsh ]; then
Expand All @@ -144,24 +72,35 @@ if [ -e ~/.zsh_files/aliases.zsh ]; then
source ~/.zsh_files/aliases.zsh
fi

#########################
# Load the Functions file
if [ -e ~/.zsh_files/functions.zsh ]; then
source ~/.zsh_files/functions.zsh
fi

# Load the Powerline Bindings
if [ -e $POWERLINE_PATH/powerline/bindings/zsh/powerline.zsh ]; then
source $POWERLINE_PATH/powerline/bindings/zsh/powerline.zsh
fi

##########################################
# Environment setups
#########################
##########################################

# Python with PyEnv setup
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi

# Ruby with RbEnv setup
eval "$(rbenv init -)"

# Man Command colorizer
man() {
env \
LESS_TERMCAP_md=$'\e[1;36m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[1;40;92m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[1;32m' \
man "$@"
}
# Color Scheme for Ruby // Requires Base16 Shell
$HOME/.config/base16-shell/base16-tomorrow.dark.sh

##########################################
# Experimental
##########################################

# OPAM configuration
#. /home/amacgregor/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true

# Run Fortune on a new terminal
#fortune quotes

0 comments on commit 409b49d

Please sign in to comment.