NEOFLUX-MENUGEN(1) User Commands NEOFLUX-MENUGEN(1)

neoflux-menugen - generate a NeoFlux menu.toml from installed applications

neoflux-menugen [-o file] [-t terminal] [-e editor] [--no-descriptions] [--no-icons] [--no-backup] [--max-backups n] [-d dir] [--dry-run] [--verbose]

neoflux-menugen scans the XDG application directories for .desktop files and writes a categorized NeoFlux root menu: two quick-launch rows (terminal and editor), then one [[menu]] submenu per application category (Terminals, Web Browsers, Development, ...), each entry with its resolved PNG icon. It is a one-shot tool — run it after installing software, then pick the new menu up with neoflux's Reconfigure. The window manager never invokes it.

Scanned directories, first occurrence of a desktop-id winning: $XDG_DATA_HOME/applications (user-local), each entry of $XDG_DATA_DIRS/applications, plus Flatpak exports and Snap. Entries marked NoDisplay or Hidden, and anything other than Type=Application, are skipped. Terminal=true entries are wrapped in the terminal emulator.

Exec lines are sanitized conservatively: entries whose command contains shell chaining or redirection metacharacters, suspicious paths, or known-destructive commands are dropped entirely rather than escaped. Icons resolve theme names through the hicolor fallback theme and the pixmaps directories; only PNG results are used, since that is what neoflux's menu renderer decodes.

NeoFlux appends its own controls (Themes, Reconfigure, Restart, Exit) below the generated entries, so the file contains only launchers.

Write the menu to file instead of standard output. Typical: -o ~/.config/neoflux/menu.toml
Terminal emulator for the quick-launch row and for wrapping Terminal=true entries. Default: $TERMINAL if on PATH, else the first of x-terminal-emulator, xfce4-terminal, alacritty, kitty, xterm.
Editor for the quick-launch row. Default: $VISUAL then $EDITOR, else the first of emacs, vim, vi. Terminal editors (vi, vim, nano, ..., or anything invoked with -nw/-t/--tty) are wrapped in the terminal emulator.
Label entries with the application name only, without the “Name — comment” description suffix.
Omit icon= paths.
Do not back up an existing output file before overwriting.
Keep at most n timestamped .bak backups beside the output file (default: 5).
Scan an additional directory of .desktop files. May be repeated.
Print the menu to standard output even if -o was given; write nothing.
Report scanned directories, rejected entries, and backups on standard error.
Show usage.

~/.config/neoflux/menu.toml
The menu overlay neoflux loads (after config.toml, so its [[menu]] wins). Regenerating replaces the whole file; the previous version is kept as menu.toml.<timestamp>.bak.

Preview what would be generated:

neoflux-menugen | less

Generate the menu and pick it up live:

neoflux-menugen -o ~/.config/neoflux/menu.toml
# then right-click the desktop → Reconfigure

neoflux(1), neoflux-import(1)

July 4, 2026 neoflux 0.5.3