summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2011-05-12 16:49:29 +0200
committerSebastian Reichel <sre@ring0.de>2011-05-12 16:49:29 +0200
commit4071689c049d834aff0668bb728a9b523a8a608c (patch)
treed6d7bb44a19b263db04d98a8eea5ab95b95b12e4
downloadzsh-config-4071689c049d834aff0668bb728a9b523a8a608c.tar.bz2
initial config
-rw-r--r--zshrc120
1 files changed, 120 insertions, 0 deletions
diff --git a/zshrc b/zshrc
new file mode 100644
index 0000000..ae7b853
--- /dev/null
+++ b/zshrc
@@ -0,0 +1,120 @@
+# initialize zsh auto completion system
+autoload -Uz compinit vcs_info; compinit
+zmodload -i zsh/complist
+
+# history settings
+#HISTFILE=~/.histfile
+SAVEHIST=0
+HISTSIZE=1000
+
+# no beep
+setopt prompt_subst autocd
+unsetopt beep
+
+# sane keybindings
+bindkey -e
+
+# define colors
+BLACK="%{"$'\033[01;30m'"%}"
+GREEN="%{"$'\033[01;32m'"%}"
+RED="%{"$'\033[01;31m'"%}"
+YELLOW="%{"$'\033[01;33m'"%}"
+BLUE="%{"$'\033[01;34m'"%}"
+BOLD="%{"$'\033[01;39m'"%}"
+NORM="%{"$'\033[00m'"%}"
+
+# my prefered prompt with color
+# %n = Username
+# %m = Hostname
+# %~ = Current Directory
+# %# = Shell Icon % for User, # for root
+PROMPT="${GREEN}%n@%m ${BLUE}%~ %# ${NORM}"
+
+# VCS prompt on the right side
+RPROMPT=$'$(vcs_info_wrapper)'
+
+# enable color in some commands
+eval "`dircolors -b`"
+export LS_COLORS="$LS_COLORS*.wmv=01;35:"
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+alias less="less -r"
+
+# shortcut for some commands
+alias l=ls
+alias gq="background geeqie"
+alias ev="background evince"
+
+# vim: open multiple files in tabs by default
+alias vim="vim -p"
+
+# improved calender
+alias cal="ccal -e -f"
+
+alias mplayer="mplayer2"
+
+# suffix aliases
+alias -s jpg="background gpicview"
+alias -s gif="background gpicview"
+alias -s png="background gpicview"
+alias -s svg="background gpicview"
+alias -s pdf="background evince"
+alias -s mkv="mplayer2 -really-quiet"
+alias -s ogg="mplayer2 -really-quiet"
+alias -s wmv="mplayer2 -really-quiet"
+alias -s mpg="mplayer2 -really-quiet"
+alias -s avi="mplayer2 -really-quiet"
+alias -s mp4="mplayer2 -really-quiet"
+alias -s exe="wine"
+alias -s vala="vim"
+alias -s txt="vim"
+alias -s doc="oowriter"
+
+# set default programs
+export EDITOR=vim
+export PAGER=vimpager
+export BROWSER=chromium
+
+# path /sbin for ifconfig etc.
+export PATH=$PATH:/usr/sbin:/sbin:/var/lib/gems/1.8/bin
+
+# function to set terminal title
+title() {
+ if [[ $TERM == "xterm" || $TERM == "rxvt" || $TERM == "screen" ]]; then
+ print -Pn "\e]2;$*\a"
+ fi
+}
+
+# function to spawn a program in the background
+background() {
+ $1 $2 >/dev/null 2>&1 &!
+}
+
+# get vcs info for the prompt
+vcs_info_wrapper() {
+ vcs_info
+ echo "${vcs_info_msg_0_}"
+}
+
+# update title
+function precmd { title "%n@%m %~" }
+
+# menus for mutt and less
+zstyle ':completion:*:*:less:*' menu yes select
+zstyle ':completion:*:*:mutt:*' menu yes select
+
+# menu for Processes
+zstyle ':completion:*:*:*:*:processes' menu yes select
+zstyle ':completion:*:*:*:*:processes' force-list always
+
+# 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
+
+# export some variables
+export EMAIL="sre@ring0.de"
+export DEBEMAIL="sre@debian.org"
+export DEBSIGN_MAINT="sre@debian.org"
+export DEBCHANGE_RELEASE_HEURISTIC=changelog