From 01b779617c90eafd4c570f3cc88b3df1f7bf9660 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 21 Mar 2012 12:21:25 -0700 Subject: [PATCH 01/17] Use https instead of git for submodules --- .gitmodules | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitmodules b/.gitmodules index fbaf363..4e16b69 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,33 +1,33 @@ [submodule "vim/bundle/surround"] path = vim/bundle/surround - url = git://github.com/tpope/vim-surround.git + url = https://github.com/tpope/vim-surround.git [submodule "vim/bundle/speeddating"] path = vim/bundle/speeddating - url = git://github.com/tpope/vim-speeddating.git + url = https://github.com/tpope/vim-speeddating.git [submodule "vim/bundle/blackboard"] path = vim/bundle/blackboard - url = git://github.com/nelstrom/vim-blackboard.git + url = https://github.com/nelstrom/vim-blackboard.git [submodule "vim/bundle/fugitive"] path = vim/bundle/fugitive - url = git://github.com/tpope/vim-fugitive.git + url = https://github.com/tpope/vim-fugitive.git [submodule "vim/bundle/snipmate"] path = vim/bundle/snipmate - url = git://github.com/msanders/snipmate.vim.git + url = https://github.com/msanders/snipmate.vim.git [submodule "vim/bundle/unimpaired"] path = vim/bundle/unimpaired - url = git://github.com/tpope/vim-unimpaired.git + url = https://github.com/tpope/vim-unimpaired.git [submodule "vim/bundle/git"] path = vim/bundle/git - url = git://github.com/tpope/vim-git.git + url = https://github.com/tpope/vim-git.git [submodule "vim/bundle/solarized"] path = vim/bundle/solarized - url = git://github.com/altercation/vim-colors-solarized.git + url = https://github.com/altercation/vim-colors-solarized.git [submodule "vim/bundle/gundo"] path = vim/bundle/gundo url = http://github.com/sjl/gundo.vim.git [submodule "vim/bundle/command-t"] path = vim/bundle/command-t - url = git://git.wincent.com/command-t.git + url = https://git.wincent.com/command-t.git [submodule "vim/bundle/repeat"] path = vim/bundle/repeat url = https://github.com/tpope/vim-repeat From bb5526c6e71e6bca18faba806e48c6966f9ddb91 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 21 Mar 2012 12:28:18 -0700 Subject: [PATCH 02/17] Fix up snipmate submodule --- vim/bundle/snipmate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/snipmate b/vim/bundle/snipmate index c6b0959..f5a75d0 160000 --- a/vim/bundle/snipmate +++ b/vim/bundle/snipmate @@ -1 +1 @@ -Subproject commit c6b09594a9c78df92245d60faf37a43fbb4853e8 +Subproject commit f5a75d075d3c005ebe69e3f5e56cf99516e8aa3b From 6087aa4e0f4f8edea6311500cc7e3dba197294b3 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 21 Mar 2012 12:30:21 -0700 Subject: [PATCH 03/17] http -> https for a submodule... --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 4e16b69..0508347 100644 --- a/.gitmodules +++ b/.gitmodules @@ -24,7 +24,7 @@ url = https://github.com/altercation/vim-colors-solarized.git [submodule "vim/bundle/gundo"] path = vim/bundle/gundo - url = http://github.com/sjl/gundo.vim.git + url = https://github.com/sjl/gundo.vim.git [submodule "vim/bundle/command-t"] path = vim/bundle/command-t url = https://git.wincent.com/command-t.git From fc6eed5b25d5b104ac764aa7b2bf2d9242144b9a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 30 Mar 2012 20:16:21 -0700 Subject: [PATCH 04/17] Use the GitHub Command-t repo instead of the wincent.com one. Apparently his home page has bad SSL certs. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 0508347..d8f7e13 100644 --- a/.gitmodules +++ b/.gitmodules @@ -27,7 +27,7 @@ url = https://github.com/sjl/gundo.vim.git [submodule "vim/bundle/command-t"] path = vim/bundle/command-t - url = https://git.wincent.com/command-t.git + url = https://github.com/wincent/Command-T.git [submodule "vim/bundle/repeat"] path = vim/bundle/repeat url = https://github.com/tpope/vim-repeat From 83f54375a73233cbbfda86cd8a8a3a6844049a0c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 10 Apr 2012 10:04:09 -0700 Subject: [PATCH 05/17] Use black background instead of manutally specified colors for command divider --- zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zshrc b/zshrc index b1eeba4..ec1f310 100644 --- a/zshrc +++ b/zshrc @@ -50,7 +50,7 @@ precmd_separator_info() for (( i=0; $i < $filler; i++)); do pstr="${pstr}-" done - print -P "%{\e[38;5;240m%}$pstr$time%{\e[0m%}" + print -P "%K{black}$pstr$time%k" } precmd_git_rprompt() @@ -149,7 +149,6 @@ zstyle ':completion:*:cd:*' ignore-parents parent pwd # Expand partial paths zstyle ':completion:*' expand 'yes' - ### # FUNCTIONS ### From 700dba30b60ae99c8ca2d1de1f1d43406fb96737 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 10 Apr 2012 10:11:14 -0700 Subject: [PATCH 06/17] Clean up zshenv, add hooks for system and local env scripts --- zshenv | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/zshenv b/zshenv index 9d3363c..79d6d9a 100644 --- a/zshenv +++ b/zshenv @@ -3,11 +3,19 @@ # Eryn Wells +local sys=`uname -s | tr A-Z a-z` + + +# Global settings for sh, bash, ksh, zsh derivative shells +[ -e $HOME/.env ] && source $HOME/.env + + PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11/bin [ -d /opt/local/bin ] && PATH=/opt/local/bin:$PATH [ -d $HOME/.local/bin ] && PATH=$HOME/.local/bin:$PATH [ -d $HOME/bin ] && PATH=$HOME/bin:$PATH + PAGER="less" MANPAGER=$PAGER EDITOR="vim" @@ -22,12 +30,19 @@ export PATH \ LESSHISTFILE \ GREP_OPTIONS GREP_COLOR -[ `uname -s` = "Linux" ] && export MAIL="/var/mail/$USER" +[ $sys = 'linux' ] && export MAIL="/var/mail/$USER" + local py27local=$HOME/.local/lib/python2.7/site-packages if [[ ! -z $PYTHONPATH ]]; then - [ -d $py27local ] && PYTHONPATH=$PYTHONPATH:$py27local + [ -d $py27local ] && PYTHONPATH=$py27local:$PYTHONPATH else PYTHONPATH=$py27local fi export PYTHONPATH + + +# System specific environment settings +[ -e $HOME/.zshenv.$sys ] && source $HOME/.zshenv.$sys +# Local environment settings +[ -e $HOME/.zshenv.local ] && source $HOME/.zshenv.local From e85fa6f09167f53544ffed59e9ff1db838d63e48 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 10 Apr 2012 10:11:38 -0700 Subject: [PATCH 07/17] Some solarized color scheme settings for Vim --- vimrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 5e7c197..ab20841 100644 --- a/vimrc +++ b/vimrc @@ -104,7 +104,9 @@ if &t_Co > 2 || has('gui_running') syntax on " turn on syntax highlighting endif -" use a colorscheme if the terminal can support it (or we're in a GUI) +" use solarized colorscheme if the terminal can support it (or we're in a GUI) +let g:solarized_termtrans=1 +let g:solarized_visibility='low' if has('gui_running') set bg=light colorscheme solarized From c5f0040fa062dcaa87839418b06450eab5451dd9 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 11 Apr 2012 09:53:24 -0700 Subject: [PATCH 08/17] Add a directory of dircolors configs --- dircolors/linux.cfg | 194 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 dircolors/linux.cfg diff --git a/dircolors/linux.cfg b/dircolors/linux.cfg new file mode 100644 index 0000000..a4cadea --- /dev/null +++ b/dircolors/linux.cfg @@ -0,0 +1,194 @@ +# Configuration file for dircolors, a utility to help you set the +# LS_COLORS environment variable used by GNU ls with the --color option. +# Copyright (C) 1996, 1999-2010 Free Software Foundation, Inc. +# Copying and distribution of this file, with or without modification, +# are permitted provided the copyright notice and this notice are preserved. +# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the +# slackware version of dircolors) are recognized but ignored. +# Below, there should be one TERM entry for each termtype that is colorizable +TERM Eterm +TERM ansi +TERM color-xterm +TERM con132x25 +TERM con132x30 +TERM con132x43 +TERM con132x60 +TERM con80x25 +TERM con80x28 +TERM con80x30 +TERM con80x43 +TERM con80x50 +TERM con80x60 +TERM cons25 +TERM console +TERM cygwin +TERM dtterm +TERM eterm-color +TERM gnome +TERM gnome-256color +TERM jfbterm +TERM konsole +TERM kterm +TERM linux +TERM linux-c +TERM mach-color +TERM mlterm +TERM putty +TERM rxvt +TERM rxvt-256color +TERM rxvt-cygwin +TERM rxvt-cygwin-native +TERM rxvt-unicode +TERM rxvt-unicode256 +TERM screen +TERM screen-256color +TERM screen-256color-bce +TERM screen-bce +TERM screen-w +TERM screen.linux +TERM vt100 +TERM xterm +TERM xterm-16color +TERM xterm-256color +TERM xterm-88color +TERM xterm-color +TERM xterm-debian +# Below are the color init strings for the basic file types. A color init +# string consists of one or more of the following numeric codes: +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white +NORMAL 00 # no color code at all +FILE 00 # regular file: use no color at all +RESET 0 # reset to "normal" color +DIR 01;07;30;44 # directory +LINK 01;07;30;46 # symbolic link. (If you set this to 'target' instead of a + # numerical value, the color is as for the file pointed to.) +MULTIHARDLINK 00 # regular file with more than one link +FIFO 07;30;43 # pipe +SOCK 01;07;30;45 # socket +DOOR 01;35 # door +BLK 40;33;01 # block device driver +CHR 40;33;01 # character device driver +ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file +SETUID 37;41 # file that is setuid (u+s) +SETGID 30;43 # file that is setgid (g+s) +CAPABILITY 30;41 # file with capability +STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) +OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky +STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable +# This is for files with execute permission: +EXEC 01;32 +# List any file extensions like '.gz' or '.tar' that you would like ls +# to colorize below. Put the extension, a space, and the color init string. +# (and any comments you want to add after a '#') +# If you use DOS-style suffixes, you may want to uncomment the following: +#.cmd 01;32 # executables (bright green) +#.exe 01;32 +#.com 01;32 +#.btm 01;32 +#.bat 01;32 +# Or if you want to colorize scripts even if they do not have the +# executable bit actually set. +#.sh 01;32 +#.csh 01;32 + # archives or compressed (bright red) +.tar 01;31 +.tgz 01;31 +.arj 01;31 +.taz 01;31 +.lzh 01;31 +.lzma 01;31 +.tlz 01;31 +.txz 01;31 +.zip 01;31 +.z 01;31 +.Z 01;31 +.dz 01;31 +.gz 01;31 +.lz 01;31 +.xz 01;31 +.bz2 01;31 +.bz 01;31 +.tbz 01;31 +.tbz2 01;31 +.tz 01;31 +.deb 01;31 +.rpm 01;31 +.jar 01;31 +.rar 01;31 +.ace 01;31 +.zoo 01;31 +.cpio 01;31 +.7z 01;31 +.rz 01;31 +# image formats +.jpg 01;35 +.jpeg 01;35 +.gif 01;35 +.bmp 01;35 +.pbm 01;35 +.pgm 01;35 +.ppm 01;35 +.tga 01;35 +.xbm 01;35 +.xpm 01;35 +.tif 01;35 +.tiff 01;35 +.png 01;35 +.svg 01;35 +.svgz 01;35 +.mng 01;35 +.pcx 01;35 +.mov 01;35 +.mpg 01;35 +.mpeg 01;35 +.m2v 01;35 +.mkv 01;35 +.ogm 01;35 +.mp4 01;35 +.m4v 01;35 +.mp4v 01;35 +.vob 01;35 +.qt 01;35 +.nuv 01;35 +.wmv 01;35 +.asf 01;35 +.rm 01;35 +.rmvb 01;35 +.flc 01;35 +.avi 01;35 +.fli 01;35 +.flv 01;35 +.gl 01;35 +.dl 01;35 +.xcf 01;35 +.xwd 01;35 +.yuv 01;35 +.cgm 01;35 +.emf 01;35 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axv 01;35 +.anx 01;35 +.ogv 01;35 +.ogx 01;35 +# audio formats +.aac 00;36 +.au 00;36 +.flac 00;36 +.mid 00;36 +.midi 00;36 +.mka 00;36 +.mp3 00;36 +.mpc 00;36 +.ogg 00;36 +.ra 00;36 +.wav 00;36 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axa 00;36 +.oga 00;36 +.spx 00;36 +.xspf 00;36 From ddfca13b5e08db454f100f0b269516feb4334fa7 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 11 Apr 2012 09:54:43 -0700 Subject: [PATCH 09/17] Fancy new setup.sh With colors! And z shell! And ponies! But seriously, it will now symlink all the files in the current directory and print some nice messages about its progress. --- setup.sh | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/setup.sh b/setup.sh index a9d6acd..9c0a464 100755 --- a/setup.sh +++ b/setup.sh @@ -1,36 +1,39 @@ -#!/bin/bash +#!/bin/zsh dfdir=$(cd "$(dirname "$0")" && pwd) -ln -s "$dfdir/profile" "$HOME/.profile" -ln -s "$dfdir/rc" "$HOME/.rc" +print -P "%BSymlinking config files%b" +for dotfile in `ls .` +do + [ $dotfile = 'setup.sh' ] && continue -ln -s "$dfdir/zshrc" "$HOME/.zshrc" -ln -s "$dfdir/zsh" "$HOME/.zsh" -ln -s "$dfdir/zprofile" "$HOME/.zprofile" -ln -s "$dfdir/zshenv" "$HOME/.zshenv" + local dest="$HOME/.$dotfile" + local action='skipped' -ln -s "$dfdir/vimrc" "$HOME/.vimrc" -ln -s "$dfdir/vim" "$HOME/.vim" + if [[ ! -L "$dest" ]]; then + action='linked' + else + action='skipped' + fi + filler=$(($COLUMNS - ${#dest} - ${#action} - 4)) + spaces='' + for (( i=0; $i < $filler; i++ )); do spaces="$spaces " done -ln -s "$dfdir/indent.pro" "$HOME/.indent.pro" -ln -s "$dfdir/screenrc" "$HOME/.screenrc" -ln -s "$dfdir/tmux.conf" "$HOME/.tmux.conf" -ln -s "$dfdir/ledgerrc" "$HOME/.ledgerrc" -ln -s "$dfdir/toprc" "$HOME/.toprc" - -ln -s "$dfdir/muttrc" "$HOME/.muttrc" -ln -s "$dfdir/mutt" "$HOME/.mutt" - -ln -s "$dfdir/gitconfig" "$HOME/.gitconfig" - -ln -s "$dfdir/irssi" "$HOME/.irssi" - -[ `uname -s` = "Linux" ] && ln -s "$dfdir/Xdefaults" "$HOME/.Xdefaults" + echo -n " $dest" + if [[ $action = 'linked' ]]; then + ln -fs "$dfdir/$dotfile" "$dest" + action="%F{yellow}$action%f" + else + action="%F{green}$action%f" + fi + print -P "$spaces%F{green}$action%f" +done +echo "touch $HOME/.hushlogin" touch "$HOME/.hushlogin" -# Initialized submodules +# Initialize submodules +print -P "%BInitializing git submodules%b" cd "$dfdir" git submodule init git submodule update From 43c6765b057de4607c3dd95391567199a15c5a25 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 11 Apr 2012 09:56:27 -0700 Subject: [PATCH 10/17] Add pprint-json alias; source local rc file All in .rc --- rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rc b/rc index 7711b3e..25c47b3 100644 --- a/rc +++ b/rc @@ -25,9 +25,15 @@ alias today='date +%Y-%m-%d' alias addkey="ssh-agent ~/.ssh/id_rsa" +alias pprint-json="python -c 'import sys,json;print json.dumps(json.load(sys.stdin), indent=2)'" + which osascript &>/dev/null if [[ $? -eq 0 ]]; then alias itp="osascript $HOME/Code/AppleScripts/iTunes/previous-track.scpt" alias itn="osascript $HOME/Code/AppleScripts/iTunes/next-track.scpt" alias ito="osascript $HOME/Code/AppleScripts/iTunes/toggle.scpt" fi + +if [[ -e $HOME/.rc-local ]]; then + source $HOME/.rc-local +fi From 6282d07291878f1554f1b0241c654e7f0f558047 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:15:30 -0700 Subject: [PATCH 11/17] Environment settings for bash and derivatives --- env | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 env diff --git a/env b/env new file mode 100644 index 0000000..09f8c4d --- /dev/null +++ b/env @@ -0,0 +1,20 @@ +# .env +# vim: ft=zsh +# +# Environment settings for bash and derivatives +# +# Eryn Wells + +export SYS=`uname -s | tr A-Z a-z` + +PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin +[ -d /usr/X11/bin ] && PATH=$PATH:/usr/X11/bin +[ -d /opt/local/bin ] && PATH=/opt/local/bin:$PATH +[ -d $HOME/.local/bin ] && PATH=$HOME/.local/bin:$PATH +[ -d $HOME/bin ] && PATH=$HOME/bin:$PATH +export PATH + +# System specific environment settings +[ -e $HOME/.env.$SYS ] && source $HOME/.env.$SYS +# Local environment settings +[ -e $HOME/.env.local ] && source $HOME/.env.local From 6f75e6798de49ce818a6fc31287eacc721f064f1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:16:07 -0700 Subject: [PATCH 12/17] Move some stuff around in zshenv, some to env --- zshenv | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/zshenv b/zshenv index 79d6d9a..aaa4875 100644 --- a/zshenv +++ b/zshenv @@ -1,21 +1,12 @@ # .zshenv # vim: ft=zsh +# +# Environment settings for zsh +# # Eryn Wells - -local sys=`uname -s | tr A-Z a-z` - - -# Global settings for sh, bash, ksh, zsh derivative shells [ -e $HOME/.env ] && source $HOME/.env - -PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11/bin -[ -d /opt/local/bin ] && PATH=/opt/local/bin:$PATH -[ -d $HOME/.local/bin ] && PATH=$HOME/.local/bin:$PATH -[ -d $HOME/bin ] && PATH=$HOME/bin:$PATH - - PAGER="less" MANPAGER=$PAGER EDITOR="vim" @@ -30,8 +21,7 @@ export PATH \ LESSHISTFILE \ GREP_OPTIONS GREP_COLOR -[ $sys = 'linux' ] && export MAIL="/var/mail/$USER" - +[ $SYS = 'linux' ] && export MAIL="/var/mail/$USER" local py27local=$HOME/.local/lib/python2.7/site-packages if [[ ! -z $PYTHONPATH ]]; then @@ -41,8 +31,7 @@ else fi export PYTHONPATH - # System specific environment settings -[ -e $HOME/.zshenv.$sys ] && source $HOME/.zshenv.$sys +[ -e $HOME/.zshenv.$SYS ] && source $HOME/.zshenv.$SYS # Local environment settings [ -e $HOME/.zshenv.local ] && source $HOME/.zshenv.local From ce63e3f83c6366508f45aaf3e6aa7b6a94b85b0d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:19:58 -0700 Subject: [PATCH 13/17] Clean up zshrc; add comments --- zshrc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/zshrc b/zshrc index ec1f310..7e5f359 100644 --- a/zshrc +++ b/zshrc @@ -1,6 +1,13 @@ # .zshrc +# vim: ft=zsh +# +# ZSH init for interactive shells +# # Eryn Wells +# load bash/zsh/ksh agnostic configurations +source $HOME/.rc + # PROMPT # ' histnum bgjobsflag time (%|#)' # Colors are determined based on zsh capability (>= version 4.3.7) @@ -16,12 +23,6 @@ else bgjob="%(1j.%{$fg_bold[magenta]%}* %{$reset_color%}.)" hist="%(0?.%h.%{$fg_bold[red]%}%h%{$reset_color%})" isroot="%(!.%{$fg_bold[red]%}%#%{$reset_color%}.%#)" - - # where do I include these? - #bgjob="%(1j.%B*%b.)" - #cmdstat="%(0?..%B!%b)" - #isroot="%(!.%B#%b.)" - #mytime="%T" fi PROMPT=" $hist $bgjob$isroot " @@ -77,9 +78,6 @@ setopt \ EXTENDED_GLOB \ MULTIOS -# load bash/zsh/ksh agnostic configurations -source $HOME/.rc - alias pd='pushd' alias pod='popd' @@ -111,16 +109,21 @@ HISTFILE="$HOME/.zhistory" #[ -n "$DISPLAY" ] && alias -s pdf='evince' #[ -n "$DISPLAY" ] && alias -s dvi='evince' -# host specific initialization -[ -e $HOME/.zshrc-local ] && . ~/.zshrc-local +# Set up dircolors +if [ -e $HOME/.dircolors/$sys.cfg ]; then + dircolors=$HOME/.dircolors/$sys.cfg +else + dircolors=$HOME/.dircolors/default.cfg +fi +eval `dircolors $dircolors` # emacs command line editing bindkey -v -# +### # Completion -# +### # load completion system autoload -U compinit @@ -158,8 +161,11 @@ fpath=($HOME/.zsh/func $fpath) # Wikipedia lookup, courtesy of msanders@github autoload wiki +# Make a Maildir autoload mkmdir +# Generate a password autoload pw +# Make a C module (.c and .h pair) autoload mkcmod # Go up $1 directories, where $1 is an integer (saves me from having to type ../ @@ -178,11 +184,5 @@ function up { } -# Toggle showing a separator before every command -function tsep { - if (($precmd_functions[(Ie)precmd_separator] > 0)); then - precmd_functions=${precmd_functions#precmd_separator} - else - precmd_functions+=(precmd_separator) - fi -} +[ -e $HOME/.zshrc.$SYS ] && source $HOME/.zshrc.$SYS +[ -e $HOME/.zshrc.local ] && source $HOME/.zshrc.local From 70c4118fa568e81ba7c637b758872bbcef162d6d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:28:00 -0700 Subject: [PATCH 14/17] Add README --- README | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..31262c9 --- /dev/null +++ b/README @@ -0,0 +1,32 @@ +Dotfiles +======== + +This is my collection of dotfiles, preserved here for all to see and enjoy. +Feel free to copy anything you see here. It would be nice if you added a +comment mentioning where you got it. + +My environment relies on `zsh`, `vim`, and `git`. + +## Installation + +Clone the repository to a directory on your machine. I like to use +`~/.dotfiles`. + + git clone https://github.com/erynofwales/dotfiles.git ~/.dotfiles + +Run the setup script. + + cd ~/.dotfiles + ./setup.sh + +This script will symlink all the files in the directory to your home directory +and initialize the various submodules (mostly Vim plugins). + +Enjoy. + +## License + +Everything in this repository is licensed under the [Creative Commons +Attribution 3.0 Unported License][ccaul]. + +[ccaul]: http://creativecommons.org/licenses/by/3.0/ From aa77d1997a76208b52e9abb76aa3fcabbbc48da4 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:29:23 -0700 Subject: [PATCH 15/17] Move README to README.md --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 7102fddbc4002c54ebb132aa04fcc5ede846da20 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:41:32 -0700 Subject: [PATCH 16/17] Expand README with docs about shell environment --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 31262c9..43a1037 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,23 @@ and initialize the various submodules (mostly Vim plugins). Enjoy. +## Shell Environment + +As much as possible, I tried to keep these files as system agnostic as +possible. I work on lots of different systems so having the ability to bring +down my core environment and customize it is very useful. Most of the +environment files have three levels: + +1. The main file (e.g. `.zshrc`). +2. A system specific file whose name is generated by the `uname -s` command. + So, these files have names like `.zshrc.darwin` and `.env.linux`. The system + name is exported as `$SYS` in the `.env` script. +3. A machine specific file whose name is derived by appending `.local` to the + main file's name (e.g. `.zshrc.local`). + +Files 2 and 3 are sourced at the end of the main file, so any settings you add +there will override those set in the main file. + ## License Everything in this repository is licensed under the [Creative Commons From d7f92a1f85b356b5fc03aac7ba13ac2d7c6f9108 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:44:42 -0700 Subject: [PATCH 17/17] Remove .irssi/config --- irssi/config | 200 --------------------------------------------------- 1 file changed, 200 deletions(-) delete mode 100644 irssi/config diff --git a/irssi/config b/irssi/config deleted file mode 100644 index 57b2cd8..0000000 --- a/irssi/config +++ /dev/null @@ -1,200 +0,0 @@ -servers = ( - { - address = "irc.susans.org"; - chatnet = "Susans"; - port = "6667"; - use_ssl = "no"; - ssl_verify = "no"; - autoconnect = "yes"; - } -); - -chatnets = { - Susans = { - type = "IRC"; - nick = "val"; - username = "irssi"; - realname = "Eryn"; - autosendcmd = "/wait 2000; /msg NickServ identify pineapple"; - }; -}; - -channels = ( - { name = "#Chat"; chatnet = "Susans"; autojoin = "yes"; }, - { name = "#TSTalk"; chatnet = "Susans"; autojoin = "yes"; } -); - -aliases = { - J = "join"; - WJOIN = "join -window"; - WQUERY = "query -window"; - LEAVE = "part"; - BYE = "quit"; - EXIT = "quit"; - SIGNOFF = "quit"; - DESCRIBE = "action"; - DATE = "time"; - HOST = "userhost"; - LAST = "lastlog"; - SAY = "msg *"; - WI = "whois"; - WII = "whois $0 $0"; - WW = "whowas"; - W = "who"; - N = "names"; - M = "msg"; - T = "topic"; - C = "clear"; - CL = "clear"; - K = "kick"; - KB = "kickban"; - KN = "knockout"; - BANS = "ban"; - B = "ban"; - MUB = "unban *"; - UB = "unban"; - IG = "ignore"; - UNIG = "unignore"; - SB = "scrollback"; - UMODE = "mode $N"; - WC = "window close"; - WN = "window new hide"; - SV = "say Irssi $J ($V) - http://irssi.org/"; - GOTO = "sb goto"; - CHAT = "dcc chat"; - RUN = "SCRIPT LOAD"; - CALC = "exec - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi"; - SBAR = "STATUSBAR"; - INVITELIST = "mode $C +I"; - Q = "QUERY"; - "MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save"; - EXEMPTLIST = "mode $C +e"; - ATAG = "WINDOW SERVER"; - UNSET = "set -clear"; - RESET = "set -default"; -}; - -statusbar = { - # formats: - # when using {templates}, the template is shown only if it's argument isn't - # empty unless no argument is given. for example {sb} is printed always, - # but {sb $T} is printed only if $T isn't empty. - - items = { - # start/end text in statusbars - barstart = "{sbstart}"; - barend = "{sbend}"; - - topicbarstart = "{topicsbstart}"; - topicbarend = "{topicsbend}"; - - # treated "normally", you could change the time/user name to whatever - time = "{sb $Z}"; - user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}"; - - # treated specially .. window is printed with non-empty windows, - # window_empty is printed with empty windows - window = "{sb $winref:$tag/$itemname{sbmode $M}}"; - window_empty = "{sb $winref{sbservertag $tag}}"; - prompt = "{prompt $[.15]itemname}"; - prompt_empty = "{prompt $winname}"; - topic = " $topic"; - topic_empty = " Irssi v$J - http://www.irssi.org"; - - # all of these treated specially, they're only displayed when needed - lag = "{sb Lag: $0-}"; - act = "{sb Act: $0-}"; - more = "-- more --"; - }; - - # there's two type of statusbars. root statusbars are either at the top - # of the screen or at the bottom of the screen. window statusbars are at - # the top/bottom of each split window in screen. - default = { - # the "default statusbar" to be displayed at the bottom of the window. - # contains all the normal items. - window = { - disabled = "no"; - - # window, root - type = "window"; - # top, bottom - placement = "bottom"; - # number - position = "1"; - # active, inactive, always - visible = "active"; - - # list of items in statusbar in the display order - items = { - barstart = { priority = "100"; }; - time = { }; - user = { }; - window = { }; - window_empty = { }; - lag = { priority = "-1"; }; - act = { priority = "10"; }; - more = { priority = "-1"; alignment = "right"; }; - barend = { priority = "100"; alignment = "right"; }; - }; - }; - - # statusbar to use in inactive split windows - window_inact = { - type = "window"; - placement = "bottom"; - position = "1"; - visible = "inactive"; - items = { - barstart = { priority = "100"; }; - window = { }; - window_empty = { }; - more = { priority = "-1"; alignment = "right"; }; - barend = { priority = "100"; alignment = "right"; }; - }; - }; - - # we treat input line as yet another statusbar :) It's possible to - # add other items before or after the input line item. - prompt = { - type = "root"; - placement = "bottom"; - # we want to be at the bottom always - position = "100"; - visible = "always"; - items = { - prompt = { priority = "-1"; }; - prompt_empty = { priority = "-1"; }; - # treated specially, this is the real input line. - input = { priority = "10"; }; - }; - }; - - # topicbar - topic = { - type = "root"; - placement = "top"; - position = "1"; - visible = "always"; - items = { - topicbarstart = { priority = "100"; }; - topic = { }; - topic_empty = { }; - topicbarend = { priority = "100"; alignment = "right"; }; - }; - }; - }; -}; -settings = { - core = { real_name = "Unknown"; user_name = "ewells"; nick = "ewells"; }; - "fe-text" = { actlist_sort = "refnum"; }; - "fe-common/core" = { - autolog = "yes"; - hide_colors = "yes"; - autolog_path = "~/Dropbox/Logs/irssi/$tag/$0.log"; - }; -}; -logs = { }; -hilights = ( - { text = "\\"; nick = "yes"; word = "yes"; regexp = "yes"; } -);