9term xterm and wiily

  • From: spam@xxxxxxxxxxxxx
  • To: wilyfans@xxxxxxxxxxxxx
  • Date: Thu, 13 Jun 2002 11:12:17 +0100

There was a discussion a while ago about 9term etc. Following
this, I compiled 9term and got frustrated with it not being quite right.
Eventually, i realised that it was because I wanted 9term to be wily;
therefore I decided that I should use wily instead.

So, for a few weeks now, I have been using wily _instead_ of
xterm and 9term. It took a bit of thinking about, and
editing some bits of wily (mainly  win actually)  but I'm 
now happy using wily as a terminal. I do prefer this way
over xterm and friends.

Some of my  thoughts are below, I have attached some bits of
source if anyone is interested. Both files need linking to libmsg.


It is necessary for the shell to expect the terminal to be raw (that
is, there cannot be any filename completion, cursor keys etc).
So, rc must be made without linking to any readline library.

win: the shortcoming of win was that when you changed directory,
the title of the win window did not changed. Therefore, when
you clicked on a file in the current directory, wily did not find it.
This is fixed by a change in win to export a variable containing
the id of the win window, to make it easy for another program (setname)
to change the title each time the directory changed. (Actually,
i was a bit lazy here and I call cwd() from the rc fn prompt()).

fn prompt {
        if (~ $cputype linux*) {
                if ( ~ $TERM win) {

Clearly, it is vital to have many terminal wilys running simultaneously.
So $WILYFIFO is set to different values by a script
wily $*
rm -rf /tmp/wily-$pid

Wily acts as a terminal most naturally if there is one column: exec xwily -c 1 
But often, I expand to two columns later.

More generally, but mostly with terminals, browsing directories happens a
lot, so I finally got round to  writing the code to open a directory in
the current window: that is, B2 on a directory does like B3 does, but the
new directory opens into the current wily window.  And .. appears in the title
of all directory windows.

for man pages: set the variable PAGER='col -bx'

Still to do: 'ls' really messes up the formatting. I suspect that setting the 
and using a fixed font would help. Perhaps ls would be better being mapped 
using a rc function to a b3 and do a Get on . ?

Other related posts: