commit 94f8961bea157880c5b69e9d8133b65dc42362e0
parent 8babf2cf8c68be6f919edd58e306e61b99ce448c
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Fri, 3 Jan 2014 16:38:32 +0100
zshrc revamped, minor changes to tmux aesthetics
Diffstat:
M | .tmux.conf | | | 22 | +++++++++++++++------- |
M | .zshrc | | | 200 | +++++++++++++++++++++++++++++++++++-------------------------------------------- |
M | install.sh | | | 8 | +++----- |
3 files changed, 106 insertions(+), 124 deletions(-)
diff --git a/.tmux.conf b/.tmux.conf
@@ -3,6 +3,7 @@ set-option -g prefix C-a
bind-key C-w last-window # Go to last window with C-a C-w
bind-key C-a last-pane # Go to last pane with C-a C-a
+set -g default-terminal "screen-256color"
setw -g mode-keys vi
# vi-like text yanking in copy mode
@@ -34,7 +35,6 @@ set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
-set -g default-terminal "screen-256color"
setw -g utf8 on
setw -g status-utf8 on
@@ -51,13 +51,21 @@ bind-key a send-prefix
# done
# Set status bar
-set -g status-interval 5
+#set -g status-interval 5
+#set -g status-bg default
+#set -g status-fg white
+##set -g status-right "#[fg=green]#H"
+#set -g status-left-length 40
+#set -g status-left "#[fg=green]s:#S #[fg=yellow]w:#I #[fg=cyan]p:#P"
+#set -g status-right "#[fg=blue]#(acpi|sed 's/Battery//; s/0://; s/Discharging//; s/Full, //; s/remaining//; s/ , //; s/Charging, /+/; s/ until charged/ /; s/, / /; s/Unknown //; s/ $//;') #[fg=white]#(cat /proc/loadavg|awk '{print $1;}') #[fg=cyan]%d %b %R"
+#set -g status-justify centre
set -g status-bg default
-set -g status-fg white
-#set -g status-right "#[fg=green]#H"
-set -g status-left-length 40
-set -g status-left "#[fg=green]s:#S #[fg=yellow]w:#I #[fg=cyan]p:#P"
-set -g status-right "#[fg=blue]#(acpi|sed 's/Battery//; s/0://; s/Discharging//; s/Full, //; s/remaining//; s/ , //; s/Charging, /+/; s/ until charged/ /; s/, / /; s/Unknown //; s/ $//;') #[fg=white]#(cat /proc/loadavg|awk '{print $1;}') #[fg=cyan]%d %b %R"
+set -g status-fg cyan
+set -g status-interval 4
+set -g status-left ''
+set -g status-right ''
+#set -g status-left '#[fg=white,bold]#S#[fg=cyan] | #[fg=white,bold]#(echo $USER) '
+#set -g status-right '#[fg=white]#H#[fg=cyan] | #[fg=white]#(uname -r)#[default]'
set -g status-justify centre
# Timeout for pane-numbering in milliseconds
diff --git a/.zshrc b/.zshrc
@@ -1,122 +1,98 @@
-# Path to your oh-my-zsh configuration.
-ZSH=$HOME/.oh-my-zsh
+source /home/adc/code/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+
+autoload -U compinit promptinit colors
+compinit
+promptinit
+colors
+
+PROMPT="
+%{$fg[red]%} ยป %{$reset_color%}"
+RPROMPT="%B%{$fg[cyan]%}%~%{$reset_color%}"
+
+setopt AUTO_CD
+setopt CORRECT
+setopt completealiases
+setopt append_history
+setopt share_history
+setopt hist_verify
+setopt hist_ignore_all_dups
+export HISTFILE="${HOME}"/.zsh-history
+export HISTSIZE=1000000
+export SAVEHIST=$HISTSIZE
-# Set name of the theme to load.
-# Look in ~/.oh-my-zsh/themes/
-# Optionally, if you set this to "random", it'll load a random theme each
-# time that oh-my-zsh is loaded.
-#ZSH_THEME="robbyrussell"
-#ZSH_THEME="gnzh"
-ZSH_THEME="gnzh-mod"
-#ZSH_THEME="agnoster"
-#ZSH_THEME="ys"
-#ZSH_THEME="ys-mod"
-
-# Example aliases
-# alias zshconfig="mate ~/.zshrc"
-# alias ohmyzsh="mate ~/.oh-my-zsh"
-
-# 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"
+plugins=(git)
-# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
-# export UPDATE_ZSH_DAYS=13
+zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+zstyle ':completion:*' list-colors 'reply=( "=(#b)(*$VAR)(?)*=00=$color[green]=$color[bg-green]" )'
+zstyle ':completion:*:*:*:*:hosts' list-colors '=*=30;41'
+zstyle ':completion:*:*:*:*:users' list-colors '=*=$color[green]=$color[red]'
+zstyle ':completion:*' menu select
-# Uncomment following line if you want to disable colors in ls
-# DISABLE_LS_COLORS="true"
+bindkey -v
+bindkey '^R' history-incremental-search-backward
+bindkey "^j" history-beginning-search-backward
+bindkey "^k" history-beginning-search-forward
-# Uncomment following line if you want to disable autosetting terminal title.
-# DISABLE_AUTO_TITLE="true"
+function open() { xdg-open $1 &> /dev/null &disown; }
+function lt() { ls -ltrsa "$@" | tail; }
+function psgrep() { ps axuf | grep -v grep | grep "$@" -i --color=auto; }
+function fname() { find . -iname "*$@*"; }
-# Uncomment following line if you want red dots to be displayed while waiting for completion
-# COMPLETION_WAITING_DOTS="true"
+alias svim='sudoedit'
+alias gs='git status'
+alias gc='git commit'
+alias gp='git push'
+alias gcgp='git commit && git push'
+alias gcagp='git commit -a && git push'
-# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
-# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
-# Example format: plugins=(rails git textmate ruby lighthouse)
-plugins=(git)
+alias alsamixer="alsamixer -g"
+alias equalizer="alsamixer -D equal"
+
+alias zshreload="source ~/.zshrc"
+
+#alias rm='rm -i'
+alias rmi='rm -i'
+#alias mv='mv -i'
+alias c='xsel -ib'
+alias h='history | tail'
+alias hg='history | grep '
+alias ch='chmod 755 '
+alias ..='cd ..'
+alias ...='cd ../..'
+alias ....='cd ../../..'
+alias .....='cd ../../../..'
+alias ......='cd ../../../../..'
+alias ']'='open'
+alias ll='ls -alF'
+alias la='ls -A'
+alias lla='ls -lA'
+alias l='ls -CF'
+
+# enable color support of ls and also add handy aliases
+alias ls='ls --color=auto'
+alias dir='dir --color=auto'
+alias vdir='vdir --color=auto'
+alias grep='grep --color=auto'
+alias fgrep='fgrep --color=auto'
+alias egrep='egrep --color=auto'
+
+set -o noclobber
+set -o vi
-source $ZSH/oh-my-zsh.sh
+# MUTT BG fix
+COLORFGBG="default;default"
-# disable autocorrect
-unsetopt correctall
+pathdirs=(
+ ~/scripts
+)
+for dir in $pathdirs; do
+ if [ -d $dir ]; then
+ path+=$dir
+ fi
+done
-# set vi-like movement
-set -o vi
-export EDITOR=vim
-
-# vi mode status
-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
-
-# Add local bin folder to path
-export PATH=$HOME/bin:$PATH
-export PATH=~/bin:$PATH
-export PATH=~/code/metasploit:$PATH
-export PATH=~/.gem/ruby/1.9.1/bin:$PATH
-export PATH=~/code/julia:$PATH
-export PATH=~/code/elmerfem/fem/src:$PATH
-
-# CUDA 5.0 (installed with `sudo sh cuda_5.0.35_linux_64_ubuntu11.10-1.run -override`)
-export PATH=/usr/local/cuda-5.0/bin:$PATH
-export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:/usr/local/cuda-5.0/lib:$LD_LIBRARY_PATH
-
-alias l='ls -lh'
-alias ll='ls -lha'
-alias m='make'
-alias mc='make clean'
-alias zshreload='source ~/.zshrc'
-alias gs='git status'
-alias gcgp='git commit && git push'
-alias gcagp='git commit -a && git push'
+export EDITOR="vim"
+export XDG_CONFIG_HOME="/home/adc/.config"
-# mark functionality
-export MARKPATH=$HOME/.marks
-function jump {
- cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
-}
-function mark {
- mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
-}
-function unmark {
- rm -i $MARKPATH/$1
-}
-function marks {
- ls -l $MARKPATH | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
-}
-
-# speech synth command
-function say { echo $* | festival --tts }
-
-# LPP (liggghts post-processing)
-CFDEM_pizzaPath=/home/adc/code/liggghts/lpp-git
-alias pizza='python -i $CFDEM_pizzaPath/src/pizza.py'
-
-# ESYS-Particle
-export PATH=/usr/local/bin/:$PATH
-export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
-export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
-export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH
-export PYTHONPATH=/home/adc/code/esys-particle/own-modules/:$PYTHONPATH
-
-# LMGC90v2
-if [ -z ${PYTHONPATH} ]; then
- export PYTHONPATH=/home/adc/code/lmgc90/LMGC90v2/builds/Lmgc90_v2
- export PYTHONPATH=${PYTHONPATH}://home/adc/code/lmgc90/LMGC90v2/builds/Lmgc90_v2/lib
-else
- export PYTHONPATH=${PYTHONPATH}://home/adc/code/lmgc90/LMGC90v2/builds/Lmgc90_v2
- export PYTHONPATH=${PYTHONPATH}://home/adc/code/lmgc90/LMGC90v2/builds/Lmgc90_v2/lib
-fi
-export PATH=${PATH}:/home/adc/code/lmgc90/LMGC90v2/src/LMGC90v2_dev/addons
-
-# Set locales
-export LC_ALL=en_US.UTF-8
-export LANG=en_US.UTF-8
+# Environment variables
+export PATH=/home/adc/bin:$PATH
diff --git a/install.sh b/install.sh
@@ -3,11 +3,9 @@
# Create symlinks
./create_symlinks.sh
-# Clone oh-my-zsh
-OMZDIR=~/.oh-my-zsh
-git clone https://github.com/robbyrussell/oh-my-zsh.git $OMZDIR
-wget https://cs.au.dk/\~adc/files_nonpub/ys-mod.zsh-theme -O $OMZDIR/themes/ys-mod.zsh-theme
-wget https://cs.au.dk/\~adc/files_nonpub/gnzh-mod.zsh-theme -O $OMZDIR/themes/gnzh-mod.zsh-theme
+# Clone zsh syntax highlighting
+mkdir -p $HOME/code && cd $HOME/code && \
+git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
# Install Vundle
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle