xprompt: a dmenu rip-off with contextual completion - Programming On Unix
Users browsing this thread: 2 Guest(s)
|
|||
I've just discovered that there was already an xprompt since 1989 (and it is in FreeBSD ports)!. Its last release before 2019 was in 1991. Then it got revived last year by another developer
Its premise is a little different from mine xprompt: rather than being a text input field for the user to construct a string based on the information on the stdin, it asks the user for one or more strings and print them to stdout, standard input is not used and there is no completion feature. For example, the following invocation of 1989 xprompt asks the user for a user name and a email: Code: $ xprompt -p Name: -p E-mail: Although it was recently ported to X11R7, for being that old, it uses some obscure and archaic X11 routines and headers. I'm gonna definitely study its code and see how I can improve my xprompt; and understand how it deals with text input and text edition, etc. I've just got a copy of Nye's Xlib Programming Manual, which is as old as that xprompt (and uses ye old K&R C), hopefully it will help me in understanding that xprompt. That xprompt is a regular wm-managed window (no override-redirect) that grabs the keyboard but does not steal focus. It currently has no support to unicode/Xft and it uses the Athena Widget library (which is distributed with X11). Once again, I accidentally named a program with an already existant name. But now the list of related-but-different programs just got bigger: - dmenu: select a string from stdin. - my xprompt: build a string based on items from stdin provided as completions. - ye old xprompt: create a dialog window for the user to write some strings. All three are scriptable and pipe-able UNIXy programs. |
|||