mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 20:50:06 +00:00
feat: add cleanup for aerial wallpaper videos
Add support for cleaning old aerial wallpaper videos in: /Users/user/Library/Application Support/com.apple.wallpaper/aerials/videos These video files can consume significant disk space (up to 50GB+) and are safe to remove - macOS will re-download them on demand. Uses MOLE_SUPPORT_CACHE_AGE_DAYS (default 30 days) to avoid removing recently used wallpapers. Closes #508
This commit is contained in:
@@ -420,6 +420,12 @@ clean_support_app_data() {
|
||||
safe_find_delete "$idle_assets_dir" "*" "$support_age_days" "f" || true
|
||||
fi
|
||||
|
||||
# Clean old aerial wallpaper videos (can be large, safe to remove).
|
||||
local wallpaper_videos_dir="$HOME/Library/Application Support/com.apple.wallpaper/aerials/videos"
|
||||
if [[ -d "$wallpaper_videos_dir" && ! -L "$wallpaper_videos_dir" ]]; then
|
||||
safe_find_delete "$wallpaper_videos_dir" "*" "$support_age_days" "f" || true
|
||||
fi
|
||||
|
||||
# Do not touch Messages attachments, only preview/sticker caches.
|
||||
if pgrep -x "Messages" > /dev/null 2>&1; then
|
||||
echo -e " ${GRAY}${ICON_WARNING}${NC} Messages is running · preview cache cleanup skipped"
|
||||
|
||||
Reference in New Issue
Block a user