[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [newbie] terminal handling facilities
- From: Klaus Ripke <paul-lua@...>
- Date: Thu, 29 Sep 2005 11:07:00 +0200
humm, things are starting to get a little OT,
so let me try to settle this peacefully.
Just wanting to point to options currently available with Lua.
On Thu, Sep 29, 2005 at 03:51:19AM -0400, Glenn Maynard wrote:
> > well, there not many terminals but xterm to change size at all.
>
> You're trying to downplay the importance of supporting window resizing
> by claiming that "not many terminals support it"?
no
> Xterm/rxvt, and
> equivalents in other systems over ssh connections (eg. Putty), is
> probably by far the most common type of terminal in use today. That's
> a whole lot of terminals.
Rxvt, Putty and most others are basically xterm, that's what I wanted to say.
So e.g. an abstraction of querying the window size might be a little bit
overkill in practice. Kde console and friends are less xtermish, though.
> The only ones I can think of that wouldn't
> support it would be actual, text terminals (eg. the Linux console).
Right, and even these accept some basic VT100 controls.
> Having to type ^L to have an application recognize a window size
> change is not acceptable.
Sorry, I really did not want to suggest to remove ncurses or
readline from your bash, mutt/pine, vimacs or elinks.
> It's 2005; handling this automatically
> has been standard practice for a very long time.
If it has been standard practice for a very long time in terminal
based lua apps then some pointer would no doubt be appreciated.
Just wanted to say that it is possible and not even hard to get somewhere
without ncurses and the comfort sacrificed may be considered worthwhile
with regard to the trouble saved e.g. in building a version to run in a
windoze based xterm clone. One could ship the *nix version with some
little wrapper proggy to take care of the ioctl (and possibly even to
turn sigwinch into some character), while a win "xterm" might require
these options to be set from some menu anyway as there is no ioctl.
So you could end up running the exact same lua script in both
environments which is nice and lua-ish and nix-ish, too.
> I'm in screen,
> with nine screens open inside; if I resize my terminal, all nine
> resize. I'm not about to cycle through each one hitting ^L. (For
> line-based applications, eg. readline, ^L also tends to clear the
> screen, which resizing shouldn't do.)
Why not teach screen to turn SIGWINCH into some in-band input
for certain apps? It's dealing with it anyway.
As modern unicode xterms tend to pipe IO through luit,
that would be another possibility to hook in.
> "Extremely antisocial" is a pretty accurate description of an ncurses-ish
> application that doesn't support SIGWINCH.
I guess everbody will be delighted to see luacurses or lurses or whatever
appear on luaforge or lua-users. Right now there is zilch.
For the time being, I would not urge people to switch to slang or what
just to have curses when something can be done in Lua.
kind regards
Klaus