commit 384cd899664f9f1895553689b2c3bc60fbb1e21b
Author: Claudio Alessi <smoppy_AT_gmail.com>
Date: Sun Jan 10 16:01:25 2016 +0100
[surf][omnibar] update to 0.7
diff --git a/surf.suckless.org/patches/omnibar.md b/surf.suckless.org/patches/omnibar.md
index 55a0c15..339fa5b 100644
--- a/surf.suckless.org/patches/omnibar.md
+++ b/surf.suckless.org/patches/omnibar.md
_AT_@ -28,8 +28,8 @@ Now you can use the following key (don't forget to remove the old one):
Download
--------
-* [surf-0.6-omnibar.diff](surf-0.6-omnibar.diff) (20151006)
-* [omnibar-3477b69](
https://github.com/clamiax/.surf/blob/3477b69c5b00ad0129b163b22c84b8ed560abbb3/omnibar)
+* [surf-0.7-omnibar.diff](surf-0.7-omnibar.diff)
+* [omnibar](
https://raw.githubusercontent.com/clamiax/.surf/374e101748093215e8ecbf00a24a764932b60ed7/omnibar)
Author
------
diff --git a/surf.suckless.org/patches/surf-0.6-omnibar.diff b/surf.suckless.org/patches/surf-0.6-omnibar.diff
deleted file mode 100644
index 814e6bd..0000000
--- a/surf.suckless.org/patches/surf-0.6-omnibar.diff
+++ /dev/null
_AT_@ -1,59 +0,0 @@
-diff -wu surf-0.6/config.def.h surf-0.6-edit/config.def.h
---- surf-0.6/config.def.h 2013-02-10 19:40:14.000000000 +0100
-+++ surf-0.6-edit/config.def.h 2015-11-07 13:12:23.854017366 +0100
-_AT_@ -43,6 +43,18 @@
- } \
- }
-
-+#define ONLOAD(u) { \
-+ .v = (char *[]){"/bin/sh", "-c", \
-+ "~/.surf/omnibar addhist \"$0\"", u, NULL \
-+ } \
-+}
-+
-+#define GOTO { \
-+ .v = (char *[]){"/bin/sh", "-c", \
-+ "~/.surf/omnibar goto \"$0\" \"$1\"", winid, "_SURF_GO", NULL \
-+ } \
-+}
-+
- #define MODKEY GDK_CONTROL_MASK
-
- /* hotkeys */
-_AT_@ -80,7 +92,7 @@
- { MODKEY, GDK_o, source, { 0 } },
- { MODKEY|GDK_SHIFT_MASK,GDK_o, inspector, { 0 } },
-
-- { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
-+ { MODKEY, GDK_g, spawn, GOTO },
- { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
- { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
-
-Solo in surf-0.6-edit/: config.h
-Solo in surf-0.6-edit/: surf-0.6-omnibar.diff
-diff -wu surf-0.6/surf.c surf-0.6-edit/surf.c
---- surf-0.6/surf.c 2013-02-10 19:40:14.000000000 +0100
-+++ surf-0.6-edit/surf.c 2015-11-07 13:13:24.253997068 +0100
-_AT_@ -588,11 +588,11 @@
- WebKitWebDataSource *src;
- WebKitNetworkRequest *request;
- SoupMessage *msg;
-- char *uri;
-+ char *uri = geturi(c);
-+ Arg arg;
-
- switch(webkit_web_view_get_load_status (c->view)) {
- case WEBKIT_LOAD_COMMITTED:
-- uri = geturi(c);
- if(strstr(uri, "https://") == uri) {
- frame = webkit_web_view_get_main_frame(c->view);
- src = webkit_web_frame_get_data_source(frame);
-_AT_@ -604,6 +604,8 @@
- setatom(c, AtomUri, uri);
- break;
- case WEBKIT_LOAD_FINISHED:
-+ arg = (Arg)ONLOAD(uri);
-+ spawn(NULL, &arg);
- c->progress = 100;
- update(c);
- break;
diff --git a/surf.suckless.org/patches/surf-0.7-omnibar.diff b/surf.suckless.org/patches/surf-0.7-omnibar.diff
new file mode 100644
index 0000000..e00e5e3
--- /dev/null
+++ b/surf.suckless.org/patches/surf-0.7-omnibar.diff
_AT_@ -0,0 +1,59 @@
+diff --git a/config.def.h b/config.def.h
+index 93a3d49..05d81de 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -65,6 +65,18 @@ static Bool allowgeolocation = TRUE;
+ } \
+ }
+
++#define ONLOAD(u) { \
++ .v = (char *[]){"/bin/sh", "-c", \
++ "~/.surf/omnibar addhist \"$0\"", u, NULL \
++ } \
++}
++
++#define GOTO { \
++ .v = (char *[]){"/bin/sh", "-c", \
++ "~/.surf/omnibar goto \"$0\" \"$1\"", winid, "_SURF_GO", NULL \
++ } \
++}
++
+ /* styles */
+ /*
+ * The iteration will stop at the first match, beginning at the beginning of
+_AT_@ -112,7 +124,7 @@ static Key keys[] = {
+ { MODKEY, GDK_o, source, { 0 } },
+ { MODKEY|GDK_SHIFT_MASK,GDK_o, inspector, { 0 } },
+
+- { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
++ { MODKEY, GDK_g, spawn, GOTO },
+ { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
+ { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
+
+diff --git a/surf.c b/surf.c
+index f2170a4..c8fdab3 100644
+--- a/surf.c
++++ b/surf.c
+_AT_@ -789,11 +789,11 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c)
+ WebKitWebDataSource *src;
+ WebKitNetworkRequest *request;
+ SoupMessage *msg;
+- char *uri;
++ char *uri = geturi(c);
++ Arg arg;
+
+ switch (webkit_web_view_get_load_status (c->view)) {
+ case WEBKIT_LOAD_COMMITTED:
+- uri = geturi(c);
+ if (strstr(uri, "https://") == uri) {
+ frame = webkit_web_view_get_main_frame(c->view);
+ src = webkit_web_frame_get_data_source(frame);
+_AT_@ -809,6 +809,8 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c)
+ setstyle(c, getstyle(uri));
+ break;
+ case WEBKIT_LOAD_FINISHED:
++ arg = (Arg)ONLOAD(uri);
++ spawn(NULL, &arg);
+ c->progress = 100;
+ updatetitle(c);
+ if (diskcache) {
Received on Sun Jan 10 2016 - 16:01:28 CET