Adding application entries from non-standard folders to your Desktop Environment’s application menu

So you have a directory full of XDG .desktop files but they don’t show up in your application launcher menu because it is a non-standard location.[1]

You can add directories to the search list by creating a .menu file in ~/.config/menus/applications-merged/ with something like the following:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"

The .menu specification does not expand environment variables, so you will have to spell out the path to your home directory instead of using $HOME.

The file name does not have to be anything specific (name it something related to what you’re adding), except it should end in .menu.

Once the file has been saved, the entries should appear in your launcher.

[1] Before you say “why not put them in a standard location?”, these entries are managed by a third-party, that must not contaminate the standard locations. In this case, I have the package manager nix, which places its application entries under ~/.nix-profile/share/applications.