When talking about command line shells, like MS power shell, the linux community talks about terminal emulation. What is a terminal?
Some old mechanical thing for talking to mainframes, like a typewriter. But is has nothing to do with command line execution, the main function of shells. One of those leftovers from days gone by, like text files or like Xwindows client-server model.
What I want is a simple Xwindows based character shell, a graphics buffer holding rectangular arrays of character bits. I guess we can call that a terminal, but it is confusing if you don't know the history, and confounding if you do.
I keep thinking, an Xwindow, basic character mode GUI. Divide the screen into rectangles according to font size. Not doing graphics smaller than a character font. In fact, font shell is the more appropriate term. It should have been invented, all 200 lines of code, set up window, compute font size, implement :
strout(str,i,j); // write a string of characters to a char window
Too simple, and I think it is not worth managing, not much more than a code snippet, too small to be a generic 'tool'. Easier to gin one up than hunt down open source code? Be nice if someone had already done this.
I cutnpasted an Xwindows 'hello world' window, and it basically this this strout(str,i,j); or something similar with a default character height. From there create Xchar and on top of that add whatever text menu headers and text block utilities to make a Char manager. So we get a stack similar to Gnome over X, for example. We want GnomeChars over Xchars, everything just course grained down to character arrays.
The interface becomes very simple, limited to the printable chars. Like the plaintext idea, sometimes pixel graphics are a nuisance. But some things are too simple to pay the cost of software management, Xchars is a cutnpaste kind of snippet.
Ncurses is really a char window manager, while it has no standard Xwindos sublayer. If we could extract the window and menu manager from Ncurses, this is the real code. Drop all the stuff about old style typewriters.
No comments:
Post a Comment