Re: [dev] [hack] Having dmenu provide hints about current selected entry

From: Connor Lane Smith <cls_AT_lubutu.com>
Date: Fri, 26 Nov 2010 14:43:16 +0000

Hey,

On 26 November 2010 14:04, Dieter Plaetinck <dieter_AT_plaetinck.be> wrote:
> I would prefer if it works like this:
> - when you invoke dmenu, it immediately appears, and user can start
> typing input. as soon as dmenu is started, it starts reading stdin,
> however fast or slow it goes until EOF.
> - anytime anything happens (user changes his query or new line is
> read on stdin) the search results are updated in realtime accordingly.
>
> I think the code/algorithms to realize this must be pretty complicated
> for it to work nicely (high performance).. But your patches seem
> trivial, so did I miss something?

No, to do this would be trivial. It's just that certain suckless
people are rather aggressive to the idea of using pthreads for
anything.

On 26 November 2010 13:38, Christophe-Marie Duquesne
<chm.duquesne_AT_gmail.com> wrote:
> 1) if invoked with the option -s (-s for stream) dmenu will output
> selected entry on every keystroke (so you can feed a tool with the
> current entry).
> 2) in order to avoid waiting for the input stream to finish before
> allowing the user for select entries (and so that you can continue
> feeding it from stdin while you type), dmenu reads stdin in a thread.

The first aspect of your patch, the incremental output, already
exists.[1] The threaded input is neat, and I am perfectly willing to
add it into dmenu proper. Though I expect others will not share that
willingness.

[1]: http://tools.suckless.org/dmenu/patches/incremental

Thanks,
cls
Received on Fri Nov 26 2010 - 15:43:16 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 26 2010 - 15:48:02 CET