view raw
julumme julumme - 8 months ago 69
Bash Question

Bash and dialog UI, how to change color dynamically

I have a simple bash script, which I use to maintain some log etc files on a server, and most of the time the tools works in "normal mode". For UI I use the


However, sometimes I have some condition that requires more careful attention, and I would like at those times to change the background color of dialog, to draw more attention to the issue.

I know that by changing the
attribute in
, I can define custom colors for the dialogs, but that affects all windows, and is not what I want.

Is there some way to dynamically set this variable so that only specific dialogs would have different colors, and everything else unaffected?


For a given dialog process, you can select a specific configuration file using the environment variable DIALOGRC (see manual).