-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
202 lines (165 loc) · 6.08 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# shellcheck disable=SC1090,SC2148
# set -x # enable DEBUG MODE
# zmodload zsh/zprof # enable profiling
# enable advance profiling
# zmodload zsh/datetime
# setopt PROMPT_SUBST
# PS4='+$EPOCHREALTIME %N:%i> '
# logfile=$(mktemp zsh_profile.XXXXXXXX)
# echo "Logging to $logfile"
# exec 3>&2 2>$logfile
# setopt XTRACE
################################
# Core setup #
################################
# This shouldn't be changes, except you install the application to difference
export MYZS_ROOT="$HOME/.myzs"
export MYZS_TYPE="FULLY"
################################
# Plugins and Modules #
################################
export MYZS_LOADING_PLUGINS=(
"myzs-plugins/core#master"
"myzs-plugins/editor#master"
"myzs-plugins/git#master"
"myzs-plugins/macos#master"
"myzs-plugins/thefuck#master"
"myzs-plugins/mobile#main"
"myzs-plugins/asdf#main"
"myzs-plugins/google#main"
"myzs-plugins/docker#master"
"myzs-plugins/pack#main"
"myzs-plugins/python#main"
"myzs-plugins/golang#main"
"myzs-plugins/rust#main"
"myzs-plugins/dotnet#main"
"myzs-plugins/nodejs#master"
"myzs-plugins/java#main"
# "kamontat/mplugin-kamontat#master"
# "kamontat/mplugin-agoda#master"
)
export MYZS_LOADING_MODULES=(
"builtin#app/myzs.sh" # requires
"builtin#alias/myzs.sh"
"builtin#app/myzs-dev.sh" # several command for start myzs debugger
"builtin#app/env.sh" # loading .env file in .myzs directory
"builtin#app/autopath.sh" # move to path from clipboard if folder is exist
)
MYZS_LOADING_MODULES+=(
"myzs-plugins/core#alias/short.sh"
# "myzs-plugins/core#alias/shell.sh"
# "myzs-plugins/editor#app/vscode.sh"
"myzs-plugins/git#alias/git.sh"
"myzs-plugins/macos#app/homebrew.sh"
)
# custom define group
# This will by loaded only if group setting is enabled
export MYZS_LOADING_GROUPS=(
"$" group "shell" "myzs-plugins/core#alias/shell.sh"
"$" group "dev" "myzs-plugins/editor#app/vscode.sh" "myzs-plugins/git#alias/git.sh" "myzs-plugins/thefuck#app/fuck.sh"
"$" group "docker" "myzs-plugins/docker#alias/docker.sh" "myzs-plugins/pack#app/main.sh"
"$" group "golang" "builtin#groups/dev" "myzs-plugins/git#alias/git.sh" "myzs-plugins/golang#app/go.sh"
"$" group "node" "myzs-plugins/nodejs#settings/yarn.sh" "myzs-plugins/nodejs#settings/lts.sh"
)
################################
# Application settings #
################################
# Format action command will listed via `_myzs:private:setting:<name>`
# first element must be '$'
# second element is command type
# 1. string => string "$1" "$2" (run $1=$2)
# 2. array => array "$1" "$@" (run $1=($2 $3 $@))
# 2. enabled => enabled "$1" (run $1=true)
# 3. disabled => disabled "$1" (run $1=false)
export MYZS_LOADING_SETTINGS=(
# This is settings for myzs behavior.
# Accept values: FULLY | SMALL
# 1. FULLY -> full command with advance support on zsh script
# 2. SMALL -> small utils with alias for bash and server bash
"$" string type "${MYZS_TYPE:-FULLY}"
# enabled or disabled zplug modules and plugins
# for custom plugins look to `Zsh dependencies plugins` section
"$" enabled zplug
# We will if plugin have loaded before, we will skip it
# if disabled is setting we will process every plugin
"$" enabled plugin/cache
# Enabled this meaning progressbar step when we load plugin to be one 1 task
"$" enabled plugin/aggregation
# Enabled this meaning progressbar step when we load plugin to be one 1 task
"$" enabled module/aggregation
# List of enabled log level, this is case insensitive
# "error" "warn" "info" "debug"
"$" array logger/level "error"
# enabled or disabled progress bar
"$" enabled pg
# If this is true, the application will trace each component in difference lines
"$" disabled pg/performance
# progress bar style (listed at src/utils/revolver)
"$" string pg/style "bouncingBall"
# title shift when price progress bar
"$" string pg/title/length "8"
# full message shift when print progress bar
"$" string pg/message/length "68"
# timer format in progressbar
# %M - total minute, %S - total second, %L - total millisecond
# %s - second, %l - millisecond
"$" string pg/timer/format "%S:%l"
# minimum millisecond will be shown as danger color
"$" string pg/timer/danger-color "600"
# minimum millisecond will be shown as warning color
"$" string pg/timer/warn-color "200"
# loading message color
"$" string pg/color/loading "$(tput setaf 6)"
# complete status indicator
"$" string pg/color/completed "$(tput setaf 10)"
# skip status indicator
"$" string pg/color/skipped "$(tput setaf 11)"
# fail status indicator
"$" string pg/color/failed "$(tput setaf 9)"
# time danger color
"$" string pg/color/time-danger "$(tput setaf 1)"
# time warning color
"$" string pg/color/time-warn "$(tput setaf 3)"
# normal time color
"$" string pg/color/time "$(tput setaf 14)"
# enabled module group (beta)
"$" enabled group
# enabled data metric (beta)
"$" disabled metrics
)
################################
# Zsh dependencies plugins #
################################
# Uncommand this, to use custom zplug application.
# export MYZS_ZPLUG=""
## Override zplug plugins list.
## NOTES: This will remove all plugins from src/settings/zplugins.sh except 'zplug/zplug'
## Uncommand function below
# myzs:zplug:custom:plugin-list() {
# zplug "zsh-users/zsh-autosuggestions"
# }
################################
# Shell environment variable #
################################
# This is tell terminal to know what is default shell
# MYZS_DEFAULT_SHELL="/usr/local/bin/zsh"
# export MYZS_DEFAULT_SHELL
# System call, leave it alone
if test -f "${MYZS_ROOT}/init.sh"; then
source "${MYZS_ROOT}/init.sh"
else
echo "cannot load myzs init file" >&2
fi
################################
# Appending by user or scripts #
################################
# doing something else
################################
# Cleanup #
################################
_myzs:internal:project:cleanup
# When enabled profiling
# zprof
# When enabled advance profiling
# unsetopt XTRACE
# exec 2>&3 3>&-