kspi / dmenu-frecency

A dmenu-based desktop application launcher
MIT License
33 stars 8 forks source link

Global .desktop file overrides the local .desktop file #18

Open willemw12 opened 6 years ago

willemw12 commented 6 years ago

A .desktop file in ~/.local/share/applications/ should overide the .desktop file in /usr/share/applications/. I think this is between desktop files with the same "Name=" property.

See http://pyxdg.readthedocs.io/en/latest/basedirectory.html?highlight=xdg.BaseDirectory.load_data_paths.

A possible fix is to reverse the .desktop path search order, from:

for applications_directory in xdg.BaseDirectory.load_data_paths("applications"):

into:

for applications_directory in reversed(list(xdg.BaseDirectory.load_data_paths("applications"))):
willemw12 commented 5 years ago

There is no need to reverse the paths. The order of the paths is already correct.