Remove laggy zsh plugins, move configs to ~/.config/zsh

This commit is contained in:
Arthur Khachaturov 2023-12-01 18:37:02 +03:00
parent 39536754b3
commit 8577646177
10 changed files with 82 additions and 112 deletions

5
.config/zsh/.zprofile Normal file
View file

@ -0,0 +1,5 @@
# unused for now
# export PATH="${$(find ~/.local/bin -type d -printf %p:)%%:}:$PATH"
# default apps
export EDITOR="/usr/bin/nvim"

5
.config/zsh/.zshenv Normal file
View file

@ -0,0 +1,5 @@
# unused for now
# export PATH="${$(find ~/.local/bin -type d -printf %p:)%%:}:$PATH"
# default apps
export EDITOR="/usr/bin/nvim"

65
.config/zsh/.zshrc Normal file
View file

@ -0,0 +1,65 @@
# ls colors
eval "$(dircolors -b)"
# history
HISTSIZE=10000000
SAVEHIST=10000000
HISTFILE="${HOME}/.cache/zsh_history"
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_find_no_dups
setopt hist_save_no_dups
# change word-style
autoload -U select-word-style
select-word-style b
# options
setopt extendedglob
setopt auto_pushd
# keybinds
bindkey -e
bindkey '^[[Z' reverse-menu-complete
bindkey "^[[1;3C" forward-word
bindkey "^[[1;5C" forward-word
bindkey "^[[1;3D" backward-word
bindkey "^[[1;5D" backward-word
bindkey "^[^H" backward-word
bindkey "^[^L" forward-word
bindkey "^[h" backward-char
bindkey "^[f" forward-char
# completions
autoload -Uz compinit
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
compinit;
else
compinit -C;
fi;
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}:ma=48;5;8;38;5;15"
# prompt
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# ls aliases
alias ls="lsd --color=auto"
alias l="ls -lh"
alias la="ls -lah"
alias ll="ls -lh"
alias tree="ls --tree"
# aliases
alias dt="git --git-dir=$HOME/.dotfiles/git --work-tree=$HOME"
alias rz="exec zsh"
alias ..="cd .."
alias ...="cd ..."
alias reload_completion="autoload -Uz compinit && compinit"

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
# lazy.nvim lockfile
lazy-lock.json
**/tmux/plugins/
.zcompdump

9
.gitmodules vendored
View file

@ -1,6 +1,3 @@
[submodule ".local/share/zsh-plugins/zsh-syntax-highlighting"]
path = .local/share/zsh-plugins/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting/
[submodule ".local/share/zsh-plugins/git-prompt.zsh"]
path = .local/share/zsh-plugins/git-prompt.zsh
url = https://github.com/woefe/git-prompt.zsh
[submodule ".local/share/tmux-plugins/tpm"]
path = .local/share/tmux-plugins/tpm
url = https://github.com/tmux-plugins/tpm

@ -1 +0,0 @@
Subproject commit 55f40bdfb287122ea50c1c01ef056ca7dac175e5

@ -1 +0,0 @@
Subproject commit bb27265aeeb0a22fb77f1275118a5edba260ec47

View file

@ -1,26 +0,0 @@
typeset -g -A key
key[F1]='OP'
key[F2]='^[OQ'
key[F3]='^[OR'
key[F4]='^[OS'
key[F5]='^[[15~'
key[F6]='^[[17~'
key[F7]='^[[18~'
key[F8]='^[[19~'
key[F9]='^[[20~'
key[F10]='^[[21~'
key[F11]=''''
key[F12]='^[[24~'
key[Backspace]='^?'
key[Insert]='^[[2~'
key[Home]=''''
key[PageUp]=''''
key[Delete]='^[[3~'
key[End]=''''
key[PageDown]=''''
key[Up]='^[[A'
key[Left]='^[[D'
key[Down]='^[[B'
key[Right]='^[[C'
key[Menu]=''''

View file

@ -1,4 +0,0 @@
export PATH="${$(find ~/.local/bin -type d -printf %p:)%%:}:$PATH"
# default apps
export EDITOR="/usr/bin/nvim"

74
.zshrc
View file

@ -1,74 +0,0 @@
# ls colors
eval "$(dircolors -b)"
# history
HISTSIZE=10000000
SAVEHIST=10000000
HISTFILE="$HOME/.cache/zsh_history"
setopt inc_append_history
setopt extended_history
setopt hist_find_no_dups
# change word-style
autoload -U select-word-style
select-word-style b
# options
setopt extendedglob
setopt AUTO_PUSHD
# keybinds
bindkey -e
bindkey '^[[Z' reverse-menu-complete
bindkey "^[[1;3C" forward-word
bindkey "^[[1;5C" forward-word
bindkey "^[[1;3D" backward-word
bindkey "^[[1;5D" backward-word
# completions
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}:ma=48;5;8;38;5;15"
# prompt
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
RPROMPT='$(gitprompt)'
# ls aliases
alias ls="lsd --color=auto"
alias l="ls -lh"
alias la="ls -lah"
alias ll="ls -lh"
alias tree="ls --tree"
# aliases
alias dt="git --git-dir=$HOME/.dotfiles/git --work-tree=$HOME"
alias rz="exec zsh"
alias bat="batcat"
alias ..="cd .."
alias ...="cd ..."
# theming
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[red]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[red]%}]"
ZSH_THEME_GIT_PROMPT_SEPARATOR=" "
ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_bold[cyan]%}:"
ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}"
ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}⟳ "
ZSH_THEME_GIT_PROMPT_UPSTREAM_NO_TRACKING="%{$fg_bold[red]%}!"
ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})"
ZSH_THEME_GIT_PROMPT_BEHIND="↓"
ZSH_THEME_GIT_PROMPT_AHEAD="↑"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}x"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}*"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}+"
ZSH_THEME_GIT_PROMPT_UNTRACKED="…"
ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}s"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}v"
# plugins
source "$HOME/.local/share/zsh-plugins/git-prompt.zsh/git-prompt.zsh"
# source "$HOME/.local/share/zsh-plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" # don't like it, makes my terminal feel sluggish