Greetings.
On Fri, 31 Jan 2014 10:49:11 +0100 FRIGN <dev_AT_frign.de> wrote:
> On Fri, 31 Jan 2014 09:35:07 +0200
> Dimitris Zervas <dzervas_AT_dzervas.gr> wrote:
>
> > I didn't know about libvitapi. I'll check it.
> > About line editors: COME ON.
>
> Line editors have their uses once you work with them a bit more.
ed is the standard editor. If you can’t use it, live in despair.
> > About compatibility/portability: I want the library to work for me. I don't care about anyone else. So it's gonna be compatible with xterm and st. Not even urxvt!
>
> Even with st, we have so many different modes (256-color and the like).
> It would be convenient to write just one solution, but who knows how
> it's going to end up as a project?
> From what you say, why don't you just take termbox and write a proper
> Makefile-bases build-system for it?
St was born out of the reason to have a compatibility layer to all of
these modes and the applications using it. For writing new applications
simply use a known subset which works. Since basic escape codes require
terminfo because st is different to xterm or urxvt, the only real alter‐
native is ncursesw. The API isn’t that bad. Compare this to any GUI API.
A different paradigm has to be solved here. The paradigm of 2D inter‐
faces to complex tasks. This could be done using swk. If you have swk
done right, then it could be easily run in text or graphics mode.
The idea of the GUI abstractions is like in every software aimed at
clueless programmers to add more and more layers. You nowadays have high
level languages taking away the burden to think, then there are GUI edi‐
tors where you click to add a button and automatically the callback is
generated.
That’s where the suckless solution should begin, by having reusable mod‐
ules. For example there was the idea on the IRC channel to have a sepa‐
rate GUI process handling the output and giving callbacks via a simple
text interface over a pipe. That process could display the meta‐informa‐
tion of arranging UI elements (buttons, listbox, entry, forms, menus)
however it is needed. Of course supporting the OpenGL widget won’t work
in text mode.
What’s left is writing this by pointing out the really needed widgets.
Here new ones evolved, like the command line of vim added to browsers,
which could be reused in such applications to always have all UI ele‐
ments available via a text interface and make it automatically script‐
able. Then the menu, buttons, of course an editable text field with the
$EDITOR you wish, some way to display graphics (w3mimage for st maybe?),
tables ….
Conclusion: Text is just a way to output the metadata really represent‐
ed. There all hope is gone by backwards‐compatibility and the wide va‐
riety of terminals. Ncursesw is the only help here. Abstract it to the
suckless needs.
Sincerely,
Christoph Lohmann
Received on Fri Jan 31 2014 - 10:49:11 CET
This archive was generated by hypermail 2.3.0
: Fri Jan 31 2014 - 11:12:07 CET