Join Nostr
2026-08-14 04:52:07 UTC
in reply to

Stuart Longland (VK4MSL) on Nostr: Getting close to replicating what `pyXDG` can do menu-wise. I have a program that ...

Getting close to replicating what `pyXDG` can do menu-wise. I have a program that dumps a list to standard-output.

Very long and verbose, and only handles a fraction of the full specification… but it's a big step forward towards my goal of a XDG menu-driven launcher for X11/Wayland.

```
Menu: Applications
1. Submenu
Menu: Applications
1. Wine Windows Program Loader
2. Kiwix
3. Twinkle
4. Print Settings
5. Zoom
… snip >400 entries …
2. Submenu
Menu: Development
1. Submenu
Menu: Translation
2. Submenu
Menu: Web Development
1. KImageMapEditor
3. Qt Assistant
4. CMake
5. Data Display Debugger
6. Qt Widgets Designer
7. GNU Emacs
8. emacsclient
9. FLUID
10. GNU Radio Companion
11. GTK+ Demo
12. Icon Browser
13. Widget Factory
14. Jupyter Notebook
15. JupyterLab
16. Qt Linguist
17. Glade
18. GTK Demo
19. Print Editor
20. Widget Factory
21. Node Editor
22. Kate
23. KDebugSettings
24. sigrok-cli
25. Qt D-Bus Viewer
3. Submenu
Menu: Science
1. GNU Radio Companion
2. Gnumeric
3. KiCad Image Converter
4. KiCad Schematic Editor (Standalone)
5. KiCad Gerber Viewer
6. KiCad
7. KiCad PCB Calculator
8. KiCad PCB Editor (Standalone)
… etc …
```

I need to handle `OnlyUnallocated`, that'll collapse that `Applications` menu down… There's also `OnlyShowIn` / `NotShowIn` that'll drop quite a few as well.

The C++ file is 742 lines, a single `.cc` file. I need to better organise this, but this is a good start.