1 export TERM=xterm-256color
2 export HISTFILE=~/.zsh_history
7 autoload -U compinit promptinit
10 setopt ALWAYS_TO_END AUTO_LIST NO_LIST_BEEP SH_WORD_SPLIT
11 setopt NOMATCH BAD_PATTERN
13 setopt NO_BEEP CD_ABLE_VARS
14 setopt CORRECT APPEND_HISTORY SHARE_HISTORY HIST_IGNORE_DUPS
15 #WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'
16 WORDCHARS='*?_.[]~\!#$%^()<>|`@#$%^*+:?'
19 #zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
20 zstyle ':completion:*:*:kill:*' command 'ps -au$USER -o pid,%cpu,cmd'
21 zstyle ':completion:*' completer _expand _complete _correct
22 zstyle ':completion:*' format '%d:'
23 zstyle ':completion:*' group-name ''
24 zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*'
25 #zstyle ':completion:*' max-errors 3
26 zstyle ':completion:*' menu select=2 yes=long-list
27 zstyle ':completion:*' prompt 'Alternatives %e:'
28 zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
29 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
30 zstyle ':completion:*:cd:*' ignore-parents parent pwd
31 #zstyle ':completion::*:(rm|vim|cp|mv):*' ignore-line true
35 highlights='${PREFIX:+=(#bi)($PREFIX:t)(?)*==$color[cyan]=$color[none];$color[none]}':${(s.:.)LS_COLORS}}
37 zstyle -e ':completion:*' list-colors 'reply=( "'$highlights'" )'
40 # use colors when browsing man pages (if not using pinfo or PAGER=most)
41 [ -d ~/.terminfo/ ] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man'
45 bindkey "\e[1~" beginning-of-line
46 bindkey "\e[4~" end-of-line
47 bindkey "\e[5~" beginning-of-history
48 bindkey "\e[6~" end-of-history
49 bindkey "\e[3~" delete-char
50 bindkey "\e[2~" quoted-insert
51 bindkey "\e[5C" forward-word
52 bindkey "\eOc" emacs-forward-word
53 bindkey "\e[5D" backward-word
54 bindkey "\eOd" emacs-backward-word
55 bindkey "\e\e[C" forward-word
56 bindkey "\e\e[D" backward-word
57 #bindkey "^W" backward-delete-word
58 bindkey "^?" backward-delete-char
59 bindkey "^H" backward-delete-char
61 bindkey "\e[8~" end-of-line
62 bindkey "\e[7~" beginning-of-line
63 ## for non RH/Debian xterm, can't hurt for RH/DEbian xterm
64 bindkey "\eOH" beginning-of-line
65 bindkey "\eOF" end-of-line
66 ## for freebsd console
67 bindkey "\e[H" beginning-of-line
68 bindkey "\e[F" end-of-line
69 ## completion in the middle of a line
70 bindkey '^i' expand-or-complete-prefix
72 bindkey "^A" beginning-of-line
73 bindkey "^E" end-of-line
74 bindkey "^b" backward-word
75 bindkey "^f" forward-word
76 bindkey "^k" kill-line
77 bindkey ' ' magic-space # also do history expansion on space
78 # bindkey '^I' complete-word # complete on tab, leave expansion to _expand
83 #find out ATI card temperature and set fan speed
84 function teplota { LD_PRELOAD=libXinerama.so.1 aticonfig --od-gettemperature; }
85 function fan() { aticonfig --pplib-cmd "set fanspeed 0 $1"; }
88 if [[ "$#" == "1" ]]; then
91 *.tar.bz2) tar xvjf $1 ;;
92 *.tar.gz) tar xvzf $1 ;;
97 *.tbz2) tar xvjf $1 ;;
100 *.Z) uncompress $1 ;;
102 *) echo "don't know how to extract '$1'..." ;;
105 echo "'$1' is not a valid file!"
108 echo "Must provide only one argument!"
112 alias ls="ls --color -h"
113 alias pacman="pacman2"
117 alias grep="grep --colour -i"
118 alias rubysearch="ruby ~/skripty/search_interface.rb"
119 alias vi="vim -u ~/.vimrc"
120 alias xterm="LANG=sk_SK.utf8 xterm"
121 #alias more="vim -u /usr/share/vim/vim72/macros/less.vim"
122 #alias less="vim -u /usr/share/vim/vim72/macros/less.vim"
123 alias rtorrent="rtorrent -o http_capath=/etc/ssl/certs"
124 export m="/media/data/"
125 export M="/media/data2/"
126 #alias "true-combat"="fan 50; true-combat.alsa; fan 3;"
127 #alias soffice="env GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc env OOO_FORCE_DESKTOP=gnome soffice"
128 alias t="vim -c :TodoOpen -c :q -c ':noremap q :q<CR>'"
129 alias toclip="xclip -selection clipboard"
130 alias fromclip="xclip -selection clipboard -o"
131 alias newsbeuter="TERM=xterm newsbeuter"
132 alias pidgin="GTK2_RC_FILES=~/.themes/CrazyTrain/gtk-2.0/gtkrc pidgin"
133 alias firefox="GTK2_RC_FILES=~/.themes/CrazyTrain/gtk-2.0/gtkrc firefox"
134 alias smplayer="GTK2_RC_FILES=~/.themes/CrazyTrain/gtk-2.0/gtkrc smplayer 2>/dev/null"
137 autoload zsh/terminfo
138 #for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
139 for color in RED GREEN; do
140 eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
141 #eval PR__$color='%{$fg[${(L)color}]%}'
142 # (( count = $count + 1 ))
144 PR_NO_COLOUR="%{$terminfo[sgr0]%}"
148 PS1="[${PR_RED} %/ $PR_NO_COLOUR]═> "
150 PS1="[${PR_GREEN} %/ ${PR_NO_COLOUR}]═> "