1 /* modifier 0 means no modifier */
2 static char *useragent = "Surf/"VERSION" (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)";
3 static char *progress = "#0000FF";
4 static char *progress_untrust = "#FF0000";
5 static char *progress_trust = "#00FF00";
6 static char *progress_proxy = "#FFFF00";
7 static char *progress_proxy_trust = "#66FF00";
8 static char *progress_proxy_untrust = "#FF6600";
9 static char *stylefile = "~/.surf/style.css";
10 static char *scriptfile = "~/.surf/script.js";
11 static char *cookiefile = "~/.surf/cookies.txt";
12 static time_t sessiontime = 3600;
13 static char *cafile = "/etc/ssl/certs/ca-certificates.crt";
14 static char *strictssl = FALSE; /* Refuse untrusted SSL connections */
15 static int indicator_thickness = 2;
17 #define HIDE_BACKGROUND FALSE
18 #define SPATIAL_BROWSING TRUE
20 #define SETPROP(p, q) { .v = (char *[]){ "/bin/sh", "-c", \
21 "prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
22 "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
24 #define DOWNLOAD(d) { \
25 .v = (char *[]){ "/bin/sh", "-c", \
26 "xterm -e \"wget '$0' \
27 --load-cookies ~/.surf/cookies.txt \
28 --user-agent '$1' ; sleep 5\"", d, useragent, NULL } }
29 #define MODKEY GDK_CONTROL_MASK
31 /* modifier keyval function arg Focus */
32 { MODKEY|GDK_SHIFT_MASK,GDK_r, reload, { .b = TRUE } },
33 { MODKEY, GDK_r, reload, { .b = FALSE } },
34 { MODKEY|GDK_SHIFT_MASK,GDK_p, print, { 0 } },
35 { MODKEY, GDK_p, clipboard, { .b = TRUE } },
36 { MODKEY, GDK_y, clipboard, { .b = FALSE } },
37 { MODKEY|GDK_SHIFT_MASK,GDK_j, zoom, { .i = -1 } },
38 { MODKEY|GDK_SHIFT_MASK,GDK_k, zoom, { .i = +1 } },
39 { MODKEY|GDK_SHIFT_MASK,GDK_i, zoom, { .i = 0 } },
40 { MODKEY, GDK_l, navigate, { .i = +1 } },
41 { MODKEY, GDK_h, navigate, { .i = -1 } },
42 { MODKEY, GDK_j, scroll_v, { .i = +1 } },
43 { MODKEY, GDK_k, scroll_v, { .i = -1 } },
44 { MODKEY, GDK_b, scroll_v, { .i = -10000 } },
45 { MODKEY, GDK_space, scroll_v, { .i = +10000 } },
46 { MODKEY, GDK_i, scroll_h, { .i = +1 } },
47 { MODKEY, GDK_u, scroll_h, { .i = -1 } },
48 { 0, GDK_Escape, stop, { 0 } },
49 { MODKEY, GDK_o, source, { 0 } },
50 { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
51 { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
52 { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
53 { MODKEY, GDK_n, find, { .b = TRUE } },
54 { MODKEY|GDK_SHIFT_MASK,GDK_n, find, { .b = FALSE } },
55 { MODKEY, GDK_v, toggle, { .v = "enable-plugins" } },
56 { MODKEY|GDK_SHIFT_MASK,GDK_i, toggle, { .v = "auto-load-images" } },
57 { MODKEY, GDK_c, toggle, { .v = "enable-caret-browsing" } },
58 { MODKEY|GDK_SHIFT_MASK,GDK_s, toggle, { .v = "enable-scripts" } },