Skip to content

applications: desktop entry specification fix#115

Closed
peppidesu wants to merge 2 commits intoanyrun-org:masterfrom
peppidesu:master
Closed

applications: desktop entry specification fix#115
peppidesu wants to merge 2 commits intoanyrun-org:masterfrom
peppidesu:master

Conversation

@peppidesu
Copy link
Copy Markdown

This pull request solves #113

The application plugin is now compliant with the Desktop Entry Specification:

Desktop File ID

Each desktop entry representing an application is identified by its desktop file ID, which is based on its filename.

To determine the ID of a desktop file, make its full path relative to the $XDG_DATA_DIRS component in which the desktop file is installed, remove the "applications/" prefix, and turn '/' into '-'.

For example /usr/share/applications/foo/bar.desktop has the desktop file ID foo-bar.desktop.

If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used.

Before, desktop entries (not files, but the entries within each file) would be overridden if they had matching Name and Icon fields, and $XDG_DATA_DIRS precedence was disregarded completely. This meant that overriding the Name or Icon fields would be impossible, because it would simply appear as a second entry (not overriding the original one).

@peppidesu
Copy link
Copy Markdown
Author

This PR has been created as well in anyrun-org/plugin-applications#2, closing this PR.

@peppidesu peppidesu closed this Jan 5, 2024
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