sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit b46be08c01a408431b1f35e2939add16679c764e
parent a5c8466f99cec6353a565c8e6e065e60c6329a1f
Author: Philippe Gras <philippe.gras@free.fr>
Date:   Mon, 11 Nov 2013 15:51:31 +0100

Merge branch 'master' of git://git.suckless.org/sites

Diffstat:
Msuckless.org/sucks.md | 1-
Asurf.suckless.org/patches/spacesearch.md | 22++++++++++++++++++++++
Asurf.suckless.org/patches/surf-0.6-spacesearch.diff | 22++++++++++++++++++++++
3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/suckless.org/sucks.md b/suckless.org/sucks.md @@ -96,7 +96,6 @@ The following programs are broken (see [rocking stuff](/rocks) for saner alterna * XMMS (assumes fixed size, doesn't set transient\_for hint properly) * Xchat * [Firefox](http://www.mozilla.org/products/firefox) (doesn't set the TRANSIENT\_FOR hint correctly on its download dialog) -* [GIMP](http://www.gimp.org/) (GIMP expects a float environment to be useable) * beep-media-player * gqview * gthumb diff --git a/surf.suckless.org/patches/spacesearch.md b/surf.suckless.org/patches/spacesearch.md @@ -0,0 +1,22 @@ +Space search +============ + +Description +----------- + +This patch makes surf treat `_SURF_URI` string with leading whitespace as +search query. The search engine to send queries to is defined in `config.h`: + + static char *searchengine = "https://duckduckgo.com/?q="; + +(The patch adds this string to `config.def.h`.) + +Download +-------- + +* [surf-0.6-spacesearch.diff](surf-0.6-spacesearch.diff) (701) (20131110) + +Author +------ + +* Dmitrij D. Czarkoff <[czarkoff@gmail.com](mailto:czarkoff@gmail.com)> diff --git a/surf.suckless.org/patches/surf-0.6-spacesearch.diff b/surf.suckless.org/patches/surf-0.6-spacesearch.diff @@ -0,0 +1,22 @@ +diff --git a/config.def.h b/config.def.h +index a221c86..c3aef5e 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -93,3 +93,4 @@ static Key keys[] = { + { MODKEY|GDK_SHIFT_MASK,GDK_v, toggle, { .v = "enable-plugins" } }, + }; + ++static char *searchengine = "https://duckduckgo.com/?q="; +diff --git a/surf.c b/surf.c +index cebd469..a5c0030 100644 +--- a/surf.c ++++ b/surf.c +@@ -626,6 +626,8 @@ loaduri(Client *c, const Arg *arg) { + rp = realpath(uri, NULL); + u = g_strdup_printf("file://%s", rp); + free(rp); ++ } else if (*uri == ' ') { ++ u = g_strdup_printf("%s%s", searchengine, uri+1); + } else { + u = g_strrstr(uri, "://") ? g_strdup(uri) + : g_strdup_printf("http://%s", uri);