summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author135e2 <[email protected]>2022-01-15 19:52:04 +0800
committer135e2 <[email protected]>2022-01-15 19:52:04 +0800
commited2d42984222bd7579359abd38cdd4899004faa7 (patch)
treeeb3b1a116b328be8e9d9fe320a54c4f9548c8b28
parent9c2f3b187ffc65ed97948ec2e35a9829a16de8c9 (diff)
downloaddotfiles-ed2d42984222bd7579359abd38cdd4899004faa7.tar.gz
dotfiles-ed2d42984222bd7579359abd38cdd4899004faa7.tar.bz2
dotfiles-ed2d42984222bd7579359abd38cdd4899004faa7.zip
.zshrc: new, 20220115
-rw-r--r--.zshrc76
1 files changed, 76 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
new file mode 100644
index 0000000..96c12e3
--- /dev/null
+++ b/.zshrc
@@ -0,0 +1,76 @@
+# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
+# Initialization code that may require console input (password prompts, [y/n]
+# confirmations, etc.) must go above this block; everything else may go below.
+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
+
+
+### Added by Zinit's installer
+if [[ ! -f $HOME/.zinit/bin/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"
+ command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
+ command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
+ print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
+ print -P "%F{160}▓▒░ The clone has failed.%f%b"
+fi
+
+source "$HOME/.zinit/bin/zinit.zsh"
+autoload -Uz _zinit
+(( ${+_comps} )) && _comps[zinit]=_zinit
+
+# Load a few important annexes, without Turbo
+# (this is currently required for annexes)
+zinit light-mode for \
+ zdharma-continuum/z-a-rust \
+ zdharma-continuum/z-a-as-monitor \
+ zdharma-continuum/z-a-patch-dl \
+ zdharma-continuum/z-a-bin-gem-node
+
+### End of Zinit's installer chunk
+
+# Highlighting
+zinit ice lucid wait='0' atinit='zpcompinit'
+zinit light zsh-users/zsh-syntax-highlighting
+
+# Completions
+zinit ice lucid wait='0'
+zinit light zsh-users/zsh-completions
+
+# Powerlevel10k
+zinit ice depth=1
+zinit light romkatv/powerlevel10k
+
+# Zprof
+zmodload zsh/zprof
+
+# Load from oh-my-zsh
+zinit wait="1" lucid for \
+ OMZL::clipboard.zsh \
+ OMZL::git.zsh \
+ OMZL::history.zsh \
+ OMZP::systemd/systemd.plugin.zsh \
+ OMZP::sudo/sudo.plugin.zsh \
+ OMZP::git/git.plugin.zsh
+# Auto suggestions
+zinit ice lucid wait='0' atload='_zsh_autosuggest_start'
+zinit light zsh-users/zsh-autosuggestions
+
+# Use exa instead
+DISABLE_LS_COLORS=true
+alias ls=exa
+
+# Use batcat as cat
+alias cat=batcat
+
+# Goproxy
+export GOPROXY=https://goproxy.io,direct
+
+# Go bin
+export PATH="$PATH:${HOME}/go/bin"
+
+# GnuPG magic for commit signing
+export GPG_TTY=${_P9K_TTY}
+
+# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
+[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh