95 lines
4 KiB
Text
95 lines
4 KiB
Text
# Enable Powerlevel10k instant prompt
|
|
[[ -r "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" ]] && source "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh"
|
|
|
|
export SPACEVIMDIR="$HOME/.config/spacevim/"
|
|
export FZF_MARKS_FILE=$HOME/.config/fzfmarks
|
|
export STARSHIP_CONFIG=$HOME/.config/zsh/starship.toml
|
|
export ZSH_EVALCACHE_DIR="$HOME/.cache/evalcache"
|
|
|
|
# Setopt Stuff
|
|
setopt multios prompt_subst auto_pushd pushd_ignore_dups pushdminus inc_append_history
|
|
|
|
# Zinit Clone if not exist
|
|
[[ ! -f $HOME/.config/zinit/bin/zinit.zsh ]] && command git clone https://github.com/zdharma/zinit $HOME/.config/zinit/bin
|
|
|
|
# Zinit
|
|
declare -A ZINIT
|
|
ZINIT[BIN_DIR]="$HOME/.config/zinit/bin"
|
|
ZINIT[HOME_DIR]="$HOME/.config/zinit"
|
|
ZINIT[ZCOMPDUMP_PATH]="$HOME/.cache/zsh/compdump"
|
|
source $HOME/.config/zinit/bin/zinit.zsh
|
|
|
|
# Completions and Autosuggestions
|
|
zinit ice lucid blockf atpull'zinit creinstall -q .'; zinit light "zsh-users/zsh-completions"
|
|
zinit ice lucid atload"_zsh_autosuggest_start"; zinit light "zsh-users/zsh-autosuggestions"
|
|
|
|
# History
|
|
export SAVEHIST=200000
|
|
export HISTFILE=$HOME/.cache/zsh/history
|
|
|
|
# Aliases
|
|
alias ls='exa -al --color=always --group-directories-first'
|
|
alias cat='bat'
|
|
alias rm='rm -i'
|
|
alias cp='cp -i'
|
|
alias mv='mv -i'
|
|
alias grep='grep --color=auto'
|
|
alias fgrep='fgrep --color=auto'
|
|
alias egrep='egrep --color=auto'
|
|
alias diff='diff --color=auto'
|
|
alias ip='ip --color=auto'
|
|
alias vim='nvim'
|
|
|
|
alias sc-status="sudo systemctl status"
|
|
alias sc-start="sudo systemctl start"
|
|
alias sc-stop="sudo systemctl stop"
|
|
alias sc-reload="sudo systemctl reload"
|
|
alias sc-restart="sudo systemctl restart"
|
|
alias sc-enable="sudo systemctl enable"
|
|
alias sc-disable="sudo systemctl disable"
|
|
alias sc-daemon-reload="sudo systemctl daemon-reload"
|
|
|
|
alias termbin="nc termbin.com 9999"
|
|
|
|
# Library Files
|
|
source $HOME/.config/zsh/sshagent.zsh
|
|
zinit pack for ls_colors
|
|
zinit snippet OMZL::history.zsh
|
|
zinit snippet OMZL::functions.zsh
|
|
zinit snippet OMZL::completion.zsh
|
|
zinit snippet OMZL::directories.zsh
|
|
zinit snippet OMZL::key-bindings.zsh
|
|
zinit snippet OMZL::termsupport.zsh
|
|
zinit snippet OMZL::clipboard.zsh
|
|
zinit snippet OMZL::grep.zsh
|
|
|
|
# Completion Stuff
|
|
zstyle ':completion:*:*:*:users' ignored-patterns '*'
|
|
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
|
|
zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
|
zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr
|
|
zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
|
zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr
|
|
zstyle ':completion:*:*:*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost localhost4 localhost6 ip6-localhost broadcasthost pxm
|
|
zstyle ':completion:*:*:*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*localdomain*' '*.eeleater.org' '*.local'
|
|
zstyle ':completion:*:*:*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*'
|
|
|
|
# Plugins
|
|
zinit ice lucid; zinit light "mroth/evalcache"
|
|
zinit ice lucid; zinit snippet OMZP::command-not-found
|
|
zinit ice lucid; zinit snippet OMZP::fzf
|
|
zinit ice lucid; zinit light "b4b4r07/enhancd"
|
|
zinit ice lucid; zinit light "jreese/zsh-titles"
|
|
zinit ice lucid; zinit light "urbainvaes/fzf-marks"
|
|
zinit ice lucid; zinit light "Aloxaf/fzf-tab"
|
|
[[ -f /home/linuxbrew/.linuxbrew/bin/brew ]] && _evalcache /home/linuxbrew/.linuxbrew/bin/brew shellenv
|
|
|
|
# syntax highlighting
|
|
zinit ice lucid atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay"; zinit light "zdharma/fast-syntax-highlighting"
|
|
|
|
# Theme
|
|
zinit ice lucid depth=1; zinit light "romkatv/powerlevel10k"
|
|
[[ ! -f "$HOME/.p10k.zsh" ]] || source "$HOME/.p10k.zsh" # p10k configure || nano ~/.p10k.zsh
|
|
|
|
# Local RC
|
|
[[ -f "$HOME/.config/local/rc.zsh" ]] && source "$HOME/.config/local/rc.zsh"
|