-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwaveterm.rc
More file actions
289 lines (254 loc) · 10.5 KB
/
waveterm.rc
File metadata and controls
289 lines (254 loc) · 10.5 KB
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
#!/usr/bin/env bash
# waveterm.rc
#
# This file is sourced by the Wave Terminal on startup.
# You can use this to change things like environment variables set
# without needing to edit the distributed version
export LANG=en_US.utf8
export LC_ALL=en_US.utf8
#========================================================================
#========================================================================
# Module System Behavior - Global Settings
#----------------------------------------
# These settings control how the module system operates
# Module Security Configuration
# ----------------------------
# These settings control module security verification
# Configuration Caching System
# ------------------------
# Controls how configuration files are cached for faster shell startup
export SENTINEL_CONFIG_CACHE_ENABLED=1
export SENTINEL_CONFIG_FORCE_REFRESH=0
export SENTINEL_CONFIG_CACHE_RETENTION_DAYS=30
export SENTINEL_CONFIG_VERIFY_HASH=1
# Module System Optimization
# -------------------------
# Controls module dependency resolution and loading behavior
export SENTINEL_MODULE_DEBUG=0
export SENTINEL_MODULE_AUTOLOAD=1
export SENTINEL_MODULE_CACHE_ENABLED=1
export SENTINEL_MODULE_VERIFY=1
#========================================================================
# MODULE-SPECIFIC CONFIGURATIONS
#========================================================================
# SENTINEL Feature Module Toggles
# -------------------------------
# Uncomment to enable/disable specific SENTINEL feature modules:
export SENTINEL_OBFUSCATE_ENABLED=1
export SENTINEL_FZF_ENABLED=1
export SENTINEL_ML_ENABLED=1
export SENTINEL_OSINT_ENABLED=1
export SENTINEL_CYBERSEC_ENABLED=1
export SENTINEL_GITSTAR_ENABLED=1
export SENTINEL_CHAT_ENABLED=1
export SENTINEL_SMALLLLM_ENABLED=1
export SENTINEL_AUTO_CASE_CORRECTION_ENABLED=1
# Obfuscation Module
# ------------------
export OBFUSCATE_OUTPUT_DIR="${HOME}/secure/obfuscated_files"
# Optional: set a custom temp directory for obfuscation
# export OBFUSCATE_TEMP_DIR="/tmp/obfuscate_temp"
# Hashcat Configuration
# --------------------
export HASHCAT_BIN="/usr/bin/hashcat"
export HASHCAT_WORDLISTS_DIR="/usr/share/wordlists"
export HASHCAT_OUTPUT_DIR="${HOME}/.hashcat/cracked"
# Distcc Configuration
# -------------------
export DISTCC_HOSTS="localhost" # Space-separated list of compilation hosts
export CCACHE_SIZE="5G" # Maximum size of ccache
#========================================================================
# CUSTOM PROMPT CONFIGURATION (OPTIONAL)
#========================================================================
# Uncomment to override the default prompt
# export PS1=
#========================================================================
# USER CUSTOMIZATIONS
#========================================================================
# Add your custom configurations, aliases, and functions below
# Source centralized configuration
# Source module manager and parallel loader
if [[ -f "${HOME}/bash_modules.d/module_manager.module" ]]; then
source "${HOME}/bash_modules.d/module_manager.module"
fi
if [[ -f "${HOME}/bash_modules.d/parallel_loader.module" ]]; then
source "${HOME}/bash_modules.d/parallel_loader.module"
fi
# Load all enabled modules in parallel
if type parallel_load_modules &>/dev/null; then
parallel_load_modules "${HOME}/.bash_modules"
fi
export PATH="$HOME/bin:$PATH"
# ========================================================================
# Performance Configuration
# ========================================================================
# heavy components. This can significantly reduce shell startup time.
#
# By default, lazy loading is enabled (CONFIG[LAZY_LOAD]=1)
# You can disable it by uncommenting the following line:
# export U_LAZY_LOAD=0
#
# Development environments that are lazy loaded:
# - Pyenv (Python version management)
# - NVM (Node.js version management)
# - RVM (Ruby version management)
# - Cargo (Rust tools)
#
# To lazy load additional tools, use the lazy_load function:
# lazy_load <command> <load_function>
#
# Example:
# function __load_custom_tool() {
# source /path/to/custom/tool/setup.sh
# }
# lazy_load custom_tool __load_custom_tool
#
# See bash_functions for more predefined loader functions
# ========================================================================
export U_LAZY_LOAD=1
# Lazy loading for development tools
if [[ -n "${CONFIG[LAZY_LOAD]+set}" && "${CONFIG[LAZY_LOAD]}" == "1" ]] || [[ "${U_LAZY_LOAD:-1}" == "1" ]]; then
function pyenv() {
{ unset -f pyenv; } 2>/dev/null || true
if [[ -d "$HOME/.pyenv" ]]; then
{ export PYENV_ROOT="$HOME/.pyenv"; } 2>/dev/null || true
{ export PATH="$PYENV_ROOT/bin:$PATH"; } 2>/dev/null || true
{ eval "$(command pyenv init - 2>/dev/null)"; } 2>/dev/null || true
{ eval "$(command pyenv virtualenv-init - 2>/dev/null)"; } 2>/dev/null || true
{ pyenv "$@"; } 2>/dev/null || return 0
else
{ echo "pyenv is not installed"; } 2>/dev/null || true
return 0
fi
}
function nvm() {
{ unset -f nvm; } 2>/dev/null || true
if [[ -d "$HOME/.nvm" ]]; then
{ export NVM_DIR="$HOME/.nvm"; } 2>/dev/null || true
{ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"; } 2>/dev/null || true
{ [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"; } 2>/dev/null || true
{ nvm "$@"; } 2>/dev/null || return 0
else
{ echo "nvm is not installed"; } 2>/dev/null || true
return 0
fi
}
function node() {
{ unset -f node; } 2>/dev/null || true
{ nvm >/dev/null 2>&1; } 2>/dev/null || true
{ node "$@"; } 2>/dev/null || return 0
}
function npm() {
{ unset -f npm; } 2>/dev/null || true
{ nvm >/dev/null 2>&1; } 2>/dev/null || true
{ npm "$@"; } 2>/dev/null || return 0
}
function python() {
{ unset -f python; } 2>/dev/null || true
{ pyenv >/dev/null 2>&1; } 2>/dev/null || true
{ python "$@"; } 2>/dev/null || return 0
}
function pip() {
{ unset -f pip; } 2>/dev/null || true
{ pyenv >/dev/null 2>&1; } 2>/dev/null || true
{ pip "$@"; } 2>/dev/null || return 0
}
fi
# Add your customizations below this line
# ============================================================
# Meteor Lake C Toolchain - GCC 13.2.0
# ============================================================
if [ -f /home/john/c-toolchain/activate-enhanced.sh ]; then
source /home/john/c-toolchain/activate-enhanced.sh
elif [ -f /home/john/c-toolchain/activate.sh ]; then
source /home/john/c-toolchain/activate.sh
fi
# Quick aliases
alias mgcc='meteor-gcc 2>/dev/null || gcc'
alias mprofile='meteor_profile 2>/dev/null || echo "Enhanced features not installed"'
# Show toolchain info on login (optional)
if command -v gcc &> /dev/null; then
echo "Toolchain: $(gcc --version | head -1)"
fi
# Silence module status messages
export SENTINEL_QUIET_STATUS=1
# OpenVINO Check (after Python venv setup)
DSENV_PATH="${HOME}/datascience/envs/dsenv"
SENTINEL_VENV_PATH="${HOME}/venv"
if [[ -n "${VIRTUAL_ENV}" && "${VIRTUAL_ENV}" == "${DSENV_PATH}" ]]; then
# dsenv is active
if python -c "import openvino" >/dev/null 2>&1; then
echo "[SENTINEL] OpenVINO Python package successfully detected in the active custom environment (dsenv)."
else
echo "[SENTINEL] Warning: Custom environment (dsenv) is active, but OpenVINO Python package not found within it."
echo "[SENTINEL] Ensure your custom OpenVINO build in dsenv includes the Python bindings."
fi
elif [[ -n "${VIRTUAL_ENV}" && "${VIRTUAL_ENV}" == "${SENTINEL_VENV_PATH}" ]]; then
# SENTINEL venv is active (and dsenv is not)
# This check will likely fail due to constraints.txt, but we keep it for completeness.
if "${SENTINEL_VENV_PATH}/bin/python" -c "import openvino" >/dev/null 2>&1; then
echo "[SENTINEL] OpenVINO Python package is available in the SENTINEL virtual environment (${SENTINEL_VENV_PATH})."
else
echo "[SENTINEL] SENTINEL virtual environment (${SENTINEL_VENV_PATH}) is active. OpenVINO Python package not found (expected, due to constraints.txt for custom build)."
echo "[SENTINEL] If you intend to use a custom OpenVINO, please activate the 'dsenv' environment: source ${DSENV_PATH}/bin/activate"
fi
else
# No known primary virtual environment active or an unknown one is.
echo "[SENTINEL] No primary SENTINEL or dsenv virtual environment detected as active."
echo "[SENTINEL] For OpenVINO, ensure 'dsenv' (${DSENV_PATH}) is activated or OpenVINO is installed in '${SENTINEL_VENV_PATH}' (if not using custom build)."
fi
# Python virtual environment management
mkvenv() {
local venv_dir=".venv"
local python_cmd="python3"
local requirements_file="requirements.txt"
# Handle optional arguments
while [[ $# -gt 0 ]]; do
case $1 in
-d|--dir)
venv_dir="$2"
shift 2
;;
-p|--python)
python_cmd="$2"
shift 2
;;
-r|--requirements)
requirements_file="$2"
shift 2
;;
-h|--help)
echo "Usage: mkvenv [OPTIONS]"
echo "Create and activate a Python virtual environment in the current directory."
echo ""
echo "Options:"
echo " -d, --dir DIR Specify the virtual environment directory (default: .venv)"
echo " -p, --python PYTHON Specify the Python executable to use (default: python3)"
echo " -r, --requirements FILE Install packages from requirements file after creation"
echo " -h, --help Show this help message and exit"
return 0
;;
*)
echo "Unknown option: $1"
echo "Use mkvenv --help for usage information."
return 1
;;
esac
done
# Check if Python is available
if ! command -v "$python_cmd" &>/dev/null; then
echo "[✗] Error: $python_cmd not found"
return 1
fi
# Create the virtual environment if it doesn't exist
if [[ ! -d "$venv_dir" ]]; then
echo "[+] Creating virtual environment in: $venv_dir"
"$python_cmd" -m venv "$venv_dir"
if [[ $? -ne 0 ]]; then
echo "[✗] Failed to create virtual environment"
fi
fi
}
# =============================
# End of waveterm.rc
# =============================