homes/common/.zshrc

157 lines
4.4 KiB
Bash
Raw Normal View History

2013-05-02 12:38:30 +02:00
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
2018-07-15 18:53:05 +02:00
export TERM=xterm-256color
2018-01-09 19:44:17 +01:00
2013-05-02 12:38:30 +02:00
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
2013-05-02 18:11:33 +02:00
#ZSH_THEME="robbyrussell"
2013-05-02 12:38:30 +02:00
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
2013-05-02 18:11:33 +02:00
COMPLETION_WAITING_DOTS="true"
2013-05-02 12:38:30 +02:00
DISABLE_AUTO_UPDATE=true
2015-03-07 21:23:21 +01:00
ZSH_TMUX_AUTOSTART=false
ZSH_TMUX_FIXTERM=true
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor root)
2013-05-02 12:38:30 +02:00
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git mercurial battery cake celery command-not-found coffee colorize debian django fabric git \
2013-12-16 11:46:41 +01:00
gitfast git-extras go gpg-agent mercurial node npm nyan pep8 pip pyenv pylint \
python ssh-agent svn tmux vi-mode command-not-found zsh-syntax-highlighting urltools web-search)
2013-05-02 18:11:33 +02:00
2013-10-17 12:25:16 +02:00
alias mpc='mpc -f "%title%[ - %album%]\n\r%artist%[ - %performer%]\n\r%file%"'
2013-05-02 12:38:30 +02:00
source $ZSH/oh-my-zsh.sh
2013-05-02 18:11:33 +02:00
source ~/.zshrc-local
2017-07-16 19:41:30 +02:00
source ~/.zsh-theme
2013-05-02 12:38:30 +02:00
autoload -Uz promptinit
promptinit
autoload -U zsh-mime-setup
autoload -U zsh-mime-handler
zsh-mime-setup
2013-05-02 23:36:55 +02:00
#autoload -Uz vcs_info
#zstyle ':vcs_info:*' enable git svn hg bzr mtn
#precmd() {
# vcs_info
#}
2013-05-02 18:11:33 +02:00
zstyle ':vcs_info:*' actionformats
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
2013-05-02 12:38:30 +02:00
alias make='colormake'
alias gcc='colorgcc'
alias diff='colordiff'
alias vim='vim -p'
alias ls='ls --color'
alias ll='ls -la'
alias l='ls -a'
alias grep='grep --color'
export COLORFGBG="default;default"
2016-09-01 10:52:32 +02:00
export VISUAL="vim"
2013-05-02 12:38:30 +02:00
function cd() {
builtin cd $@;
2016-12-10 12:55:11 +01:00
if [ -f venv/bin/activate ]
2013-05-02 12:38:30 +02:00
then
2016-12-10 12:55:11 +01:00
source venv/bin/activate
2013-05-02 12:38:30 +02:00
elif [ -f bin/activate ]
then
source bin/activate
2016-12-10 12:55:11 +01:00
elif [ -f ../venv/bin/activate ]
2013-05-02 12:38:30 +02:00
then
2016-12-10 12:55:11 +01:00
source ../venv/bin/activate
2013-05-02 12:38:30 +02:00
fi
}
# Customize to your needs...
2013-05-02 23:36:55 +02:00
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:~/.local/bin
2013-05-02 12:38:30 +02:00
alias gitst="git status | more"
2016-11-23 11:09:51 +01:00
alias gitci="git commit -S"
alias gitcia='git commit -Sa'
alias gitco="git checkout"
alias gitdiff='git diff'
alias gitgrep='git grep'
alias gitlog='git log --name-status'
alias gittree='git log --graph'
alias gitlstags='git describe --tags'
alias gittag='git tag -a'
2013-10-09 11:09:45 +02:00
alias gitw='git instaweb --httpd=webrick'
2014-07-21 17:36:10 +02:00
alias gitpull='git pull --stat --progress && git submodule update'
alias gitpr='git pull --stat --progress --rebase && git submodule update'
alias gitprst='git stash && git pull --stat --progress --rebase && git submodule update && git stash apply'
alias gitprp='git pull --stat --progress --rebase && git submodule update && git push'
alias gitprst='git stash && git pull --stat --progress --rebase && git submodule update && git stash apply && git push'
gitgrephistory(){
if [ $# = 1 ] ; then
git rev-list --all | xargs git grep "$1"
else
git rev-list --all | sed 's!$!:'"$1"'!' | xargs git grep "$2"
fi
}
2013-05-02 18:11:33 +02:00
hl() { highlight --out-format=xterm256 -l ${argv} | less -R; }
2016-11-24 15:11:20 +01:00
bindkey "^[OA" history-search-backward
bindkey "^[OB" history-search-forward
POWERLINE_DETECT_SSH="true"
POWERLINE_FULL_CURRENT_PATH="true"
set -o vi
2014-07-21 17:36:10 +02:00
alias vcatfr="espeak -v mb/mb-fr1 -p30 -s 150 -f"
alias vcaten="espeak -v mb/mb-en1 -p30 -s 150 -f"
alias vcat="vcaten"
2014-07-22 09:41:48 +02:00
alias vechofr="espeak -v mb/mb-fr1 -p30 -s 150"
alias vechoen="espeak -v mb/mb-en1 -p30 -s 150"
alias vecho="vcaten"
alias vmanfr='man -P "espeak -v mb/mb-fr1 -p30 -s 150"'
alias vmanen='man -P "espeak -v mb/mb-en1 -p30 -s 150"'
alias vman=vmanen
2015-11-16 10:05:41 +01:00
2016-02-18 13:24:55 +01:00
alias less='less -R'
2017-02-02 13:20:51 +01:00
export LESS='-j4aR'
export LESSOPEN="| /path/to/src-hilite-lesspipe.sh %s"
2016-02-18 13:24:55 +01:00
2015-11-16 10:05:41 +01:00
eval $(thefuck --alias)
2016-02-18 13:24:55 +01:00
2018-06-02 11:47:19 +02:00
alias pa-create-nullsink='pactl load-module module-null-sink sink_name=$1'
alias pa-create-loopback='pactl load-module module-loopback sink=$1'
2016-02-18 15:51:10 +01:00
alias meteo=wego
2018-07-14 20:35:10 +02:00
alias f='fortune 30% discworld 30% hitchhiker 10% vimtips 30% fr/kaamelott'
2016-12-02 08:26:53 +01:00
f