pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
228 stars 47 forks source link

Desktop entries deduplication #19

Closed friday closed 2 years ago

friday commented 3 years ago

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

Currently I have Nautilus duplicated in these two directories:

I do this to override something in the desktop entries and avoid rewriting it when I update the package it belongs to.

My xdg_data_dirs: ~/.local/share, /usr/local/share and /usr/share (XDG_DATA_DIRS is actually not set, but these are the paths that should be used when this is the case)

Screenshot from 2021-09-13 21-03-38

(same thing with "Bulk Rename", which is part of Thunar).

If you want this I could try to implement it, but I'm a Rust noob at best and haven't looked into your code.

mmstick commented 3 years ago

There's currently a Set collection in the desktop-entries plugin that's filtering based on source and app ID. Removing the Hash and PartialEq condition for the src field would have it only consider the app ID. You would simply have to ensure that the local apps have a higher priority in the set than system apps.

friday commented 3 years ago

Nice. Thank you for the pointers :+1:

friday commented 2 years ago

Awesome! Real life and other things got in between, so I never had the chance to start looking at it, but hope to be able to contribute soon :)