Commit Graph

528 Commits

Author SHA1 Message Date
Quentin Rameau b8b0c05035 Embed dmenu into the surf window by default 2017-05-08 11:33:59 +02:00
Quentin Rameau dca4264863 Simplify DOWNLOAD macro
No need to spawn an extra sh.
Use short flags for curl and quote operands.
Replace sleep with read, let the user close the download window instead
of waiting for an arbitrary time.
Rename d to reflect what it's used for.
Reorder sh positional arguments.
Set $0 to a command name and shift other positional parameters to
clarify the "sh -c" command.
2017-05-08 11:33:55 +02:00
Quentin Rameau 654d527f87 Simplify SETPROP macro
Get rid of xargs by using a subshell instead.
Use two replacement commands in sed because back-references in BRE are
too differently implemented in different libc.
Rename p, q, to reflect what they're used for.
Reorder sh positional arguments.
Set $0 to a command name and shift other positional parameters to
clarify the "sh -c" command.
2017-05-08 11:30:20 +02:00
Quentin Rameau d984d12de7 Simplify usage()
There's no real need for using the real executable call name, especially
with basename requiring special care.
2017-05-04 10:29:02 +02:00
Quentin Rameau 2901145301 Simplify version message 2017-05-04 10:27:07 +02:00
Ivan Tham e23d5c1c45 Use Ctrl-t for showcert instead of Ctrl-x 2017-05-02 17:20:11 +02:00
Quentin Rameau 5936806949 Cleanup and fix formatage issues in surf.1 2017-05-01 01:09:52 +02:00
Quentin Rameau 0df9f79d95 Fix forgotten options in surf.1 2017-05-01 01:08:27 +02:00
Hiltjo Posthuma edddfbc14a setcert: check uri before adding a certificate
Also directly check for https scheme, we won't need a certificate for
others.
2017-04-30 11:39:15 +02:00
Hiltjo Posthuma 21d81a71cc fix mini typo 2017-04-30 00:10:11 +02:00
Hiltjo Posthuma b466bb5bbd surf.1: remove trailing spaces 2017-04-30 00:09:07 +02:00
Quentin Rameau cc887cf2ab Add forgotten tT indicator description in surf.1 2017-04-29 17:59:09 +02:00
Quentin Rameau 0326e42bb3 Add forgotten fF indicator description in surf.1 2017-04-29 17:59:08 +02:00
Quentin Rameau d66904675d Add a flag for custom certificates
I don't think a keybinding would be useful here because we can't
remove a custom certificate which is alread set anyway.
I'll add it if somebody convince me of it's usefulness.
2017-04-29 17:59:08 +02:00
Quentin Rameau 7823ab6fc0 Move xid printing option from -x to -w 2017-04-29 17:59:08 +02:00
Quentin Rameau 9eda6f5dd5 Add a keybinding to show current TLS certificate 2017-04-29 17:59:07 +02:00
Quentin Rameau 1dc3cd513a Display an error message and certificate on tls error 2017-04-29 16:34:48 +02:00
Quentin Rameau c870098b82 Arrange Makefile
Let the user specify his own C and LD FLAGS.
Remove unuseful and non portable CFLAGS like pendantic and Wall.
2017-04-29 16:34:47 +02:00
Quentin Rameau db7922f173 Free temporary certificate in setcert 2017-04-29 14:34:02 +02:00
Quentin Rameau 0d1e670ac3 Do not build SiteSpecific file when regex is invalid 2017-04-28 13:09:39 +02:00
Quentin Rameau 3c2c0a6525 Add support for using custom certificates per url 2017-04-28 12:58:36 +02:00
Quentin Rameau eb32dd6eca Avoid using global name stylefile in setstyle() 2017-04-27 15:41:16 +02:00
Quentin Rameau d0e3c69e59 Change site styles structure for a more generic one 2017-04-27 15:02:40 +02:00
Quentin Rameau 5c52733984 Fix 27cec48 Add a flag/keybinding for strict TLS
Forgot to add changes in main(), usage() and newwindow() too.
2017-04-23 18:31:32 +02:00
Quentin Rameau 2940d2bd07 Fix a981959 Move -t stylefile flag to -C stylefile
Forgot to modify usage() and newwindow() too.
2017-04-23 18:28:06 +02:00
Quentin Rameau 4b752834d8 Fix possible oob access of cmd in newwindow()
Thanks to tarug0 for spotting this!
2017-04-23 18:27:43 +02:00
Quentin Rameau ac837f43b9 Bump year in program 2017-04-20 00:10:46 +02:00
Quentin Rameau 27cec48408 Add a flag and toggle keybinding for strict TLS 2017-04-20 00:10:45 +02:00
Quentin Rameau a981959124 Move -t stylefile flag to -C stylefile 2017-04-20 00:09:01 +02:00
Quentin Rameau ee854bb095 Rename SSL instances to TLS 2017-04-19 17:45:20 +02:00
Quentin Rameau 0247e91b00 Set strict ssl by default and handle insecure content
Non-https content in https pages is now handled separately from https
connection establishment.
2017-04-19 17:41:23 +02:00
Quentin Rameau 2355c20e92 Add a configure option for default window size 2017-04-19 19:10:21 +02:00
Quentin Rameau b814567e2b Bump version to 2.0
We're using the new scheme: 2.x is for webkit2
2017-03-28 18:17:45 +02:00
Quentin Rameau 0cb1597801 Add contributors to the LICENSE 2017-03-28 18:17:03 +02:00
Quentin Rameau 7e02344a61 Install Atoms before initializing gtk
There a race condition in gtkplug/socket which is raised when setting
Atoms.
Use this workaround until
https://bugzilla.gnome.org/show_bug.cgi?id=778680 is fixed.
2017-03-22 17:20:36 +01:00
Michael Stevens 1abb2ebe7a Fix spelling of otherwise in surf.1
Add more spelling to surf.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2017-03-22 17:01:36 +01:00
Quentin Rameau 37e43501d8 Fix font-size setting parameter value type in newview 2017-03-06 11:00:04 +01:00
Quentin Rameau da5290a41a Add support for loading Webkit extensions 2016-09-22 10:21:31 +02:00
Charles Lehner c64c368d86 Reload on SIGHUP
ratiueratuie rstiure tiurest aruite rautie rautier tiue rtaruit ratiuera
This patch makes surf reload its pages when it receives a SIGHUP signal.
This makes it easier for shell scripts to trigger surf to reload.

