Re: [dev][surf] Searchengines Patch Update

2010-08-13 Thread Matthew Bauer
You could add a "I'm Feeling Lucky" Google search with: +static SearchEngine searchengines[] = { +{ "g", "http://www.google.com/search?q=%s"; }, +{ "lucky", "http://www.google.com/search?q=%s&btnI=I'm+Feeling+Lucky" }, +{ "leo", "http://dict.leo.org/ende?search=%s"; }, +}; On Fri,

[dev][surf] Searchengines Patch Update

2010-08-13 Thread Alex Puterbaugh
If anyone's interested, I've updated the searchengines patch to succeed with the latest hg pull. The diff: diff -r dbb565b8d61c config.def.h --- a/config.def.h Fri Jun 25 09:42:58 2010 +0200 +++ b/config.def.h Fri Aug 13 16:28:31 2010 -0400 @@ -7,6 +7,10 @@ static char *cookiefile

[dev] [surf] searchengines patch 0.4 update

2010-06-05 Thread Jeremy Wolff
I've updated the searchengines patch for surf, the patch on the site only works for 0.3. diff -up surf-0.4/config.def.h surf-0.4-mychanges/config.def.h --- surf-0.4/config.def.h 2010-05-30 16:05:25.0 -0400 +++ surf-0.4-mychanges/config.def.h 2010-06-05 14:23:36.0 -0400 @@ -38,3 +38,

Re: [dev] [surf] SearchEngines patch

2009-09-24 Thread Jessta
On 24/09/2009, Dieter Plaetinck wrote: > On Thu, 24 Sep 2009 16:28:15 +1000 > Jessta wrote: > >> On 24/09/2009, Nils wrote: >> > On Thu, Sep 24, 2009 at 10:16:28AM +1000, Jessta wrote: >> >> I don't think url parameter replacement is really the domain of the >> >> web browser >> > >> > Oh yeah,

Re: [dev] [surf] SearchEngines patch

2009-09-24 Thread Dieter Plaetinck
On Thu, 24 Sep 2009 16:28:15 +1000 Jessta wrote: > On 24/09/2009, Nils wrote: > > On Thu, Sep 24, 2009 at 10:16:28AM +1000, Jessta wrote: > >> I don't think url parameter replacement is really the domain of the > >> web browser > > > > Oh yeah, you're right. My window manager should do it. > > >

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread Jessta
On 24/09/2009, Nils wrote: > On Thu, Sep 24, 2009 at 10:16:28AM +1000, Jessta wrote: >> I don't think url parameter replacement is really the domain of the >> web browser > > Oh yeah, you're right. My window manager should do it. > I don't think url parameter replacement is really the domain of th

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread Nils
On Thu, Sep 24, 2009 at 10:16:28AM +1000, Jessta wrote: > I don't think url parameter replacement is really the domain of the > web browser Oh yeah, you're right. My window manager should do it.

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread Jessta
On 23/09/2009, Nils wrote: > Hi, > > I wrote a little patch for surf which allows you to define custom search > engines, so you can google for "foo bar" simply by loading the url "g > foo bar" (or any other search engine you prefer). > I don't think url parameter replacement is really the domain o

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread Nils
On Wed, Sep 23, 2009 at 04:08:37PM +0200, cryptix wrote: > Due to the removal of the prefix = g_strdup_printf("%s ", > searchengines[i].token) line, another bug sneaked in. > With the {"g“, "http://google.com/search?q=%s"}, SearchEngine in > place, opening any url starting with g applies this Searc

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread cryptix
Hey there, On 23.09.2009, at 15:44, Nils wrote: Thanks cryptix. As you can tell I'm not very experienced with C and this little patch was more of a hack anyway. :) you’re welcome, I don’t consider me to be very experienced either. :) Due to the removal of the prefix = g_strdup_printf("%s ",

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread Nils
On Wed, Sep 23, 2009 at 03:04:55PM +0200, cryptix wrote: > Realized this is still bad. > > If you have 10 SearchEngines and only the last one matches in the > parseuri() for loop, you would still have the other 9 allocated.. > Getting rid of prefix altogether seams to be the cleanest approach. > n

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread cryptix
Realized this is still bad. If you have 10 SearchEngines and only the last one matches in the parseuri() for loop, you would still have the other 9 allocated.. Getting rid of prefix altogether seams to be the cleanest approach. no need to strdup(). Updated patch attached. searchengines.p

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread cryptix
Hey Nils, like the patch, the unfree()ed prefixes were bugging me, though. Updated it a bit, hope you agree. Kind regards, cryptix searchengines.patch Description: Binary data

Re: [dev] [surf] SearchEngines patch

2009-09-23 Thread Enno Boland (Gottox)
Hi! I won't add this patch to vanilla-surf but feel free to create a patches section in the suckless-wiki and add your patch. regards Gottox 2009/9/23 Nils : > Hi, > > I wrote a little patch for surf which allows you to define custom search > engines, so you can google for "foo bar" simply by lo

[dev] [surf] SearchEngines patch

2009-09-22 Thread Nils
Hi, I wrote a little patch for surf which allows you to define custom search engines, so you can google for "foo bar" simply by loading the url "g foo bar" (or any other search engine you prefer). Put this in your config.h: > static SearchEngine searchengines[] = { > { "g", "http://www.goo