diff --git a/README.md b/README.md index cee7e04..39d96b6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash ```bash mole # Interactive main menu -mole clean # Deep clean (smart sudo handling) +mole clean # Deeper system cleanup mole uninstall # Interactive app uninstaller mole --help # Show help ``` @@ -29,7 +29,7 @@ mole --help # Show help ### Example Output ```bash -🕳️ Mole - System Cleanup +🕳️ Mole - Deeper system cleanup ======================== 🍎 Detected: Apple Silicon | 💾 Free space: 45.2GB 🚀 Mode: User-level cleanup (no password required) diff --git a/bin/clean.sh b/bin/clean.sh index d9a451a..ea3de07 100755 --- a/bin/clean.sh +++ b/bin/clean.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Mole - System Cleanup Module +# Mole - Deeper system cleanup # Complete cleanup with smart password handling set -euo pipefail @@ -295,8 +295,8 @@ safe_clean() { start_cleanup() { clear - echo "🕳️ Mole - System Cleanup" - echo "=========================" + echo "🕳️ Mole - Deeper system cleanup" + echo "==================================================" echo "" echo "This will clean:" echo " • App caches and logs" @@ -336,7 +336,7 @@ start_cleanup() { perform_cleanup() { echo "" - echo "🕳️ Mole - System Cleanup" + echo "🕳️ Mole - Deeper system cleanup" echo "========================" echo "🍎 Detected: $(detect_architecture) | 💾 Free space: $(get_free_space)" @@ -869,7 +869,7 @@ perform_cleanup() { main() { case "${1:-""}" in "--help"|"-h") - echo "Mole - System Cleanup" + echo "Mole - Deeper system cleanup" echo "Usage: clean.sh [options]" echo "" echo "Options:" @@ -885,4 +885,4 @@ main() { esac } -main "$@" \ No newline at end of file +main "$@" diff --git a/mole b/mole index 03817ee..a6aa863 100755 --- a/mole +++ b/mole @@ -25,8 +25,8 @@ source "$SCRIPT_DIR/lib/common.sh" VERSION="1.0.0" show_help() { - cat << EOF -Mole v$VERSION - Dig deep to clean your mac. + cat <<'EOF' +Mole can dig deep to clean your mac. ===================================== USAGE: @@ -34,7 +34,7 @@ USAGE: COMMANDS: mole # Interactive main menu - mole clean # Clean system (will ask for password if needed) + mole clean # Deeper system cleanup mole uninstall # Remove applications completely mole --help # Show this help message @@ -48,7 +48,7 @@ show_main_menu() { if [[ "$redraw_full" == "true" ]]; then echo "" - echo " 🌚 Mole can dig deep to clean your mac." + echo "Mole can dig deep to clean your mac." echo "" fi @@ -74,6 +74,10 @@ interactive_main_menu() { # Set up signal trapping to handle Ctrl+C gracefully trap 'echo ""; echo "Thank you for using Mole!"; exit 0' INT + cleanup_menu_display() { + printf '\033[u\033[J' + } + while true; do if [[ "$first_draw" == "true" ]]; then show_main_menu $current_option true @@ -101,6 +105,7 @@ interactive_main_menu() { ((current_option < total_options)) && ((current_option++)) ;; "ENTER") + cleanup_menu_display case $current_option in 1) exec "$SCRIPT_DIR/bin/clean.sh" @@ -109,10 +114,12 @@ interactive_main_menu() { exec "$SCRIPT_DIR/bin/uninstall.sh" ;; 3) + clear_screen show_help exit 0 ;; 4) + clear_screen echo "" echo "Thank you for using Mole!" exit 0 @@ -120,16 +127,19 @@ interactive_main_menu() { esac ;; "QUIT"|"ESC") + cleanup_menu_display + clear_screen echo "" echo "Thank you for using Mole!" exit 0 ;; "1"|"2"|"3"|"4") + cleanup_menu_display case $key in 1) exec "$SCRIPT_DIR/bin/clean.sh" ;; 2) exec "$SCRIPT_DIR/bin/uninstall.sh" ;; - 3) show_help; exit 0 ;; - 4) echo ""; echo "Thank you for using Mole!"; exit 0 ;; + 3) clear_screen; show_help; exit 0 ;; + 4) clear_screen; echo ""; echo "Thank you for using Mole!"; exit 0 ;; esac ;; *)