surf.git
6 years agoUse pkg-config for X11{INC,LIB}
Leonardo Taccari [Tue, 9 Oct 2018 19:30:52 +0000 (21:30 +0200)]
Use pkg-config for X11{INC,LIB}

6 years agoMakefile: fix dependencies
Quentin Rameau [Tue, 9 Oct 2018 10:26:32 +0000 (12:26 +0200)]
Makefile: fix dependencies

6 years agoFix, again, webext directory in Makefile
Quentin Rameau [Mon, 8 Oct 2018 12:23:51 +0000 (14:23 +0200)]
Fix, again, webext directory in Makefile

6 years agoFix webext directory in Makefile
Quentin Rameau [Mon, 8 Oct 2018 12:11:24 +0000 (14:11 +0200)]
Fix webext directory in Makefile

6 years agoRemove libtool depencency, reorganise Makefile
Quentin Rameau [Mon, 8 Oct 2018 11:47:25 +0000 (13:47 +0200)]
Remove libtool depencency, reorganise Makefile

We don't need libtool anymore, just build the library directly.
This lets us simplify the Makefile too.

6 years agoUnobfuscate Makefile
Quentin Rameau [Mon, 8 Oct 2018 10:34:47 +0000 (12:34 +0200)]
Unobfuscate Makefile

6 years agoext: get the right DOM on msg
Quentin Rameau [Mon, 12 Jun 2017 16:19:58 +0000 (18:19 +0200)]
ext: get the right DOM on msg

When navigating history, the document-loaded signal isn't triggered and
we can't directly get back the previous webview, so we have no other
choice than to look it up everytime a new message is received.

6 years agoAdd a file for shared functions
Quentin Rameau [Mon, 4 Jan 2016 15:09:12 +0000 (16:09 +0100)]
Add a file for shared functions

New common.[hc] files where shared functions between surf and
webkitextension will be put. First addition is die().

6 years agoCommunicate with webextension via a pipe
Quentin Rameau [Mon, 7 Dec 2015 14:50:00 +0000 (15:50 +0100)]
Communicate with webextension via a pipe

6 years agoext: first commit for surf lib
Quentin Rameau [Mon, 23 Nov 2015 21:12:00 +0000 (22:12 +0100)]
ext: first commit for surf lib

6 years agoRequest cookiemanager only once at creation
Quentin Rameau [Sun, 25 Mar 2018 10:07:41 +0000 (12:07 +0200)]
Request cookiemanager only once at creation

6 years agoExit more gracefully on web process crash.
Quentin Rameau [Fri, 16 Mar 2018 11:44:04 +0000 (12:44 +0100)]
Exit more gracefully on web process crash.

6 years agoAllow tilde expansion in loaduri
nzl [Wed, 14 Mar 2018 19:46:52 +0000 (03:46 +0800)]
Allow tilde expansion in loaduri

also fixed a bug that ~foo/ was expanded to /home/fo/o/

6 years agoFixed wording in FAQ.md
Eddie Thieda [Mon, 18 Jun 2018 10:13:16 +0000 (06:13 -0400)]
Fixed wording in FAQ.md

6 years agoForce printing the winid when requested
Quentin Rameau [Sat, 9 Jun 2018 19:53:04 +0000 (21:53 +0200)]
Force printing the winid when requested

Do not wait for the libc to decide flushing buffers, force it ourselves.

Thanks to koniu for reporting the issue.

6 years agoDocument SIGHUP in manpage
Jochen Sprickerhof [Thu, 16 Nov 2017 22:18:05 +0000 (23:18 +0100)]
Document SIGHUP in manpage

6 years agoScript text shouldn't go through formatted conversion
nzl [Wed, 21 Feb 2018 19:26:06 +0000 (03:26 +0800)]
Script text shouldn't go through formatted conversion

6 years agoAdd support for WebGL
Eon S. Jeon [Fri, 29 Sep 2017 15:34:35 +0000 (00:34 +0900)]
Add support for WebGL

Allows enabling and disabling WebGL support built into WebKit.
The feature is turned off by default.

7 years agoDisable media autoplay by default
Quentin Rameau [Sat, 3 Jun 2017 08:20:50 +0000 (10:20 +0200)]
Disable media autoplay by default

7 years agoStore modified parameters list
Quentin Rameau [Sun, 21 May 2017 20:53:56 +0000 (22:53 +0200)]
Store modified parameters list

7 years agoUse priority values instead of “forced” parameters
Quentin Rameau [Sun, 21 May 2017 11:41:56 +0000 (13:41 +0200)]
Use priority values instead of “forced” parameters

