-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
168 lines (133 loc) · 4.89 KB
/
.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# _____ _
# |__ /___| |__ _ __ ___
# / // __| '_ \| '__/ __|
# / /_\__ \ | | | | | (__
# /____|___/_| |_|_| \___|
# Show OS info when opening a new terminal
# neofetch
# Font mode for powerlevel9k
POWERLEVEL9K_MODE="nerdfont-complete"
# Prompt elements
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs status)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(go_version background_jobs rbenv)
# Set name of the theme to load.
ZSH_THEME="powerlevel10k/powerlevel10k"
# Last command successful
# ✔ %F{red} ✘
# Prompt settings
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=$'╰─ '
#
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=$'%F{cyan}%K{white} %f%F{red} %f%F{black} %f%k\e[97;48;5;48m'
# # Separators
# POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR_ICON=$'\ue0b0'
# POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR_ICON=$'\ue0b1'
# POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR_ICON=$'\ue0b2'
# POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR_ICON=$'\ue0b7'
# # Dir colours
# POWERLEVEL9K_DIR_HOME_BACKGROUND='white'
# POWERLEVEL9K_DIR_HOME_FOREGROUND='black'
# POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND='black'
# POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND='white'
# POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='yellow'
# POWERLEVEL9K_DIR_DEFAULT_FOREGROUND='black'
POWERLEVEL9K_DIR_SHORTEN_LENGTH=5
# POWERLEVEL9K_DIR_SHORTEN_STRATEGY="truncate_from_right"
# # OS segment
# POWERLEVEL9K_OS_ICON_BACKGROUND='black'
# POWERLEVEL9K_LINUX_ICON='%F{cyan} \uf303 %F{white} arch %F{cyan}linux%f'
# # VCS icons
# POWERLEVEL9K_VCS_GIT_ICON=$'\uf1d2 '
# POWERLEVEL9K_VCS_GIT_GITHUB_ICON=$'\uf113 '
# POWERLEVEL9K_VCS_GIT_GITLAB_ICON=$'\uf296 '
# POWERLEVEL9K_VCS_BRANCH_ICON=$''
# POWERLEVEL9K_VCS_STAGED_ICON=$'\uf055'
# POWERLEVEL9K_VCS_UNSTAGED_ICON=$'\uf421'
# POWERLEVEL9K_VCS_UNTRACKED_ICON=$'\uf00d'
# POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=$'\uf0ab '
# POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=$'\uf0aa '
# # VCS colours
# POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='blue'
# POWERLEVEL9K_VCS_MODIFIED_FOREGROUND='black'
# POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='green'
# POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND='black'
# POWERLEVEL9K_VCS_CLEAN_BACKGROUND='green'
# POWERLEVEL9K_VCS_CLEAN_FOREGROUND='black'
# # VCS CONFIG
# POWERLEVEL9K_VCS_SHOW_CHANGESET=false
# Status
POWERLEVEL9K_STATUS_OK_BACKGROUND='white'
POWERLEVEL9K_STATUS_OK_FOREGROUND='green'
POWERLEVEL9K_STATUS_OK=false
POWERLEVEL9K_STATUS_OK_ICON=$'\uf164'
POWERLEVEL9K_STATUS_ERROR_ICON=$'\uf165'
POWERLEVEL9K_STATUS_ERROR_CR_ICON=$'\uf165'
# # Battery
# POWERLEVEL9K_BATTERY_LOW_FOREGROUND='red'
# POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND='blue'
# POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='green'
# POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='blue'
# POWERLEVEL9K_BATTERY_VERBOSE=true
# # Programming languages
# POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=true
# POWERLEVEL9K_GO_VERSION_PROMPT_ALWAYS_SHOW=true
# POWERLEVEL9K_NODE_VERSION_BACKGROUND='green'
# POWERLEVEL9K_NODE_VERSION_FOREGROUND='black'
# CustomP9K
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='yellow'
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='yellow'
POWERLEVEL9K_VCS_CLEAN_BACKGROUND='lightgreen'
POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='black'
POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND='springgreen1'
POWERLEVEL9K_BATTERY_LOW_FOREGROUND='red'
POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND='green'
POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='lightcyan'
POWERLEVEL9K_BATTERY_LOW_BACKGROUND='grey50'
POWERLEVEL9K_BATTERY_CHARGING_BACKGROUND='grey50'
POWERLEVEL9K_BATTERY_CHARGED_BACKGROUND='grey50'
POWERLEVEL9K_BATTERY_VERBOSE=false
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=30
POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD='60'
POWERLEVEL9K_GO_VERSION_FOREGROUND='blue'
#POWERLEVEL9K_STATUS_OK='false'
# Command auto-correction.
ENABLE_CORRECTION="true"
# Command execution time stamp shown in the history command output.
HIST_STAMPS="dd/mm/yyyy"
plugins=(git
gitfast
golang
zsh-syntax-highlighting
zsh-autosuggestions
zsh-completions
history-substring-search)
autoload -U compinit && compinit
export ZSH=$HOME/.oh-my-zsh
source $ZSH/oh-my-zsh.sh
# User configuration
unsetopt beep
eval `dircolors ~/.dircolors/dircolors.256dark`
# zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==34=34}:${(s.:.)LS_COLORS}")';
export MANPATH="/usr/local/man:$MANPATH"
# load functions
if [ -f ~/.zsh_functions ]; then
. ~/.zsh_functions
fi
# load aliases
if [ -f ~/.zsh_aliases ]; then
. ~/.zsh_aliases
fi
export DISPLAY=:0
export LIBGL_ALWAYS_INDIRECT=1
if [ $WSL_DISTRO_NAME = 'WLinux' ]; then
export ZSH_THEME_TERM_TAB_TITLE_IDLE='PengWin/$WSL_DISTRO_NAME: %~'
else
export ZSH_THEME_TERM_TAB_TITLE_IDLE='$WSL_DISTRO_NAME: %~'
fi
# bind keys so that CTRL+Delete/Backspace work in Windows Terminal
bindkey "^H" backward-kill-word
bindkey "^[[3;5~" kill-word
bindkey "^[" kill-whole-line