From 7afa226999cd11f320b5a81581e0b0a308802bed Mon Sep 17 00:00:00 2001 From: Sebastian Tramp Date: Sun, 9 Jan 2011 10:39:04 +0100 Subject: [PATCH] some minor niceups --- aliases.zsh | 10 +++++++++- functions.zsh | 5 +++++ prompt.zsh | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/aliases.zsh b/aliases.zsh index ff5d548..dd6269c 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -12,6 +12,9 @@ alias vedit=" $EDITOR ~/.vimrc" #alias man="unset PAGER; man" alias grep='grep --color=auto' +# g for go! is more natural than the autojumps j command +alias g=j + ##### standard aliases (start with a space to be ignored in history) alias ls='ls --color=auto' alias ll=' ls -lhF' @@ -19,12 +22,16 @@ alias la=' ls -A' alias l=' ls -CF' alias v=" clear; ls -Flgh" -alias g='ps aux|grep ' +alias psgrep='ps aux|grep ' alias d=' dirs -v' alias ..=' cd ..; ls' alias ...=' cd ..; cd ..; ls' alias ....=' cd ..; cd ..; cd ..; ls' +alias cd..='cd ..' +alias cd...='cd ../..' +alias cd....='cd ../../..' +alias cd.....='cd ../../../..' ##### global aliases # zsh buch s.82 (z.B. find / ... NE) @@ -35,6 +42,7 @@ alias -g NO='&>|/dev/null' alias -g G='| grep -' alias -g P='2>&1 | $PAGER' alias -g L='| less' +alias -g C='| wc -l' # http://www.commandlinefu.com/commands/view/7284/zsh-suffix-to-inform-you-about-long-command-ending # zsh suffix to inform you about long command ending make, Just add "R" (without quotes) suffix to it and you can do other things: diff --git a/functions.zsh b/functions.zsh index 3aa0e49..81b084c 100644 --- a/functions.zsh +++ b/functions.zsh @@ -71,3 +71,8 @@ autoload zmv # noglob so you don't need to quote the arguments of zmv # mmv *.JPG *.jpg alias mmv='noglob zmv -W' + +# start a webcam for screencast +function webcam () { + mplayer -cache 128 -tv driver=v4l2:width=350:height=350 -vo xv tv:// -noborder -geometry "+1340+445" -ontop -quiet 2>/dev/null >/dev/null +} diff --git a/prompt.zsh b/prompt.zsh index 29d7f7e..455c121 100644 --- a/prompt.zsh +++ b/prompt.zsh @@ -91,10 +91,12 @@ function promptSetMultiplexerTabTitle () { add-zsh-hook preexec promptSetMultiplexerTabTitle # setup tmux environment (context + status) +# TODO: shorten the path variable function tmuxChangeDirectory () { # set the tmux status line if [[ "$TMUX" != "" ]]; then - tmux set-option -g status-right $OLDPWD >/dev/null + newMailCountTool="/home/seebi/bin/scripts/newMailCount.py" + tmux set-option -g status-right "$OLDPWD -- #($newMailCountTool /var/mail/seebi)" >/dev/null fi if [[ $VCS_TYPE == 'hg' ]]; then