python-rofi-menu
python-rofi-menu copied to clipboard
DesktopEntry item
- added DesktopEntry class to create a menu item from a .desktop file
- create_appmenu_flat /create_appmenu_categories function to create a menu from a directory of .desktop files (flat or hierarchical by app category)
@dnalor, thanks for your contribution
The idea of generating menu based on *.desktop
files definitely makes sense.
I'll be quite busy this week, sorry in advance that the code review may take longer than expected.
Meantime I've got a couple suggestions:
While I can easily replace os.walk with Path.glob, I'm not sure I see the point - a quick benchmark suggests Path.glob is slower. Finding all *.h files in /usr/include and /usr/local/include: walk: 10494 files: 0.072s / glob: 10494 files :0.194s
Admittedly, for this use case performance is probably irrelevant, but still...