laptop-dots/.config/zsh/.zshrc

111 lines
3.7 KiB
Bash
Raw Normal View History

2023-02-20 06:07:04 +00:00
nitch
2023-03-09 05:03:47 +00:00
2023-02-20 06:07:04 +00:00
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
2023-03-09 05:03:47 +00:00
# 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
2023-02-20 06:07:04 +00:00
export XDG_DATA_HOME=$HOME/.local/share
export XDG_CONFIG_HOME=$HOME/.config
2023-03-09 05:03:47 +00:00
export XDG_STATE_HOME=$HOME/.local/state
2023-02-20 06:07:04 +00:00
export XDG_CACHE_HOME=$HOME/.cache
2023-03-09 05:03:47 +00:00
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
2023-02-20 06:07:04 +00:00
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"
2023-03-09 05:03:47 +00:00
PATH="$PATH:$XDG_DATA_HOME/go/bin"
2023-02-20 06:07:04 +00:00
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"
2023-03-09 05:03:47 +00:00
# PATH
# set in ~/.profile
2023-02-20 06:07:04 +00:00
# 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
2023-03-09 05:31:29 +00:00
2023-02-20 06:07:04 +00:00
# append completions to fpath
fpath=(/bedrock/share/zsh/completion /bedrock/cross/zsh-completion $fpath)
2023-03-09 05:03:47 +00:00
zinit wait lucid light-mode for \
atload'_zsh_autosuggest_start' zsh-users/zsh-autosuggestions \
2023-03-09 05:18:37 +00:00
atload"zicompinit; zicdreplay" blockf zsh-users/zsh-completions \
2023-03-09 05:03:47 +00:00
joshskidmore/zsh-fzf-history-search \
hlissner/zsh-autopair \
zsh-users/zsh-history-substring-search \
z-shell/F-Sy-H \
djui/alias-tips
2023-02-20 06:07:04 +00:00
# ALIASES
2023-03-09 05:03:47 +00:00
for file in $XDG_CONFIG_HOME/zsh/aliases/* ; do
source "$file"
done
2023-03-05 08:49:11 +00:00
2023-02-20 06:07:04 +00:00
# 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
2023-03-09 05:03:47 +00:00
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
2023-02-20 06:07:04 +00:00
eval "$(dircolors)"
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}