2022-06-25 21:26:38 +08:00
|
|
|
|
cat ~/.config/splash 2> /dev/null || true
|
|
|
|
|
echo
|
|
|
|
|
echo '\033[0;35m /w '$(awk -F "=" '/^NAME/ {print $2}' 2> /dev/null < /etc/os-release || uname -o)
|
|
|
|
|
echo '\033[0;34m @ '$HOST
|
|
|
|
|
|
|
|
|
|
#Install zinit if no zinit is present
|
|
|
|
|
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
|
|
|
|
if [[ ! -f $ZINIT_HOME/zinit.zsh ]]; then
|
|
|
|
|
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
|
|
|
|
|
mkdir -p "$(dirname $ZINIT_HOME)"
|
|
|
|
|
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
|
|
|
|
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
|
|
|
|
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
|
|
|
|
fi
|
|
|
|
|
source "$ZINIT_HOME/zinit.zsh"
|
|
|
|
|
|
|
|
|
|
zinit ice lucid wait
|
|
|
|
|
zinit light zdharma-continuum/fast-syntax-highlighting
|
|
|
|
|
zinit ice lucid wait
|
|
|
|
|
zinit light agkozak/zsh-z
|
|
|
|
|
zinit ice lucid wait
|
|
|
|
|
zinit light juancldcmt/colorize
|
|
|
|
|
zinit ice lucid wait
|
|
|
|
|
zinit light juancldcmt/shortify.zsh
|
2023-03-07 15:11:17 +08:00
|
|
|
|
# zinit ice lucid wait
|
|
|
|
|
# zinit light juancldcmt/direnv.zsh
|
2022-06-25 21:26:38 +08:00
|
|
|
|
|
|
|
|
|
zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
|
|
|
|
|
zinit light sindresorhus/pure
|
|
|
|
|
zinit light zsh-users/zsh-autosuggestions
|
|
|
|
|
zinit light hlissner/zsh-autopair
|
|
|
|
|
zinit light zsh-users/zsh-history-substring-search
|
|
|
|
|
|
|
|
|
|
autoload -Uz _zinit
|
|
|
|
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
|
|
|
|
|
|
|
|
|
# Load LS_COLORS if not present
|
|
|
|
|
test -n "$LS_COLORS" || eval $(dircolors) || echo 'Warning: Unable to set LS_COLORS'
|
|
|
|
|
|
2022-09-20 13:03:40 +08:00
|
|
|
|
|
2022-06-25 21:26:38 +08:00
|
|
|
|
# The following lines were added by compinstall
|
|
|
|
|
|
|
|
|
|
zstyle ':completion:*' auto-description '%F{green}Specify%f: %F{cyan}%d%f'
|
|
|
|
|
zstyle ':completion:*' completer _oldlist _expand _complete _ignored _match _correct _approximate _prefix
|
|
|
|
|
zstyle ':completion:*' completions 1
|
|
|
|
|
zstyle ':completion:*' expand prefix suffix
|
2022-09-20 13:03:40 +08:00
|
|
|
|
zstyle ':completion:*' file-sort name
|
2022-06-25 21:26:38 +08:00
|
|
|
|
zstyle ':completion:*' format '%F{green}Completing%f %F{yellow}%d%f'
|
|
|
|
|
zstyle ':completion:*' glob 1
|
|
|
|
|
zstyle ':completion:*' group-name ''
|
|
|
|
|
zstyle ':completion:*' ignore-parents parent pwd ..
|
|
|
|
|
zstyle ':completion:*' insert-unambiguous true
|
|
|
|
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
|
|
|
|
zstyle ':completion:*' list-prompt %S%F{green}At %p%f: Hit TAB for more, or the character to insert%s
|
2022-09-22 22:59:13 +08:00
|
|
|
|
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
|
2022-09-20 13:03:40 +08:00
|
|
|
|
zstyle ':completion:*' max-errors 16 numeric
|
2022-06-25 21:26:38 +08:00
|
|
|
|
zstyle ':completion:*' menu select=1
|
|
|
|
|
zstyle ':completion:*' original false
|
|
|
|
|
zstyle ':completion:*' preserve-prefix '//[^/]##/'
|
|
|
|
|
zstyle ':completion:*' prompt '%F{green}Completing%f, with %F{red}%e%f errors'
|
|
|
|
|
zstyle ':completion:*' select-prompt %S%F{green}Scrolling%f active: current selection at %F{blue}%p%f%s
|
|
|
|
|
zstyle ':completion:*' substitute 1
|
|
|
|
|
zstyle ':completion:*' use-compctl true
|
|
|
|
|
zstyle :compinstall filename ~/.zshrc
|
|
|
|
|
|
|
|
|
|
autoload -Uz compinit
|
|
|
|
|
compinit
|
|
|
|
|
# End of lines added by compinstall
|
|
|
|
|
# Lines configured by zsh-newuser-install
|
|
|
|
|
HISTFILE=~/.cache/zhistory
|
|
|
|
|
HISTSIZE=8192
|
|
|
|
|
SAVEHIST=8192
|
|
|
|
|
setopt autocd extendedglob nomatch notify auto_pushd
|
|
|
|
|
unsetopt beep
|
|
|
|
|
bindkey -v
|
|
|
|
|
# End of lines configured by zsh-newuser-install
|
|
|
|
|
|
2022-07-09 21:33:59 +08:00
|
|
|
|
# pure config
|
|
|
|
|
zstyle :prompt:pure:prompt:success color green
|
2022-06-25 21:26:38 +08:00
|
|
|
|
|
|
|
|
|
#edit in vim
|
2022-07-09 21:33:59 +08:00
|
|
|
|
export KEYTIMEOUT=1
|
2022-06-25 21:26:38 +08:00
|
|
|
|
autoload edit-command-line
|
|
|
|
|
zle -N edit-command-line
|
|
|
|
|
bindkey '' edit-command-line
|
|
|
|
|
|
|
|
|
|
zmodload zsh/complist
|
|
|
|
|
bindkey -M menuselect 'h' vi-backward-char
|
|
|
|
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
|
|
|
|
bindkey -M menuselect 'l' vi-forward-char
|
|
|
|
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
|
|
|
|
|
|
|
|
|
bindkey '^[[A' history-substring-search-up
|
|
|
|
|
bindkey '^[[B' history-substring-search-down
|
|
|
|
|
bindkey '' history-substring-search-up
|
|
|
|
|
bindkey '' history-substring-search-down
|
|
|
|
|
|
|
|
|
|
bindkey ' ' magic-space
|
|
|
|
|
|
|
|
|
|
bindkey '' autosuggest-execute
|
|
|
|
|
|
|
|
|
|
#config location
|
|
|
|
|
export GOPATH=$HOME/.cache/go
|
|
|
|
|
export LESSHISTFILE=/dev/null
|
|
|
|
|
export LYNX_CFG=$HOME/.config/lynx/lynxrc
|
|
|
|
|
export XDG_CACHE_HOME=$HOME/.cache
|
|
|
|
|
export XDG_CONFIG_HOME=$HOME/.config
|
|
|
|
|
|
|
|
|
|
#settings for software
|
|
|
|
|
export FZF_DEFAULT_OPTS="--reverse --cycle --height=40% --border sharp --prompt=🔎"
|
|
|
|
|
export GPG_TTY=$(tty) # fixes gpg
|
2023-02-10 15:26:53 +08:00
|
|
|
|
export JDK_HOME=/usr/lib/jvm/openjdk-17
|
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
2022-06-25 21:26:38 +08:00
|
|
|
|
|
|
|
|
|
#colored output
|
|
|
|
|
export MANWIDTH=${MANWIDTH:-78}
|
|
|
|
|
export MANLESS="Manual\ \$MAN_PN\ ?ltline\ %lt?L/%L.:byte\ %bB?s/%s..?\:?pB\ %pB\\%.."
|
|
|
|
|
export LESS="-RSM~"
|
|
|
|
|
|
|
|
|
|
#local path
|
|
|
|
|
export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.scripts:${HOME}/cargo/bin:${HOME}/.cache/go/bin"
|
|
|
|
|
export MANPATH="${MANPATH}:${HOME}/.local/share/man"
|
|
|
|
|
|
|
|
|
|
#ccache support
|
|
|
|
|
export USE_CCACHE=1
|
|
|
|
|
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
|