Skip to content

Conversation

@raul-lezameta
Copy link

Overview

This PR implements a paired conversion and cleanup strategy for GNOME 42 wallpaper support: wallpapers with exactly 2 images are converted to GNOME 42 syntax AND their old XML files are deleted to eliminate redundancy.

Problem Solved

Previously, updating wallpapers to GNOME 42 syntax created duplicates - the old XML file remained alongside the new one. This PR eliminates that by deleting the old files for converted wallpapers while preserving multi-image wallpapers in their original format.

What This Feature Does

  • Convert: Only wallpapers with exactly 2 images are converted to GNOME 42 light/dark format
  • Delete: Old XML files for those converted wallpapers are automatically removed
  • Preserve: Wallpapers with 3+ images keep their original dynamic format unchanged
  • Clarify: System now clearly shows which are simple light/dark variants vs truly dynamic wallpapers

Benefits

Eliminates Redundancy: Old XML files deleted when converted to new syntax
No Duplicates: Each wallpaper exists in only one format in the system
Clarity: Simple light/dark variants distinct from truly dynamic multi-step wallpapers
Preservation: Complex multi-image wallpapers retain full time-step functionality
Cleaner System: Removes obsolete files, reducing clutter and confusion
User Experience: Only the preferred GNOME 42 format available for 2-image wallpapers

Technical Details

  • filter_wallpapers(): Selects only wallpapers with exactly 2 images
  • delete_old_xml_files(): Removes old XML entries for converted wallpapers
  • Early exit when no 2-image wallpapers are found
  • Improved console messaging showing deletion of old files

Testing Performed

✅ Confirmed conversion of 2-image wallpapers to GNOME 42 syntax
✅ Verified old XML files are deleted for converted wallpapers
✅ Confirmed multi-image wallpapers remain untouched
✅ Tested no duplicates remain in system
✅ Validated proper file cleanup and naming conventions

- Only converts wallpapers with exactly 2 images to GNOME 42 syntax
- Prevents duplicate wallpaper entries by deleting old XML files
- Adds early exit if no eligible wallpapers are found
- Improves user experience by avoiding conversion conflicts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant