Compare 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 | ||
|
|
9b1e1873b0 | ||
|
|
5333171961 | ||
|
|
2223e9ed22 | ||
|
|
1ebb5c624e | ||
|
|
9a2547230a | ||
|
|
0290066b31 | ||
|
|
d84fe71094 | ||
|
|
d486169fa4 | ||
|
|
c65c8d422b | ||
|
|
9f5c6ff8d7 | ||
|
|
c2bb8d0325 | ||
|
|
6a65dcb394 | ||
|
|
c81fbbaf43 | ||
|
|
8a898ec4df | ||
|
|
1554354f16 | ||
|
|
3c2acda0b7 | ||
|
|
8e88984a40 | ||
|
|
294142a806 | ||
|
|
957a6f0812 | ||
|
|
9b6998e7ae | ||
|
|
b4ca032b8c | ||
|
|
29c2ab207a | ||
|
|
f7e358280c | ||
|
|
b3a4392923 | ||
|
|
b1c5e594d1 | ||
|
|
e573e094d6 | ||
|
|
ee6376ea1e | ||
|
|
90de5cdd15 | ||
|
|
344efec3fb | ||
|
|
d4e31d9472 | ||
|
|
68813b3a46 | ||
|
|
87224dcdfa | ||
|
|
d511226ea6 | ||
|
|
b36921fbe8 | ||
|
|
9c3b5ad353 | ||
|
|
7c34d5061e | ||
|
|
9333d5d727 | ||
|
|
e7d1c09916 | ||
|
|
117d484833 | ||
|
|
24ec46fc24 | ||
|
|
a5b85836ac | ||
|
|
c2da2bae5d | ||
|
|
c467e5a3b3 | ||
|
|
3e89b4451c | ||
|
|
dd705d43eb | ||
|
|
531f71f851 | ||
|
|
d5b04aac60 | ||
|
|
bb287fa2e8 | ||
|
|
285cc3843f | ||
|
|
ea9d60c5c0 | ||
|
|
f8f0c30f3e | ||
|
|
a8267f7b95 | ||
|
|
618c3dfd52 | ||
|
|
3cc5f87db8 | ||
|
|
637902b452 | ||
|
|
127dc366ef | ||
|
|
361da0b3c4 | ||
|
|
b7435badc2 | ||
|
|
4b623bd28a | ||
|
|
7ad886fb0b | ||
|
|
fa9b187393 | ||
|
|
780cca964c | ||
|
|
e4869357f1 | ||
|
|
a78aec6630 | ||
|
|
9eedabe348 | ||
|
|
432f45a852 | ||
|
|
7e9a37f25f | ||
|
|
83df29393f | ||
|
|
f3d97922e9 | ||
|
|
237e10058a | ||
|
|
058f7f45e2 | ||
|
|
7001df98d1 | ||
|
|
2e978627dd | ||
|
|
0b44a5948e | ||
|
|
c234737bea | ||
|
|
4f45ae9307 | ||
|
|
ffaf10bd8f | ||
|
|
067c313e6c | ||
|
|
d0309a1a22 | ||
|
|
083ea8ecde | ||
|
|
a383964c95 | ||
|
|
e0e4a844f7 | ||
|
|
f6dc8b2541 | ||
|
|
12101938d8 | ||
|
|
bccfe2a9a5 | ||
|
|
dcb4f81ad2 | ||
|
|
a69c41ccac | ||
|
|
d02f73d990 | ||
|
|
a5dddd8fd3 | ||
|
|
c6fbbd9dc6 | ||
|
|
badb84387e | ||
|
|
fe3bd631d4 | ||
|
|
69004b2ff6 | ||
|
|
bd5bbb7fc3 | ||
|
|
3e972f8e2a | ||
|
|
053a8f1a73 | ||
|
|
ba634ea8e3 | ||
|
|
24f0f83197 | ||
|
|
3c1ed5d56a | ||
|
|
27dac4a157 |
No files matched your search
@@ -1,10 +0,0 @@
|
||||
d8628fc93353faa411c9fc7eef82d11a84d26ae2 0.1
|
||||
d8628fc93353faa411c9fc7eef82d11a84d26ae2 0.1
|
||||
9c8ebcf54061112b5979742b403de26fc94007ff 0.1
|
||||
3ef997607115303fe93873b592d152f0ec186f77 0.1.1
|
||||
bffb0c3c23410ac7f260d167f4b9771497fc1127 0.1.2
|
||||
a5db79d487c85615be2ecf30815c6b4977e88000 0.2
|
||||
46d516fd216731adf91740496e6823c1be4f6199 0.3
|
||||
ac8e058003ed2c0974529808752e5da7692fd7d8 0.4
|
||||
71388899ac09d21e6c93518cc57a28395034f63c 0.4.1
|
||||
f0cea0f2bfc6a32a0e352b6c69d781f1dbddbcda 0.5
|
||||
@@ -0,0 +1,10 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## Surf is starting up slowly. What might happen?
|
||||
|
||||
The first suspect for such a behaviour is the plugin handling. Run surf
|
||||
on the commandline and see if there are errors because of »nspluginwrap‐
|
||||
per« or failed RPCs to them. If that is true, go to ~/.mozilla/plugins
|
||||
and try removing stale links to plugins not on your system anymore. This
|
||||
will stop surf from trying to load them.
|
||||
|
||||
@@ -1,8 +1,32 @@
|
||||
MIT/X Consortium License
|
||||
|
||||
© 2011-2012 Troels Henriksen <athas@sigkill.at>
|
||||
© 2009-2011 Enno Boland <g s01 de>
|
||||
© 2012 Christoph Lohmann <20h@r-36.net>
|
||||
© 2009-2010 Enno Boland <tox@s01.de>
|
||||
© 2009 Thomas Menari <spaceinvader@chaotika.org>
|
||||
© 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
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -6,6 +6,7 @@ Requirements
|
||||
------------
|
||||
In order to build surf you need GTK+ and Webkit/GTK+ header files.
|
||||
|
||||
In order to use the functionality of the url-bar, also install dmenu[0].
|
||||
|
||||
Installation
|
||||
------------
|
||||
@@ -26,7 +27,7 @@ See the manpage for further options.
|
||||
|
||||
Running surf in tabbed
|
||||
----------------------
|
||||
For running surf in tabbed[0] there is a script included in the distribution,
|
||||
For running surf in tabbed[1] there is a script included in the distribution,
|
||||
which is run like this:
|
||||
|
||||
surf-open.sh [URI]
|
||||
@@ -34,5 +35,6 @@ which is run like this:
|
||||
Further invocations of the script will run surf with the specified URI in this
|
||||
instance of tabbed.
|
||||
|
||||
[0] http://tools.suckless.org/tabbed
|
||||
[0] http://tools.suckless.org/dmenu
|
||||
[1] http://tools.suckless.org/tabbed
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# TODO
|
||||
|
||||
* suckless adblocking
|
||||
* integrate the WebKitWebInspector API
|
||||
* make scrollbars a switch and allow them to be disabled
|
||||
* replace twitch() with proper gtk calls to make scrollbars reappear
|
||||
* replace webkit with something sane
|
||||
* add video player options
|
||||
* play in plugin
|
||||
|
||||
@@ -3,39 +3,46 @@
|
||||
* by 20h
|
||||
*/
|
||||
|
||||
#ifndef __ARG_H__
|
||||
#define __ARG_H__
|
||||
#ifndef ARG_H__
|
||||
#define ARG_H__
|
||||
|
||||
extern char *argv0;
|
||||
|
||||
#define USED(x) ((void)(x))
|
||||
|
||||
/* use main(int argc, char *argv[]) */
|
||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||
argv[0] && argv[0][1]\
|
||||
&& argv[0][0] == '-';\
|
||||
argv[0] && argv[0][0] == '-'\
|
||||
&& argv[0][1];\
|
||||
argc--, argv++) {\
|
||||
char _argc;\
|
||||
char **_argv;\
|
||||
char argc_;\
|
||||
char **argv_;\
|
||||
int brk_;\
|
||||
if (argv[0][1] == '-' && argv[0][2] == '\0') {\
|
||||
argv++;\
|
||||
argc--;\
|
||||
break;\
|
||||
}\
|
||||
for (argv[0]++, _argv = argv; argv[0][0];\
|
||||
for (brk_ = 0, argv[0]++, argv_ = argv;\
|
||||
argv[0][0] && !brk_;\
|
||||
argv[0]++) {\
|
||||
if (_argv != argv)\
|
||||
if (argv_ != argv)\
|
||||
break;\
|
||||
_argc = argv[0][0];\
|
||||
switch (_argc)
|
||||
|
||||
argc_ = argv[0][0];\
|
||||
switch (argc_)
|
||||
#define ARGEND }\
|
||||
USED(_argc);\
|
||||
}\
|
||||
USED(argv);\
|
||||
USED(argc);
|
||||
}
|
||||
|
||||
#define EARGF(x) ((argv[1] == NULL)? ((x), abort(), (char *)0) :\
|
||||
(argc--, argv++, argv[0]))
|
||||
#define ARGC() argc_
|
||||
|
||||
#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
|
||||
|
||||
+135
-64
@@ -1,48 +1,97 @@
|
||||
/* modifier 0 means no modifier */
|
||||
static char *useragent = "Mozilla/5.0 (X11; U; Unix; en-US) "
|
||||
"AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 "
|
||||
"Safari/537.15 Surf/"VERSION;
|
||||
static char *progress = "#0000FF";
|
||||
static char *progress_untrust = "#FF0000";
|
||||
static char *progress_trust = "#00FF00";
|
||||
static char *progress_proxy = "#FFFF00";
|
||||
static char *progress_proxy_trust = "#66FF00";
|
||||
static char *progress_proxy_untrust = "#FF6600";
|
||||
static char *stylefile = "~/.surf/style.css";
|
||||
static int surfuseragent = 1; /* Append Surf version to default WebKit user agent */
|
||||
static char *fulluseragent = ""; /* Or override the whole user agent string */
|
||||
static char *scriptfile = "~/.surf/script.js";
|
||||
static char *styledir = "~/.surf/styles/";
|
||||
static char *cachedir = "~/.surf/cache/";
|
||||
static char *cookiefile = "~/.surf/cookies.txt";
|
||||
static time_t sessiontime = 3600;
|
||||
static char *cafile = "/etc/ssl/certs/ca-certificates.crt";
|
||||
static char *strictssl = FALSE; /* Refuse untrusted SSL connections */
|
||||
static int indicator_thickness = 2;
|
||||
|
||||
/* Webkit default features */
|
||||
static Bool enablespatialbrowsing = TRUE;
|
||||
static Bool enableplugins = TRUE;
|
||||
static Bool enablescripts = TRUE;
|
||||
static Bool enableinspector = TRUE;
|
||||
static Bool loadimages = TRUE;
|
||||
static Bool hidebackground = FALSE;
|
||||
static Parameter defconfig[ParameterLast] = {
|
||||
SETB(AcceleratedCanvas, 1),
|
||||
SETB(CaretBrowsing, 0),
|
||||
SETV(CookiePolicies, "@Aa"),
|
||||
SETB(DiskCache, 1),
|
||||
SETB(DNSPrefetch, 0),
|
||||
SETI(FontSize, 12),
|
||||
SETB(FrameFlattening, 0),
|
||||
SETB(Geolocation, 0),
|
||||
SETB(HideBackground, 0),
|
||||
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) { \
|
||||
.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 \
|
||||
} \
|
||||
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||
"prop=\"`xprop -id $2 $0 " \
|
||||
"| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \
|
||||
"| xargs -0 printf %b | 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", \
|
||||
"st -e /bin/sh -c \"curl -J -O --user-agent '$1'" \
|
||||
" --referer '$2'" \
|
||||
" -b ~/.surf/cookies.txt -c ~/.surf/cookies.txt '$0';" \
|
||||
" sleep 5;\"", \
|
||||
d, useragent, r, NULL \
|
||||
} \
|
||||
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||
"st -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \
|
||||
" --referer '$2' -b $3 -c $3 '$0';" \
|
||||
" sleep 5;\"", \
|
||||
d, useragent, r, cookiefile, NULL \
|
||||
} \
|
||||
}
|
||||
|
||||
/* PLUMB(URI) */
|
||||
/* This called when some URI which does not begin with "about:",
|
||||
* "http://" or "https://" should be opened.
|
||||
*/
|
||||
#define PLUMB(u) {\
|
||||
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||
"xdg-open \"$0\"", u, NULL \
|
||||
} \
|
||||
}
|
||||
|
||||
/* VIDEOPLAY(URI) */
|
||||
#define VIDEOPLAY(u) {\
|
||||
.v = (const char *[]){ "/bin/sh", "-c", \
|
||||
"mpv --really-quiet \"$0\"", u, NULL \
|
||||
} \
|
||||
}
|
||||
|
||||
/* styles */
|
||||
/*
|
||||
* The iteration will stop at the first match, beginning at the beginning of
|
||||
* the list.
|
||||
*/
|
||||
static SiteStyle styles[] = {
|
||||
/* regexp file in $styledir */
|
||||
{ ".*", "default.css" },
|
||||
};
|
||||
|
||||
#define MODKEY GDK_CONTROL_MASK
|
||||
|
||||
/* hotkeys */
|
||||
@@ -51,45 +100,67 @@ static Bool hidebackground = FALSE;
|
||||
* edit the CLEANMASK() macro.
|
||||
*/
|
||||
static Key keys[] = {
|
||||
/* modifier keyval function arg Focus */
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_r, reload, { .b = TRUE } },
|
||||
{ MODKEY, GDK_r, reload, { .b = FALSE } },
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_p, print, { 0 } },
|
||||
/* modifier keyval function arg */
|
||||
{ MODKEY, GDK_KEY_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
|
||||
{ MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||||
{ MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||||
|
||||
{ MODKEY, GDK_p, clipboard, { .b = TRUE } },
|
||||
{ MODKEY, GDK_y, clipboard, { .b = FALSE } },
|
||||
{ 0, GDK_KEY_Escape, stop, { 0 } },
|
||||
{ MODKEY, GDK_KEY_c, stop, { 0 } },
|
||||
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_j, zoom, { .i = -1 } },
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_k, zoom, { .i = +1 } },
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_q, zoom, { .i = 0 } },
|
||||
{ MODKEY, GDK_minus, zoom, { .i = -1 } },
|
||||
{ MODKEY, GDK_plus, zoom, { .i = +1 } },
|
||||
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_r, reload, { .b = 1 } },
|
||||
{ MODKEY, GDK_KEY_r, reload, { .b = 0 } },
|
||||
|
||||
{ MODKEY, GDK_l, navigate, { .i = +1 } },
|
||||
{ MODKEY, GDK_h, navigate, { .i = -1 } },
|
||||
{ MODKEY, GDK_KEY_l, navigate, { .i = +1 } },
|
||||
{ MODKEY, GDK_KEY_h, navigate, { .i = -1 } },
|
||||
|
||||
{ MODKEY, GDK_j, scroll_v, { .i = +1 } },
|
||||
{ MODKEY, GDK_k, scroll_v, { .i = -1 } },
|
||||
{ MODKEY, GDK_b, scroll_v, { .i = -10000 } },
|
||||
{ MODKEY, GDK_space, scroll_v, { .i = +10000 } },
|
||||
{ MODKEY, GDK_i, scroll_h, { .i = +1 } },
|
||||
{ MODKEY, GDK_u, scroll_h, { .i = -1 } },
|
||||
/* Currently we have to use scrolling steps that WebKit2GTK+ gives us
|
||||
* d: step down, u: step up, r: step right, l:step left
|
||||
* D: page down, U: page up */
|
||||
{ MODKEY, GDK_KEY_j, scroll, { .i = 'd' } },
|
||||
{ MODKEY, GDK_KEY_k, scroll, { .i = 'u' } },
|
||||
{ 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_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||||
{ MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||||
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_j, zoom, { .i = -1 } },
|
||||
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_k, zoom, { .i = +1 } },
|
||||
{ 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_SHIFT_MASK,GDK_n, find, { .b = FALSE } },
|
||||
{ MODKEY, GDK_KEY_p, clipboard, { .b = 1 } },
|
||||
{ MODKEY, GDK_KEY_y, clipboard, { .b = 0 } },
|
||||
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_c, toggle, { .v = "enable-caret-browsing" } },
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_i, toggle, { .v = "auto-load-images" } },
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_s, toggle, { .v = "enable-scripts" } },
|
||||
{ MODKEY|GDK_SHIFT_MASK,GDK_v, toggle, { .v = "enable-plugins" } },
|
||||
{ MODKEY, GDK_KEY_n, find, { .i = +1 } },
|
||||
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_n, find, { .i = -1 } },
|
||||
|
||||
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_p, print, { 0 } },
|
||||
|
||||
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_a, togglecookiepolicy, { 0 } },
|
||||
{ 0, GDK_KEY_F11, togglefullscreen, { 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 */
|
||||
/* target can be OnDoc, OnLink, OnImg, OnMedia, OnEdit, OnBar, OnSel, OnAny */
|
||||
static Button buttons[] = {
|
||||
/* target event mask button function argument stop event */
|
||||
{ OnLink, 0, 2, clicknewwindow, { .b = 0 }, 1 },
|
||||
{ OnLink, MODKEY, 2, clicknewwindow, { .b = 1 }, 1 },
|
||||
{ OnLink, MODKEY, 1, clicknewwindow, { .b = 1 }, 1 },
|
||||
{ OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
|
||||
{ OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
|
||||
{ OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 },
|
||||
};
|
||||
@@ -1,26 +1,27 @@
|
||||
# surf version
|
||||
VERSION = 0.6
|
||||
VERSION = 2.0
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
LIBPREFIX = ${PREFIX}/lib/surf
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
GTKINC = `pkg-config --cflags gtk+-2.0 webkit-1.0`
|
||||
GTKLIB = `pkg-config --libs gtk+-2.0 webkit-1.0`
|
||||
GTKINC = `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0`
|
||||
GTKLIB = `pkg-config --libs gtk+-3.0 webkit2gtk-4.0`
|
||||
|
||||
# includes and libs
|
||||
INCS = -I. -I/usr/include -I${X11INC} ${GTKINC}
|
||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE
|
||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -DWEBEXTDIR=\"${LIBPREFIX}\" -D_DEFAULT_SOURCE
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
|
||||
LDFLAGS = -g ${LIBS}
|
||||
LDFLAGS = -s ${LIBS}
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
||||
|
||||
+2
-2
@@ -21,12 +21,12 @@ then
|
||||
runtabbed
|
||||
else
|
||||
xid=$(cat "$xidfile")
|
||||
xprop -id "$xid" 2>&1 >/dev/null
|
||||
xprop -id "$xid" >/dev/null 2>&1
|
||||
if [ $? -gt 0 ];
|
||||
then
|
||||
runtabbed
|
||||
else
|
||||
surf -e "$xid" "$uri" 2>&1 >/dev/null &
|
||||
surf -e "$xid" "$uri" >/dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
surf \- simple webkit-based browser
|
||||
.SH SYNOPSIS
|
||||
.B surf
|
||||
.RB [-ipnsvx]
|
||||
.RB [-bBdDfFgGiIkKmMnNpPsSvx]
|
||||
.RB [-a\ cookiepolicies]
|
||||
.RB [-c\ cookiefile]
|
||||
.RB [-e\ xid]
|
||||
.RB [-r\ scriptfile]
|
||||
.RB [-t\ stylefile]
|
||||
.RB [-u\ useragent]
|
||||
.RB [-z\ zoomlevel]
|
||||
.RB "URI"
|
||||
.SH DESCRIPTION
|
||||
surf is a simple Web browser based on WebKit/GTK+. It is able
|
||||
@@ -17,38 +19,111 @@ which makes it possible to embed it in another application. Furthermore,
|
||||
one can point surf to another URI by setting its XProperties.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-a cookiepolicies
|
||||
Define the order of
|
||||
.I cookie policies.
|
||||
The default is "Aa@" but could be
|
||||
redefined in the
|
||||
.I config.h,
|
||||
with "A" meaning to
|
||||
accept all cookies, "a" to deny all cookies and "@", which tells surf to
|
||||
accept no third party cookies.
|
||||
.TP
|
||||
.B \-b
|
||||
Disable Scrollbars
|
||||
.TP
|
||||
.B \-B
|
||||
Enable Scrollbars
|
||||
.TP
|
||||
.B \-c cookiefile
|
||||
Specify the cookiefile to use.
|
||||
Specify the
|
||||
.I cookiefile
|
||||
to use.
|
||||
.TP
|
||||
.B \-d
|
||||
Disable the disk cache.
|
||||
.TP
|
||||
.B \-D
|
||||
Enable the disk cache.
|
||||
.TP
|
||||
.B \-e xid
|
||||
Reparents to window specified by xid.
|
||||
Reparents to window specified by
|
||||
.I xid.
|
||||
.TP
|
||||
.B \-f
|
||||
Start surf in windowed mode (not fullscreen).
|
||||
.TP
|
||||
.B \-F
|
||||
Start surf in fullscreen mode.
|
||||
.TP
|
||||
.B \-g
|
||||
Disable giving the geolocation to websites.
|
||||
.TP
|
||||
.B \-G
|
||||
Enable giving the geolocation to websites.
|
||||
.TP
|
||||
.B \-i
|
||||
Disable Images
|
||||
.TP
|
||||
.B \-I
|
||||
Enable Images
|
||||
.TP
|
||||
.B \-k
|
||||
Disable kiosk mode (disable key strokes and right click)
|
||||
.TP
|
||||
.B \-K
|
||||
Enable kiosk mode (disable key strokes and right click)
|
||||
.TP
|
||||
.B \-m
|
||||
Disable application of user style sheets.
|
||||
.TP
|
||||
.B \-M
|
||||
Enable application of user style sheets.
|
||||
.TP
|
||||
.B \-n
|
||||
Disable the Web Inspector (Developer Tools).
|
||||
.TP
|
||||
.B \-N
|
||||
Enable the Web Inspector (Developer Tools).
|
||||
.TP
|
||||
.B \-p
|
||||
Disable Plugins
|
||||
.TP
|
||||
.B \-P
|
||||
Enable Plugins
|
||||
.TP
|
||||
.B \-r scriptfile
|
||||
Specify the user scriptfile.
|
||||
Specify the user
|
||||
.I scriptfile.
|
||||
.TP
|
||||
.B \-s
|
||||
Disable Javascript
|
||||
.TP
|
||||
.B \-S
|
||||
Enable Javascript
|
||||
.TP
|
||||
.B \-t stylefile
|
||||
Specify the user stylefile.
|
||||
Specify the user
|
||||
.I stylefile.
|
||||
This does disable the site-specific styles.
|
||||
.TP
|
||||
.B \-u useragent
|
||||
Specify the useragent which surf should use.
|
||||
Specify the
|
||||
.I useragent
|
||||
which surf should use.
|
||||
.TP
|
||||
.B \-v
|
||||
Prints version information to standard output, then exits.
|
||||
.TP
|
||||
.B \-x
|
||||
Prints xid to standard output. This can be used to script the browser by using
|
||||
Prints xid to standard output. This can be used to script the browser in for
|
||||
example
|
||||
.BR xdotool(1).
|
||||
.TP
|
||||
.B \-z zoomlevel
|
||||
Specify the
|
||||
.I zoomlevel
|
||||
which surf should use.
|
||||
.BR xprop(1).
|
||||
.SH USAGE
|
||||
.B Escape
|
||||
@@ -87,13 +162,7 @@ Zooms page out
|
||||
.B Ctrl\-Shift\-q
|
||||
Resets Zoom
|
||||
.TP
|
||||
.B Ctrl\-h
|
||||
Navigate back one step in history.
|
||||
.TP
|
||||
.B Ctrl\-l
|
||||
Navigate forward one step in history.
|
||||
.TP
|
||||
.B Ctrl\-f and Ctrl\-\\
|
||||
.B Ctrl\-f and Ctrl\-/
|
||||
Opens the search-bar.
|
||||
.TP
|
||||
.B Ctrl\-n
|
||||
@@ -103,14 +172,11 @@ Go to next search result.
|
||||
Go to previous search result.
|
||||
.TP
|
||||
.B Ctrl\-g
|
||||
Opens the URL-bar.
|
||||
Opens the URL-bar (requires dmenu installed).
|
||||
.TP
|
||||
.B Ctrl\-p
|
||||
Loads URI from primary selection.
|
||||
.TP
|
||||
.B Esc
|
||||
Stop loading the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-p
|
||||
Calls Printpage Dialog.
|
||||
.TP
|
||||
@@ -118,7 +184,7 @@ Calls Printpage Dialog.
|
||||
Reloads the website.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-r
|
||||
Reloads the website without using cache.
|
||||
Reloads the website without using the cache.
|
||||
.TP
|
||||
.B Ctrl\-y
|
||||
Copies current URI to primary selection.
|
||||
@@ -126,26 +192,94 @@ Copies current URI to primary selection.
|
||||
.B Ctrl\-o
|
||||
Show the sourcecode of the current page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-a
|
||||
Toggle through the the
|
||||
.I cookie policies.
|
||||
This will not reload the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-b
|
||||
Toggle scrollbars. This will reload the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-c
|
||||
Toggle caret browsing. This will reload the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-i
|
||||
Toggle auto-loading of images. This will reload the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-m
|
||||
Toggle if the
|
||||
.I stylefile
|
||||
file should be loaded. This will reload the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-o
|
||||
Open the Web Inspector (Developer Tools) window for the current page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-c
|
||||
Toggle caret browsing.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-i
|
||||
Toggle auto-loading of images.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-s
|
||||
Toggle script execution.
|
||||
Toggle script execution. This will reload the page.
|
||||
.TP
|
||||
.B Ctrl\-Shift\-v
|
||||
Toggle the enabling of plugins on that surf instance.
|
||||
Toggle the enabling of plugins on that surf instance. This will reload the
|
||||
page.
|
||||
.TP
|
||||
.B F11
|
||||
Toggle fullscreen mode.
|
||||
.SH INDICATORS OF OPERATION
|
||||
Surf is showing indicators of operation in front of the site title.
|
||||
For all indicators, unless otherwise specified, a lower case letter means disabled and an upper case letter means enabled.
|
||||
.TP
|
||||
.B A
|
||||
all cookies accepted
|
||||
.TP
|
||||
.B a
|
||||
no cookies accepted
|
||||
.TP
|
||||
.B @
|
||||
all except third-party cookies accepted
|
||||
.TP
|
||||
.B c C
|
||||
caret browsing
|
||||
.TP
|
||||
.B g G
|
||||
geolocation
|
||||
.TP
|
||||
.B d D
|
||||
disk cache
|
||||
.TP
|
||||
.B i I
|
||||
images
|
||||
.TP
|
||||
.B s S
|
||||
scripts
|
||||
.TP
|
||||
.B v V
|
||||
plugins
|
||||
.TP
|
||||
.B m M
|
||||
styles
|
||||
.SH INDICATORS OF WEB PAGE
|
||||
The second part of the indicators specifies modes of the web page itself.
|
||||
.SS First character: encryption
|
||||
.TP
|
||||
.B -
|
||||
unencrypted
|
||||
.TP
|
||||
.B T
|
||||
encrypted (SSL)
|
||||
.TP
|
||||
.B U
|
||||
attempted encryption but failed
|
||||
.SS Second character: proxying
|
||||
.TP
|
||||
.B -
|
||||
no proxy
|
||||
.TP
|
||||
.B P
|
||||
using proxy
|
||||
.SH ENVIRONMENT
|
||||
.B SURF_USERAGENT
|
||||
If this variable is set upon startup, surf will use it as the useragent string
|
||||
If this variable is set upon startup, surf will use it as the
|
||||
.I useragent
|
||||
string
|
||||
.TP
|
||||
.B http_proxy
|
||||
If this variable is set and not empty upon startup, surf will use it as the http proxy
|
||||
@@ -164,6 +298,7 @@ will help you.
|
||||
.BR dmenu(1),
|
||||
.BR xprop(1),
|
||||
.BR tabbed(1),
|
||||
.BR nspluginwrapper(1)
|
||||
.BR nspluginwrapper(1),
|
||||
.BR xdotool(1)
|
||||
.SH BUGS
|
||||
Please report them!
|
||||
Reference in new issue
Block a user