optimized _custom.sh

This commit is contained in:
2025-11-03 15:14:19 -05:00
parent 20decfa42a
commit 6185230dfd

View File

@@ -7,42 +7,47 @@
#---------------
alias ac='clean && clear'
#---------------
# Theme's prompt
#---------------
if [[ -f $HOME/.hyperterm/themes/joy.sh ]]; then source "$HOME/.hyperterm/themes/joy.sh"; else true; fi
if [[ -f $HOME/.hyperterm/themes/light_theme.sh ]]; then source "$HOME/.hyperterm/themes/light_theme.sh"; else true; fi
if [[ -f $HOME/.hyperterm/themes/minterm.sh ]]; then source "$HOME/.hyperterm/themes/minterm.sh"; else true; fi
if [[ -f $HOME/.hyperterm/themes/pure.sh ]]; then source "$HOME/.hyperterm/themes/pure.sh"; else true; fi
if [[ -f $HOME/.hyperterm/themes/simple.sh ]]; then source "$HOME/.hyperterm/themes/simple.sh"; else true; fi
if [[ -f $HOME/.hyperterm/themes/special.sh ]]; then source "$HOME/.hyperterm/themes/special.sh"; else true; fi
#-----------------
# Theme Selection
#-----------------
HYPERTERM_THEME="default"
#---------------
# Set Theme
#---------------
unset prompt
prompt="${default}"
#prompt="${joy}"
#prompt="${light_theme}"
#prompt="${minterm}"
#prompt="${pure}"
#prompt="${simple}"
#prompt="${special}"
# Load only selected theme - optimized for speed
if [[ -f "$HOME/.hyperterm/themes/${HYPERTERM_THEME}.sh" ]]; then
source "$HOME/.hyperterm/themes/${HYPERTERM_THEME}.sh"
case "$HYPERTERM_THEME" in
"default") prompt="${default}" ;;
"joy") prompt="${joy}" ;;
"light_theme") prompt="${light_theme}" ;;
"minterm") prompt="${minterm}" ;;
"pure") prompt="${pure}" ;;
"simple") prompt="${simple}" ;;
"special") prompt="${special}" ;;
esac
fi
#---------------
#-------
# Tools
#---------------
if [[ -f $HOME/.hyperterm/tools/compress.sh ]]; then source "$HOME/.hyperterm/tools/compress.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/export.sh ]]; then source "$HOME/.hyperterm/tools/export.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/listuser.sh ]]; then source "$HOME/.hyperterm/tools/listuser.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/network.sh ]]; then source "$HOME/.hyperterm/tools/network.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/proxy.sh ]]; then source "$HOME/.hyperterm/tools/proxy.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/rar2zip.sh ]]; then source "$HOME/.hyperterm/tools/rar2zip.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/ruby.sh ]]; then source "$HOME/.hyperterm/tools/ruby.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/ssh-agent.sh ]]; then source "$HOME/.hyperterm/tools/ssh-agent.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/sysinfo.sh ]]; then source "$HOME/.hyperterm/tools/sysinfo.sh"; else true; fi
if [[ -f $HOME/.hyperterm/tools/virtualenv.sh ]]; then source "$HOME/.hyperterm/tools/virtualenv.sh"; else true; fi
# if [[ -f $HOME/.hyperterm/tools/vconverter.sh ]]; then source "$HOME/.hyperterm/tools/vconverter.sh"; else true; fi
#-------
# Uncomment only the tools you actually use for faster loading
HYPERTERM_TOOLS=(
"compress" # Archive extractor (ex function for .tar, .zip, .rar, etc)
# "export" # Export functions and environment variables
# "listuser" # User listing and management utilities
"network" # IP detection and network info functions
# "proxy" # Proxy configuration helpers
# "rar2zip" # RAR to ZIP conversion utilities
# "ruby" # Ruby development environment setup
"ssh-agent" # SSH key and agent management
# "sysinfo" # System information display functions
# "virtualenv" # Python virtual environment tools
# "vconverter" # Video conversion utilities
)
# Load only selected tools
for tool in "${HYPERTERM_TOOLS[@]}"; do
[[ -f "$HOME/.hyperterm/tools/${tool}.sh" ]] && source "$HOME/.hyperterm/tools/${tool}.sh"
done
#---------------
# Screenfetch