[wiki] [sites] Add 'homepage' patch for Surf 2.0 || thatlittlegit

From: <git_AT_suckless.org>
Date: Thu, 04 Jan 2018 18:36:51 +0100

commit 86ac1f79a7050b328fa3d3d99b3bd599663e511d
Author: thatlittlegit <wapidstyle_AT_live.ca>
Date: Thu Jan 4 12:35:37 2018 -0500

    Add 'homepage' patch for Surf 2.0

diff --git a/surf.suckless.org/patches/homepage.md b/surf.suckless.org/patches/homepage.md
index 50f59c61..cc44a4d2 100644
--- a/surf.suckless.org/patches/homepage.md
+++ b/surf.suckless.org/patches/homepage.md
_AT_@ -9,6 +9,7 @@ This patch allows you to set a homepage to be loaded when you have not set a uri
 Download
 --------
 
+* [surf-2.0-homepage.diff](surf-2.0-homepage.diff) (.6k) (20180104)
 * [surf-0.6-homepage.diff](surf-0.6-homepage.diff) (.7k) (20140816)
 * [surf-0.3-homepage.diff](surf-0.3-homepage.diff) (.3k) (20100705)
 
diff --git a/surf.suckless.org/patches/surf-2.0-homepage.diff b/surf.suckless.org/patches/surf-2.0-homepage.diff
new file mode 100644
index 00000000..f32016f7
--- /dev/null
+++ b/surf.suckless.org/patches/surf-2.0-homepage.diff
_AT_@ -0,0 +1,24 @@
+diff --git a/config.def.h b/config.def.h
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -164,3 +164,5 @@ static Button buttons[] = {
+ { OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
+ { OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 },
+ };
++
++#define HOMEPAGE "https://duckduckgo.com/"
+diff --git a/surf.c b/surf.c
+--- a/surf.c
++++ b/surf.c
+_AT_@ -1751,7 +1751,11 @@ main(int argc, char *argv[])
+ if (argc > 0)
+ arg.v = argv[0];
+ else
++#ifdef HOMEPAGE
++ arg.v = HOMEPAGE;
++#else
+ arg.v = "about:blank";
++#endif
+
+ setup();
+ c = newclient(NULL);
Received on Thu Jan 04 2018 - 18:36:51 CET

This archive was generated by hypermail 2.3.0 : Thu Jan 04 2018 - 18:48:24 CET