mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 14:43:39 +00:00
Tip content format optimization
This commit is contained in:
@@ -9,5 +9,5 @@ if [[ -x "$GO_BIN" ]]; then
|
|||||||
exec "$GO_BIN" "$@"
|
exec "$GO_BIN" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Bundled analyzer binary not found. Please reinstall Mole or run 'mo update' to restore it." >&2
|
echo "Bundled analyzer binary not found. Please reinstall Mole or run mo update to restore it." >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
14
bin/clean.sh
14
bin/clean.sh
@@ -489,7 +489,7 @@ start_cleanup() {
|
|||||||
|
|
||||||
if [[ "$DRY_RUN" != "true" && -t 0 ]]; then
|
if [[ "$DRY_RUN" != "true" && -t 0 ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${YELLOW}Tip:${NC} Safety first—run 'mo clean --dry-run'. Important Macs should stop."
|
echo -e "${YELLOW}☻${NC} First time? Run ${GRAY}mo clean --dry-run${NC} first to preview changes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$DRY_RUN" == "true" ]]; then
|
if [[ "$DRY_RUN" == "true" ]]; then
|
||||||
@@ -734,8 +734,8 @@ perform_cleanup() {
|
|||||||
start_section "Finder metadata"
|
start_section "Finder metadata"
|
||||||
if [[ "$PROTECT_FINDER_METADATA" == "true" ]]; then
|
if [[ "$PROTECT_FINDER_METADATA" == "true" ]]; then
|
||||||
note_activity
|
note_activity
|
||||||
echo -e " ${GRAY}○${NC} Finder metadata protected by whitelist."
|
echo -e " ${YELLOW}☻${NC} Finder metadata protected by whitelist"
|
||||||
echo -e " ${GRAY}○${NC} Use ${GRAY}mo clean --whitelist${NC} to allow cleaning .DS_Store files."
|
echo -e " ${YELLOW}☻${NC} Run ${GRAY}mo clean --whitelist${NC} to allow cleaning .DS_Store files"
|
||||||
else
|
else
|
||||||
clean_ds_store_tree "$HOME" "Home directory (.DS_Store)"
|
clean_ds_store_tree "$HOME" "Home directory (.DS_Store)"
|
||||||
|
|
||||||
@@ -965,7 +965,7 @@ perform_cleanup() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Timeout or error occurred
|
# Timeout or error occurred
|
||||||
echo -e " ${YELLOW}${ICON_WARNING}${NC} Homebrew cleanup timed out (run 'brew cleanup' manually)"
|
echo -e " ${YELLOW}${ICON_WARNING}${NC} Homebrew cleanup timed out (run ${GRAY}brew cleanup${NC} manually)"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e " ${YELLOW}→${NC} Homebrew (would cleanup)"
|
echo -e " ${YELLOW}→${NC} Homebrew (would cleanup)"
|
||||||
@@ -1646,13 +1646,13 @@ perform_cleanup() {
|
|||||||
if [[ $node_modules_count -gt 0 ]] || [[ $venv_count -gt 0 ]]; then
|
if [[ $node_modules_count -gt 0 ]] || [[ $venv_count -gt 0 ]]; then
|
||||||
if [[ $node_modules_count -gt 0 ]]; then
|
if [[ $node_modules_count -gt 0 ]]; then
|
||||||
local nm_gb=$(echo "$node_modules_size" | awk '{printf "%.1f", $1/1024/1024}')
|
local nm_gb=$(echo "$node_modules_size" | awk '{printf "%.1f", $1/1024/1024}')
|
||||||
echo -e " ${GRAY}○${NC} Found ${YELLOW}${nm_gb}GB${NC} in $node_modules_count old node_modules ${GRAY}(60+ days)${NC}"
|
echo -e " ${YELLOW}☻${NC} Found ${YELLOW}${nm_gb}GB${NC} in $node_modules_count old node_modules ${GRAY}(60+ days)${NC}"
|
||||||
fi
|
fi
|
||||||
if [[ $venv_count -gt 0 ]]; then
|
if [[ $venv_count -gt 0 ]]; then
|
||||||
local venv_gb=$(echo "$venv_size" | awk '{printf "%.1f", $1/1024/1024}')
|
local venv_gb=$(echo "$venv_size" | awk '{printf "%.1f", $1/1024/1024}')
|
||||||
echo -e " ${GRAY}○${NC} Found ${YELLOW}${venv_gb}GB${NC} in $venv_count old Python venv ${GRAY}(60+ days)${NC}"
|
echo -e " ${YELLOW}☻${NC} Found ${YELLOW}${venv_gb}GB${NC} in $venv_count old Python venv ${GRAY}(60+ days)${NC}"
|
||||||
fi
|
fi
|
||||||
echo -e " ${YELLOW}☻${NC} Run 'mo analyze' to see details and manually clean"
|
echo -e " ${YELLOW}☻${NC} Run ${GRAY}mo analyze${NC} to see details and manually clean"
|
||||||
else
|
else
|
||||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} No large unused project dependencies found"
|
echo -e " ${GREEN}${ICON_SUCCESS}${NC} No large unused project dependencies found"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$show_touchid_tip" == "true" ]]; then
|
if [[ "$show_touchid_tip" == "true" ]]; then
|
||||||
echo -e "Tip: run 'mo touchid' to approve sudo via Touch ID."
|
echo -e "${YELLOW}☻${NC} Run ${GRAY}mo touchid${NC} to approve sudo via Touch ID"
|
||||||
fi
|
fi
|
||||||
print_summary_block "success" "$summary_title" "${summary_details[@]}"
|
print_summary_block "success" "$summary_title" "${summary_details[@]}"
|
||||||
printf '\n'
|
printf '\n'
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ show_status() {
|
|||||||
if is_touchid_configured; then
|
if is_touchid_configured; then
|
||||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Touch ID is enabled for sudo"
|
echo -e "${GREEN}${ICON_SUCCESS}${NC} Touch ID is enabled for sudo"
|
||||||
else
|
else
|
||||||
echo -e "${YELLOW}○${NC} Touch ID is not configured for sudo"
|
echo -e "${YELLOW}☻${NC} Touch ID is not configured for sudo"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,9 +132,9 @@ batch_uninstall_applications() {
|
|||||||
local removal_note="Remove ${app_total} ${app_text}"
|
local removal_note="Remove ${app_total} ${app_text}"
|
||||||
[[ -n "$size_display" ]] && removal_note+=" (${size_display})"
|
[[ -n "$size_display" ]] && removal_note+=" (${size_display})"
|
||||||
if [[ ${#running_apps[@]} -gt 0 ]]; then
|
if [[ ${#running_apps[@]} -gt 0 ]]; then
|
||||||
removal_note+=" - will force quit: ${running_apps[*]}"
|
removal_note+=" ${YELLOW}[Running]${NC}"
|
||||||
fi
|
fi
|
||||||
echo -ne "${PURPLE}${ICON_ARROW}${NC} ${removal_note}. Press ${GREEN}Enter${NC} to confirm, ${GRAY}ESC${NC} to cancel: "
|
echo -ne "${PURPLE}${ICON_ARROW}${NC} ${removal_note} ${GREEN}Enter${NC} confirm, ${GRAY}ESC${NC} cancel: "
|
||||||
|
|
||||||
IFS= read -r -s -n1 key || key=""
|
IFS= read -r -s -n1 key || key=""
|
||||||
drain_pending_input # Clean up any escape sequence remnants
|
drain_pending_input # Clean up any escape sequence remnants
|
||||||
|
|||||||
Reference in New Issue
Block a user