fix: Robust cleanup for orphaned user-local desktop entries on packag… #3865
+23
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Robust Cleanup for Orphaned User-Local Desktop Files
Fixes #3574
This PR addresses the issue of application entries remaining in the user's application launcher after a package has been removed using
omarchy-pkg-remove.This bug resulted in "orphaned" desktop files (
~/.local/share/applications/*.desktop) pointing to non-existent binaries.Key Changes in
omarchy-pkg-removeRobust Desktop Entry Deletion:
findcommand that iterates over the package selection..desktopfile using multiple common name variations (original casing, lowercase, and variations without hyphens) to ensure the file is caught regardless of how it was created.Application Menu Cache Refresh:
omarchy-refresh-applicationsis now called after the deletion. This is vital, as it forces the desktop environment (like Wofi or Rofi) to rebuild its application cache, immediately eliminating the dead entry.Correct Flow Control:
omarchy-show-done) is executed only once, after the package removal, file cleanup, and application refresh are all successfully completed.