style(ui): apply cyberpunk neon theme across all menus
- replace color palette with Cyberpunk 2077 neon variants in lib/common.sh - add DIM, BLINK, REV attributes and show_title ui helper - make show_separator terminal-width-aware via tput cols - restyle menus with ◢ numbered items and ▸_ prompt indicator - support two-digit input aliases (01-05, 00) alongside single-digit - update status tokens: [✓]/[✗] → [OK]/[KO], PURPLE → MAGENTA - apply consistent ui changes to lxs.sh and tools/index.sh
This commit is contained in:
+23
-25
@@ -35,16 +35,16 @@ run_sibling() {
|
||||
|
||||
local temp_file exit_code
|
||||
temp_file=$(mktemp "/tmp/lxs.${script_name%.*}.XXXXXX.sh")
|
||||
echo -e "${PURPLE}[*] Downloading ${BOLD}${script_name}${NC}${PURPLE}...${NC}"
|
||||
echo -e "${MAGENTA}[··] Fetching ${BOLD}${script_name}${NC}${MAGENTA}...${NC}"
|
||||
if curl -fsSL -H "Cache-Control: no-cache" -o "${temp_file}" "${LXS_RAW_BASE}/${script_path}"; then
|
||||
echo -e "${GREEN}[✓] Downloaded${NC}"
|
||||
echo -e "${GREEN}[OK] Payload acquired${NC}"
|
||||
chmod +x "${temp_file}"
|
||||
"${temp_file}" "$@"
|
||||
exit_code=$?
|
||||
rm -f "${temp_file}"
|
||||
return $exit_code
|
||||
else
|
||||
echo -e "${RED}[✗] Failed to download ${script_path}${NC}"
|
||||
echo -e "${RED}[KO] Failed to download ${script_path}${NC}"
|
||||
rm -f "${temp_file}"
|
||||
return 1
|
||||
fi
|
||||
@@ -53,35 +53,33 @@ run_sibling() {
|
||||
menu_tools() {
|
||||
while true; do
|
||||
clear
|
||||
echo -e "${WHITE}╔═══════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${WHITE}║ TOOLS ║${NC}"
|
||||
echo -e "${WHITE}╚═══════════════════════════════════════════════════════╝${NC}"
|
||||
show_title "TOOLS" "SYS_DAEMONS"
|
||||
echo ""
|
||||
echo -e " ${CYAN}[1]${NC} System Infos"
|
||||
echo -e " ${PURPLE}[2]${NC} Server Benchmark"
|
||||
echo -e " ${YELLOW}[3]${NC} Harden Server"
|
||||
echo -e " ${GREEN}[4]${NC} Change Root Password"
|
||||
echo -e " ${CYAN}[5]${NC} Update Server"
|
||||
echo -e " ${YELLOW}[6]${NC} Root SSH Password Login"
|
||||
echo -e " ${PURPLE}[7]${NC} Welcome Message (MOTD)"
|
||||
echo -e " ${RED}[0]${NC} Back"
|
||||
echo -e " ${YELLOW}◢ 01${NC} ${GRAY}│${NC} ${WHITE}System Infos${NC}"
|
||||
echo -e " ${YELLOW}◢ 02${NC} ${GRAY}│${NC} ${WHITE}Server Benchmark${NC}"
|
||||
echo -e " ${YELLOW}◢ 03${NC} ${GRAY}│${NC} ${WHITE}Harden Server${NC}"
|
||||
echo -e " ${YELLOW}◢ 04${NC} ${GRAY}│${NC} ${WHITE}Change Root Password${NC}"
|
||||
echo -e " ${YELLOW}◢ 05${NC} ${GRAY}│${NC} ${WHITE}Update Server${NC}"
|
||||
echo -e " ${YELLOW}◢ 06${NC} ${GRAY}│${NC} ${WHITE}Root SSH Password Login${NC}"
|
||||
echo -e " ${YELLOW}◢ 07${NC} ${GRAY}│${NC} ${WHITE}Welcome Message (MOTD)${NC}"
|
||||
echo -e " ${RED}◢ 00${NC} ${GRAY}│${NC} ${WHITE}BACK${NC}"
|
||||
echo ""
|
||||
echo -e -n "${BOLD}Choice [0-7]: ${NC}"
|
||||
echo -e -n "${YELLOW}▸${NC}${MAGENTA}_${NC} "
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_sibling "tools/system-infos.sh" ;;
|
||||
2) run_sibling "tools/server-benchmark.sh" ;;
|
||||
3) run_sibling "tools/harden.sh" ;;
|
||||
4) run_sibling "tools/root-password.sh" ;;
|
||||
5) run_sibling "tools/update-server.sh" ;;
|
||||
6) run_sibling "tools/root-ssh-login.sh" ;;
|
||||
7) run_sibling "tools/welcome-message.sh" ;;
|
||||
0) return ;;
|
||||
*) echo -e "${RED}[✗] Invalid option. Please select 0-7.${NC}"; sleep 1; continue ;;
|
||||
1|01) run_sibling "tools/system-infos.sh" ;;
|
||||
2|02) run_sibling "tools/server-benchmark.sh" ;;
|
||||
3|03) run_sibling "tools/harden.sh" ;;
|
||||
4|04) run_sibling "tools/root-password.sh" ;;
|
||||
5|05) run_sibling "tools/update-server.sh" ;;
|
||||
6|06) run_sibling "tools/root-ssh-login.sh" ;;
|
||||
7|07) run_sibling "tools/welcome-message.sh" ;;
|
||||
0|00) return ;;
|
||||
*) echo -e "${RED}[KO] Invalid protocol. Select 0-7.${NC}"; sleep 1; continue ;;
|
||||
esac
|
||||
|
||||
if [ "$choice" != "0" ]; then
|
||||
if [ "$choice" != "0" ] && [ "$choice" != "00" ]; then
|
||||
echo ""
|
||||
read -r -p "Press Enter to continue..."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user