On (12/08/09 20:39), Julien Steinhauser wrote:
> Date: Wed, 12 Aug 2009 20:39:41 +0200
> From: Julien Steinhauser <Julien.Steinhauser_AT_orange.fr>
> To: dev_AT_suckless.org
> Subject: [dev] dmenu : auto confirm when only one item remains
> User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)
> List-Id: dev mail list <dev.suckless.org>
>
> Hello,
> Sorry, I don't write to bring a patch.
> I wander if someone has already patched dwm
> to make it auto confirm when, (as said in the subject)
> only one item remains.
>
> I've found something on the mailing list which is almost
> what I wish but not exactly, it auto confirms on exact match.
>
> It could be something like :
> <pseudocode>
> if number of Item == 1 or if firstItem == lastItem
> </pseudocode>
> fprintf(stdout, "%s", text);
> fflush(stdout);
> running = False;
>
> As I'm not a developper, I miss the knowledge
> to write the if condition in real code.
>
> This feature would be handy for a few scripts in which I use dmenu.
> If someone has already done it or have ideas on how to do it, please
> let me know :) .
>
For you, instead of patching dmenu it will be much better to just check
it input is only one line. If it is, then there's no reason for you to
fire-up dmenu.
Any such patch to dmenu you are suggesting is imho big NO-NO. Afterall,
you wan't be able to change that command, add/remove some arguments etc.
Also, what's such bad on user pressing enter after possible some change?
-Ph
-- Premysl "Anydot" Hruby, http://www.redrum.cz/ - I'm a signature virus. Please add me to your signature and help me spread!Received on Thu Aug 13 2009 - 13:46:12 UTC
This archive was generated by hypermail 2.2.0 : Sun Aug 16 2009 - 14:18:46 UTC