From fc006e32be143978728152f18494a9f0d65fe144 Mon Sep 17 00:00:00 2001 From: tw93 Date: Thu, 5 Mar 2026 19:10:03 +0800 Subject: [PATCH] remove startup intro animation from main menu --- mole | 58 ---------------------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/mole b/mole index 3193075..a00fbc3 100755 --- a/mole +++ b/mole @@ -188,50 +188,6 @@ ${GREEN}|_| |_|\___/|_|\___|${NC} ${GREEN}${MOLE_TAGLINE}${NC} EOF } -animate_mole_intro() { - if [[ ! -t 1 ]]; then - return - fi - - clear_screen - printf '\n' - hide_cursor - - local -a mole_lines=() - - while IFS= read -r line; do - mole_lines+=("$line") - done << 'EOF' - /\_/\ - ____/ o o \ - /~____ =o= / -(______)__m_m) - / \ - __/ /\ \__ - /__/ \__\_ -EOF - - local idx - local body_cutoff=4 - local body_color="${PURPLE}" - local ground_color="${GREEN}" - - for idx in "${!mole_lines[@]}"; do - if ((idx < body_cutoff)); then - printf "%s\n" "${body_color}${mole_lines[$idx]}${NC}" - else - printf "%s\n" "${ground_color}${mole_lines[$idx]}${NC}" - fi - sleep 0.1 - done - - printf '\n' - sleep 0.5 - - printf '\033[2J\033[H' - show_cursor -} - show_version() { local os_ver if command -v sw_vers > /dev/null; then @@ -796,20 +752,6 @@ show_main_menu() { } interactive_main_menu() { - if [[ -t 1 ]]; then - local tty_name - tty_name=$(tty 2> /dev/null || echo "") - if [[ -n "$tty_name" ]]; then - local flag_file - local cache_dir="$HOME/.cache/mole" - ensure_user_dir "$cache_dir" - flag_file="$cache_dir/intro_$(echo "$tty_name" | LC_ALL=C tr -c '[:alnum:]_' '_')" - if [[ ! -f "$flag_file" ]]; then - animate_mole_intro - ensure_user_file "$flag_file" - fi - fi - fi local current_option=1 local first_draw=true local brand_banner=""