j4-dmenu-desktop
j4-dmenu-desktop copied to clipboard
Honor $XDG_DATA_DIRS
Desktop applications installed via nix on a per-user basis are currently not found. I have XDG_DATA_DIRS
set to $HOME/.nix-profile/share
but j4-dmenu-desktop doesn't see it. I can set XDG_DATA_HOME
to this path but then I lose access to the apps in .local/share/applications
. Currently I'm helping myself with symlinks, but it would be great if j4-dmenu-desktop supported this variable.
$XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be seperated with a colon ':'. https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I'm not the most familiar with the code here but is this already implemented?
I also tried to get Nix to work with j4-dmenu-desktop
and found that when I set XDG_DATA_DIRS=$HOME/.nix-profile/share:/usr/share
the desktop entry in /usr/share/applications
is found. After adding .nix-profile
to the end of XDG_DATA_DIRS
the correct entry was found. So it seems that later path entries are preferred to earlier ones.
If @Lykos153 got wrong (global) entries instead of no entries, this could be the same problem.