Dnia 2009-08-12, o godz. 14:45:47 Colin Shea <[email protected]> napisał(a):
> On Wed, Aug 12, 2009 at 08:39:41PM +0200, Julien Steinhauser wrote: > > 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 :) . > > > > Why not check if the number of items you are passing into dmenu is one > and use that instead of making dmenu do the check? It seems to me > pointless to call dmenu with only one value in stdin. > I think he means that if only one item remains on the bar, then it is automagically returned by dmenu. Anyway, I don't think this is so good, especially when you make some typo and launch something random. Regards Ted