This makes parameter handling a bit easier and lets the user override
parameters as he sees fit.

7 years agoGet rid of config parameter MACROs
Quentin Rameau [Sat, 20 May 2017 17:21:41 +0000 (19:21 +0200)]
Get rid of config parameter MACROs

There's no need to obfuscate so much what is done, the user can deal
with a few extra knobs to set instead.

7 years agoGet rid of integer member b in Arg
Quentin Rameau [Sat, 20 May 2017 15:04:49 +0000 (17:04 +0200)]
Get rid of integer member b in Arg

There's no need to keep another integer member there, use directly the i
integer one.

7 years agoOnly apply parameters when needed
Quentin Rameau [Thu, 18 May 2017 23:10:30 +0000 (01:10 +0200)]
Only apply parameters when needed

Specify which parameter should be applied on which load state.

7 years agoFix handling of uri-specific parameters
Quentin Rameau [Thu, 18 May 2017 10:33:28 +0000 (12:33 +0200)]
Fix handling of uri-specific parameters

We need to (re)apply uri-specific parameters for each new uri even if
the parameter has already been set to get the correct value.

Thanks to Julien STEINHAUSER <julien.steinhauser@orange.fr> for the
report!

7 years agoUnset previous user styles before applying another one
Quentin Rameau [Thu, 18 May 2017 14:42:59 +0000 (16:42 +0200)]
Unset previous user styles before applying another one

7 years agoAdd config option for cross requests from file URLs
Constantine Bytensky [Thu, 18 May 2017 11:46:49 +0000 (14:46 +0300)]
Add config option for cross requests from file URLs

I use it to open local .xml files with .xsl style-sheets.

7 years agoAdd config option for microphone and webcam access
Quentin Rameau [Thu, 18 May 2017 09:20:07 +0000 (11:20 +0200)]
Add config option for microphone and webcam access

7 years agoFix synchronization issue with atoms
Quentin Rameau [Thu, 11 May 2017 22:28:24 +0000 (00:28 +0200)]
Fix synchronization issue with atoms

Be sure to sync after setting an atom.
Sync too before reading one.

7 years agoThere's no need to call geturi() again in loadchanged
Quentin Rameau [Thu, 11 May 2017 22:03:57 +0000 (00:03 +0200)]
There's no need to call geturi() again in loadchanged

Also call the variable “uri” instead of “title” which was ambiguous
regarding what it is.

7 years agoAdd config option for smooth scrolling activation
Quentin Rameau [Thu, 11 May 2017 13:33:42 +0000 (15:33 +0200)]
Add config option for smooth scrolling activation

7 years agoAdd config option for Java activation
Quentin Rameau [Thu, 11 May 2017 13:27:27 +0000 (15:27 +0200)]
Add config option for Java activation

7 years agoAdd config option for setting default charset.
Quentin Rameau [Thu, 11 May 2017 13:23:22 +0000 (15:23 +0200)]
Add config option for setting default charset.

This will be used for pages with no specified charset.

7 years agoImprove parameters handling
Quentin Rameau [Tue, 9 May 2017 12:45:24 +0000 (14:45 +0200)]
Improve parameters handling

There's no need to reload all parameters each time a new url is loaded,
instead set only custom parameters and restore those to defaults when
needed.

7 years agoChange PROMPT_GO from "URL:" to "Go:"
ssd [Wed, 10 May 2017 22:55:29 +0000 (00:55 +0200)]
Change PROMPT_GO from "URL:" to "Go:"

This looks more apropriate because URL is too specific and _SURF_GO can
be set to other things.

7 years agoAdd prompts for SETPROP
Quentin Rameau [Mon, 8 May 2017 09:22:34 +0000 (11:22 +0200)]
Add prompts for SETPROP

Imported from __20h__ repo, thanks to him and Ben Woolley.

7 years agoEmbed dmenu into the surf window by default
Quentin Rameau [Mon, 8 May 2017 08:20:28 +0000 (10:20 +0200)]
Embed dmenu into the surf window by default

7 years agoSimplify DOWNLOAD macro
Quentin Rameau [Thu, 4 May 2017 16:24:33 +0000 (18:24 +0200)]
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.

7 years agoSimplify SETPROP macro
Quentin Rameau [Thu, 4 May 2017 14:49:17 +0000 (16:49 +0200)]
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.

7 years agoSimplify usage()
Quentin Rameau [Thu, 4 May 2017 08:22:29 +0000 (10:22 +0200)]
Simplify usage()

