laptop-dots/.config/zsh/.zshrc
2023-03-11 20:58:31 -08:00

115 lines
3.8 KiB
Bash

nitch
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ${ZDOTDIR:-~}/.p10k.zsh ]] || source ${ZDOTDIR:-~}/.p10k.zsh
## ADD TO /etc/zsh/zshenv
#export ZDOTDIR="$HOME"/.config/zsh
#. /bedrock/run/zprofile
export XDG_DATA_HOME=$HOME/.local/share
export XDG_CONFIG_HOME=$HOME/.config
export XDG_STATE_HOME=$HOME/.local/state
export XDG_CACHE_HOME=$HOME/.cache
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
export CABAL_DIR="$XDG_DATA_HOME"/cabal
export CARGO_HOME="$XDG_DATA_HOME"/cargo
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
export GOPATH="$XDG_DATA_HOME"/go
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
export XCURSOR_PATH=/usr/share/icons:${XDG_DATA_HOME}/icons
export LESSHISTFILE="$XDG_STATE_HOME"/less/history
export NIMBLE_DIR="$XDG_DATA_HOME/nimble"
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
export PSQL_HISTORY="$XDG_DATA_HOME/psql_history"
export W3M_DIR="$XDG_DATA_HOME"/w3m
export WINEPREFIX="$XDG_DATA_HOME"/wine
export HISTFILE="$XDG_STATE_HOME"/zsh/history
export KUBECONFIG=$(find ~/.kube/configs -type f -printf '%p:')
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
export EDITOR=nvim
export LIBVA_DRIVER_NAME=nvidia
PATH="$PATH:/home/abs3nt/.local/bin"
PATH="$PATH:/home/abs3nt/.local/lib/python3.9/site-packages"
PATH="$PATH:/home/abs3nt/.cargo/bin"
PATH="$PATH:$XDG_DATA_HOME/go/bin"
PATH="$PATH:/usr/lib/node_modules/npm"
PATH="$PATH:/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home/bin"
PATH="$PATH:/home/abs3nt/.nimble/bin"
. ~/.asdf/plugins/java/set-java-home.zsh
# PATH
# set in ~/.profile
# ZSH SETTINGS
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
unsetopt beep
### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
### END
__git_files () {
_wanted files expl 'local files' _files
}
# PLUGINS
zinit ice depth=1; zinit light romkatv/powerlevel10k
# append completions to fpath
fpath=(/bedrock/share/zsh/completion /bedrock/cross/zsh-completion $fpath)
zinit load asdf-vm/asdf
. ~/.asdf/plugins/java/set-java-home.zsh
zinit wait lucid light-mode for \
atload"zicompinit; zicdreplay" blockf zsh-users/zsh-completions \
atload'_zsh_autosuggest_start' zsh-users/zsh-autosuggestions \
joshskidmore/zsh-fzf-history-search \
hlissner/zsh-autopair \
zsh-users/zsh-history-substring-search \
z-shell/F-Sy-H
# ALIASES
for file in $XDG_CONFIG_HOME/zsh/aliases/* ; do
source "$file"
done
# KEYBINDING
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# PLUGIN SETTINGS
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=false
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=false
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=true
export ZSH_FZF_HISTORY_SEARCH_REMOVE_DUPLICATES=1
export ZSH_FZF_HISTORY_SEARCH_DATES_IN_SEARCH=0
export ZSH_FZF_HISTORY_SEARCH_EVENT_NUMBERS=0
eval "$(dircolors)"
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}