Browse Source

Update zsh config

master
Arti Zirk 5 years ago
parent
commit
b681db7693
  1. 1
      .bin/vless
  2. 63
      .zshrc

1
.bin/vless

@ -0,0 +1 @@
/usr/share/nvim/runtime/macros/less.sh

63
.zshrc

@ -1,15 +1,46 @@
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
# Virtualenv support # Virtualenv support
function virtual_env_prompt () { function virtual_env_prompt () {
REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) } REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
} }
grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f' grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f'
zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent
function config_env_prompt () {
REPLY=${CONFIG_ENV+(${CONFIG_ENV:t}) }
}
grml_theme_add_token config-env -f config_env_prompt '%F{magenta}' '%f'
zstyle ':prompt:grml:left:setup' items rc config-env virtual-env change-root user at host path vcs percent
# Disable right side sad smiley, works nicer with resized terminal # Disable right side sad smiley, works nicer with resized terminal
zstyle ':prompt:grml:right:setup' use-rprompt false zstyle ':prompt:grml:right:setup' use-rprompt false
function _config_activate {
export GIT_DIR=$HOME/.cfg/
export GIT_WORK_TREE=$HOME
CONFIG_ENV="config"
}
function _config_deactivate {
unset GIT_DIR GIT_WORK_TREE CONFIG_ENV
}
source /etc/profile.d/vte.sh function config {
if [[ -n "$1" ]]; then
_config_activate
git $@
_config_deactivate
return
elif [[ -z "${CONFIG_ENV}" ]]; then
_config_activate
else
_config_deactivate
fi
}
if [[ -f /etc/profile.d/vte.sh ]]; then
source /etc/profile.d/vte.sh
fi
function new-scratch { function new-scratch {
cur_dir="$HOME/scratch" cur_dir="$HOME/scratch"
@ -29,22 +60,24 @@ alias dmesg="dmesg -L"
alias disapprove="firefox 'data:text/html;base64,PGRpdiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXI7Zm9udC1zaXplOjU1dm1pbiI+JiMzMjMyO18mIzMyMzI7PC9kaXY+Cg=='" alias disapprove="firefox 'data:text/html;base64,PGRpdiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXI7Zm9udC1zaXplOjU1dm1pbiI+JiMzMjMyO18mIzMyMzI7PC9kaXY+Cg=='"
alias ipy="ipython" alias ipy="ipython"
alias htop="htop -d 10" alias htop="htop -d 10"
alias ip="ip -c" alias ip="ip -color=auto"
alias cp="cp --reflink=auto" alias cp="cp --reflink=auto"
alias cal="cal -w3" alias cal="cal -w3"
alias gitg="LANG=en_US.UTF-8 gitg" alias gitg="LANG=en_US.UTF-8 gitg"
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' #alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
source /usr/share/zaw/zaw.zsh if [[ -f /usr/share/zaw/zaw.zsh ]]; then
source /usr/share/zaw/zaw.zsh
bindkey '^R' zaw-history bindkey '^R' zaw-history
bindkey -M filterselect '^R' down-line-or-history bindkey -M filterselect '^R' down-line-or-history
bindkey -M filterselect '^S' up-line-or-history bindkey -M filterselect '^S' up-line-or-history
bindkey -M filterselect '^E' accept-search bindkey -M filterselect '^E' accept-search
zstyle ':filter-select:highlight' matched fg=green zstyle ':filter-select:highlight' matched fg=green
zstyle ':filter-select' max-lines 3 zstyle ':filter-select' max-lines 3
zstyle ':filter-select' extended-search yes zstyle ':filter-select' extended-search yes
fi
EDITOR=nvim EDITOR=nvim
VISUAL=nvim VISUAL=nvim
@ -52,7 +85,9 @@ VISUAL=nvim
# iostat colors # iostat colors
export S_COLORS=auto export S_COLORS=auto
source /usr/share/zsh/site-functions/git-flow-completion.zsh if [[ -f /usr/share/zsh/site-functions/git-flow-completion.zsh ]];then
source /usr/share/zsh/site-functions/git-flow-completion.zsh
fi
export PATH="/home/arti/.bin:$(ruby -e 'print Gem.user_dir')/bin:$PATH" export PATH="/home/arti/.bin:$(ruby -e 'print Gem.user_dir')/bin:$PATH"

Loading…
Cancel
Save