There's no real need for using the real executable call name, especially
with basename requiring special care.

7 years agoSimplify version message
Quentin Rameau [Tue, 2 May 2017 16:53:01 +0000 (18:53 +0200)]
Simplify version message

7 years agoUse Ctrl-t for showcert instead of Ctrl-x
Ivan Tham [Tue, 2 May 2017 15:10:32 +0000 (23:10 +0800)]
Use Ctrl-t for showcert instead of Ctrl-x

7 years agoCleanup and fix formatage issues in surf.1
Quentin Rameau [Sun, 30 Apr 2017 23:09:52 +0000 (01:09 +0200)]
Cleanup and fix formatage issues in surf.1

7 years agoFix forgotten options in surf.1
Quentin Rameau [Sun, 30 Apr 2017 23:08:27 +0000 (01:08 +0200)]
Fix forgotten options in surf.1

7 years agosetcert: check uri before adding a certificate
Hiltjo Posthuma [Sat, 29 Apr 2017 20:16:03 +0000 (22:16 +0200)]
setcert: check uri before adding a certificate

Also directly check for https scheme, we won't need a certificate for
others.

7 years agofix mini typo
Hiltjo Posthuma [Sat, 29 Apr 2017 20:07:08 +0000 (22:07 +0200)]
fix mini typo

7 years agosurf.1: remove trailing spaces
Hiltjo Posthuma [Sat, 29 Apr 2017 20:06:43 +0000 (22:06 +0200)]
surf.1: remove trailing spaces

7 years agoAdd forgotten tT indicator description in surf.1
Quentin Rameau [Sat, 29 Apr 2017 15:55:23 +0000 (17:55 +0200)]
Add forgotten tT indicator description in surf.1

7 years agoAdd forgotten fF indicator description in surf.1
Quentin Rameau [Sat, 29 Apr 2017 15:47:06 +0000 (17:47 +0200)]
Add forgotten fF indicator description in surf.1

7 years agoAdd a flag for custom certificates
Quentin Rameau [Sat, 29 Apr 2017 15:21:12 +0000 (17:21 +0200)]
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.

7 years agoMove xid printing option from -x to -w
Quentin Rameau [Sat, 29 Apr 2017 15:23:37 +0000 (17:23 +0200)]
Move xid printing option from -x to -w

7 years agoAdd a keybinding to show current TLS certificate
Quentin Rameau [Sat, 29 Apr 2017 12:56:02 +0000 (14:56 +0200)]
Add a keybinding to show current TLS certificate

7 years agoDisplay an error message and certificate on tls error
Quentin Rameau [Sat, 29 Apr 2017 12:49:04 +0000 (14:49 +0200)]
Display an error message and certificate on tls error

7 years agoArrange Makefile
Quentin Rameau [Sat, 29 Apr 2017 13:21:49 +0000 (15:21 +0200)]
Arrange Makefile

Let the user specify his own C and LD FLAGS.
Remove unuseful and non portable CFLAGS like pendantic and Wall.

7 years agoFree temporary certificate in setcert
Quentin Rameau [Sat, 29 Apr 2017 12:34:02 +0000 (14:34 +0200)]
Free temporary certificate in setcert

7 years agoDo not build SiteSpecific file when regex is invalid
Quentin Rameau [Fri, 28 Apr 2017 11:09:39 +0000 (13:09 +0200)]
Do not build SiteSpecific file when regex is invalid

7 years agoAdd support for using custom certificates per url
Quentin Rameau [Fri, 28 Apr 2017 10:58:36 +0000 (12:58 +0200)]
Add support for using custom certificates per url

7 years agoAvoid using global name stylefile in setstyle()
Quentin Rameau [Thu, 27 Apr 2017 13:41:16 +0000 (15:41 +0200)]
Avoid using global name stylefile in setstyle()

7 years agoChange site styles structure for a more generic one
Quentin Rameau [Thu, 27 Apr 2017 13:01:54 +0000 (15:01 +0200)]
Change site styles structure for a more generic one

7 years agoFix 27cec48 Add a flag/keybinding for strict TLS
Quentin Rameau [Sun, 23 Apr 2017 16:18:23 +0000 (18:18 +0200)]
Fix 27cec48 Add a flag/keybinding for strict TLS

Forgot to add changes in main(), usage() and newwindow() too.

7 years agoFix a981959 Move -t stylefile flag to -C stylefile
Quentin Rameau [Sun, 23 Apr 2017 16:11:54 +0000 (18:11 +0200)]
Fix a981959 Move -t stylefile flag to -C stylefile

