MarkHedleyJones/dmenu-extended

Advanced key bindings

MeisterLLD opened this issue · 2 comments

Hi. Typing the following in terminal does not achieve what is expected (i.e. open the file with dragon-drop)
dmenu_extended_run "dragon-drop:"
Same happens with any other software.

Same happens with the example provided in the documentation
dmenu_extended_run "-> Internet search: " "Wikipedia"
this opens standard dmenu extended.

On the other hand, typing dragon-drop: then enter in dmenu extended and then selecting the file, works.

This was working well up to a few months ago.

Hi @MeisterLLD thanks for trying dmenu-extended.
Actually that's not an intended use-case for the menu, but it is interesting.
That would allow for creating keyboard bindings that access a particular item or filter in the menu.
I like it.
Interesting that you said it was working up until a few weeks ago.
It might be due to a new launcher script that's being used now (which is generated by the installer).
I'll try the original launcher script and see if the behaviour described makes that work.

Okay so to shed some light onto things...
The original launcher script dmenu_extended_run was replaced when updating the installer to use setuptools instead of distutils #123.
As of that version, setuptools doesn't seem to support the old way of packaging up the launcher script as it instead generates its own with the target that is set in pyproject.toml.

[project.scripts]
"dmenu_extended_run" = "dmenu_extended.main:run"

There is another issue with the generated launcher (#153) in that it introduces a noticeable delay when opening the menu. I've run out of time to investigate this further at the moment so I'm leaving this information here as-is for future reference.

Maybe it's possible to modify the way the launcher script is generated so that it behaves the same as the old script.