DWJHLZWVL7RM2WQXN3ZJTJXXKUEUNQLL37TMMTPL7NL375M2QJCQC
3CY6DZO4DKCQ2BPIA7R6K4GQ52QKMSLNIWURG5CRC7BBHEGR7V3QC
6EQI7R3C5QAA3R4J2VMRSJDYAALLVAHSGLATPKCZ7C4YY5MOGWKAC
2FUUFSLCH746TSMGBJPGPPYKV3QSTBADMJTWPRGGMDPZFEWPNUMQC
RCTW4VQVWMZEYSBORRWDV6OPIE63XTYOWYZUADF37S26CLQSBVBQC
RXCY7LD6ZRIOIKZEYKLMCYPMQPXF4DOEEFBDLVR2B22BXLZJFFBQC
MVGZ575CHTEYOYZJ22DZDSVSYWHW7U3BFUKSQIPDDQYWVASSUQLQC
TGD23KBV2V7J7FFX7FDBENYMGDIOMS2JNOIZAYNXGQ52E4CQNJYAC
GYCQG6LZQ3CALPOMOGV4KWDDYSWHQHMANY47O4AFARFVTU7DPCNQC
EMMDV4VWIOO4QOTNDGNSIA4A56NZN5DAWSL6GSSPSLXLJKXDFHMQC
WQLSZKP6BVOVBZPJ2HLUYQX7CIL6MNUXVIZ7GPFEXKHIQQLXCQCQC
EKU4KQ6YHQNKNT3IPCB3LFVFAHOYVJAHJ7F7QBIZQZII7AJBJNQAC
Q7EOKUVVNTVH7NENBGM76GCFN42ZPMOPT7CID7UJM3PAGYQDV4MAC
CS2PMYI343VVUB2UZE4JH6UPMIKYK55KTJSMSLIMA4YDVLI6MPZQC
#zmodload zsh/zprof
cat <<'EOP'
:
`. ; .'
`. .-'''-. .'
;' __ _;'
/ '_ _`\
| _( a ( a |
'''''| (_) > |``````
\ \ / /
`. `--'.'
.' `-,,,-' `.
.' : `. hjw
:
EOP
echo "begin zshrc"
echo "shell session started for $USER on $TTY at `date`" | tee /dev/stderr | logger
source $HOME/.localzshrc.sh
autoload -U colors && colors
autoload zsh/parameter
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/opt/local/bin:/sbin/usr/sbin:$PATH
export GNU_PREFIX=''
platform="$(uname -s)"
echo the platform is "$platform"
if [[ $platform == 'Darwin' ]]; then
GNU_PREFIX='g'
else
echo not osx
fi
if [[ -e /etc/sysconfig/zsh-prompt-$TERM ]]; then
. /etc/sysconfig/zsh-prompt-$TERM
elif [[ -e $HOME/.zsh-prompt-$TERM ]]; then
. $HOME/.zsh-prompt-$TERM
fi
for p in $PATH; do
_FORTUNE="$PATH/fortune"
if [[ -x "$_FORTUNE" ]]; then
FORTUNE="$_FORTUNE"
break
fi
done
if [ -x "$FORTUNE" ]; then
$FORTUNE
fi
function battery_charge() {
if [[ $LAPTOP[1] == 'y' && $TERM != "xterm" ]]; then
python "$HOME/bin/batcharge.py" 2>/dev/null
fi
}
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}%f%s%F{5}%F{3}->%F{5}%F{2}%b%F{3}|%F{1}%a%F{5}%f'
zstyle ':vcs_info:*' formats \
'%F{5}%f%s%F{5}%F{3}->%F{5}%F{2}%b%F{5}%f'
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
zstyle ':vcs_info:*' enable git cvs svn
vcs_info_wrapper() {
vcs_info
if [ -n "$vcs_info_msg_0_" ]; then
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"
fi
}
function zle-line-init zle-keymap-select {
RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}"
RPS2=$RPS1
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
export PYTHONSTARTUP=$HOME/Library/Python/2.7/site-packages/sitecustomize.py
setopt promptsubst
PROMPT='---
(%?) %m:%n--%l ${PWD/$HOME/~} `vcs_info_wrapper` `battery_charge`
%!:%# '
export PROMPT
#RPROMPT='[%T]'
HOSTNAME=`hostname -f`
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
cmdtermtitle() {
cmd_name="${(V)1}"
if [ 'fg' = "${${(z)@}[1]}" ]; then
cmd_name="${(vV)jobtexts}"
fi
if [[ "${TERM%%-*}"x == "screen"x ]]; then
echo -ne "\033]0;${cmd_name}\007"
else
echo -ne "\033]0; ${cmd_name} : ${USER}@$HOSTNAME\007"
fi
}
autoload -U add-zsh-hook
if [[ $TERM != "linux" && ${TERM%-color} != "eterm" ]]; then
add-zsh-hook preexec cmdtermtitle
fi
termtitle() {
npwd=${PWD/#$HOME/\~}
if [[ "${TERM%%-*}"x == "screen"x ]]; then
echo -ne "\033]0;${npwd}\007"
else
echo -ne "\033]0;${USER}@$HOSTNAME: ${npwd}\007"
fi
}
if [[ $TERM != "linux" && ${TERM%-color} != "eterm" ]]; then
add-zsh-hook precmd termtitle
fi
PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/opt/local/bin:/usr/sbin:/sbin/usr/sbin:/sbin:$HOME/.cabal/bin:$HOME/.local/bin:$HOME/bin:/Developer/usr/bin:$PATH"
export VIMCLOJURE_SERVER_JAR="$HOME/bin/jars/server-2.3.6.jar"
export SAVEHIST=10000000
export HISTSIZE=10000000
export HISTFILE=$HOME/.zshistory
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
export MANPATH="$HOME/.nix-profile/share/man:/opt/local/share/man:/usr/local/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:$MANPATH"
export INFOPATH="$HOME/.nix-profile/share/info:/usr/local/share/info:/usr/local/texlive/2009/texmf/doc/info:$INFOPATH"
export PAGER="less -SiemX"
export RGBDEF='/opt/X11/share/X11/rgb.txt'
export GREP_COLORS='ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36'
if command -v emacsclient 2>&1 >/dev/null; then
export VISUAL="emacsclient -c"
elif [ -x /usr/local/bin/vim ]; then
export VISUAL="/usr/local/bin/vim"
else
export VISUAL="/usr/bin/vim"
fi
export EDITOR=$VISUAL
autoload run-help
autoload -U zfinit
autoload -U tcp_proxy
autoload -U tcp_open
autoload -U tcp_point
autoload -U tcp_shoot
#------------------
zfinit
if [[ $TERM != 'dumb' ]]; then
# Solarized dircolors:
LS_COLORS='no=00;38;5;244:rs=0:di=00;38;5;33:ln=00;38;5;37:mh=00:pi=48;5;230;38;5;136;01:so=48;5;230;38;5;136;01:do=48;5;230;38;5;136;01:bd=48;5;230;38;5;244;01:cd=48;5;230;38;5;244;01:or=48;5;235;38;5;160:su=48;5;160;38;5;230:sg=48;5;136;38;5;230:ca=30;41:tw=48;5;64;38;5;230:ow=48;5;235;38;5;33:st=48;5;33;38;5;230:ex=00;38;5;64:*.tar=00;38;5;61:*.tgz=00;38;5;61:*.arj=00;38;5;61:*.taz=00;38;5;61:*.lzh=00;38;5;61:*.lzma=00;38;5;61:*.tlz=00;38;5;61:*.txz=00;38;5;61:*.zip=00;38;5;61:*.z=00;38;5;61:*.Z=00;38;5;61:*.dz=00;38;5;61:*.gz=00;38;5;61:*.lz=00;38;5;61:*.xz=00;38;5;61:*.bz2=00;38;5;61:*.bz=00;38;5;61:*.tbz=00;38;5;61:*.tbz2=00;38;5;61:*.tz=00;38;5;61:*.deb=00;38;5;61:*.rpm=00;38;5;61:*.jar=00;38;5;61:*.rar=00;38;5;61:*.ace=00;38;5;61:*.zoo=00;38;5;61:*.cpio=00;38;5;61:*.7z=00;38;5;61:*.rz=00;38;5;61:*.apk=00;38;5;61:*.gem=00;38;5;61:*.jpg=00;38;5;136:*.JPG=00;38;5;136:*.jpeg=00;38;5;136:*.gif=00;38;5;136:*.bmp=00;38;5;136:*.pbm=00;38;5;136:*.pgm=00;38;5;136:*.ppm=00;38;5;136:*.tga=00;38;5;136:*.xbm=00;38;5;136:*.xpm=00;38;5;136:*.tif=00;38;5;136:*.tiff=00;38;5;136:*.png=00;38;5;136:*.PNG=00;38;5;136:*.svg=00;38;5;136:*.svgz=00;38;5;136:*.mng=00;38;5;136:*.pcx=00;38;5;136:*.dl=00;38;5;136:*.xcf=00;38;5;136:*.xwd=00;38;5;136:*.yuv=00;38;5;136:*.cgm=00;38;5;136:*.emf=00;38;5;136:*.eps=00;38;5;136:*.CR2=00;38;5;136:*.ico=00;38;5;136:*.tex=00;38;5;245:*.rdf=00;38;5;245:*.owl=00;38;5;245:*.n3=00;38;5;245:*.ttl=00;38;5;245:*.nt=00;38;5;245:*.torrent=00;38;5;245:*.xml=00;38;5;245:*Makefile=00;38;5;245:*Rakefile=00;38;5;245:*Dockerfile=00;38;5;245:*build.xml=00;38;5;245:*rc=00;38;5;245:*1=00;38;5;245:*.nfo=00;38;5;245:*README=00;38;5;245:*README.txt=00;38;5;245:*readme.txt=00;38;5;245:*.md=00;38;5;245:*README.markdown=00;38;5;245:*.ini=00;38;5;245:*.yml=00;38;5;245:*.cfg=00;38;5;245:*.conf=00;38;5;245:*.c=00;38;5;245:*.cpp=00;38;5;245:*.cc=00;38;5;245:*.sqlite=00;38;5;245:*.go=00;38;5;245:*.log=00;38;5;240:*.bak=00;38;5;240:*.aux=00;38;5;240:*.lof=00;38;5;240:*.lol=00;38;5;240:*.lot=00;38;5;240:*.out=00;38;5;240:*.toc=00;38;5;240:*.bbl=00;38;5;240:*.blg=00;38;5;240:*~=00;38;5;240:*#=00;38;5;240:*.part=00;38;5;240:*.incomplete=00;38;5;240:*.swp=00;38;5;240:*.tmp=00;38;5;240:*.temp=00;38;5;240:*.o=00;38;5;240:*.pyc=00;38;5;240:*.class=00;38;5;240:*.cache=00;38;5;240:*.aac=00;38;5;166:*.au=00;38;5;166:*.flac=00;38;5;166:*.mid=00;38;5;166:*.midi=00;38;5;166:*.mka=00;38;5;166:*.mp3=00;38;5;166:*.mpc=00;38;5;166:*.ogg=00;38;5;166:*.ra=00;38;5;166:*.wav=00;38;5;166:*.m4a=00;38;5;166:*.axa=00;38;5;166:*.oga=00;38;5;166:*.spx=00;38;5;166:*.xspf=00;38;5;166:*.mov=00;38;5;166:*.MOV=00;38;5;166:*.mpg=00;38;5;166:*.mpeg=00;38;5;166:*.m2v=00;38;5;166:*.mkv=00;38;5;166:*.ogm=00;38;5;166:*.mp4=00;38;5;166:*.m4v=00;38;5;166:*.mp4v=00;38;5;166:*.vob=00;38;5;166:*.qt=00;38;5;166:*.nuv=00;38;5;166:*.wmv=00;38;5;166:*.asf=00;38;5;166:*.rm=00;38;5;166:*.rmvb=00;38;5;166:*.flc=00;38;5;166:*.avi=00;38;5;166:*.fli=00;38;5;166:*.flv=00;38;5;166:*.gl=00;38;5;166:*.m2ts=00;38;5;166:*.divx=00;38;5;166:*.webm=00;38;5;166:*.axv=00;38;5;166:*.anx=00;38;5;166:*.ogv=00;38;5;166:*.ogx=00;38;5;166:';
export LS_COLORS
fi
setopt autopushd
setopt cdablevars
setopt AUTO_LIST
setopt LIST_PACKED
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_VERIFY
setopt noBG_NICE
setopt PUSHD_IGNORE_DUPS
setopt autocd
setopt chaselinks
setopt markdirs
source $HOME/git_repos/3dp/nix-zsh-completions/nix.plugin.zsh
fpath=($HOME/git_repos/3dp/nix-zsh-completions $fpath)
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete #_match _prefix
zstyle ':completion:*' format 'Completing %D %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**'
zstyle ':completion:*' menu select=0
zstyle ':completion:*' original false
zstyle ':completion:*' prompt '%e errors:'
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
export fpath=($HOME/.zsh.d/completion $fpath)
autoload -Uz compinit
compinit
# End of lines added by compinstall
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
alias vi='vim'
vim() {
stty -ixon
env vim $*
stty ixany
}
alias :e='vim'
alias :w='cat >'
alias "cd-"="cd -"
alias jmp=pushd
alias ret=popd
alias ..python="PYTHONPATH=.. python"
alias .python="PYTHONPATH=. python"
alias grep="grep --color=auto -I"
alias la="ls -AF"
alias ,=pydit
alias tw=twitter_tool
alias v=$VISUAL
alias e=$EDITOR
alias cvsdiff='cvs diff -wbB | colordiff'
alias cp.='gcp --target-directory=.'
alias bower='noglob bower'
alias node='nodejs'
alias find='noglob find'
echo "done variables and options"
showspaces() {
python -c'import sys;print sys.stdin.read().replace(" ","_").replace("\t", "----")'
}
cvsc() {
FN=$1
shift
cvs -q commit -m "'$*'" $FN
}
alias cvsc.="cvsc ."
truncfile() {
echo $1
(( number = $1 - 1 ))
${GNU_PREFIX}sed -i "${number}q" $2
}
gtde() { cd $HOME/Desktop/$1 }
gtdo() { cd $HOME/Downloads/$1 }
gtp() {cd $HOME/Programming/$1 }
gt() { cd $HOME/$1 }
if [[ ! -e $HHOME/.gtaliases ]]; then touch $HOME/.gtaliases; fi
savedir() {
cmd="export "`basename $PWD`"=$PWD"
eval $cmd
truncfile 50 $HOME/.gtaliases
echo $cmd >> $HOME/.gtaliases
}
gtpa() {
gtp $1
cmd="alias \"gt_$1\"=\"gtp $1\""
eval $cmd
truncfile 50 $HOME/.gtaliases
echo $cmd >> $HOME/.gtaliases
}
gta() {
gt $1
cmd="alias \"gt_$1\"=\"gt $1\""
eval $cmd
truncfile 50 $HOME/.gtaliases
echo $cmd >> $HOME/.gtaliases
}
source $HOME/.gtaliases
gthaskell() { gtp haskell }
gtprolog() { gtp prolog }
gtpython() { gtp python }
despace() { echo ${1// /} }
escape() { echo ${(j<\\ >)*} }
archive() {
if [ ! -d .bak ]; then
mkdir .bak
fi
FN=.bak/`despace $1`-`date +"%Y%m%d.%H%M%S"`.tbz
echo -n archiving $FN...
tar jhcf $FN $1
echo done.
}
editrc() {
hash=`md5 $HOME/.zshrc`
$VISUAL $HOME/.zshrc
newhash=`md5 $HOME/.zshrc`
if [[ $hash != $newhash ]]; then
source $HOME/.zshrc
fi
}
rl() { source $HOME/.zshrc }
getlink() { #gtdo
curl "`pbpaste`" > $(basename `pbpaste`)
}
copypwd() { echo -n `pwd` | pbcopy }
alias sdir='copypwd'
sshto() {
TARGET=`egrep "^$1:" ~/.ssh_dests | cut -d: -f2`
USER=`grep $TARGET ~/.ssh_dests | cut -d: -f3`
ssh $USER@$TARGET
}
dirsave() {
pwd | ctext
}
dirgo() {
cd `ptext`
}
ccwd() {
pwd | ucopy
}
gdir() {
cd `upaste`
}
ulimit -c unlimited
autoload edit-command-line
zle -N edit-command-line
bindkey '^X^e' edit-command-line
# pip zsh completion start
function _pip_completion {
local words cword
read -Ac words
read -cn cword
reply=( $( COMP_WORDS="$words[*]" \
COMP_CWORD=$(( cword-1 )) \
PIP_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _pip_completion pip
# pip zsh completion end
add_to_sandbox() {
echo adding $1 to sandbox
cp $1 $HOME/sandbox
cd $HOME/sandbox
git add `basename $1`
git commit -a -m "added snippet $1"
cd -
}
psc() {
python -u -c "from __future__ import print_function; import sys;$1"
}
activate_env() {
venv=.
if [[ -e bin/activate ]]; then
echo "sourcing local env: `pwd`/bin/activate"
elif [[ -e venv/bin/activate ]]; then
echo "sourcing local env: `pwd`/venv/bin/activate"
venv=venv
else
env=$1
pushd $HOME/python_envs/ > /dev/null
venv="$PWD/$env"
popd
if [[ $env == "" ]]; then
counter=1
typeset -A choices
unset choice
for x in `ls "$venv"`; do
echo $counter\) `basename $x`
choices[$counter]=$x
(( counter++ ))
done
echo -n "your choice? "
choice=-1
read choice
if [[ $choice == "" ]]; then
return
fi
venv="$venv/$choices[$choice]"
echo "you chose $venv"
fi
fi
source $venv/bin/activate
unset venv env;
}
alias ae=activate_env
new_virtual_env() {
virtualenv -p python$2 --no-site-packages --distribute $HOME/python_envs/$1
pushd $HOME/python_envs/$1
}
alias ne=new_virtual_env
ge() {
cd $VIRTUAL_ENV
}
messages() {
if [[ -d .git ]]; then
echo "Git log messages:"
git log -n 5 | egrep --color=yes -Io '(TODO|NOTE|FIXME|BUG|DONE):.*$'
fi
echo "Messages from files:"
egrep --color=yes -IHnro '(TODO|NOTE|FIXME|BUG):.*$' . |
psc '
for line in sys.stdin:
line = line.strip().split(":", 2)
print("%s\n\t%s" % (":".join(line[2:]), ":".join(line[:2])))'
}
wiki() {
pushd $HOME/mywiki > /dev/null
soywiki
popd > /dev/null
}
dupfind() {
find \( \( -name .git -o -name CVS \) -prune \) -o \( -type f \) -print0 | xargs -0 shasum | sort | uniq -w 20 -c | sort -nr
}
es() {
python2.7 -c "e('$1')"
}
load_snippet() {
python -ic "import sitecustomize;ls('$1')"
}
alias page=$PAGER
export VIRTUALENV=/usr
setopt allexport
export PYTHONPATH=$PYTHONPATH:$HOME/pythonlibs
PASSWD_RIGHT=True
cuauth() {
if [ $PASSWD_RIGHT ]; then
passwd=`security find-internet-password -l "ntsrva.cua.edu" -w`
else
passwd=`prompt_password 69langley`
fi
postdata="buttonClicked=4&err_flag=0&err_msg=&info_flag=0&info_msg=&redirect_url=&username=69langley&password=$passwd"
curl https://wirelessauth.cua.edu/login.html -d $postdata 2>&1 | html2ps | ps2ascii && return
unset PASSWD_RIGHT
}
getshelljobtrees() {
pstree `pgrep '^login$'`
}
psgrep() {
ps auxw | grep --color=yes $* | grep -v grep --color=no
}
dis() {
jobs
echo -n 'disown which? '
n=-1
read n
if [[ $n != "" ]]; then
disown %$n
fi
}
getcommands() {
compgen -acbk -A function | grep -v '^_'
}
alias dq=dmenu_queue_mpd
alias dqp=dmenu_queueplay_mpd
if [[ $BINDKEYS == "" ]]; then
echo 'defining bindkeys in zshrc'
BINDKEYS=${TERM%-256color}
BINDKEYS=${BINDKEYS%-noit}
fi
bindkey -e
if [[ $BINDKEYS == "screen" ]]; then
bindkey '[D' backward-word
bindkey '[C' forward-word
bindkey '[1~' beginning-of-line
bindkey '[4~' end-of-line
else
bindkey '[1;5D' backward-word
bindkey '[5D' backward-word
bindkey '[1;5C' forward-word
bindkey '[5C' forward-word
bindkey 'OH' beginning-of-line
bindkey 'OF' end-of-line
fi
bindkey '[3~' delete-char
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
rvm use system &>/dev/null
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
export PATH=$HOME/vim8/bin:$PATH
export CPATH=$CPATH:$HOME/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib
export VIMCLOJURE_SERVER_JAR="$HOME/lib/vimclojure/server-2.3.6.jar"
export CLON_THEME=el
pmkdir() {
mkdir $1
touch $1/__init__.py
cd $1
}
mkcd() {
mkdir "$1"
cd "$1"
}
for x in `ls $HOME/.zsh.d/*.zsh`; do
source "$x"
done
alias cn=current_news
PROMPT='---
(%?) %m:%n--%l ${PWD/$HOME/~} `vcs_info_wrapper` `battery_charge 2>/dev/null`
%!:%# '
export PROMPT
set -o vi
bindkey -M vicmd '?' history-incremental-search-backward
#zprof
export NVM_DIR="/home/edwlan/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
echo 'zshrc done'
#THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!!
[[ -s "/Users/edwlan/.gvm/bin/gvm-init.sh" ]] && source "/Users/edwlan/.gvm/bin/gvm-init.sh"
# # zstyle ':completion:*' add-space true
# # zstyle ':completion:*' insert-unambiguous true
# zstyle ':completion:*' completer _list _oldlist _expand _complete _match _correct _prefix
# zstyle ':completion:*' completions 1
# zstyle ':completion:*' expand prefix suffix
# zstyle ':completion:*' file-sort name
# zstyle ':completion:*' format 'Completing %D %d'
# zstyle ':completion:*' glob 1
# zstyle ':completion:*' group-name ''
# zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]} r:|[-._\ ]=** r:|=**' '+m:{[:lower:]}={[:upper:]} r:|[-._\ ]=** r:|=**' '+m:{[:lower:]}={[:upper:]} r:|[-._\ ]=** r:|=** l:|=*' '+m:{[:lower:]}={[:upper:]} r:|[-._\ ]=** r:|=** l:|=*'
# zstyle ':completion:*' max-errors 1
# zstyle ':completion:*' prompt '%e errors:'
# zstyle ':completion:*' substitute 1
# zstyle :compinstall filename '/Users/elangley/.zshrc'
# export fpath=($HOME/.zsh.d/completion $fpath)
# The following lines were added by compinstall
# zstyle ':completion:*' completer _expand _complete #_match _prefix
zstyle ':completion:*' completer _list _oldlist _expand _complete _match _prefix #_correct _prefix
zstyle ':completion:*' keep-prefix true
zstyle ':completion:*' format 'Completing %D %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' ignore-parents parent pwd
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._\ ]=** r:|=**'
# zstyle ':completion:*' match-original both
zstyle ':completion:*' menu select=2
# zstyle ':completion:*' original true
zstyle ':completion:*' original false
zstyle ':completion:*' prompt '%e errors:'
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion:*' show-ambiguity true
zstyle ':completion:*' use-compctl false
zstyle ':completion::complete:cd::' group-order directory-stack local-directories named-directories users
zstyle :compinstall filename '/Users/elangley/.zsh.d/99-completion.zsh'
source $HOME/.zsh.d/completion/nix.plugin.zsh
fpath=($HOME/.zsh.d/completion $fpath)
autoload -U compinit && compinit
compinit
# # End of lines added by compinstall
is-function () {
whence -w $1 | grep --color=auto -I function > /dev/null
git-messages() {
if [[ -d .git ]]; then
echo "Git log messages:"
git log -n 5 | egrep --color=yes -Io '(TODO|NOTE|FIXME|BUG|DONE):.*$'
fi
echo "Messages from files:"
egrep --color=yes -IHnro '(TODO|NOTE|FIXME|BUG):.*$' . |
psc '
for line in sys.stdin:
line = line.strip().split(":", 2)
print("%s\n\t%s" % (":".join(line[2:]), ":".join(line[:2])))'
alias ..python="PYTHONPATH=.. python"
alias .python="PYTHONPATH=. python"
activate_env() {
venv=.
if [[ -e bin/activate ]]; then
echo "sourcing local env: `pwd`/bin/activate"
elif [[ -e venv/bin/activate ]]; then
echo "sourcing local env: `pwd`/venv/bin/activate"
venv=venv
else
env=$1
pushd $HOME/python_envs/ > /dev/null
venv="$PWD/$env"
popd
if [[ $env == "" ]]; then
counter=1
typeset -A choices
unset choice
for x in `ls "$venv"`; do
echo $counter\) `basename $x`
choices[$counter]=$x
(( counter++ ))
done
echo -n "your choice? "
choice=-1
read choice
if [[ $choice == "" ]]; then
return
fi
venv="$venv/$choices[$choice]"
echo "you chose $venv"
fi
fi
source "$venv/bin/activate"
unset venv env;
}
alias ae=activate_env
psc() {
python -u -c "from __future__ import print_function; import sys;$1"
}
new_virtual_env() {
virtualenv -p "python$2" --no-site-packages "$HOME/python_envs/$1"
pushd "$HOME/python_envs/$1"
}
alias ne=new_virtual_env
ge() {
cd "$VIRTUAL_ENV"
}
add_exe_path "$HOME/pfff/bin"
export JAVA_HOME="`/usr/libexec/java_home`"
prepend_exe_path "$JAVA_HOME/bin"
export HELPDIR="$HOME/.zsh_help"
unalias run-help
bindkey -v '^_' run-help
add_exe_path() {
export PATH="$PATH:$1"
}
push_exe_path() {
export PATH="$PATH:$1"
}
prepend_exe_path() {
export PATH="$1:$PATH"
}
mkcd() {
mkdir "$@"
cd "$1"
}
dupfind() {
local parallel
parallel="$(command -v parallel)"
parallel="${parallel:-$(command -v xargs)}"
local dir
dir="${1:-.}"
find "$dir" \( \( -name .git -o -name CVS \) -prune \) -o \( -type f \) -print0 |
$parallel -0 shasum |
sort |
${GNU_PREFIX}uniq -w 20 -c |
sort -nr
}
is-function () {
whence -w $1 | grep -I function > /dev/null
}
is-alias () {
whence -w $1 | grep -I alias > /dev/null
}
expand-alias () {
local POSSIBLE_ALIAS
if [[ ! -z "$1" ]]; then
POSSIBLE_ALIAS="$(alias $1)"
if [[ ! -z "$POSSIBLE_ALIAS" ]]; then
echo "${POSSIBLE_ALIAS#*=}"
else
echo "$1"
fi
fi
}
export PATH=$PATH:/Users/elangley/Library/Python/2.7/bin
if [[ -o interactive ]]; then
if [ "$TERM" != "screen" -a "$ITERM_SHELL_INTEGRATION_INSTALLED" = "" ]; then
ITERM_SHELL_INTEGRATION_INSTALLED=Yes
ITERM2_SHOULD_DECORATE_PROMPT="1"
# Indicates start of command output. Runs just before command executes.
iterm2_before_cmd_executes() {
printf "\033]133;C;\007"
}
iterm2_set_user_var() {
printf "\033]1337;SetUserVar=%s=%s\007" "$1" $(printf "%s" "$2" | base64 | tr -d '\n')
}
# Users can write their own version of this method. It should call
# iterm2_set_user_var but not produce any other output.
# e.g., iterm2_set_user_var currentDirectory $PWD
# Accessible in iTerm2 (in a badge now, elsewhere in the future) as
# \(user.currentDirectory).
whence -v iterm2_print_user_vars > /dev/null 2>&1
if [ $? -ne 0 ]; then
iterm2_print_user_vars() {
}
fi
iterm2_print_state_data() {
printf "\033]1337;RemoteHost=%s@%s\007" "$USER" "$iterm2_hostname"
printf "\033]1337;CurrentDir=%s\007" "$PWD"
iterm2_print_user_vars
}
# Report return code of command; runs after command finishes but before prompt
iterm2_after_cmd_executes() {
printf "\033]133;D;%s\007" "$STATUS"
iterm2_print_state_data
}
# Mark start of prompt
iterm2_prompt_mark() {
printf "\033]133;A\007"
}
# Mark end of prompt
iterm2_prompt_end() {
printf "\033]133;B\007"
}
# There are three possible paths in life.
#
# 1) A command is entered at the prompt and you press return.
# The following steps happen:
# * iterm2_preexec is invoked
# * PS1 is set to ITERM2_PRECMD_PS1
# * ITERM2_SHOULD_DECORATE_PROMPT is set to 1
# * The command executes (possibly reading or modifying PS1)
# * iterm2_precmd is invoked
# * ITERM2_PRECMD_PS1 is set to PS1 (as modified by command execution)
# * PS1 gets our escape sequences added to it
# * zsh displays your prompt
# * You start entering a command
#
# 2) You press ^C while entering a command at the prompt.
# The following steps happen:
# * (iterm2_preexec is NOT invoked)
# * iterm2_precmd is invoked
# * iterm2_before_cmd_executes is called since we detected that iterm2_preexec was not run
# * (ITERM2_PRECMD_PS1 and PS1 are not messed with, since PS1 already has our escape
# sequences and ITERM2_PRECMD_PS1 already has PS1's original value)
# * zsh displays your prompt
# * You start entering a command
#
# 3) A new shell is born.
# * PS1 has some initial value, either zsh's default or a value set before this script is sourced.
# * iterm2_precmd is invoked
# * ITERM2_SHOULD_DECORATE_PROMPT is initialized to 1
# * ITERM2_PRECMD_PS1 is set to the initial value of PS1
# * PS1 gets our escape sequences added to it
# * Your prompt is shown and you may begin entering a command.
#
# Invariants:
# * ITERM2_SHOULD_DECORATE_PROMPT is 1 during and just after command execution, and "" while the prompt is
# shown and until you enter a command and press return.
# * PS1 does not have our escape sequences during command execution
# * After the command executes but before a new one begins, PS1 has escape sequences and
# ITERM2_PRECMD_PS1 has PS1's original value.
iterm2_decorate_prompt() {
# This should be a raw PS1 without iTerm2's stuff. It could be changed during command
# execution.
ITERM2_PRECMD_PS1="$PS1"
ITERM2_SHOULD_DECORATE_PROMPT=""
# Add our escape sequences just before the prompt is shown.
if [[ $PS1 == *'$(iterm2_prompt_mark)'* ]]
then
PS1="$PS1%{$(iterm2_prompt_end)%}"
else
PS1="%{$(iterm2_prompt_mark)%}$PS1%{$(iterm2_prompt_end)%}"
fi
}
iterm2_precmd() {
local STATUS="$?"
if [ -z "$ITERM2_SHOULD_DECORATE_PROMPT" ]; then
# You pressed ^C while entering a command (iterm2_preexec did not run)
iterm2_before_cmd_executes
fi
iterm2_after_cmd_executes "$STATUS"
if [ -n "$ITERM2_SHOULD_DECORATE_PROMPT" ]; then
iterm2_decorate_prompt
fi
}
# This is not run if you press ^C while entering a command.
iterm2_preexec() {
# Set PS1 back to its raw value prior to executing the command.
PS1="$ITERM2_PRECMD_PS1"
ITERM2_SHOULD_DECORATE_PROMPT="1"
iterm2_before_cmd_executes
}
# If hostname -f is slow on your system, set iterm2_hostname prior to sourcing this script.
[[ -z "$iterm2_hostname" ]] && iterm2_hostname=`hostname -f`
[[ -z $precmd_functions ]] && precmd_functions=()
precmd_functions=($precmd_functions iterm2_precmd)
[[ -z $preexec_functions ]] && preexec_functions=()
preexec_functions=($preexec_functions iterm2_preexec)
iterm2_print_state_data
printf "\033]1337;ShellIntegrationVersion=5;shell=zsh\007"
fi
fi
function nametab {
printf "\e]1;$1\a"
}
function namewin {
printf "\e]2;$1\a"
}
02-cj-profile.zsh
(defun load-init-file (filename &optional (conf-dir ".lispworks.d"))
(load (merge-pathnames
(make-pathname :directory `(:relative ,conf-dir)
:name filename)
(user-homedir-pathname))))
(change-directory (user-homedir-pathname))
(load-init-file "editor-color-theme")
(editor-color-theme:color-theme "solarized-dark")
(setf (editor:variable-value "Input Format Default")
:default)
(setf (editor:variable-value "Output Format Default")
'(:utf-8 :eol-style :lf))
(load "~/quicklisp/setup.lisp")
;;;; Copyright (C) 2013 Paulo Madeira
;;;;
;;;; This Source Code Form is subject to the terms of the Mozilla Public
;;;; License, v. 2.0. If a copy of the MPL was not distributed with this
;;;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;; Interface
(cl:in-package #:cl-user)
(defpackage #:editor-color-theme
(:use #:cl)
(:export #:*current-colors*
#:all-color-themes
#:color-theme-args
#:color-theme
#:define-color-theme
#:remove-color-theme
))
(in-package #:editor-color-theme)
;;; Configuration
;; Default foreground and background colors
(defconstant +default-foreground-color+ :black)
(defconstant +default-background-color+ :white)
(defvar *current-colors* (make-hash-table))
;;; Implementation
(defvar *all-color-themes* (make-hash-table :test 'string=))
(defvar *editor-face-names*
'(:region
:show-point-face
:interactive-input-face
:highlight
:non-focus-complete-face
:font-lock-function-name-face
:font-lock-comment-face
:font-lock-type-face
:font-lock-variable-name-face
:font-lock-string-face
:font-lock-keyword-face
:font-lock-builtin-face
:compiler-note-highlight
:compiler-warning-highlight
:compiler-error-highlight
:incremental-search-face
:incremental-search-other-matches-face
))
(defclass editor-panes-theme ()
((editor-panes :initform nil :accessor editor-panes)
(buffers-panes :initform nil :accessor buffers-panes)
(editor-background :initform +default-background-color+ :accessor bg)
(editor-foreground :initform +default-foreground-color+ :accessor fg)
(buffers-background :initform +default-background-color+ :accessor buffers-bg)
(buffers-foreground :initform +default-foreground-color+ :accessor buffers-fg)
(buffers-selected-foreground :initform +default-foreground-color+ :accessor buffers-selected-fg)))
(defclass listener-panes-theme ()
((listener-panes :initform nil :accessor listener-panes)
(listener-foreground :initform +default-foreground-color+ :accessor bg)
(listener-background :initform +default-background-color+ :accessor fg)))
(defclass general-panes-theme ()
((output-panes :initform nil :accessor output-panes)
(output-foreground :initform +default-foreground-color+ :accessor output-fg)
(output-background :initform +default-background-color+ :accessor output-bg)))
(defvar *editor-tool* (make-instance 'editor-panes-theme))
(defvar *listener-tool* (make-instance 'listener-panes-theme))
(defvar *all-tools* (make-instance 'general-panes-theme))
(defun all-color-themes ()
(maphash #'(lambda (key value)
(declare (ignore value))
key)
*all-color-themes*))
(defun color-theme-data (theme-name)
(multiple-value-bind (data found?)
(gethash theme-name *all-color-themes*)
(if found?
data
(error "No color theme named ~s found." theme-name))))
(defun color-theme-super-theme-names (theme-name)
(first (color-theme-data theme-name)))
(defun color-theme-args (theme-name)
(rest (color-theme-data theme-name)))
(defun buffers-color-function (lp symbol state)
(declare (ignore lp))
(cond ((eq state :normal)
(buffers-fg *editor-tool*))
((eq state :selected)
(buffers-selected-fg *editor-tool*))))
(defun update-pane-colors (pane foreground background)
(setf (capi:simple-pane-foreground pane) foreground)
(setf (capi:simple-pane-background pane) background)
(when (and (typep pane 'capi:editor-pane)
(editor::buffer-font-lock-mode-p (capi:editor-pane-buffer pane)))
(gp:invalidate-rectangle pane)))
(defgeneric clear-colors (tool)
(:documentation "Clear colors for tool keeping other data untouched"))
(defgeneric update (tool)
(:documentation "Update tool's colors"))
(defmethod clear-colors ((self editor-panes-theme))
(with-slots (editor-background editor-foreground) self
(setf editor-background +default-background-color+)
(setf editor-foreground +default-foreground-color+)))
(defmethod clear-colors ((self listener-panes-theme))
(with-slots (listener-background listener-foreground) self
(setf listener-background +default-background-color+)
(setf listener-foreground +default-foreground-color+)))
(defmethod clear-colors ((self general-panes-theme))
(with-slots (output-background output-foreground) self
(setf output-background +default-background-color+)
(setf output-foreground +default-foreground-color+)))
(defmethod update ((self editor-panes-theme))
(mapcar #'(lambda (pane)
(update-pane-colors pane (fg self) (bg self)))
(editor-panes self))
(mapcar #'(lambda (pane)
(update-pane-colors pane (buffers-fg self) (buffers-bg self)))
(buffers-panes self)))
(defmethod update ((self listener-panes-theme))
(mapcar #'(lambda (pane)
(update-pane-colors pane (fg self) (bg self)))
(listener-panes self)))
(defmethod update ((self general-panes-theme))
(mapcar #'(lambda (pane)
(update-pane-colors pane (output-fg self) (output-bg self)))
(output-panes self)))
(defun set-color-theme (theme-name)
(destructuring-bind (&rest color-theme-args
&key foreground background
listener-foreground
listener-background
output-foreground
output-background
buffers-foreground
buffers-selected-foreground
buffers-background
&allow-other-keys)
(color-theme-args theme-name)
;; new instances of tools wrappers
(clear-colors *editor-tool*)
(clear-colors *listener-tool*)
(clear-colors *all-tools*)
;; editor foreground and background
(when foreground
(setf (fg *editor-tool*) foreground))
(when background
(setf (bg *editor-tool*) background))
;; listener foreground and background, uses
;; the :background and :foreground if not specified
(setf (fg *listener-tool*)
(or listener-foreground
(fg *editor-tool*))
(bg *listener-tool*)
(or listener-background
(bg *editor-tool*)))
;; output foreground and background, uses :background and
;; :foreground if not specified
(setf (output-fg *all-tools*)
(or output-foreground
(fg *editor-tool*))
(output-bg *all-tools*)
(or output-background
(bg *editor-tool*)))
;; buffers list colors
(setf (buffers-fg *editor-tool*)
(or buffers-foreground
(fg *editor-tool*))
(buffers-selected-fg *editor-tool*)
(or buffers-selected-foreground
(buffers-fg *editor-tool*))
(buffers-bg *editor-tool*)
(or buffers-background
(bg *editor-tool*)))
(dolist (name *editor-face-names*)
(let* ((color-theme-args-for-face (getf color-theme-args name))
(face-name (intern (string name) '#:editor))
(face (editor:make-face face-name :if-exists t)))
(apply 'editor:make-face face-name :if-exists :overwrite
:documentation (or (getf color-theme-args-for-face :documentation)
(slot-value face 'documentation))
color-theme-args-for-face))))
theme-name)
(defun color-theme (theme-name)
(mapc 'set-color-theme (color-theme-super-theme-names theme-name))
(set-color-theme theme-name)
(update *editor-tool*)
(update *listener-tool*)
(update *all-tools*)
theme-name)
(defun define-color-theme (theme-name super-theme-names
&rest color-theme-args &key &allow-other-keys)
(unless super-theme-names
(setf super-theme-names '("default")))
(dolist (super-theme-name super-theme-names)
(multiple-value-bind (color-theme-data found?)
(gethash super-theme-name *all-color-themes*)
(declare (ignore color-theme-data))
(unless found?
(warn "Inherited color theme ~s not defined." super-theme-name))))
(setf (gethash theme-name *all-color-themes*) (list* super-theme-names color-theme-args))
theme-name)
(defun remove-color-theme (theme-name)
(remhash theme-name *all-color-themes*))
(defun set-editor-pane-colors (pane)
(typecase pane
(capi:editor-pane
(progn
(pushnew pane (editor-panes *editor-tool*))
(let ((bg-color (bg *editor-tool*))
(fg-color (fg *editor-tool*)))
(setf (capi:simple-pane-foreground pane) fg-color)
(setf (capi:simple-pane-background pane) bg-color))))))
(defun set-listener-pane-colors (pane)
(typecase pane
(capi:editor-pane
(progn
(pushnew pane (listener-panes *listener-tool*))
(let ((bg-color (bg *listener-tool*))
(fg-color (fg *listener-tool*)))
(setf (capi:simple-pane-foreground pane) fg-color)
(setf (capi:simple-pane-background pane) bg-color))))))
(defun set-collector-pane-colors (pane)
;;(when (typep (capi:top-level-interface pane) 'lw-tools:listener)
(pushnew pane (output-panes *all-tools*))
(let ((bg-color (output-bg *all-tools*))
(fg-color (output-fg *all-tools*)))
(setf (capi:simple-pane-foreground pane) fg-color)
(setf (capi:simple-pane-background pane) bg-color)))
(defun set-mulitcolumn-list-panel-colors (pane)
(when (or (eq (capi:capi-object-name pane) 'lw-tools::buffers-list)
(eq (capi:capi-object-name pane) 'lispworks-tools::narrow-buffers-list))
(pushnew pane (buffers-panes *editor-tool*))
(when (eq (capi:capi-object-name pane) 'lispworks-tools::narrow-buffers-list)
(setf (slot-value pane 'capi::color-function) #'buffers-color-function))
(update-pane-colors pane (buffers-fg *editor-tool*) (buffers-bg *editor-tool*))))
(lispworks:defadvice ((method capi:interface-display :before (lw-tools:editor))
change-editor-colors
:before
:documentation "Change editor colors.")
(interface)
(capi:map-pane-descendant-children interface 'set-editor-pane-colors))
;; we don't have defined capi:interface-display for lw-tools::listener,
;; so nothing to advice. Instead we need to define our own
(sys::without-warning-on-redefinition
(defmethod capi:interface-display :before ((self lw-tools::listener))
(capi:map-pane-descendant-children
self 'set-listener-pane-colors)))
;; capi:collector-pane does'nt have interface-display method called,
;; so we adding the :after constuctor instead
(sys::without-warning-on-redefinition
(defmethod initialize-instance :after ((self capi:collector-pane) &rest
clos::initargs &key &allow-other-keys)
(set-collector-pane-colors self)))
(lispworks:defadvice ((method initialize-instance :after (capi:multi-column-list-panel))
change-multicolumn-colors
:after
:documentation "Change capi:multi-column-list-panel colors")
(self &rest initargs &key &allow-other-keys)
(declare (ignore initargs))
(set-mulitcolumn-list-panel-colors self))
;; This makes it "work" after the podium is launched
(defun is-editor-pane-p (obj)
(and (typep obj 'capi:editor-pane)
(not (eq obj (hcl:class-prototype (class-of obj))))))
(defun cache-existing-pane (pane)
(pushnew pane (editor-panes *editor-tool*)))
(defun cache-if-pane (obj)
(when (is-editor-pane-p obj)
(cache-existing-pane obj)))
#+:lispworks-personal-edition
(hcl:sweep-all-objects #'cache-if-pane)
;;; Initial color themes
(define-color-theme "default" ()
:foreground nil
:background nil
:region '(:foreground :color_highlighttext
:background :color_highlight)
:show-point-face '(:background :green)
:interactive-input-face '(:foreground :red3)
:highlight '(:bold-p t)
:non-focus-complete-face '(:background :tweak_background)
:font-lock-function-name-face '(:foreground :blue)
:font-lock-comment-face '(:foreground :firebrick)
:font-lock-type-face '(:foreground :forestgreen)
:font-lock-variable-name-face '(:foreground :darkgoldenrod)
:font-lock-string-face '(:foreground :rosybrown)
:font-lock-keyword-face '(:foreground :purple)
:font-lock-builtin-face '(:foreground :orchid)
:compiler-note-highlight '(:foreground :magenta)
:compiler-warning-highlight '(:foreground :orange3)
:compiler-error-highlight '(:foreground :red)
:incremental-search-face '(:background :tweak_background)
:incremental-search-other-matches-face '(:underline-p t))
(define-color-theme "plain" ()
:foreground nil :background nil
:region '(:foreground :color_highlighttext
:background :color_highlight)
:show-point-face '()
:interactive-input-face '()
:highlight '(:bold-p t)
:non-focus-complete-face '(:background :tweak_background)
:font-lock-function-name-face '()
:font-lock-comment-face '()
:font-lock-type-face '()
:font-lock-variable-name-face '()
:font-lock-string-face '()
:font-lock-keyword-face '()
:font-lock-builtin-face '()
:compiler-note-highlight '()
:compiler-warning-highlight '()
:compiler-error-highlight '()
:incremental-search-face '(:background :tweak_background)
:incremental-search-other-matches-face '(:underline-p t))
(define-color-theme "emacs" ()
;; :foreground nil :background nil
:region '(:foreground :color_highlighttext
:background :color_highlight)
:show-point-face '(:background :green)
:interactive-input-face '(:foreground :red3)
:highlight '(:bold-p t)
:non-focus-complete-face '(:background :tweak_background)
:font-lock-function-name-face '(:foreground :blue)
:font-lock-comment-face '(:foreground :gray40)
:font-lock-type-face '(:foreground :forestgreen)
:font-lock-variable-name-face '(:foreground :darkgoldenrod)
:font-lock-string-face '(:foreground :rosybrown)
:font-lock-keyword-face '(:foreground :purple)
:font-lock-builtin-face '(:foreground :orchid)
:compiler-note-highlight '(:foreground :magenta)
:compiler-warning-highlight '(:foreground :orange3)
:compiler-error-highlight '(:foreground :red)
:incremental-search-face '(:background :tweak_background)
:incremental-search-other-matches-face '(:underline-p t))
(define-color-theme "torte" ()
:foreground (color:make-rgb 0.8s0 0.8s0 0.8s0)
:background (color:make-rgb 0.0s0 0.0s0 0.0s0)
:region '(:foreground :color_highlighttext
:background :color_highlight)
:show-point-face `(:background ,(color:make-rgb 0.6275s0 0.1255s0 0.9412s0))
:interactive-input-face '(:foreground :pink)
:highlight '(:bold-p t)
:non-focus-complete-face '(:background :tweak_background)
:font-lock-function-name-face `(:foreground ,(color:make-rgb 0.0s0 1.0s0 1.0s0))
:font-lock-comment-face `(:foreground ,(color:make-rgb 0.5s0 0.6275s0 1.0s0))
:font-lock-type-face `(:foreground ,(color:make-rgb 0.5s0 1.0s0 0.5s0))
:font-lock-variable-name-face `(:foreground ,(color:make-rgb 1.0s0 1.0s0 1.0s0))
:font-lock-string-face `(:foreground ,(color:make-rgb 1.0s0 0.6275s0 0.6275s0))
:font-lock-keyword-face `(:foreground ,(color:make-rgb 1.0s0 1.0s0 0.0s0))
:font-lock-builtin-face `(:foreground ,(color:make-rgb 1.0s0 1.0s0 0.0s0))
:compiler-note-highlight '(:foreground :magenta)
:compiler-warning-highlight '(:foreground :orange)
:compiler-error-highlight '(:foreground :red)
:incremental-search-face '(:background :tweak_background)
:incremental-search-other-matches-face '(:underline-p t))
(defun make-rgb (red green blue &optional alpha)
(color:make-rgb (/ red 255s0)
(/ green 255s0)
(/ blue 255s0)
(and alpha (/ alpha 255s0))))
(defvar *solarized-color-table*
'(:solarized-base03 (#x00 #x2b #x36)
:solarized-base02 (#x07 #x36 #x42)
:solarized-base01 (#x58 #x6e #x75)
:solarized-base00 (#x65 #x7b #x83)
:solarized-base0 (#x83 #x94 #x96)
:solarized-base1 (#x93 #xa1 #xa1)
:solarized-base2 (#xee #xe8 #xd5)
:solarized-base3 (#xfd #xf6 #xe3)
:solarized-yellow (#xb5 #x89 #x00)
:solarized-orange (#xcb #x4b #x16)
:solarized-red (#xdc #x32 #x2f)
:solarized-magenta (#xd3 #x36 #x82)
:solarized-violet (#x6c #x71 #xc4)
:solarized-blue (#x26 #x8b #xd2)
:solarized-cyan (#x2a #xa1 #x98)
:solarized-green (#x85 #x99 #x00)))
(loop for list on *solarized-color-table* by #'cddr
for name = (first list)
for rgb = (second list)
do
(color:define-color-alias
name
(apply #'make-rgb rgb)))
(define-color-theme "solarized-light" ()
:foreground :solarized-base00
:background :solarized-base3
:region '(:foreground :solarized-base1
:background :solarized-base3
:inverse-p t)
:highlight '(:background :solarized-base2)
:font-lock-function-name-face '(:foreground :solarized-blue)
:font-lock-comment-face '(:foreground :solarized-base1 :italic-p t)
:font-lock-type-face '(:foreground :solarized-yellow)
:font-lock-variable-name-face '(:foreground :solarized-blue)
:font-lock-string-face '(:foreground :solarized-cyan)
:font-lock-keyword-face '(:foreground :solarized-green)
:font-lock-builtin-face '(:foreground :solarized-green)
:compiler-note-highlight '(:foreground :solarized-green
:bold-p t)
:compiler-warning-highlight '(:foreground :solarized-orange
:bold-p t)
:compiler-error-highlight '(:foreground :solarized-red
:inverse-p t)
:show-point-face '(:foreground :solarized-cyan
:bold-p t :inverse-p t)
:interactive-input-face '(:foreground :solarized-red)
:non-focus-complete-face '(:background :solarized-base3)
:parenthesis-font-face-colours '(:solarized-red
:solarized-base01
:solarized-green
:solarized-orange
:solarized-blue
:solarized-magenta))
(define-color-theme "solarized-dark" ()
:foreground :solarized-base0
:background :solarized-base03
:region '(:foreground :solarized-base01
:background :solarized-base03
:inverse-p t)
:highlight '(:background :solarized-base02)
:font-lock-function-name-face '(:foreground :solarized-blue)
:font-lock-comment-face '(:foreground :solarized-base01 :italic-p t)
:font-lock-type-face '(:foreground :solarized-yellow)
:font-lock-variable-name-face '(:foreground :solarized-blue)
:font-lock-string-face '(:foreground :solarized-cyan)
:font-lock-keyword-face '(:foreground :solarized-green)
:font-lock-builtin-face '(:foreground :solarized-green)
:compiler-note-highlight '(:foreground :solarized-green
:bold-p t)
:compiler-warning-highlight '(:foreground :solarized-orange
:bold-p t)
:compiler-error-highlight '(:foreground :solarized-red
:inverse-p t)
:show-point-face '(:foreground :solarized-cyan
:bold-p t :inverse-p t)
:interactive-input-face '(:foreground :solarized-red)
:non-focus-complete-face '(:background :solarized-base03)
:parenthesis-font-face-colours '(:solarized-red
:solarized-base1
:solarized-green
:solarized-orange
:solarized-blue
:solarized-magenta))
;;; Show presence when loaded
(pushnew :editor-color-theme *features*)
;;;;; INDENTATION SETUP {{{
(progn
(setq-default indent-tabs-mode nil
tab-width 2)
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'sh-basic-offset 'tab-width)
(defvaralias 'js2-basic-offset 'tab-width)
(defvaralias 'sgml-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width))
(capitalized-words-mode haskell-decl-scan-mode haskell-indentation-mode highlight-uses-mode imenu-add-menubar-index interactive-haskell-mode)) t)
(capitalized-words-mode haskell-decl-scan-mode haskell-indentation-mode highlight-uses-mode imenu-add-menubar-index interactive-haskell-mode)))
(geiser pollen-mode js2-refactor npm-mode helm-dash aggressive-indent company-tern tern srefactor ac-slime znc helm-ag ag helm-projectile notmuch zenburn-theme zeal-at-point use-package tabbar slime-company rainbow-delimiters projectile mvn jdee intero helm evil-visual-mark-mode evil-vimish-fold evil-paredit evil-numbers ensime eldoc-eval editorconfig color-theme ansible alect-themes ac-js2)))
(deft geiser pollen-mode js2-refactor npm-mode helm-dash aggressive-indent company-tern tern srefactor ac-slime znc helm-ag ag helm-projectile notmuch zenburn-theme zeal-at-point use-package tabbar slime-company rainbow-delimiters projectile mvn jdee intero helm evil-visual-mark-mode evil-vimish-fold evil-paredit evil-numbers ensime eldoc-eval editorconfig color-theme ansible alect-themes ac-js2)))