]> git.sev.monster Git - dotfiles.git/blame - base/.zshrc
reorganized tint2, i3->volumeicon vol control
[dotfiles.git] / base / .zshrc
CommitLineData
1b8a4102 1# modules
2autoload -Uz vcs_info
3zstyle ':vcs_info:*' enable git
4zstyle ':vcs_info:*' get-revision true
5zstyle ':vcs_info:git*' formats "(%F{green}%r/%b%f) %m%u%c "
03bc64c4 6
7function precmd {
d8be64ba 8 print -Pn "\e]0;${SSH_CLIENT+$USER@$HOST}%#%(1j,:%j,):%~\a"
03bc64c4 9 vcs_info
118fb6e0 10 if ((SECONDS - _exectime >= 5)) {
11 # bell after long exec
12 print "\a"
13 }
03bc64c4 14}
15function preexec {
16 printf "\033]0;%s\a" "$1"
118fb6e0 17 _exectime=$SECONDS
03bc64c4 18}
1b8a4102 19
20# prompt
21setopt prompt_subst
22PROMPT='%F{$VICOL}%n%f@%F{$VICOL}%m%f%(?../%F{red}$?%f)%# '
23RPROMPT='${vcs_info_msg_0_}%F{yellow}%~%f %T'
24
25function zle-line-init zle-keymap-select {
7cdf1f1b 26 VICOL="${${KEYMAP:/vicmd/red}:/(main|viins)/green}"
1b8a4102 27 zle reset-prompt
28}
29zle -N zle-line-init
30zle -N zle-keymap-select
31
32# common aliases
33alias h="history -25"
34alias j="jobs -l"
35alias la="ls -aF"
36alias lf="ls -AF"
37alias ll="ls -lhAF"
38alias pa="sudo ps -Sudax"
03bc64c4 39function s { sysctl hw.snd.default_unit=$1 }
1b8a4102 40
41# be paranoid
42alias cp='cp -ip'
43alias mv='mv -i'
44alias rm='rm -I'
45
46# venv
47alias activate="source bin/activate"
48
49# ports
118fb6e0 50function portpkg {
51 case "$1" {
52 build|run) ;;
53 *)
54 echo "Usage: \`portpkg <build|run>' in a port directory"
55 return 1;;
56 }
57 sudo pkg install -AU $(make ${1}-depends-list | sed 's_/usr/ports/_ _' | tr -d '\n')
58}
1b8a4102 59
60# keys
61bindkey "^[[7~" beginning-of-line #Home
62bindkey "^[[8~" end-of-line #End
63bindkey "^[[3~" delete-char #Del
64# vt keys
65bindkey "^[[H" beginning-of-line #Home
66bindkey "^[[F" end-of-line #End
67
68autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
69zle -N up-line-or-beginning-search
70zle -N down-line-or-beginning-search
71[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
72[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
73
74# The following lines were added by compinstall
75zstyle ':completion:*' auto-description 'specify: %d'
76zstyle ':completion:*' expand suffix
77zstyle ':completion:*' format '# %d'
78zstyle ':completion:*' group-name ''
79zstyle ':completion:*' ignore-parents parent
80zstyle ':completion:*' insert-unambiguous false
81zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
82zstyle ':completion:*' list-prompt '%B%i%b'
83zstyle ':completion:*' list-suffixes true
84zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
85zstyle ':completion:*' menu select=1
86zstyle ':completion:*' original false
87zstyle ':completion:*' select-prompt '%B%l%b'
88zstyle ':completion:*' verbose true
89zstyle :compinstall filename '/home/ds6/.zshrc'
90
91autoload -Uz compinit
92compinit
93# End of lines added by compinstall
94
95# Lines configured by zsh-newuser-install
96HISTFILE=~/.histfile
97HISTSIZE=100
98SAVEHIST=100
99setopt appendhistory autocd extendedglob
100unsetopt beep
101bindkey -v
102# End of lines configured by zsh-newuser-install
103
03bc64c4 104# vim: ts=8:sts=4:sw=4:et:tw=79
This page took 0.053291 seconds and 4 git commands to generate.