Forgot to modify usage() and newwindow() too.

7 years agoFix possible oob access of cmd in newwindow()
Quentin Rameau [Sun, 23 Apr 2017 16:25:40 +0000 (18:25 +0200)]
Fix possible oob access of cmd in newwindow()

Thanks to tarug0 for spotting this!

7 years agoBump year in program
Quentin Rameau [Wed, 19 Apr 2017 18:56:01 +0000 (20:56 +0200)]
Bump year in program

7 years agoAdd a flag and toggle keybinding for strict TLS
Quentin Rameau [Wed, 19 Apr 2017 16:35:16 +0000 (18:35 +0200)]
Add a flag and toggle keybinding for strict TLS

7 years agoMove -t stylefile flag to -C stylefile
Quentin Rameau [Wed, 19 Apr 2017 16:14:56 +0000 (18:14 +0200)]
Move -t stylefile flag to -C stylefile

7 years agoRename SSL instances to TLS
Quentin Rameau [Wed, 19 Apr 2017 15:45:20 +0000 (17:45 +0200)]
Rename SSL instances to TLS

7 years agoSet strict ssl by default and handle insecure content
Quentin Rameau [Fri, 8 Jul 2016 16:27:07 +0000 (18:27 +0200)]
Set strict ssl by default and handle insecure content

Non-https content in https pages is now handled separately from https
connection establishment.

7 years agoAdd a configure option for default window size
Quentin Rameau [Wed, 19 Apr 2017 14:05:39 +0000 (16:05 +0200)]
Add a configure option for default window size

7 years agoBump version to 2.0
Quentin Rameau [Tue, 28 Mar 2017 16:17:45 +0000 (18:17 +0200)]
Bump version to 2.0

We're using the new scheme: 2.x is for webkit2

7 years agoAdd contributors to the LICENSE
Quentin Rameau [Tue, 28 Mar 2017 16:13:50 +0000 (18:13 +0200)]
Add contributors to the LICENSE

7 years agoInstall Atoms before initializing gtk
Quentin Rameau [Sun, 12 Feb 2017 17:50:31 +0000 (18:50 +0100)]
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.

7 years agoFix spelling of otherwise in surf.1
Michael Stevens [Tue, 8 Dec 2015 11:12:14 +0000 (11:12 +0000)]
Fix spelling of otherwise in surf.1

Add more spelling to surf.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
7 years agoFix font-size setting parameter value type in newview
Quentin Rameau [Mon, 6 Mar 2017 10:00:04 +0000 (11:00 +0100)]
Fix font-size setting parameter value type in newview

8 years agoAdd support for loading Webkit extensions
Quentin Rameau [Mon, 23 Nov 2015 21:12:00 +0000 (22:12 +0100)]
Add support for loading Webkit extensions

8 years agoReload on SIGHUP
Charles Lehner [Sat, 9 Jan 2016 19:18:53 +0000 (14:18 -0500)]
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>
8 years agoAdd a few configuration options
Quentin Rameau [Tue, 5 Jul 2016 15:26:54 +0000 (17:26 +0200)]
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

8 years agoFix GdkDisplay assignment in setup()
Quentin Rameau [Tue, 5 Jul 2016 11:35:44 +0000 (13:35 +0200)]
Fix GdkDisplay assignment in setup()

Init GTK before trying to get the default display.

8 years agoGet rid of getkbdevice
Quentin Rameau [Tue, 5 Jul 2016 10:33:23 +0000 (12:33 +0200)]
Get rid of getkbdevice

The GTK guys nicely took in account our request and pushed in a
convenience function to get default keyboard device.

8 years agoFixing the last patch to the surf style.
Christoph Lohmann [Fri, 3 Jun 2016 13:14:53 +0000 (15:14 +0200)]
Fixing the last patch to the surf style.

8 years agoCheck $HOME and home dir of $USER before getpwuid()->pw_dir
Dmitry Bogatov [Sun, 29 May 2016 09:56:51 +0000 (11:56 +0200)]
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>
8 years agoFix url parsing in load()
Quentin Rameau [Sat, 16 Apr 2016 04:19:13 +0000 (06:19 +0200)]
Fix url parsing in load()

8 years agoApply domain parameters each time url is changed
Quentin Rameau [Thu, 3 Mar 2016 15:51:24 +0000 (16:51 +0100)]
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.

8 years agoFix inspector toggling
Quentin Rameau [Sat, 9 Jan 2016 12:42:50 +0000 (13:42 +0100)]
Fix inspector toggling

