i3-dmenu-desktop is a script which extracts the (localized) name from
application .desktop files, offers the user a choice via dmenu(1) and then
starts the chosen application via i3 (for startup notification support).
The advantage of using .desktop files instead of dmenu_run(1) is that dmenu_run
offers all binaries in your $PATH, including non-interactive utilities like
sed. Also, .desktop files contain a proper name, information about whether
the application runs in a terminal and whether it supports startup
The .desktop files are searched in $XDG_DATA_HOME/applications (by default
$HOME/.local/share/applications) and in the applications subdirectory of each
entry of $XDG_DATA_DIRS (by default /usr/local/share/:/usr/share/).
Files with the same name in $XDG_DATA_HOME/applications take precedence over
files in $XDG_DATA_DIRS, so that you can overwrite parts of the system-wide
.desktop files by copying them to your local directory and making changes.
i3-dmenu-desktop displays the Name value in the localized version depending
on LC_MESSAGES as specified in the Desktop Entry Specification.
You can pass a filename or URL (%f/%F and %u/%U field codes in the .desktop
file respectively) by appending it to the name of the application. E.g., if you
want to launch GNU Emacs 24 with the patch /tmp/foobar.txt, you would type
emacs, press TAB, type /tmp/foobar.txt and press ENTER.
.desktop files with Terminal=true are started using i3-sensible-terminal(1).
.desktop files with NoDisplay=true or Hidden=true are skipped.
UTF-8 is supported, of course, but dmenu does not support displaying all
glyphs. E.g., xfce4-terminal.desktops Name[fi]=Pääte will be displayed just
fine, but not its Name[ru]=Терминал.