1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-07 08:15:44 +00:00

🐛 change color

This commit is contained in:
Tw93
2025-10-05 22:37:43 +08:00
parent 518b04a759
commit c253e0ee60
8 changed files with 41 additions and 41 deletions

View File

@@ -720,7 +720,7 @@ display_cleanup_suggestions() {
echo ""
echo " ${YELLOW}Tip:${NC} Run 'mole clean' to perform cleanup operations"
else
echo " ${BLUE}${NC} No obvious cleanup opportunities found"
echo " ${GREEN}${NC} No obvious cleanup opportunities found"
fi
echo ""
}
@@ -1858,7 +1858,7 @@ interactive_drill_down() {
open "$selected_path" 2>/dev/null && open_success=true
if [[ "$open_success" == "true" ]]; then
echo ""
echo " ${BLUE}${NC} File opened in external app"
echo " ${GREEN}${NC} File opened in external app"
sleep 0.8
fi
fi
@@ -1879,7 +1879,7 @@ interactive_drill_down() {
# Show brief success message
if [[ "$open_success" == "true" ]]; then
echo ""
echo " ${BLUE}${NC} File opened in external app"
echo " ${GREEN}${NC} File opened in external app"
sleep 0.8
fi
fi
@@ -2002,7 +2002,7 @@ interactive_drill_down() {
fi
if [[ "$delete_success" == "true" ]]; then
echo " ${BLUE}✓ Deleted successfully${NC}"
echo " ${GREEN}✓ Deleted successfully${NC}"
echo " ${GRAY}Freed: $human_size${NC}"
sleep 0.8

View File

@@ -96,9 +96,9 @@ stop_spinner() {
kill "$SPINNER_PID" 2>/dev/null
wait "$SPINNER_PID" 2>/dev/null
SPINNER_PID=""
printf "\r ${BLUE}${NC} %s\n" "$result_message"
printf "\r ${GREEN}${NC} %s\n" "$result_message"
else
echo " ${BLUE}${NC} $result_message"
echo " ${GREEN}${NC} $result_message"
fi
}
@@ -235,7 +235,7 @@ safe_clean() {
if [[ "$DRY_RUN" == "true" ]]; then
echo -e " ${YELLOW}${NC} $label ${YELLOW}($size_human, dry)${NC}"
else
echo -e " ${BLUE}${NC} $label ${GREEN}($size_human)${NC}"
echo -e " ${GREEN}${NC} $label ${GREEN}($size_human)${NC}"
fi
((files_cleaned+=total_count))
((total_size_cleaned+=total_size_bytes))
@@ -445,7 +445,7 @@ perform_cleanup() {
[[ -t 1 ]] && echo -ne " ${BLUE}${NC} Cleaning npm cache...\r"
npm cache clean --force >/dev/null 2>&1 || true
[[ -t 1 ]] && echo -ne "\r\033[K"
echo -e " ${BLUE}${NC} npm cache cleaned"
echo -e " ${GREEN}${NC} npm cache cleaned"
note_activity
fi
@@ -458,7 +458,7 @@ perform_cleanup() {
[[ -t 1 ]] && echo -ne " ${BLUE}${NC} Cleaning pip cache...\r"
pip3 cache purge >/dev/null 2>&1 || true
[[ -t 1 ]] && echo -ne "\r\033[K"
echo -e " ${BLUE}${NC} pip cache cleaned"
echo -e " ${GREEN}${NC} pip cache cleaned"
note_activity
fi
@@ -472,7 +472,7 @@ perform_cleanup() {
go clean -modcache >/dev/null 2>&1 || true
go clean -cache >/dev/null 2>&1 || true
[[ -t 1 ]] && echo -ne "\r\033[K"
echo -e " ${BLUE}${NC} Go cache cleaned"
echo -e " ${GREEN}${NC} Go cache cleaned"
note_activity
fi
@@ -487,7 +487,7 @@ perform_cleanup() {
[[ -t 1 ]] && echo -ne " ${BLUE}${NC} Cleaning Docker build cache...\r"
docker builder prune -af >/dev/null 2>&1 || true
[[ -t 1 ]] && echo -ne "\r\033[K"
echo -e " ${BLUE}${NC} Docker build cache cleaned"
echo -e " ${GREEN}${NC} Docker build cache cleaned"
note_activity
fi
@@ -497,7 +497,7 @@ perform_cleanup() {
[[ -t 1 ]] && echo -ne " ${BLUE}${NC} Cleaning Podman build cache...\r"
podman system prune -f >/dev/null 2>&1 || true
[[ -t 1 ]] && echo -ne "\r\033[K"
echo -e " ${BLUE}${NC} Podman build cache cleaned"
echo -e " ${GREEN}${NC} Podman build cache cleaned"
note_activity
fi
safe_clean ~/.local/share/containers/storage/tmp/* "Container storage temp"
@@ -515,7 +515,7 @@ perform_cleanup() {
[[ -t 1 ]] && echo -ne " ${BLUE}${NC} Cleaning Homebrew...\r"
brew cleanup >/dev/null 2>&1 || true
[[ -t 1 ]] && echo -ne "\r\033[K"
echo -e " ${BLUE}${NC} Homebrew cache cleaned"
echo -e " ${GREEN}${NC} Homebrew cache cleaned"
note_activity
fi
@@ -785,7 +785,7 @@ perform_cleanup() {
fi
done
local app_count=$(wc -l < "$installed_bundles" | tr -d ' ')
echo " ${BLUE}${NC} Found $app_count apps"
echo " ${GREEN}${NC} Found $app_count apps"
local cache_count=0
@@ -805,7 +805,7 @@ perform_cleanup() {
fi
done
fi
echo " ${BLUE}${NC} Complete ($cache_count removed)"
echo " ${GREEN}${NC} Complete ($cache_count removed)"
# Clean up temp file
rm -f "$installed_bundles"

View File

@@ -404,11 +404,11 @@ uninstall_applications() {
# Show what will be removed
echo -e " ${YELLOW}Files to be removed:${NC}"
echo -e " ${BLUE}${NC} Application: $(echo "$app_path" | sed "s|$HOME|~|")"
echo -e " ${GREEN}${NC} Application: $(echo "$app_path" | sed "s|$HOME|~|")"
# Show user-level files
while IFS= read -r file; do
[[ -n "$file" && -e "$file" ]] && echo -e " ${BLUE}${NC} $(echo "$file" | sed "s|$HOME|~|")"
[[ -n "$file" && -e "$file" ]] && echo -e " ${GREEN}${NC} $(echo "$file" | sed "s|$HOME|~|")"
done <<< "$related_files"
# Show system-level files
@@ -435,7 +435,7 @@ uninstall_applications() {
if [[ $REPLY =~ ^[Yy]$ ]]; then
# Remove the application
if rm -rf "$app_path" 2>/dev/null; then
echo -e " ${BLUE}${NC} Removed application"
echo -e " ${GREEN}${NC} Removed application"
else
log_error "Failed to remove $app_path"
continue
@@ -445,7 +445,7 @@ uninstall_applications() {
while IFS= read -r file; do
if [[ -n "$file" && -e "$file" ]]; then
if rm -rf "$file" 2>/dev/null; then
echo -e " ${BLUE}${NC} Removed $(echo "$file" | sed "s|$HOME|~|" | xargs basename)"
echo -e " ${GREEN}${NC} Removed $(echo "$file" | sed "s|$HOME|~|" | xargs basename)"
fi
fi
done <<< "$related_files"
@@ -456,7 +456,7 @@ uninstall_applications() {
while IFS= read -r file; do
if [[ -n "$file" && -e "$file" ]]; then
if sudo rm -rf "$file" 2>/dev/null; then
echo -e " ${BLUE}${NC} Removed [System] $(basename "$file")"
echo -e " ${GREEN}${NC} Removed [System] $(basename "$file")"
else
log_warning "Failed to remove system file: $file"
fi