[dev] A suckless X11 Widget Toolkit

From: Lucas de Sena <lucas_AT_seninha.org>
Date: Wed, 1 Jun 2022 18:12:15 -0300


I just want to announce the last project I'm working on. It's called
control[1]. It is a GUI widget set based on the X Toolkit Intrinsics
framework[2]. I name it "control" after Plan 9's widget toolkit which
is also called control (but there is only one or two programs using it
in Plan 9).

Currently, the only implemented widget is the text input field (called
`CtrlTextField` internally). There is a demonstration program in the
demos/ directory. The demo program, called "prompt" is just a simple
dmenu-like input field that echoes what the user types into the stdout
when the user press Enter. Unlike dmenu, control's input field widget
supports extended line editing features, like undo/redo (on Ctrl-Z and
Ctrl-Shift-Z), mouse-based cursor movement and emacs-like keybindings.

For the input field, I'm still using UTF-8 points as whole characters,
to move between input characters for example. An ideal solution would
be to use something like libgrapheme. I'll use it in the future.

You can run `make all` (or only `make`) to build the library, or `make
demos` to build the demonstration programs (there's only one for now).
Under the doc/ directory, there is an extensive manual page written in

One of the reasons I'm announcing this project here is that I think it
may be interesting for suckless users and developers, as some suckless
programs are X11 programs that implements basic widget functionalities
from scratch (this is the case of dmenu, which implements text editing
features in plain Xlib).

The other reason is to ask for help, by invinting people to join me in
this project. A widget set is only a set of widgets if there are more
than one widget to make it a set (otherwise it's not a widget set, but
a widget singleton). Anyone willing to work on a X11 toolkit, please
mail me. The project is currently hosted in GitHub, but if you're not
comfortable with Microsoft's GitHub(TM), I may host it somewhere else.

There's still much to do in order for control to be usable. I need to
write a Shell widget to communicate with the WM (so clicking the close
button on the window manager also closes the application); I also need
to write manager/composite widgets and other primitive widgets, like a
label and a push button, which will be implemented as gadgets instead.

Although the project is in its (very) initial stage, what do you think
of it? Would you use (or program with) a GUI toolkit? The only simple
and suckless-y widget set I know of is X11/Motif, but it is likely not
developed anymore... It's kinda badly written, with an ugly codebase.

Lucas "seninha" de Sena (https://seninha.org)

[1]: https://github.com/phillbush/control
[2]: https://www.x.org/releases/current/doc/libXt/intrinsics.html
Received on Wed Jun 01 2022 - 23:12:15 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 01 2022 - 23:24:08 CEST