You are not logged in.

#1 2007-10-18 05:04:55

nv
Member
Registered: 2006-10-24
Posts: 39

background color in dialog

Hi everyone,

I am testing out the 'dialog' utility and I would like to use it in a way that it doesn't show any "window" to the user. I almost succeeded with the following:

#!/bin/sh

TITLE="\Z7Sample Title\Zn"
TEXT="\Z7Welcome to this wonderful dialog\Zn"


dialog --no-shadow --no-lines --backtitle "${TITLE}" --begin 2 2 \
    --colors \
    --msgbox "${TEXT}" 22 79

but I will still get a gray background. I would like to have a blue background as well, so that there is no difference between the widget and the background. Is this possible ?

Another question: How can I retrieve the height and width of the current terminal? If I use 0 0 as size for the msgbox, then the <ok> button will not be placed at the bottom, because auto-sizing will minimize the widget.

Best regards,

Niklas.

Offline

#2 2007-10-18 14:34:27

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: background color in dialog

nv wrote:

Another question: How can I retrieve the height and width of the current terminal? If I use 0 0 as size for the msgbox, then the <ok> button will not be placed at the bottom, because auto-sizing will minimize the widget.

'stty size' will tell you the term's size.

Offline

Board footer

Powered by FluxBB