Browse Source

Update zsh config

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

1
.bin/vless

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

43
.zshrc

@ -1,15 +1,46 @@ @@ -1,15 +1,46 @@
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
# Virtualenv support
function virtual_env_prompt () {
REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
}
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
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
}
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 {
cur_dir="$HOME/scratch"
@ -29,12 +60,13 @@ alias dmesg="dmesg -L" @@ -29,12 +60,13 @@ alias dmesg="dmesg -L"
alias disapprove="firefox 'data:text/html;base64,PGRpdiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXI7Zm9udC1zaXplOjU1dm1pbiI+JiMzMjMyO18mIzMyMzI7PC9kaXY+Cg=='"
alias ipy="ipython"
alias htop="htop -d 10"
alias ip="ip -c"
alias ip="ip -color=auto"
alias cp="cp --reflink=auto"
alias cal="cal -w3"
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'
if [[ -f /usr/share/zaw/zaw.zsh ]]; then
source /usr/share/zaw/zaw.zsh
bindkey '^R' zaw-history
@ -45,6 +77,7 @@ bindkey -M filterselect '^E' accept-search @@ -45,6 +77,7 @@ bindkey -M filterselect '^E' accept-search
zstyle ':filter-select:highlight' matched fg=green
zstyle ':filter-select' max-lines 3
zstyle ':filter-select' extended-search yes
fi
EDITOR=nvim
VISUAL=nvim
@ -52,7 +85,9 @@ VISUAL=nvim @@ -52,7 +85,9 @@ VISUAL=nvim
# iostat colors
export S_COLORS=auto
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"

Loading…
Cancel
Save