SYNOPSIS
ubmenu -[C* H* L W c* d g* o* p* w*] <menu> <directory>
FILE FORMAT
Menus are specified in a control file. Each control file has one or more of the following options:
- B – screen background
- C – a command to execute
- H – Help for the menu
- M – Option box
BACKGROUND
The background consists of three sections representing the header, body, and footer of the background.
B <left> <right> <name>
<header>
>
<body>
>
<footer>
>
The header is displayed before any menus (which are in the body). The footer is displayed after the menus.
COMMAND
A command is a script to execute. It is embedded in the menu but could equally be a separate script.
C <name>
<script>
>
HELP
Text to display as help for this menu. There are further levels of help for menu blocks and menu options.
H
<help message>
>
MENU
A menu consists of 4 parts.
- Menu declaration – includes optional screen position and optional name
- Help – Block of text to use as help for this menu block
- Header – Block of text displayed as a header before the menu options
- Options – a list of menu options. Each option has 6 fields
Option fields
- Display – Text to display for the menu option
- Users – list of users authorised to execute this option
- Flags
- Prompt – a pop-up confirm message before option executed
- Help – Pop-up message displayed if user hovers on the option
- Command – one of 5 execution options based on the first character of the command
Command options
- # – Execute a new menu given after the #
- ! – Execute a command from a C section
- * – Display a sub-menu. The name of the sub-menu follows the * and it must exists as a named menu block.
- @ – Call a function
- default – a shell command with arguments
CSS
When displayed in a browser the menu can be styled with css classes.
CSS Classes
- ubmenu-head – menu head
- ubmenu-body – menu body
- ubmenu-foot – menu foot
- ubmenu-help – help message style
- ubmenu-header – Header style for the menu box description
- ub_functionKeys – box holding function keys
- menu-body – format for each menu box
- has-submenu – highlight menu item that opens a sub-menu