From: Hendrik Jaeger Date: Mon, 10 Nov 2014 21:47:15 +0000 (+0100) Subject: Initial commit X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=c6f847b4678c616bd09ebfcf3980ffbabef10caf;p=user%2Fhenk%2Fvcsh%2Fzsh.git Initial commit new file: .zsh_aliases new file: .zsh_functions new file: .zshcomprc new file: .zshrc --- c6f847b4678c616bd09ebfcf3980ffbabef10caf diff --git a/.zsh_aliases b/.zsh_aliases new file mode 100644 index 0000000..a54b5b5 --- /dev/null +++ b/.zsh_aliases @@ -0,0 +1,7 @@ +alias qmplayer='mplayer -ao null' +alias dus='du -s * | sort -n' +alias dvdrip='mencoder -vf crop=704:416:8:80 -oac copy -aid 130 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:mbd=2:trell:v4mv:turbo' +alias ls='ls --color=auto' +alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg" +alias diary='vim ~/personal_data/documents/private/diary/$(date +%F).txt' + diff --git a/.zsh_functions b/.zsh_functions new file mode 100644 index 0000000..d4818ec --- /dev/null +++ b/.zsh_functions @@ -0,0 +1,50 @@ +function info_print () { + local esc_begin esc_end + esc_begin="$1" + esc_end="$2" + shift 2 + printf '%s' ${esc_begin} + printf '%s' "$*" + printf '%s' "${esc_end}" +} + +function set_title () { + info_print $'\e]0;' $'\a' "$@" +} + +function ESC_print () { + info_print $'\ek' $'\e\\' "$@" +} + +preexec () { + if [[ "$TERM" == screen* ]] ; then + local CMD=${1[(wr)^(*=*|sudo|ssh|evince|-*)]} + ESC_print ${CMD} + fi + case $TERM in + (xterm*|rxvt*) + set_title "${(%):-"%n@%m:"}" "$1" + ;; + esac +} + +precmd () { + if [[ $TERM == screen* ]] ; then + ESC_print "zsh" + fi + + case $TERM in + (xterm*|rxvt*) + set_title ${(%):-"%n@%m: %~"} + ;; + esac +} + +function vifind () { + vi $( find $1 -type f ) +} + +function shufflevideos () { + find $@ -type f -iregex ".*\.\(avi\|flv\|mkv\|mpeg\|mpg\|wmv\|wva\|mp4\|webm\|wva\|m4v\|ogm\|mp4\|mov\)" -exec mpv --shuffle $MPVOPTS \{\} + +} + diff --git a/.zshcomprc b/.zshcomprc new file mode 100644 index 0000000..9188550 --- /dev/null +++ b/.zshcomprc @@ -0,0 +1,6 @@ +# The following lines were added by compinstall +zstyle :compinstall filename '/home/henk/.zshcomprc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..e29b0d6 --- /dev/null +++ b/.zshrc @@ -0,0 +1,50 @@ +. ~/.zshcomprc +. ~/.zsh_functions +. ~/.zsh_aliases +. ~/.zsh_local + +HISTFILE=~/.zsh_history +HISTSIZE=5000 +SAVEHIST=3000 + +REPORTTIME=10 + +PS1="%F{red}%D{%A}%f %F{green}%D{%F %T Week %V}%f %F{blue}%D{Epoch %s}%f %F{yellow}%n@%m%f +%j %3~%# " +PATH=~/bin:~/usr/bin:~/usr/local/bin:$PATH + +PASSWORD_STORE_DIR=. + +setopt AUTO_CD +setopt CHASE_LINKS + +setopt AUTO_NAME_DIRS + +setopt BRACE_CCL +setopt EXTENDED_GLOB +setopt MARK_DIRS +setopt NUMERIC_GLOB_SORT +setopt RC_EXPAND_PARAM +setopt WARN_CREATE_GLOBAL + +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_IGNORE_SPACE +setopt HIST_NO_STORE +setopt HIST_REDUCE_BLANKS +setopt HIST_VERIFY +setopt INC_APPEND_HISTORY + +setopt NO_CLOBBER +setopt CORRECT +setopt CORRECT_ALL +unsetopt NOMATCH +setopt PRINT_EXIT_VALUE + +setopt AUTO_CONTINUE +setopt NO_BG_NICE +setopt LONG_LIST_JOBS + +bindkey -e + +#read -q "REPLY?Exec to fish? " && exec fish -i +