Compare commits
104 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b814567e2b | |||
| 0cb1597801 | |||
| 7e02344a61 | |||
| 1abb2ebe7a | |||
| 37e43501d8 | |||
| da5290a41a | |||
| c64c368d86 | |||
| 4c41d363b7 | |||
| 5a02d3e500 | |||
| f9714ab838 | |||
| 8682a4dffb | |||
| cee8f0186c | |||
| 3530d18d8e | |||
| 7ca9421a69 | |||
| 1206b2c587 | |||
| c8fdd4d583 | |||
| 6e019362c5 | |||
| 75e3fe5b95 | |||
| 11b34c0814 | |||
| 2aa1c38aed | |||
| d04fb9bff3 | |||
| af7522006b | |||
| 50befe4a95 | |||
| 581075796a | |||
| 934705c420 | |||
| ee04671220 | |||
| c069b76f1b | |||
| 981ade6eeb | |||
| 00f9dcdf43 | |||
| 971856a579 | |||
| d0020bad4f | |||
| c3a827d621 | |||
| b70a966aa6 | |||
| cdc80731fb | |||
| b87123ac9b | |||
| d4ac9fb6f4 | |||
| 10105c8b87 | |||
| 7c24c61ab2 | |||
| 890ab510ea | |||
| 3e017b1a89 | |||
| bd17d359d6 | |||
| 60c58fbf17 | |||
| 2fb122c012 | |||
| 6e68af115d | |||
| fef80cd56c | |||
| 6124176b89 | |||
| 11fa5a7a4d | |||
| 954a718197 | |||
| 26eb2f761c | |||
| bc46e954f2 | |||
| 432f3c6b53 | |||
| 7e9a85a5cb | |||
| adc650f399 | |||
| 5bca222339 | |||
| e6cefa584e | |||
| b5096b1c8f | |||
| 690118133d | |||
| 84611a5d29 | |||
| 5def2e51da | |||
| 2d1e422368 | |||
| 82abf5154f | |||
| 526b974c33 | |||
| 320e4e4388 | |||
| acec16e685 | |||
| 42fdc77f5e | |||
| a53dc90171 | |||
| c4f01cd18b | |||
| 0b5b798eb2 | |||
| 2c2a7b608e | |||
| ba8617e4ee | |||
| 701815a5f2 | |||
| d6794e0d75 | |||
| b4e78555d0 | |||
| d9cecc8932 | |||
| 72905b8bfc | |||
| bb1fc4195f | |||
| 2e1fb87361 | |||
| 04d46d1791 | |||
| 76940a9ab5 | |||
| d542773e75 | |||
| f6a35e5fbf | |||
| 96188f83f0 | |||
| 26a2dbac65 | |||
| 58c4e18975 | |||
| e9ec482049 | |||
| bce814b30a | |||
| 1f99df029c | |||
| 92d7ba7ed8 | |||
| 42c6c90366 | |||
| b9530ad5d1 | |||
| 60f574e4b7 | |||
| 0f3e3bf669 | |||
| ad538bb00a | |||
| 421486db18 | |||
| f86977a6fa | |||
| b0f35be17b | |||
| 42829cdad0 | |||
| 94f2f2eace | |||
| e39b7e623c | |||
| 7c34b37786 | |||
| 4415c475f7 | |||
| b7cc1ae964 | |||
| abcf5f06ed | |||
| 566b452b46 |
@@ -1,8 +1,32 @@
|
|||||||
MIT/X Consortium License
|
MIT/X Consortium License
|
||||||
|
|
||||||
© 2011-2012 Troels Henriksen <athas@sigkill.at>
|
© 2009-2010 Enno Boland <tox@s01.de>
|
||||||
© 2009-2011 Enno Boland <g s01 de>
|
© 2009 Thomas Menari <spaceinvader@chaotika.org>
|
||||||
© 2012 Christoph Lohmann <20h@r-36.net>
|
© 2009 Simon Rozet <simon@rozet.name>
|
||||||
|
© 2009 Andrew Antle <andrew.antle@gmail.com>
|
||||||
|
© 2010-2011 pancake <nopcode.org>
|
||||||
|
© 2011-2013 Anselm R Garbe <anselm@garbe.us>
|
||||||
|
© 2011-2012 Troels Henriksen <athas@sigkill.dk>
|
||||||
|
© 2011 Connor Lane Smith <cls@lubutu.com>
|
||||||
|
© 2012-2017 Christoph Lohmann <20h@r-36.net>
|
||||||
|
© 2013 Shayan Pooya <shayan@liveve.org>
|
||||||
|
© 2013 Jens Nyberg <jens.nyberg@gmail.com>
|
||||||
|
© 2013 Carlos J. Torres <vlaadbrain@gmail.com>
|
||||||
|
© 2013 Alexander Sedov <alex0player@gmail.com>
|
||||||
|
© 2013 Nick White <git@njw.me.uk>
|
||||||
|
© 2013 David Dufberg <david@dufberg.se>
|
||||||
|
© 2014-2017 Quentin Rameau <quinq@fifth.space>
|
||||||
|
© 2014-2016 Markus Teich <markus.teich@stusta.mhn.de>
|
||||||
|
© 2015 Jakukyo Friel <weakish@gmail.com>
|
||||||
|
© 2015 Ben Woolley <tautolog@gmail.com>
|
||||||
|
© 2015 Greg Reagle <greg.reagle@umbc.edu>
|
||||||
|
© 2015 GhostAV <ghostav@riseup.net>
|
||||||
|
© 2015 Ivan Tham <pickfire@riseup.net>
|
||||||
|
© 2015 Alexander Huemer <alexander.huemer@xx.vu>
|
||||||
|
© 2015 Michael Stevens <mstevens@etla.org>
|
||||||
|
© 2015 Felix Janda <felix.janda@posteo.de>
|
||||||
|
© 2016 Charles Lehner <cel@celehner.com>
|
||||||
|
© 2016 Dmitry Bogatov <KAction@gnu.org>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
|||||||
@@ -3,39 +3,46 @@
|
|||||||
* by 20h
|
* by 20h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ARG_H__
|
#ifndef ARG_H__
|
||||||
#define __ARG_H__
|
#define ARG_H__
|
||||||
|
|
||||||
extern char *argv0;
|
extern char *argv0;
|
||||||
|
|
||||||
#define USED(x) ((void)(x))
|
/* use main(int argc, char *argv[]) */
|
||||||
|
|
||||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||||
argv[0] && argv[0][1]\
|
argv[0] && argv[0][0] == '-'\
|
||||||
&& argv[0][0] == '-';\
|
&& argv[0][1];\
|
||||||
argc--, argv++) {\
|
argc--, argv++) {\
|
||||||
char _argc;\
|
char argc_;\
|
||||||
char **_argv;\
|
char **argv_;\
|
||||||
|
int brk_;\
|
||||||
if (argv[0][1] == '-' && argv[0][2] == '\0') {\
|
if (argv[0][1] == '-' && argv[0][2] == '\0') {\
|
||||||
argv++;\
|
argv++;\
|
||||||
argc--;\
|
argc--;\
|
||||||
break;\
|
break;\
|
||||||
}\
|
}\
|
||||||
for (argv[0]++, _argv = argv; argv[0][0];\
|
for (brk_ = 0, argv[0]++, argv_ = argv;\
|
||||||
|
argv[0][0] && !brk_;\
|
||||||
argv[0]++) {\
|
argv[0]++) {\
|
||||||
if (_argv != argv)\
|
if (argv_ != argv)\
|
||||||
break;\
|
break;\
|
||||||
_argc = argv[0][0];\
|
argc_ = argv[0][0];\
|
||||||
switch (_argc)
|
switch (argc_)
|
||||||
|
|
||||||
#define ARGEND }\
|
#define ARGEND }\
|
||||||
USED(_argc);\
|
}
|
||||||
}\
|
|
||||||
USED(argv);\
|
|
||||||
USED(argc);
|
|
||||||
|
|
||||||
#define EARGF(x) ((argv[1] == NULL)? ((x), abort(), (char *)0) :\
|
#define ARGC() argc_
|
||||||
(argc--, argv++, argv[0]))
|
|
||||||
|
#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||||
|
((x), abort(), (char *)0) :\
|
||||||
|
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||||
|
(&argv[0][1]) :\
|
||||||
|
(argc--, argv++, argv[0])))
|
||||||
|
|
||||||
|
#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||||
|
(char *)0 :\
|
||||||
|
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||||
|
(&argv[0][1]) :\
|
||||||
|
(argc--, argv++, argv[0])))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+114
-89
@@ -1,58 +1,68 @@
|
|||||||
/* modifier 0 means no modifier */
|
/* modifier 0 means no modifier */
|
||||||
static char *useragent = "Mozilla/5.0 (X11; U; Unix; en-US) "
|
static int surfuseragent = 1; /* Append Surf version to default WebKit user agent */
|
||||||
"AppleWebKit/537.15 (KHTML, like Gecko) "
|
static char *fulluseragent = ""; /* Or override the whole user agent string */
|
||||||
"Chrome/24.0.1295.0 Safari/537.15 Surf/"VERSION;
|
|
||||||
static char *scriptfile = "~/.surf/script.js";
|
static char *scriptfile = "~/.surf/script.js";
|
||||||
static char *styledir = "~/.surf/styles/";
|
static char *styledir = "~/.surf/styles/";
|
||||||
static char *cachefolder = "~/.surf/cache/";
|
static char *cachedir = "~/.surf/cache/";
|
||||||
|
|
||||||
static Bool kioskmode = FALSE; /* Ignore shortcuts */
|
|
||||||
static Bool showindicators = TRUE; /* Show indicators in window title */
|
|
||||||
static Bool zoomto96dpi = TRUE; /* Zoom pages to always emulate 96dpi */
|
|
||||||
static Bool runinfullscreen = FALSE; /* Run in fullscreen mode by default */
|
|
||||||
|
|
||||||
static guint defaultfontsize = 12; /* Default font size */
|
|
||||||
static gfloat zoomlevel = 1.0; /* Default zoom level */
|
|
||||||
|
|
||||||
/* Soup default features */
|
|
||||||
static char *cookiefile = "~/.surf/cookies.txt";
|
static char *cookiefile = "~/.surf/cookies.txt";
|
||||||
static char *cookiepolicies = "Aa@"; /* A: accept all; a: accept nothing,
|
|
||||||
* @: accept no third party */
|
|
||||||
static char *cafile = "/etc/ssl/certs/ca-certificates.crt";
|
|
||||||
static Bool strictssl = FALSE; /* Refuse untrusted SSL connections */
|
|
||||||
static time_t sessiontime = 3600;
|
|
||||||
|
|
||||||
/* Webkit default features */
|
/* Webkit default features */
|
||||||
static Bool enablescrollbars = TRUE;
|
static Parameter defconfig[ParameterLast] = {
|
||||||
static Bool enablespatialbrowsing = TRUE;
|
SETB(AcceleratedCanvas, 1),
|
||||||
static Bool enablediskcache = TRUE;
|
SETB(CaretBrowsing, 0),
|
||||||
static int diskcachebytes = 5 * 1024 * 1024;
|
SETV(CookiePolicies, "@Aa"),
|
||||||
static Bool enableplugins = TRUE;
|
SETB(DiskCache, 1),
|
||||||
static Bool enablescripts = TRUE;
|
SETB(DNSPrefetch, 0),
|
||||||
static Bool enableinspector = TRUE;
|
SETI(FontSize, 12),
|
||||||
static Bool enablestyle = TRUE;
|
SETB(FrameFlattening, 0),
|
||||||
static Bool loadimages = TRUE;
|
SETB(Geolocation, 0),
|
||||||
static Bool hidebackground = FALSE;
|
SETB(HideBackground, 0),
|
||||||
static Bool allowgeolocation = TRUE;
|
SETB(Inspector, 0),
|
||||||
|
SETB(JavaScript, 1),
|
||||||
|
SETB(KioskMode, 0),
|
||||||
|
SETB(LoadImages, 1),
|
||||||
|
SETB(MediaManualPlay, 0),
|
||||||
|
SETB(Plugins, 1),
|
||||||
|
SETV(PreferredLanguages, ((char *[]){ NULL })),
|
||||||
|
SETB(RunInFullscreen, 0),
|
||||||
|
SETB(ScrollBars, 1),
|
||||||
|
SETB(ShowIndicators, 1),
|
||||||
|
SETB(SiteQuirks, 1),
|
||||||
|
SETB(SpellChecking, 0),
|
||||||
|
SETV(SpellLanguages, ((char *[]){ "en_US", NULL })),
|
||||||
|
SETB(StrictSSL, 0),
|
||||||
|
SETB(Style, 1),
|
||||||
|
SETF(ZoomLevel, 1.0),
|
||||||
|
};
|
||||||
|
|
||||||
|
static UriParameters uriparams[] = {
|
||||||
|
{ "(://|\\.)suckless\\.org(/|$)", {
|
||||||
|
FSETB(JavaScript, 0),
|
||||||
|
FSETB(Plugins, 0),
|
||||||
|
}, },
|
||||||
|
};
|
||||||
|
|
||||||
|
static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
|
||||||
|
WEBKIT_FIND_OPTIONS_WRAP_AROUND;
|
||||||
|
|
||||||
#define SETPROP(p, q) { \
|
#define SETPROP(p, q) { \
|
||||||
.v = (char *[]){ "/bin/sh", "-c", \
|
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||||
"prop=\"`xprop -id $2 $0 " \
|
"prop=\"`xprop -id $2 $0 " \
|
||||||
"| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \
|
"| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \
|
||||||
"| xargs -0 printf %b | dmenu`\" &&" \
|
"| xargs -0 printf %b | dmenu`\" &&" \
|
||||||
"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
|
"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
|
||||||
p, q, winid, NULL \
|
p, q, winid, NULL \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DOWNLOAD(URI, referer) */
|
/* DOWNLOAD(URI, referer) */
|
||||||
#define DOWNLOAD(d, r) { \
|
#define DOWNLOAD(d, r) { \
|
||||||
.v = (char *[]){ "/bin/sh", "-c", \
|
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||||
"st -e /bin/sh -c \"curl -L -J -O --user-agent '$1'" \
|
"st -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \
|
||||||
" --referer '$2' -b $3 -c $3 '$0';" \
|
" --referer '$2' -b $3 -c $3 '$0';" \
|
||||||
" sleep 5;\"", \
|
" sleep 5;\"", \
|
||||||
d, useragent, r, cookiefile, NULL \
|
d, useragent, r, cookiefile, NULL \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PLUMB(URI) */
|
/* PLUMB(URI) */
|
||||||
@@ -60,9 +70,16 @@ static Bool allowgeolocation = TRUE;
|
|||||||
* "http://" or "https://" should be opened.
|
* "http://" or "https://" should be opened.
|
||||||
*/
|
*/
|
||||||
#define PLUMB(u) {\
|
#define PLUMB(u) {\
|
||||||
.v = (char *[]){ "/bin/sh", "-c", \
|
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||||
"xdg-open \"$0\"", u, NULL \
|
"xdg-open \"$0\"", u, NULL \
|
||||||
} \
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* VIDEOPLAY(URI) */
|
||||||
|
#define VIDEOPLAY(u) {\
|
||||||
|
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||||
|
"mpv --really-quiet \"$0\"", u, NULL \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* styles */
|
/* styles */
|
||||||
@@ -83,59 +100,67 @@ static SiteStyle styles[] = {
|
|||||||
* edit the CLEANMASK() macro.
|
* edit the CLEANMASK() macro.
|
||||||
*/
|
*/
|
||||||
static Key keys[] = {
|
static Key keys[] = {
|
||||||
/* modifier keyval function arg Focus */
|
/* modifier keyval function arg */
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_r, reload, { .b = TRUE } },
|
{ MODKEY, GDK_KEY_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
|
||||||
{ MODKEY, GDK_r, reload, { .b = FALSE } },
|
{ MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_p, print, { 0 } },
|
{ MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||||||
|
|
||||||
{ MODKEY, GDK_p, clipboard, { .b = TRUE } },
|
{ 0, GDK_KEY_Escape, stop, { 0 } },
|
||||||
{ MODKEY, GDK_y, clipboard, { .b = FALSE } },
|
{ MODKEY, GDK_KEY_c, stop, { 0 } },
|
||||||
|
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_j, zoom, { .i = -1 } },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_r, reload, { .b = 1 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_k, zoom, { .i = +1 } },
|
{ MODKEY, GDK_KEY_r, reload, { .b = 0 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_q, zoom, { .i = 0 } },
|
|
||||||
{ MODKEY, GDK_minus, zoom, { .i = -1 } },
|
|
||||||
{ MODKEY, GDK_plus, zoom, { .i = +1 } },
|
|
||||||
|
|
||||||
{ MODKEY, GDK_l, navigate, { .i = +1 } },
|
{ MODKEY, GDK_KEY_l, navigate, { .i = +1 } },
|
||||||
{ MODKEY, GDK_h, navigate, { .i = -1 } },
|
{ MODKEY, GDK_KEY_h, navigate, { .i = -1 } },
|
||||||
|
|
||||||
{ MODKEY, GDK_j, scroll_v, { .i = +1 } },
|
/* Currently we have to use scrolling steps that WebKit2GTK+ gives us
|
||||||
{ MODKEY, GDK_k, scroll_v, { .i = -1 } },
|
* d: step down, u: step up, r: step right, l:step left
|
||||||
{ MODKEY, GDK_b, scroll_v, { .i = -10000 } },
|
* D: page down, U: page up */
|
||||||
{ MODKEY, GDK_space, scroll_v, { .i = +10000 } },
|
{ MODKEY, GDK_KEY_j, scroll, { .i = 'd' } },
|
||||||
{ MODKEY, GDK_i, scroll_h, { .i = +1 } },
|
{ MODKEY, GDK_KEY_k, scroll, { .i = 'u' } },
|
||||||
{ MODKEY, GDK_u, scroll_h, { .i = -1 } },
|
{ MODKEY, GDK_KEY_b, scroll, { .i = 'U' } },
|
||||||
|
{ MODKEY, GDK_KEY_space, scroll, { .i = 'D' } },
|
||||||
|
{ MODKEY, GDK_KEY_i, scroll, { .i = 'r' } },
|
||||||
|
{ MODKEY, GDK_KEY_u, scroll, { .i = 'l' } },
|
||||||
|
|
||||||
{ 0, GDK_F11, fullscreen, { 0 } },
|
|
||||||
{ 0, GDK_Escape, stop, { 0 } },
|
|
||||||
{ MODKEY, GDK_o, source, { 0 } },
|
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_o, inspector, { 0 } },
|
|
||||||
|
|
||||||
{ MODKEY, GDK_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_j, zoom, { .i = -1 } },
|
||||||
{ MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_k, zoom, { .i = +1 } },
|
||||||
{ MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_q, zoom, { .i = 0 } },
|
||||||
|
{ MODKEY, GDK_KEY_minus, zoom, { .i = -1 } },
|
||||||
|
{ MODKEY, GDK_KEY_plus, zoom, { .i = +1 } },
|
||||||
|
|
||||||
{ MODKEY, GDK_n, find, { .b = TRUE } },
|
{ MODKEY, GDK_KEY_p, clipboard, { .b = 1 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_n, find, { .b = FALSE } },
|
{ MODKEY, GDK_KEY_y, clipboard, { .b = 0 } },
|
||||||
|
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_c, toggle, { .v = "enable-caret-browsing" } },
|
{ MODKEY, GDK_KEY_n, find, { .i = +1 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_i, toggle, { .v = "auto-load-images" } },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_n, find, { .i = -1 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_s, toggle, { .v = "enable-scripts" } },
|
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_v, toggle, { .v = "enable-plugins" } },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_p, print, { 0 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_a, togglecookiepolicy, { 0 } },
|
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_m, togglestyle, { 0 } },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_a, togglecookiepolicy, { 0 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_b, togglescrollbars, { 0 } },
|
{ 0, GDK_KEY_F11, togglefullscreen, { 0 } },
|
||||||
{ MODKEY|GDK_SHIFT_MASK,GDK_g, togglegeolocation, { 0 } },
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_o, toggleinspector, { 0 } },
|
||||||
|
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_c, toggle, { .i = CaretBrowsing } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_f, toggle, { .i = FrameFlattening } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_g, toggle, { .i = Geolocation } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_s, toggle, { .i = JavaScript } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_i, toggle, { .i = LoadImages } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_v, toggle, { .i = Plugins } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_b, toggle, { .i = ScrollBars } },
|
||||||
|
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_m, toggle, { .i = Style } },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
/* click can be ClkDoc, ClkLink, ClkImg, ClkMedia, ClkSel, ClkEdit, ClkAny */
|
/* target can be OnDoc, OnLink, OnImg, OnMedia, OnEdit, OnBar, OnSel, OnAny */
|
||||||
static Button buttons[] = {
|
static Button buttons[] = {
|
||||||
/* click event mask button function argument */
|
/* target event mask button function argument stop event */
|
||||||
{ ClkLink, 0, 2, linkopenembed, { 0 } },
|
{ OnLink, 0, 2, clicknewwindow, { .b = 0 }, 1 },
|
||||||
{ ClkLink, MODKEY, 2, linkopen, { 0 } },
|
{ OnLink, MODKEY, 2, clicknewwindow, { .b = 1 }, 1 },
|
||||||
{ ClkLink, MODKEY, 1, linkopen, { 0 } },
|
{ OnLink, MODKEY, 1, clicknewwindow, { .b = 1 }, 1 },
|
||||||
{ ClkAny, 0, 8, navigate, { .i = -1 } },
|
{ OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
|
||||||
{ ClkAny, 0, 9, navigate, { .i = +1 } },
|
{ OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
|
||||||
|
{ OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 },
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,26 +1,27 @@
|
|||||||
# surf version
|
# surf version
|
||||||
VERSION = 0.6
|
VERSION = 2.0
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
|
LIBPREFIX = ${PREFIX}/lib/surf
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
X11INC = /usr/X11R6/include
|
||||||
X11LIB = /usr/X11R6/lib
|
X11LIB = /usr/X11R6/lib
|
||||||
|
|
||||||
GTKINC = `pkg-config --cflags gtk+-2.0 webkit-1.0`
|
GTKINC = `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0`
|
||||||
GTKLIB = `pkg-config --libs gtk+-2.0 webkit-1.0`
|
GTKLIB = `pkg-config --libs gtk+-3.0 webkit2gtk-4.0`
|
||||||
|
|
||||||
# includes and libs
|
# includes and libs
|
||||||
INCS = -I. -I/usr/include -I${X11INC} ${GTKINC}
|
INCS = -I. -I/usr/include -I${X11INC} ${GTKINC}
|
||||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0
|
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0
|
||||||
|
|
||||||
# flags
|
# flags
|
||||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
|
CPPFLAGS = -DVERSION=\"${VERSION}\" -DWEBEXTDIR=\"${LIBPREFIX}\" -D_DEFAULT_SOURCE
|
||||||
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
|
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
|
||||||
LDFLAGS = -g ${LIBS}
|
LDFLAGS = -s ${LIBS}
|
||||||
|
|
||||||
# Solaris
|
# Solaris
|
||||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ page.
|
|||||||
Toggle fullscreen mode.
|
Toggle fullscreen mode.
|
||||||
.SH INDICATORS OF OPERATION
|
.SH INDICATORS OF OPERATION
|
||||||
Surf is showing indicators of operation in front of the site title.
|
Surf is showing indicators of operation in front of the site title.
|
||||||
For all indicators, unless otherwsie specified, a lower case letter means disabled and an upper case letter means enabled.
|
For all indicators, unless otherwise specified, a lower case letter means disabled and an upper case letter means enabled.
|
||||||
.TP
|
.TP
|
||||||
.B A
|
.B A
|
||||||
all cookies accepted
|
all cookies accepted
|
||||||
|
|||||||
Reference in New Issue
Block a user