-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
dot_zshrc
73 lines (55 loc) · 2.1 KB
/
dot_zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*-zsh-*- vim:ft=zsh
# push prompt to the bottom of screen
printf '\n%.0s' {1..$(( $(tput lines) ))}
# 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
# ┏━┓┏┳┓╺━┓ ┏━┓┏━╸╺┳╸╺┳╸╻┏┓╻┏━╸┏━┓
# ┃ ┃┃┃┃┏━┛ ┗━┓┣╸ ┃ ┃ ┃┃┗┫┃╺┓┗━┓
# ┗━┛╹ ╹┗━╸ ┗━┛┗━╸ ╹ ╹ ╹╹ ╹┗━┛┗━┛
export ZSH="${XDG_DATA_HOME:-$HOME/.local/share}/oh-my-zsh"
ZSH_CUSTOM="${XDG_DATA_HOME:-$HOME/.local/share}/omz-custom"
ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/oh-my-zsh"
ZSH_COMPDUMP="$ZSH_CACHE_DIR/.zcompdump-${SHORT_HOST:-${(%):-%m}}-${ZSH_VERSION}"
ZSH_THEME="powerlevel10k/powerlevel10k"
HIST_STAMPS="yyyy-mm-dd"
zstyle ':omz:update' mode auto
zstyle ':omz:update' frequency 7
if hash vivid 2>/dev/null; then
DISABLE_LS_COLORS=true
fi
# zsh-autocomplete plugin config
zstyle ':autocomplete:*' min-input 1
zstyle ':autocomplete:*' fzf-completion yes
zstyle ':autocomplete:*' ignored-input '(\*\*|..)'
# tmux plugin config
ZSH_TMUX_CONFIG="$HOME/.config/tmux/tmux.conf"
ZSH_TMUX_DEFAULT_SESSION_NAME="L"
# ssh-agent plugin config
zstyle :omz:plugins:ssh-agent quiet yes
zstyle :omz:plugins:ssh-agent lazy yes
plugins=(
git
rsync
sudo
tmux
ssh-agent
zsh-autosuggestions
zsh-autocomplete
fzf
zsh-latipun
zsh-syntax-highlighting # need to load last
)
# Functions path
# NOTE: https://github.com/zsh-users/zsh-completions/issues/603
# add brew completions path to fpath
if hash brew 2>/dev/null; then
fpath=("$(brew --prefix)/share/zsh/site-functions" $fpath)
fi
# zsh-completions
fpath=("${ZSH_CUSTOM:-$ZSH/custom}/plugins/zsh-completions/src" $fpath)
source $ZSH/oh-my-zsh.sh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh