1
0
mirror of https://github.com/artizirk/dotfiles.git synced 2024-12-22 03:20:15 +02:00

Update zsh config

This commit is contained in:
Arti Zirk 2020-04-18 14:46:16 +03:00
parent 7447134242
commit b681db7693
2 changed files with 51 additions and 15 deletions

1
.bin/vless Symbolic link
View File

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

65
.zshrc
View File

@ -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"
}
source /etc/profile.d/vte.sh
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,22 +60,24 @@ 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'
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 -M filterselect '^R' down-line-or-history
bindkey -M filterselect '^S' up-line-or-history
bindkey -M filterselect '^E' accept-search
bindkey '^R' zaw-history
bindkey -M filterselect '^R' down-line-or-history
bindkey -M filterselect '^S' up-line-or-history
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
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
# iostat colors
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"
@ -66,7 +101,7 @@ setopt INC_APPEND_HISTORY_TIME
#pkg not found
if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ]; then
source /usr/share/doc/pkgfile/command-not-found.zsh
source /usr/share/doc/pkgfile/command-not-found.zsh
fi
function gedit {