I'm aware of using xdotool to trigger ctrl+r keypresses for reloading
but I wasn't able to get that to work in a general way. [1]

I'm sending this here in case surf maintainers and users would like to
include this in core - if not I will submit it to the wiki.

Regards,
Charles

[1] http://surf.suckless.org/files/autorefresh

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-08 15:02:42 +02:00
Quentin Rameau 4c41d363b7 Add a few configuration options
“enable-accelerated-2d-canvas”
“media-playback-requires-user-gesture”
“enable-site-specific-quirks”

Lookup those at
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html
2016-07-05 17:32:44 +02:00
Quentin Rameau 5a02d3e500 Fix GdkDisplay assignment in setup()
Init GTK before trying to get the default display.
2016-07-05 13:35:44 +02:00
Quentin Rameau f9714ab838 Get rid of getkbdevice
The GTK guys nicely took in account our request and pushed in a
convenience function to get default keyboard device.
2016-07-05 13:01:56 +02:00
Christoph Lohmann 8682a4dffb Fixing the last patch to the surf style. 2016-07-05 13:01:56 +02:00
Dmitry Bogatov cee8f0186c Check $HOME and home dir of $USER before getpwuid()->pw_dir
getpwnam(3) recommends to use $HOME instead of getpwuid()->pw_dir,
as it allows users to point programs to a different path.

Using getpwuid() also breaks namespaces-related use cases,
like `unshare -r`.

Patch was submitted by Dmitry Bogatov on the Debian bug tracker:
https://bugs.debian.org/825397

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-05 13:01:56 +02:00
Quentin Rameau 3530d18d8e Fix url parsing in load() 2016-07-05 13:01:56 +02:00
Quentin Rameau 7ca9421a69 Apply domain parameters each time url is changed
Urls are only changed at load (initial requested one), or while
redirected. When the page is committed, url is already final.
2016-07-05 13:01:56 +02:00
Quentin Rameau 1206b2c587 Fix inspector toggling
Always get the inspector object, and let the user eventually close it
even if it's disabled for the current page.
2016-07-05 13:01:56 +02:00
Quentin Rameau c8fdd4d583 Rectify how parameters are handled in setparameter()
Access parameters through given Arg parameter instead of accessing
global parameters.
2016-07-05 13:01:56 +02:00
Quentin Rameau 6e019362c5 Fix parameter initialization and assignment 2016-07-05 13:01:56 +02:00
Quentin Rameau 75e3fe5b95 Adapting the whole surf structure to new settings 2016-07-05 13:01:56 +02:00