Use surf-setprop and adjust button mappings - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) changeset 5de8630373c1e7a52423f0fcce8e34ed55534d36
(DIR) parent 853ac4e2b45a59583ec99d27c2a9dfe713c18888
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sun, 2 Jun 2019 00:48:02
Use surf-setprop and adjust button mappings
Diffstat:
wip/surf-git/patch-config.h | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff -r 853ac4e2b45a -r 5de8630373c1 wip/surf-git/patch-config.h
--- a/wip/surf-git/patch-config.h Sat Jun 01 21:38:08 2019 +0200
+++ b/wip/surf-git/patch-config.h Sun Jun 02 00:48:02 2019 +0200
@@ -1,6 +1,6 @@
---- /dev/null 2018-10-09 23:31:13.462782904 +0200
-+++ config.h 2018-10-09 23:38:25.662442657 +0200
-@@ -0,0 +1,195 @@
+--- /dev/null 2019-06-02 00:47:02.456044340 +0200
++++ config.h 2019-06-02 00:35:06.765979012 +0200
+@@ -0,0 +1,194 @@
+/* modifier 0 means no modifier */
+static int surfuseragent = 0; /* Append Surf version to default WebKit user agent */
+static char *fulluseragent = "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"; /* Or override the whole user agent string */
@@ -72,9 +72,7 @@
+/* SETPROP(readprop, setprop, prompt)*/
+#define SETPROP(r, s, p) { \
+ .v = (const char *[]){ "/bin/sh", "-c", \
-+ "prop=\"$(printf '%b' \"$(xprop -id $1 $2 " \
-+ "| sed \"s/^$2(STRING) = //;s/^\\\"\\(.*\\)\\\"$/\\1/\")\" " \
-+ "| dmenu -p \"$4\" -w $1)\" && xprop -id $1 -f $3 8s -set $3 \"$prop\"", \
++ "~/.surf/surf-setprop \"$1\" \"$2\" \"$3\" \"$4\"", \
+ "surf-setprop", winid, r, s, p, NULL \
+ } \
+}
@@ -190,9 +188,10 @@
+static Button buttons[] = {
+ /* target event mask button function argument stop event */
+ { OnLink, 0, 2, clicknewwindow, { .i = 0 }, 1 },
-+ { OnLink, MODKEY, 1, clicknewwindow, { .i = 0 }, 1 },
++ { OnLink, GDK_SHIFT_MASK, 1, clicknewwindow, { .i = 0 }, 1 },
+ { OnLink, MODKEY|GDK_SHIFT_MASK, 1, clicknewwindow, { .i = 1 }, 1 },
+ { OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
+ { OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
+ { OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 },
++ { OnAny, MODKEY, 1, clickplumb, { 0 }, 1 },
+};