diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-09 14:39:05 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-09 14:39:05 +0900 |
| commit | d3a2e03e01d30020514e2891a559d7c96fda326a (patch) | |
| tree | 05aa4022c5db8611bb6a3734c952eecff2fb73f5 /surf/patches/surf-spacesearch-20170408-b814567.diff | |
| parent | 46ad57573d7fd55ee2d9f0a3944accd4dd618adb (diff) | |
created surf/
Diffstat (limited to 'surf/patches/surf-spacesearch-20170408-b814567.diff')
| -rw-r--r-- | surf/patches/surf-spacesearch-20170408-b814567.diff | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/surf/patches/surf-spacesearch-20170408-b814567.diff b/surf/patches/surf-spacesearch-20170408-b814567.diff new file mode 100644 index 0000000..ad5c0fe --- /dev/null +++ b/surf/patches/surf-spacesearch-20170408-b814567.diff @@ -0,0 +1,26 @@ +diff --git a/config.def.h b/config.def.h +index 6d3135e..75dc6a6 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -153,6 +153,8 @@ static Key keys[] = { + { MODKEY|GDK_SHIFT_MASK, GDK_KEY_m, toggle, { .i = Style } }, + }; + ++static char *searchengine = "https://duckduckgo.com/?q="; ++ + /* button definitions */ + /* target can be OnDoc, OnLink, OnImg, OnMedia, OnEdit, OnBar, OnSel, OnAny */ + static Button buttons[] = { +diff --git a/surf.c b/surf.c +index 93a1629..c20537e 100644 +--- a/surf.c ++++ b/surf.c +@@ -476,6 +476,8 @@ loaduri(Client *c, const Arg *a) + } else if (!stat(uri, &st) && (path = realpath(uri, NULL))) { + url = g_strdup_printf("file://%s", path); + free(path); ++ } else if (*uri == ' ') { ++ url = g_strdup_printf("%s%s", searchengine, uri + 1); + } else { + url = g_strdup_printf("http://%s", uri); + } |
