Re : [dev] dmenu : auto confirm when only one item remains

2009-08-14 Thread Julien Steinhauser
Donald Chai a écrit : I'm glad it works well for you, this minor change should work for matching on substrings as well: diff -r 9b203c5c180d dmenu.c --- a/dmenu.cSat Apr 18 12:50:12 2009 +0100 +++ b/dmenu.cThu Aug 13 11:24:18 2009 -0700 @@ -69,6 +69,7 @@ /* variables */ static char *m

Re: Re : [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Donald Chai
On Aug 13, 2009, at 10:05 AM, Julien Steinhauser wrote: Julien Steinhauser a écrit : IMO very bad idea. If you do that you won't be able to run command with arguments (eg. urxvt -e irssi). Regards, Slawek. You're right, but dmenu is small enough to have several version in / usr/local/bi

Re: Re : [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Julien Steinhauser
Julien Steinhauser a écrit : IMO very bad idea. If you do that you won't be able to run command with arguments (eg. urxvt -e irssi). Regards, Slawek. You're right, but dmenu is small enough to have several version in /usr/local/bin. At the moment, I've one with Fresch patch for vertical di

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Antoni Grzymala
markus schnalke dixit (2009-08-13, 16:35): > [2009-08-13 16:27] Antoni Grzymala > > Lorenzo Bolla dixit (2009-08-13, 11:07): > > > > > On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe > > > wrote: > > > > > > > What about > > > > > > > > echo 'rm -rf /' | dmenu? > > > > > > I bet someone's g

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Robert C Corsaro
markus schnalke wrote: [2009-08-13 16:27] Antoni Grzymala Lorenzo Bolla dixit (2009-08-13, 11:07): On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe wrote: What about echo 'rm -rf /' | dmenu? I bet someone's gonna try it... It's not gonna do anything by its

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Robert C Corsaro
Lorenzo Bolla wrote: On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe > wrote: What about echo 'rm -rf /' | dmenu? � I bet someone's gonna try it... Permission Denied

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread markus schnalke
[2009-08-13 16:27] Antoni Grzymala > Lorenzo Bolla dixit (2009-08-13, 11:07): > > > On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe wrote: > > > > > What about > > > > > > echo 'rm -rf /' | dmenu? > > > > I bet someone's gonna try it... > > It's not gonna do anything by itself. Not now ...

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Antoni Grzymala
Lorenzo Bolla dixit (2009-08-13, 11:07): > On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe wrote: > > > What about > > > > echo 'rm -rf /' | dmenu? > > I bet someone's gonna try it... It's not gonna do anything by itself. -- [a]

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Premysl Hruby
On (12/08/09 20:39), Julien Steinhauser wrote: > Date: Wed, 12 Aug 2009 20:39:41 +0200 > From: Julien Steinhauser > To: dev@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 > > Hello,

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Kurt H Maier
My wifi script reads the last-used wep key for a connection from a file and gives it to dmenu, which uses it as the "default" value unless the user types something different. With this patch the user wouldn't be able to change the wep key. Seems like it's time for a patch db like dwm has. -- #

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread markus schnalke
[2009-08-13 09:32] markus schnalke > > Do you know about McIlroy's tale about `cat'? Of course you don't know it, because it's a tale about `echo'. ;-) http://everything2.com/title/The+UNIX+and+the+Echo meillo signature.asc Description: Digital signature

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Lorenzo Bolla
On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe wrote: > What about > > echo 'rm -rf /' | dmenu? I bet someone's gonna try it...

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Anselm R Garbe
What about echo 'rm -rf /' | dmenu? ;) 2009/8/12 Julien Steinhauser : > On Aug 12, 2009, at 21:56 PM, Donald Chai wrote: > >>You're so close! >> >>Adding the following lines to the end of the match(void) procedure should >> do the trick: >>        if(item && item==itemend) { >>            fprint

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread markus schnalke
[2009-08-12 23:32] Sławomir Gonet > > IMO very bad idea. If you do that you won't be able to run command > with arguments (eg. urxvt -e irssi). Yes, one might want to use dmenu simply as command launcher, no matter what's piped into it. If the list changes dynamically, then it is not possible an

Re : [dev] dmenu : auto confirm when only one item remains

2009-08-12 Thread Julien Steinhauser
IMO very bad idea. If you do that you won't be able to run command with arguments (eg. urxvt -e irssi). Regards, Slawek. You're right, but dmenu is small enough to have several version in /usr/local/bin. At the moment, I've one with Fresch patch for vertical display and xmms like matching, f

RE: [dev] dmenu : auto confirm when only one item remains

2009-08-12 Thread Sławomir Gonet
IMO very bad idea. If you do that you won't be able to run command with arguments (eg. urxvt -e irssi). Regards, Slawek. -Original Message- From: Julien Steinhauser Sent: 12 sierpnia 2009 20:39 To: dev@suckless.org Subject: [dev] dmenu : auto confirm when only one item remains Hello, S

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-12 Thread Julien Steinhauser
On Aug 12, 2009, at 21:56 PM, Donald Chai wrote: >You're so close! > >Adding the following lines to the end of the match(void) procedure should do the trick: >if(item && item==itemend) { >fprintf(stdout, "%s", item->text); >fflush(stdout); >running =

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-12 Thread Donald Chai
On Aug 12, 2009, at 11:39 AM, 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 b

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-12 Thread Tadeusz Sośnierz
Dnia 2009-08-12, o godz. 14:45:47 Colin Shea 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

Re: [dev] dmenu : auto confirm when only one item remains

2009-08-12 Thread Colin Shea
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