menu_colors.sh(C)


menu_colors.sh -- menu tool environment variables

Synopsis

. /etc/inst/locale/${LANG}/menus/menu_colors.sh

Description

The shell file menu_colors.sh is used to set up environment variables to manage colors for the menu(C) command.

This tool, when sourced into the current shell, defines a function menu_colors that takes an argument which determines the colors or attributes that will be displayed next time the menu tool is invoked. These attributes are configurable by editing the file menu_colors.sh.

Valid arguments are:


regular
the color scheme is the one defined for regular screens (default white text on blue background, or white text on black background for monochrome displays).

warn
the color scheme is the one defined for warning screens (default white text on magenta background, or black text on white background for monochrome displays).

error
the color scheme is the one defined for error screens (default white text on red background, or black text on white background for monochrome displays).
The curses library provides the color for the menu tool. Given a color monitor, the default color scheme is as follows: regular menu screens are white text on a blue background, help screens are black text on a cyan background, and error messages are white text on a red background. These defaults can be overridden by setting the following environment variables to the values in usr/include/curses.h given for colors, and exporting the variables:

REG_FG
The foreground color for regular menu screens. The default is COLOR_WHITE.

REG_BG
The background color for regular menu screens. The default is COLOR_BLUE.

REG_FG
The foreground color for error messages. The default is COLOR_WHITE.

ERROR_BG
The background color for error messages. The default is COLOR_RED.

HELP_FG
The foreground color for help screens. The default is COLOR_BLACK.

HELP_BG
The background color for help screens. The default is COLOR_CYAN.

REG_ATTR
The curses text attribute for regular menu screens. The default is A_NORMAL.

ERROR_ATTR
The curses text attribute for error messages. The default is A_STANDOUT (inverse video).

HELP_ATTR
The curses text attribute for help screens. The default is A_NORMAL.

Differences between versions

This command is part of the UnixWare packaging tools that are supported only on SCO OpenServer Release 5.0.5a and later releases.

References

menu(C), menu(F)

Examples

To display a warning screen:
   . /etc/inst/locale/${LANG}/menus/menu_colors.sh
   menu_colors warn
   menu -f form_description_file -o output_file
This will set up the environment to have the menu_colors function defined. This should only be done once in a shell script.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005