about summary refs log tree commit diff
path: root/config.def.h
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-11-20 16:02:57 +0100
committerChristoph Lohmann <20h@r-36.net>2012-11-20 16:02:57 +0100
commit5501d75d2c97398d3ffddb200061cb93cc90bac3 (patch)
treea6798e7b3acd458a60996cd7e1f22de4429dc246 /config.def.h
parentAdd a referer argument to the DOWNLOAD macro. Some sites need this. Thanks (diff)
downloadsurf-5501d75d2c97398d3ffddb200061cb93cc90bac3.tar.gz
surf-5501d75d2c97398d3ffddb200061cb93cc90bac3.tar.bz2
surf-5501d75d2c97398d3ffddb200061cb93cc90bac3.zip
Fix some styling in the config.def.h, fix the DOWNLOAD macro and unify the
variable naming a bit.
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/config.def.h b/config.def.h
index b71f9c1..362e1d2 100644
--- a/config.def.h
+++ b/config.def.h
@@ -20,18 +20,23 @@ static int   indicator_thickness = 2;
 static Bool spatialbrowsing = TRUE;
 static Bool hidebackground  = FALSE;
 
-#define SETPROP(p, q) { .v = (char *[]){ "/bin/sh", "-c", \
-	"prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
-	"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
-	p, q, winid, NULL } }
+#define SETPROP(p, q) { \
+	.v = (char *[]){ "/bin/sh", "-c", \
+		"prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
+		"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
+		p, q, winid, NULL \
+	} \
+}
 
 /* DOWNLOAD(URI, referer) */
 #define DOWNLOAD(d, r) { \
 	.v = (char *[]){ "/bin/sh", "-c", \
-	"xterm -e \"wget '$0' \
---load-cookies ~/.surf/cookies.txt \
---user-agent '$1' \
---referer '$2' ; sleep 5\"", d, useragent, NULL } }
+		"xterm -e \"wget '$0'" \
+		" --load-cookies ~/.surf/cookies.txt" \
+		" --user-agent '$1'" \
+		" --referer '$2' ; sleep 5\"", d, useragent, r, NULL \
+	} \
+}
 
 #define MODKEY GDK_CONTROL_MASK
 
@@ -61,9 +66,10 @@ static Key keys[] = {
     { MODKEY,               GDK_slash,  spawn,      SETPROP("_SURF_FIND", "_SURF_FIND") },
     { MODKEY,               GDK_n,      find,       { .b = TRUE } },
     { MODKEY|GDK_SHIFT_MASK,GDK_n,      find,       { .b = FALSE } },
-    { MODKEY,               GDK_v,      toggle,     { .v = "enable-plugins" } },
+
+    { MODKEY|GDK_SHIFT_MASK,GDK_c,      toggle,     { .v = "enable-caret-browsing" } },
     { MODKEY|GDK_SHIFT_MASK,GDK_i,      toggle,     { .v = "auto-load-images" } },
-    { MODKEY,               GDK_c,      toggle,     { .v = "enable-caret-browsing" } },
     { MODKEY|GDK_SHIFT_MASK,GDK_s,      toggle,     { .v = "enable-scripts" } },
+    { MODKEY|GDK_SHIFT_MASK,GDK_v,      toggle,     { .v = "enable-plugins" } },
 };