After some more work all menus are specified as BASH arrays within the script.
Here's the new version which also recognizes many more applications:
http://jwm-art.net/code/lau_flux_menu_0.0.1
Here's the obligatory screenshot:
http://jwm-art.net/code/lau_flux_menu_0.0.1.png
Here's the listing format for a menu:
MENU_ARRAY=(
"command1, name"
"--"
"+submenu_file, name"
"!fluxbox_command, name"
)
# notes:
# **** "--" creates a menu separator.
# **** the command should not be specified with path.
# **** whitespace must not be placed between command and comma.
# **** whitespace after the comma is removed.
# **** the * character must not be used.
# **** () in the name will be replaced with {} as
fluxbox can't handle ().
The menu generation is now a function which is called with four
parameters, like so:
create_menu "My Menu" ~/.fluxbox/my-menu-file MENU_ARRAY[@]
Which basically means all the menus generated by the script are easily
customizable so that my choices don't have to be your choices.
The script uses the 'which' command to figure out both if the command
exists on the system and the full path for the command.
The worst bug I know of it has is that while it can handle commands such as:
xterm -e alsamixer
jaaa -J
it cannot handle:
xterm -e sudo halt
Usage of xterm is hard coded at present. If the command begins with
"xterm -e" it performs the which command on the command after.
Cheers,
James.
--
_
:
http://jwm-art.net/
-audio/image/text/code/