Always get the inspector object, and let the user eventually close it
even if it's disabled for the current page.

8 years agoRectify how parameters are handled in setparameter()
Quentin Rameau [Sat, 9 Jan 2016 11:57:39 +0000 (12:57 +0100)]
Rectify how parameters are handled in setparameter()

Access parameters through given Arg parameter instead of accessing
global parameters.

8 years agoFix parameter initialization and assignment
Quentin Rameau [Sun, 29 Nov 2015 23:39:52 +0000 (00:39 +0100)]
Fix parameter initialization and assignment

8 years agoAdapting the whole surf structure to new settings
Quentin Rameau [Sun, 29 Nov 2015 16:42:42 +0000 (17:42 +0100)]
Adapting the whole surf structure to new settings

8 years agoAdapt default parameters to new config style
Quentin Rameau [Sun, 29 Nov 2015 16:22:15 +0000 (17:22 +0100)]
Adapt default parameters to new config style

8 years agoIntroduce new data structure for handling settings
Quentin Rameau [Sun, 29 Nov 2015 16:16:48 +0000 (17:16 +0100)]
Introduce new data structure for handling settings

8 years agoDisable globbing in curl command
Dmitrij D. Czarkoff [Sun, 6 Mar 2016 00:14:52 +0000 (01:14 +0100)]
Disable globbing in curl command

Curl is invoked for downloading particular files.  Without "-g" flag it would
apply globbing rules to URLs, which may end badly in case URL is not properly
quoted.

8 years agoGet rid of JavaScript for scrolling in views
Quentin Rameau [Wed, 2 Mar 2016 13:29:21 +0000 (14:29 +0100)]
Get rid of JavaScript for scrolling in views

This is still a hack, until WebKitGTK gives us a more practical and
stable way to do that. Manipulating directly the DOM inside a
webextension is a pain and only usable with unstable API atm.

8 years agoModify linking parameter
Quentin Rameau [Sun, 29 Nov 2015 23:45:18 +0000 (00:45 +0100)]
Modify linking parameter

8 years agoImport the arg.h from st which fixed the oob bug.
Christoph Lohmann [Mon, 22 Feb 2016 05:47:46 +0000 (06:47 +0100)]
Import the arg.h from st which fixed the oob bug.

9 years agoFix title handling
Quentin Rameau [Tue, 1 Dec 2015 11:31:42 +0000 (12:31 +0100)]
Fix title handling

Don't forget to always set the title to the current uri, this way it's
up to date when there is no title on the page (ie for local file
exploration).
Thanks to pickfire for reporting the issue.

9 years agoFix clickexternplayer(), no need to test the target again
Quentin Rameau [Tue, 24 Nov 2015 22:18:06 +0000 (23:18 +0100)]
Fix clickexternplayer(), no need to test the target again

9 years agoFix user agent command-line parameter
Quentin Rameau [Mon, 23 Nov 2015 21:13:32 +0000 (22:13 +0100)]
Fix user agent command-line parameter

Thanks to yui for seeing that!

9 years agoAdd webkit language settings
Quentin Rameau [Sun, 22 Nov 2015 18:13:48 +0000 (19:13 +0100)]
Add webkit language settings

You can now set your prefered website languages in order.
It is also possible to enable spell checking in the same way.

9 years agoFix key handling
Quentin Rameau [Sun, 22 Nov 2015 16:44:40 +0000 (17:44 +0100)]
Fix key handling

I had forgotten to compare configured key values against lowered pressed
key values.
Integrated keypress() into winevent().

9 years agoFix target uri handling when leaving window
Quentin Rameau [Sun, 22 Nov 2015 15:45:22 +0000 (16:45 +0100)]
Fix target uri handling when leaving window

Introduce a new string pointer overtitle in Client to be able to keep
the targeturi intact while modifying the former for overriding or not
the window title.
Connect to GDK_ENTER_NOTIFY to restore overtitle when refocusing on
window.

9 years agoAdapt togglestyle()
Quentin Rameau [Sun, 22 Nov 2015 14:31:15 +0000 (15:31 +0100)]
Adapt togglestyle()

We can't apply an empty stylesheet anymore, instead remove any previous
stylesheet.

9 years agoModify decideresource() and favicon handling
Quentin Rameau [Sun, 22 Nov 2015 14:19:10 +0000 (15:19 +0100)]
Modify decideresource() and favicon handling

Return as soon as the request has been processed.
No need to modify the favicon uri, just ignore it.