[TAG] tput cwin question
Benjamin A. Okopnik
ben at linuxgazette.net
Sat Feb 11 00:13:35 MSK 2006
On Sun, Feb 05, 2006 at 10:12:36PM -0700, Mike Wright wrote:
> Hi, I have been trying to figure out exactly what the ?cwin? option to the tput
> command really means.
According to 'man 5 terminfo', it defines a window. According to
real-life experience with a variety of xterms, it doesn't do much.
I find that this is generally the case with anything other than a few
commands that most xterms have in common. This isn't an area of *nix
that has seen much development lately (i.e., the last decade or more)
because TclTk and the like have made that kind of text layout, etc., a
lot easier _and_ less terminal-dependent than the kind of thing you're
trying to do.
> What I?m hoping that it will let me do is to create another window in the
> current terminal using a section of the screen to output listings from
> different commands that will be executed from numbered menu options. And if the
> output is several screens then it can be presented a few lines at a time to the
> user with the option to page down through the many screens of output while not
> disturbing the menu options at the top of the screen nor the status bars at the
> bottom of the screen.
I think that you're asking far more of xterms than they can provide. It
would be nice if it worked that way, but - as far as I'm aware - it does
not.
Why not use several xterms (without decorations) arranged next to each
other? I use two tiny xterm windows with a very small font to show my
connection status and my mail status in the lower right corner of my
screen, something like this:
``
xterm -geometry 40x10-0-0 -name ppp -fn 6x9 -e pppd call cell-hs &
xterm -geometry 40x2-0-100 -name MailTail -e [long command line] &
''
I also have the above xterm names defined in my ~/.icewm/winoptions file
(however, unless you're using "icewm" as I do, these should probably go
in your ~/.Xresources file):
``
MailTail.dTitleBar: 0
MailTail.dClose: 0
MailTail.dMinimize: 0
MailTail.dMaximize: 0
MailTail.ignoreTaskBar: 1
MailTail.ignoreWinList: 1
MailTail.ignoreQuickSwitch: 1
ppp.dTitleBar: 0
ppp.dClose: 0
ppp.dMinimize: 0
ppp.dMaximize: 0
ppp.ignoreTaskBar: 1
ppp.ignoreWinList: 1
ppp.ignoreQuickSwitch: 1
''
Obviously, you can stack these however you want to. I find that this is
a lot more system-independent than trying to play around with terminfo
capabilities.
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://linuxgazette.net *
More information about the TAG
mailing list