Closed MayeulC closed 4 years ago
Sorry if I've misunderstood, but can you not use something like j4-dmenu-desktop to achieve this?
e.g.
j4-dmenu-desktop --dmenu='bemenu -i' --term='termite'
I imagine this kind of thing is well out of scope as bemenu-run
only really exists as a demonstration of the library.
It could be possible to add this into bemenu-run
as well, but I don't personally use the .desktop files at all.
Well, it turned out that flatpak provides executables in the form of com.example.mypackage in /var/lib/flatpak/exports/bin/
, so that has become a lesser issue for me. I don't know whether this is in the scope of bemenu-run at all. I wasn't aware of solutions like j4-dmenu.
It seems like the solution really would be to simply add that flatpak bindir to $PATH--after all, oddball bindirs are the whole raison d'être for $PATH!
I know this is a closed issue, but I will try. How about running a command if bemenu finds nothing? For example, if I type vscode
and bemenu offers me an empty list, hitting enter will run e.g. gtk-launch vscode
? This way, no need to manually parse desktop files, it is done by gtk-launch.
in that case bemenu-run
would try to execute vscode
, regardless it being in path or not. For such specific use case, either do your own menu with bemenu
, or do wrapper scripts and append them to your PATH
. It's also possible to type gtk-launch vscode
in the bemenu-run
and hit enter.
Some applications, such as the ones provided trough flatpak, typically only come with .desktop files as a way to be launched.
I am not entirely sure how to handle this (if you look for an app and there are two versions: one with a desktop file and one without, what should you display?), but displaying them at the end would be a start.
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
$XDG_DATA_DIRS
is the$PATH
equivalent.dex
can be used to launch .desktop files.