HISTFILE=~/.histfile HISTSIZE=1000000 SAVEHIST=1000000 setopt appendhistory autocd notify histignoredups histignorespace noequals nonomatch share_history INTERACTIVE_COMMENTS zstyle :compinstall filename '/home/michael/.zshrc' autoload -Uz compinit compinit zstyle ':completion:*' menu select #fpath=($fpath ~/.zshfns) #autoload -U promptinit #promptinit #prompt gentoo . ~/.zshfns/prompt_gentoo_setup autoload -U zsh/terminfo bindkey -e bindkey $terminfo[khome] beginning-of-line bindkey $terminfo[kend] end-of-line bindkey $terminfo[kdch1] delete-char bindkey $terminfo[kpp] history-beginning-search-backward bindkey $terminfo[knp] history-beginning-search-forward autoload -U select-word-style select-word-style bash autoload -U url-quote-magic zle -N self-insert url-quote-magic zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' original only zstyle ':completion:*:approximate:*' max-errors 1 numeric zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always zstyle ':completion::complete:*' rehash true # http://grml.org/zsh-pony/#sec-7 autoload edit-command-line && zle -N edit-command-line bindkey '\ee' edit-command-line alias -s pdf=mupdf settitlescreen() { printf "\033k$@\033\\" } settitle() { print -Pn "\e]0;$@\a" } preexec () { # local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} [ $TERM = linux ] && return settitle $1 } precmd () { [ $TERM = linux ] && return settitle $1 } alias ls='ls --color=auto' alias la='ls -hal' alias em='equery meta' alias irc='ssh -t lore screen -x' alias bat='~/bin/bat /proc/acpi/battery/BAT0/{info,state}' export EDITOR=vim screen -ls chpwd() { pwd >~/.dot} [[ -r ~/.dot ]] && [[ "$PWD" = ~ ]] && cd -L "$(< ~/.dot)" 2>/dev/null cdm() { cd $(< ~michael/.dot) } cde() { cd $(dirname $(equery which $1)) } dotgit() { for arg ; do [ $arg == clean ] && ( echo "cowardly refusing 'git clean'" ; return ) done GIT_WORK_TREE=~/ GIT_DIR=~/dotfiles git "$@" } compdef dotgit=git if ! echo $PATH | grep ${HOME}/bin >/dev/null ; then export PATH="${HOME}/bin:${PATH}" fi if ! echo $PATH | grep /usr/games/bin >/dev/null ; then export PATH="${PATH}:/usr/games/bin" fi mf() { eval $(xdotool getdisplaygeometry --shell) DWIDTH=$WIDTH DHEIGHT=$HEIGHT for WIN in $(xdotool search --class mplayer) ; do eval $(xdotool getwindowgeometry --shell $WIN) (( THEIGHT = DWIDTH * HEIGHT / WIDTH )) xdotool windowsize $WIN $DWIDTH $THEIGHT xdotool windowmove $WIN -1 -1 done } [ -r ~/.zshrc.local ] && . ~/.zshrc.local || true