j4-dmenu-desktop icon indicating copy to clipboard operation
j4-dmenu-desktop copied to clipboard

How can I show command names instead of desktop entry names?

Open danijar opened this issue 2 years ago • 3 comments

With dmenu_run, the entries are command names, such as google-chrome-stable and xterm.

With j4-dmenu-desktop, the entries are desktop entry names, such as Google Chrome and XTerm.

Is there a way to show the command names instead of desktop entry names (or both)?

danijar avatar Sep 10 '21 15:09 danijar

Hi @enkore, is this supported somehow?

danijar avatar Sep 20 '21 15:09 danijar

Use --display-binary to display both name and binary name.

meator avatar Sep 20 '21 17:09 meator

Thanks! However, now I can't fit more than 2-3 matches onto the screen anymore. Is there a way to only display the binary filename, with the name of the Desktop entry and without the path to the binary? It would also be fine to show both Desktop entries and binary filenames as separate entries.

danijar avatar Sep 20 '21 17:09 danijar

Is there a way to only display the binary filename, with the name of the Desktop entry and without the path to the binary?

@danijar I've added a new -f option that does exactly what you want in #132 (commit ea597574dea0b4e1c4cb3fa4d97cab4e540bbef9). This pull request adds all sorts of things to j4-dmenu-desktop.

Is there a way to show the command names instead of desktop entry names (or both)?

Displaying command names only would require extensive changes to code because j4dd uses the desktop name internally in several paces (and even more so in my pull request).

However, now I can't fit more than 2-3 matches onto the screen anymore.

If the entries are too long, you can modify the dmenu command to make it more practical:

j4-dmenu-desktop --dmenu "dmenu -i -l 5"

This will display each entry on its own line (up to 5 lines which can be changed).

meator avatar Oct 09 '22 09:10 meator

Fantastic, thanks!

danijar avatar Oct 09 '22 17:10 danijar