installed package: x11-wm/fluxbox-0.9.14-r1 After using the script with different options, I got always the same results -> empty submenus. Looked a little bit through the code and I believe constructions like: <code>find_it xlock append "[exec] (${LOCKSCREEN}) {xlock}"</code> should actually be: <code>find_it xlock && append .. </code> I propose the attached patch.
Created attachment 84214 [details, diff] proposed patch
Yikes, can you use diff -u for the patch? Unified diffs are preferred, otherwise the patch is a lot harder to read ;)
Well you could perform the following regular expressions in turn on the current version and you would get what I meant. s/\(find_it \+[^ ;]*\)/\1 \&\&/g s/&& *;/;/g s/&& &&/\&\&/g
Created attachment 92617 [details, diff] The && patch
notice in the find_it function: find_it() { which $1 > /dev/null 2>&1 && shift && "$@" } (for the simplier of the two) that 'shift && "$@" ' part evaluates the arguments after the first one The '-r' switch does wat your saying, so does having REMOVE=no in your ~/.fluxbox/menuconfig
Please try the latest version that comes with 1.0_rc3 - I find that it removes all empty submenus fairly well. To test properly, run once as: fluxbox-generate_menu -r Which will not remove any empty submenus, you can then check what *should* be removed. Then run it again without the '-r' switch, and ensure that it's actually doing the proper thing... All the empty submenus should be gone at this point. At least in my tests here, it seems to remove every empty submenu.
Please reopen if this still occurrs with fluxbox-1.0_rc3