nwg-piotr / nwg-launchers

GTK-based launchers: application grid, button bar, dmenu for sway and other window managers
GNU General Public License v3.0
398 stars 15 forks source link

Add more functionality to dmenu #56

Open ericonr opened 4 years ago

ericonr commented 4 years ago

nwgdmenu could:

What do you think of these ideas?

nwg-piotr commented 4 years ago

have a working graphical erase button, the current one doesn't seem to do anything

It may be impossible: the search entry widget is "read-only" on purpose, see https://github.com/nwg-piotr/nwg-launchers/issues/47#issuecomment-655499039. That's why the Delete key clears the box.

launch the first application in the list if you press return inside the search box

Doable. I did it in sgtk-menu, though some workaround was necessary.

have an option for displaying desktop applications (only the titles)

I wouldn't like dmenu to do this, as it means tons of new code. This needs a regular menu, which in postponed for now. It would be not bad to submit the menu overflow issue somewhere, but I have no idea what the culprit is - sway, wayland itself or gtk3. Could you take a look at the issue?

have an option for case insensitive search

Doable for sure.

be capable of performing fuzzy matching

I'm not sure what you mean. Please tell me more. Alright, Google is your friend. Well, this is intended to be a small and fast application. Fuzzy matching means a lot of sophisticated code and use of dictionaries. So - no, thanks :)

ericonr commented 4 years ago

It may be impossible: the search entry widget is "read-only" on purpose, see #47 (comment). That's why the Delete key clears the box.

I see, that makes sense.

Doable. I did it in sgtk-menu, though some workaround was necessary.

Cool.

Could you take a look at the issue?

Sure! I want to see if I can work the desktop menu stuff from grid into dmenu. If I can accomplish it without much weirdness / duplication, would you be open to accepting it?

Doable for sure.

Great!

Fuzzy matching means a lot of sophisticated code and use of dictionaries. So - no, thanks :)

Fair enough.

Are you working on any of these? I can try my hand at them.

nwg-piotr commented 4 years ago

I want to see if I can work the desktop menu stuff from grid into dmenu.

Far not enough. You also need categories list and localized category names. Take a look at https://github.com/nwg-piotr/sgtk-menu/blob/master/sgtk_menu/menu.py. I insist on doing this as a separate program, not a feature of nwgdmenu.

Are you working on any of these? I can try my hand at them.

That's what could be considered before 1.0.0 IMO:

Tell me if you'd like to take care of one of above.

ericonr commented 4 years ago

Far not enough. You also need categories list and localized category names. Take a look at https://github.com/nwg-piotr/sgtk-menu/blob/master/sgtk_menu/menu.py. I insist on doing this as a separate program, not a feature of nwgdmenu.

I see. For my use case I would like to have it as a flat list, no categories or anything. That's why I thought it could be inserted into dmenu. Have you used wofi? It would be similar to that. Do you feel that doesn't fit the project?

I can try my hand at either of those, let me know what you prefer to do!

nwg-piotr commented 4 years ago

Have you used wofi?

A rofi-like menu, which works on Wayland properly, but slowly? Yes, I used it for a short time. I'm not sure if the world is ready for another rofi clone, but this could be included into nwgdmenu under two conditions:

  1. It should not slow nwgdmenu down noticeably.
  2. The menus created from stdin (if any) should comply the json template format.

If you decide to give it a go, I may take care of both minor features mentioned above. For the first one I'll only need to translate some python into C++. The second one is trivial, but requires a hot key and possibly a UI button.