summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--browser.c103
-rw-r--r--config.h2
-rw-r--r--man1/lariza.1215
-rw-r--r--man1/lariza.usage.1338
4 files changed, 364 insertions, 294 deletions
diff --git a/browser.c b/browser.c
index 77ea6ff..2ecf0b5 100644
--- a/browser.c
+++ b/browser.c
@@ -12,6 +12,7 @@
#include <gio/gio.h>
#include <webkit2/webkit2.h>
#include <JavaScriptCore/JavaScript.h>
+#include "config.h"
void client_destroy(GtkWidget *, gpointer);
@@ -47,6 +48,7 @@ gboolean key_web_view(GtkWidget *, GdkEvent *, gpointer);
void mainwindow_setup(void);
void mainwindow_title(gint);
void notebook_switch_page(GtkNotebook *, GtkWidget *, guint, gpointer);
+gboolean permission_request(WebKitWebView *, WebKitPermissionRequest *, gpointer);
gboolean quit_if_nothing_active(void);
gboolean remote_msg(GIOChannel *, GIOCondition, gpointer);
void run_user_scripts(WebKitWebView *);
@@ -186,6 +188,8 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show,
G_CALLBACK(key_web_view), c);
g_signal_connect(G_OBJECT(c->web_view), "mouse-target-changed",
G_CALLBACK(hover_web_view), c);
+ g_signal_connect(G_OBJECT(c->web_view), "permission-request",
+ G_CALLBACK(permission_request), c);
g_signal_connect(G_OBJECT(c->web_view), "web-process-crashed",
G_CALLBACK(crashed_web_view), c);
@@ -655,8 +659,12 @@ ensure_uri_scheme(const gchar *t)
f = g_strdup_printf("file://%s", fabs);
free(fabs);
}
- else
- f = g_strdup_printf("http://%s", t);
+ else {
+ if (g_str_has_prefix(f, "!/"))
+ f = g_strdup_printf(SEARCH_ENGINE, t + 2);
+ else
+ f = g_strdup_printf("http://%s", t);
+ }
return f;
}
else
@@ -845,8 +853,9 @@ icon_location(GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEvent *event,
void
init_default_web_context(void)
{
- gchar *p;
+ gchar *p, *cf;
WebKitWebContext *wc;
+ WebKitCookieManager *cookiemanager;
wc = webkit_web_context_get_default();
@@ -860,6 +869,7 @@ init_default_web_context(void)
p = g_build_filename(g_get_user_config_dir(), __NAME__, "web_extensions",
NULL);
+ cf = g_build_filename(g_get_user_cache_dir(), __NAME__, "cookies.txt", NULL);
webkit_web_context_set_web_extensions_directory(wc, p);
g_free(p);
@@ -869,6 +879,9 @@ init_default_web_context(void)
trust_user_certs(wc);
webkit_web_context_set_favicon_database_directory(wc, NULL);
+
+ cookiemanager = webkit_web_context_get_cookie_manager(wc);
+ webkit_cookie_manager_set_persistent_storage(cookiemanager, cf, WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT);
}
gboolean
@@ -880,7 +893,7 @@ key_common(GtkWidget *widget, GdkEvent *event, gpointer data)
if (event->type == GDK_KEY_PRESS)
{
- if (((GdkEventKey *)event)->state & GDK_MOD1_MASK)
+ if (((GdkEventKey *)event)->state & GDK_CONTROL_MASK)
{
switch (((GdkEventKey *)event)->keyval)
{
@@ -892,11 +905,16 @@ key_common(GtkWidget *widget, GdkEvent *event, gpointer data)
webkit_web_view_load_uri(WEBKIT_WEB_VIEW(c->web_view), f);
g_free(f);
return TRUE;
- case GDK_KEY_e: /* new tab (left hand) */
+ case GDK_KEY_t: /* new tab (left hand) */
f = ensure_uri_scheme(home_uri);
client_new(f, NULL, TRUE, TRUE);
g_free(f);
return TRUE;
+ case GDK_KEY_s:
+ gtk_widget_grab_focus(c->location);
+ gtk_entry_set_text(GTK_ENTRY(c->location), "!/");
+ gtk_editable_set_position(GTK_EDITABLE(c->location), -1);
+ return TRUE;
case GDK_KEY_r: /* reload (left hand) */
webkit_web_view_reload_bypass_cache(WEBKIT_WEB_VIEW(
c->web_view));
@@ -911,21 +929,18 @@ key_common(GtkWidget *widget, GdkEvent *event, gpointer data)
case GDK_KEY_3: /* search backward (left hand) */
search(c, -1);
return TRUE;
- case GDK_KEY_l: /* location (BOTH hands) */
+ case GDK_KEY_o: /* location (BOTH hands) */
gtk_widget_grab_focus(c->location);
return TRUE;
- case GDK_KEY_k: /* initiate search (BOTH hands) */
+ case GDK_KEY_f: /* initiate search (BOTH hands) */
gtk_widget_grab_focus(c->location);
gtk_entry_set_text(GTK_ENTRY(c->location), ":/");
gtk_editable_set_position(GTK_EDITABLE(c->location), -1);
return TRUE;
- case GDK_KEY_c: /* reload trusted certs (left hand) */
- trust_user_certs(wc);
- return TRUE;
- case GDK_KEY_a: /* go one tab to the left (left hand) */
+ case GDK_KEY_k: /* go one tab to the left (left hand) */
gtk_notebook_prev_page(GTK_NOTEBOOK(mw.notebook));
return TRUE;
- case GDK_KEY_s: /* go one tab to the right (left hand) */
+ case GDK_KEY_j: /* go one tab to the right (left hand) */
gtk_notebook_next_page(GTK_NOTEBOOK(mw.notebook));
return TRUE;
}
@@ -936,6 +951,15 @@ key_common(GtkWidget *widget, GdkEvent *event, gpointer data)
webkit_web_view_go_back(WEBKIT_WEB_VIEW(c->web_view));
return TRUE;
}
+ else if (((GdkEventKey *)event)->state & GDK_MOD1_MASK)
+ {
+ switch (((GdkEventKey *)event)->keyval)
+ {
+ case GDK_KEY_c: /* reload trusted certs (left hand) */
+ trust_user_certs(wc);
+ return TRUE;
+ }
+ }
/* navigate forward (left hand) */
else if (((GdkEventKey *)event)->keyval == GDK_KEY_F3)
{
@@ -952,7 +976,7 @@ key_downloadmanager(GtkWidget *widget, GdkEvent *event, gpointer data)
{
if (event->type == GDK_KEY_PRESS)
{
- if (((GdkEventKey *)event)->state & GDK_MOD1_MASK)
+ if (((GdkEventKey *)event)->state & GDK_CONTROL_MASK)
{
switch (((GdkEventKey *)event)->keyval)
{
@@ -1136,6 +1160,59 @@ notebook_switch_page(GtkNotebook *nb, GtkWidget *p, guint idx, gpointer data)
}
gboolean
+permission_request(WebKitWebView *v, WebKitPermissionRequest *r, gpointer data)
+{
+ struct Client *c = (struct Client *)data;
+ const gchar *h;
+ char *permission_str;
+
+ h = g_uri_get_host(g_uri_parse(
+ webkit_web_view_get_uri(WEBKIT_WEB_VIEW(c->web_view)),
+ G_URI_FLAGS_PARSE_RELAXED,
+ NULL));
+
+ if (WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST(r))
+ {
+ permission_str = "Allow '%s' to see your location?";
+ }
+ else if (WEBKIT_IS_NOTIFICATION_PERMISSION_REQUEST(r))
+ {
+ permission_str = "Allow notifications from '%s'?";
+ }
+ else if (WEBKIT_IS_USER_MEDIA_PERMISSION_REQUEST(r)) {
+ if (webkit_user_media_permission_is_for_audio_device(
+ WEBKIT_USER_MEDIA_PERMISSION_REQUEST(r)))
+ permission_str = "Allow '%s' to access your microphone?";
+ else if (webkit_user_media_permission_is_for_video_device(
+ WEBKIT_USER_MEDIA_PERMISSION_REQUEST(r)))
+ permission_str = "Allow '%s' to access your webcam?";
+ else
+ return FALSE;
+ }
+ else {
+ /* Deny anything that are not listed above */
+ return FALSE;
+ }
+ GtkWidget *dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
+ g_strdup_printf(permission_str, h));
+ gtk_widget_show(dialog);
+ gint result = gtk_dialog_run(GTK_DIALOG(dialog));
+ switch(result) {
+ case GTK_RESPONSE_YES:
+ webkit_permission_request_allow(r);
+ break;
+ default:
+ webkit_permission_request_deny(r);
+ break;
+ }
+ gtk_widget_destroy(dialog);
+ return TRUE;
+}
+
+gboolean
quit_if_nothing_active(void)
{
if (clients == 0)
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..454463f
--- /dev/null
+++ b/config.h
@@ -0,0 +1,2 @@
+/* Configuration file for lariza */
+#define SEARCH_ENGINE "https://duckduckgo.com/?q=%s"
diff --git a/man1/lariza.1 b/man1/lariza.1
index e0294db..3b169d1 100644
--- a/man1/lariza.1
+++ b/man1/lariza.1
@@ -1,119 +1,108 @@
-.TH lariza 1 "2021-01-03" "lariza" "User Commands"
-.\" --------------------------------------------------------------------
-.SH NAME
-lariza \- simple web browser
-.\" --------------------------------------------------------------------
-.SH SYNOPSIS
-\fBlariza\fP
-[\fB\-C\fP]
-[\fIURI ...\fP]
-.\" --------------------------------------------------------------------
-.SH DESCRIPTION
-\fBlariza\fP is a simple web browser using GTK+ 3, GLib and WebKit2GTK+.
-.\" --------------------------------------------------------------------
-.SH OPTIONS
-In addition to the standard arguments of GTK+ 3, \fBlariza\fP knows
-about the following options:
-.TP
-\fB\-C\fP
+.Dd Jul 17, 2021
+.Dt lariza 1
+.Sh NAME
+.Nm lariza
+.Nd simple web browser
+.Sh SYNOPSIS
+.Nm
+.Op Fl C
+.Op Ar URI...
+.Sh DESCRIPTION
+.Nm
+is a simple web browser using GTK+3, GLib and Webkit2GTK+
+.Sh OPTIONS
+In addition to the standard arguments of GTK+3,
+.Nm
+knows about the following options:
+.Bl -tag
+.It Fl C
Disables cooperative instances.
-.P
-After these options there can be any number of URIs. If no URIs are
-given, $\fBLARIZA_HOME_URI\fP will be opened.
-.\" --------------------------------------------------------------------
-.SH ENVIRONMENT
-In addition to the standard variables of GTK+ 3, \fBlariza\fP knows
-about the following environment variables:
-.P
-.TP
-\fBLARIZA_ACCEPTED_LANGUAGE\fP
-In HTTP requests, WebKit sets the \(lqAccepted-Language\(rq header to
-this value. Defaults to \fBen-US\fP.
-.TP
-\fBLARIZA_DOWNLOAD_DIR\fP
-All downloads are automatically stored in this directory. If you want to
-stick to XDG directories, then you should configure your
-\(lqxdg-user-dirs\(rq and use this:
-
-\f(CW
-.nf
-\&LARIZA_DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD)
-.fi
-\fP
-
-This variable defaults to \fB/var/tmp\fP.
-.TP
-\fBLARIZA_ENABLE_CONSOLE_TO_STDOUT\fP
+.El
+.Pp
+After these options there can be any number of
+.Ar URIs .
+If no
+.Ar URIs
+are given, $\fBLARIZA_HOME_URI\fP will be opened.
+.Sh ENVIRONMENT
+In addition to the standard variables of GTK+3,
+.Nm
+knows about the following environment variables:
+.Bl -tag
+.It Sy LARIZA_ACCEPTED_LANGUAGE
+In HTTP requests, WebKit sets the
+.Dq Accepted-Language
+header to this value. Defaults to
+.Sy en-US .
+.It Sy LARIZA_DOWNLOAD_DIR
+All downloads are automatically stored in this directory. This variable defaults
+to
+.Pa /var/tmp .
+.It Sy LARIZA_ENABLE_CONSOLE_TO_STDOUT
Enable writing WebKit console messages to stdout.
-.TP
-\fBLARIZA_FIFO_SUFFIX\fP
-Cooperative instances are implemented using a named pipe in the file
-system. The name of this pipe usually is (at least on modern systems
-following XDG \(lqstandards\(rq):
-\fI/var\:/run\:/user\:/$UID\:/lariza.fifo\:-$LARIZA_FIFO_SUFFIX\fP.
-
-$\fBUID\fP is the id of your user. $\fBLARIZA_FIFO_SUFFIX\fP defaults to
-\fBmain\fP. If you change this variable, you can launch several
-independent cooperative instances of \fBlariza\fP.
-.TP
-\fBLARIZA_HISTORY_FILE\fP
-If set, \fBlariza\fP will write each visited URI to that file. This path
-can point to a named pipe, but be aware that the browser will block
-until a reader at the other end of the pipe has read all pending data.
-.TP
-\fBLARIZA_HOME_URI\fP
-This URI will be opened by pressing the appropriate hotkeys
-(\(lqhomepage\(rq or \(lqnew window\(rq) and if no URIs are specified on
-the command line. Defaults to \fBabout:blank\fP.
-.TP
-\fBLARIZA_TAB_POS\fP
-Can be one of \fBtop\fP (default), \fBright\fP, \fBbottom\fP,
-\fBleft\fP.
-.TP
-\fBLARIZA_TAB_WIDTH_CHARS\fP
+.It Sy LARIZA_FIFO_SUFFIX
+Cooperative instances are implemented using a named pipe in the file system. The
+name of this pipe usually is
+.Pq at least on modern systems following XDG Dq standards :
+.Pa /var/run/user/$UID/lariza.fifo-$LARIZA_FIFO_SUFFIX .
+.Pp
+.Sy $UID
+is the id of your user.
+.Sy $LARIZA_FIFO_SUFFIX
+defaults to
+.Sy main .
+If you change this variable, you can launch several independent cooperative
+instances of
+.Nm .
+.It Sy LARIZA_HISTORY_FILE
+If set,
+.Nm
+will write each visited URI to that file. This path can point to a named pipe,
+but be aware that the browser will block until a reader at the other end of the
+pipe has read all pending data.
+.It Sy LARIZA_HOME_URI
+This URI will be opened by pressing the appropriate hokeys
+.Pq Do homepage Dc or Do new window Dc
+and if no URIs are specified on the command line. Defaults to
+.Sy about:blank .
+.It Sy LARIZA_TAB_POS
+Can be one of
+.Sy top
+.Pq default ,
+.Sy right , bottom, left .
+.It Sy LARIZA_TAB_WIDTH_CHARS
An integer, determines width of tabs. Defaults to 20.
-.TP
-\fBLARIZA_USER_AGENT\fP
-\fBlariza\fP will identify itself with this string. Uses WebKit's
-default value if unset.
-.TP
-\fBLARIZA_ZOOM
-Zoom level for WebKit viewports. Defaults to \fB1.0\fP.
-.\" --------------------------------------------------------------------
-.SH FILES
+.It Sy LARIZA_USER_AGENT
+.Nm
+will identify itself with this string. Uses WebKit's default value if unset.
+.It Sy LARIZA_ZOOM
+Zoom level for WebKit viewports. Defaults to 1.0.
+.El
+.Sh FILES
XDG variables will be used to construct these paths.
-.TP
-\fI~/.config\:/lariza\:/adblock\fP
-Adblock patterns. See \fBlariza.usage\fP(1).
-.TP
-\fI~/.config\:/lariza\:/certs\fP
+.Bl -tag
+.It Pa ~/.config/lariza/adblock
+Adblock patterns. See
+.Xr lariza.usage 1 .
+.It Pa ~/.config/lariza/certs
Directory where trusted certificates are stored. See
-\fBlariza.usage\fP(1).
-.TP
-\fI~/.config\:/lariza\:/scripts\fP
+.Xr lariza.usage 1 .
+.It Pa ~/.config/lariza/scripts
Directory to store user-supplied JavaScript snippets. See
-\fBlariza.usage\fP(1).
-.TP
-\fI~/.local\:/share\:/lariza\:/web_extensions\fP
-Sets the directory where WebKit will look for web extensions. See
-\fBlariza.usage\fP(1).
-.TP
-\fI~/.cache\:/lariza\fP
-.TQ
-\fI~/.cache\:/webkitgtk\fP
-.TQ
-\fI~/.local\:/share\:/webkitgtk\fP
-WebKitGTK will dump its caches and local storage here. It is probably
-wise to clean those directories regularly or to mount them as
-\fBtmpfs\fP(5).
-.\" --------------------------------------------------------------------
-.SH LICENSE
-\fBlariza\fP is released under the MIT license. See the accompanying
-\fILICENSE\fP file.
-.\" --------------------------------------------------------------------
-.SH HISTORY
-\fBlariza\fP was originally written by Peter Hofmann. The project
-was started in June 2014.
-.\" --------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR lariza.usage (1).
+.Xr lariza.usage 1 .
+.It Pa ~/.cache/lariza , ~/.cache/webkitgtk , ~/.local/share/webkitgtk
+WebKitGTK will dump its caches and local storage here.
+.It Pa ~/.cache/lariza/cookies.txt
+.Nm
+will save its cookies in this text file.
+.El
+.Sh LICENSE
+.Nm
+is released under the MIT license. See the accompanying
+.Pa LICENSE
+file.
+.Sh HISTORY
+.Nm
+was originally written by Peter Hofmann. The project was started in June 2014.
+.Sh SEE ALSO
+.Xr lariza.usage 1
diff --git a/man1/lariza.usage.1 b/man1/lariza.usage.1
index 3682c60..86651f4 100644
--- a/man1/lariza.usage.1
+++ b/man1/lariza.usage.1
@@ -1,183 +1,185 @@
-.TH lariza 1 "2021-01-03" "lariza" "User Commands"
-.\" --------------------------------------------------------------------
-.SH NAME
-lariza.usage \- extended usage hints
-.\" --------------------------------------------------------------------
-.SH DESCRIPTION
-\fBlariza\fP is a simple web browser using GTK+ 3, GLib and WebKit2GTK+.
-This manpage contains additional hints and pointers regarding its usage.
-.\" --------------------------------------------------------------------
-.SH "HOTKEYS"
-.SS "Global hotkeys"
+.Dd Jul 17, 2021
+.Dt lariza.usage 1
+.Sh NAME
+.Nm lariza
+.Nd extended usage hints
+.Sh DESCRIPTION
+.Nm
+is a simple web browser using GTK+3, GLib and WebKit2GTK+. This manpage contains
+additional hints and pointers regarding its usage.
+.Sh HOTKEYS
+.Ss Global hotkeys
These hotkeys work when either the location bar or the web view is being
focused.
-.TP
-\fBMod1\fP + \fBq\fP
-Close the current window. Quits the entire program if this was the last
-window and if there are no more active downloads (download manager is
-shown otherwise).
-.TP
-\fBMod1\fP + \fBw\fP
-Go to your \(lqhomepage\(rq. See the environment variable
-$\fBLARIZA_HOME_URI\fP.
-.TP
-\fBMod1\fP + \fBe\fP
-Open a new window.
-.TP
-\fBMod1\fP + \fBr\fP
+.Bl -tag
+.It Sy Ctrl + q
+Close the current window. Quits the entire program if this was the last window
+and if there are no more active downloads
+.Pq download manager is shown otherwise .
+.It Sy Ctrl + w
+Go to your
+.Dq homepage .
+See the environment variable
+.Sy $LARIZA_HOME_URI .
+.It Sy Ctrl + t
+Open a new window .
+.Ir Sy Ctrl + r
Reload the current page.
-.TP
-\fBMod1\fP + \fBd\fP
+.It Sy Ctrl + d
Open the download manager.
-.TP
-\fBMod1\fP + \fBl\fP
+.It Sy Ctrl + o
Focus the location bar.
-.TP
-\fBMod1\fP + \fBk\fP
-Focus the location bar and set its text to \fB:/\fP, allowing you to
-easily initiate a search.
-.TP
-\fBMod1\fP + \fB2\fP
-.TQ
-\fBMod1\fP + \fBn\fP
-Repeat the last search (forward).
-.TP
-\fBMod1\fP + \fB3\fP
-Repeat the last search (backward).
-.TP
-\fBMod1\fP + \fBc\fP
+.It Sy Ctrl + f
+Focus the location bar and set its text to
+.Dq :/ ,
+allowing you to easily initiate a search.
+.It Sy Ctrl + s
+Focus the location bar and set its text to
+.Dq !/ ,
+allowin you to search through the search engine.
+.It Sy Ctrl + 2 , Ctrl + n
+Repeat the last search
+.Pq forward .
+.It Sy Ctrl + 3
+Repeat the last search
+.Pq backward .
+.It Sy Ctrl + c
Reload trusted certificates.
-.TP
-\fBMod1\fP + \fBa\fP / \fBMod1\fP + \fBs\fP
+.It Sy Ctrl + k / Ctrl + j
Select tab to the left / right.
-.TP
-\fBF2\fP / \fBF3\fP
-Go backward and forward in current browser history.
-.P
-.SS "Main window \(em WebKit viewport focused"
-.TP
-\fBEscape\fP
+.It Sy F2 / F3
+Go backward / forward in current browser history.
+.El
+.Ss Main window - WebKit viewport focused
+.Bl -tag
+.It Sy Escape
Stop loading.
-.TP
-\fBMiddle mouse\fP
+.It Sy Middle mouse
Open the link under the pointer in a new window.
-.TP
-\fBBackward\fP / \fBforward\fP (mouse keys 8 and 9)
-Same as \fBF2\fP and \fBF3\fP.
-.TP
-\fBMod1\fP + \fBScroll up\fP
-.TQ
-\fBCtrl\fP + \fBScroll up\fP
-Increase zoom level of the current page.
-.TP
-\fBMod1\fP + \fBScroll down\fP
-.TQ
-\fBCtrl\fP + \fBScroll down\fP
-Decrase zoom level of the current page.
-.TP
-\fBMod1\fP + \fBScroll horizontally\fP
-.TQ
-\fBCtrl\fP + \fBScroll horizontally\fP
-Reset zoom to $\fBLARIZA_ZOOM\fP.
-.P
-.SS "Main window \(em location bar focused"
-.TP
-\fBEscape\fP
+.It Sy Backward / forward Pq mouse keys 8 and 9
+Same as F2 and F3.
+.It Sy Ctrl + Scroll up / down
+Increase / decrease zoom level of the current page.
+.It Sy Ctrl + Scroll horizontally
+Reset zoom to
+.Sy $LARIZA_ZOOM .
+.El
+.Ss Main window - location bar focused
+.Bl -tag
+.It Sy Escape
Reset the content of the location bar to the current URI.
-.TP
-\fBReturn\fP
+.It Sy Return
Commit, i.e. begin searching or open the URI.
-.P
-.SS "Download manager"
-.TP
-\fBMod1\fP + \fBd\fP
-.TQ
-\fBMod1\fP + \fBq\fP
-Close the download manager. Active downloads are never aborted. However,
-if there are no more active downloads and no more browsing windows, then
-the entire program will quit.
-.\" --------------------------------------------------------------------
-.SH "DOWNLOAD MANAGER"
-Open the download manager using the appropriate hotkey. A new window
-listing your downloads will appear. Clicking on an item will remove it
-from the list and \(em if needed \(em cancel the download.
-.P
-There's no file manager integration, nor does \fBlariza\fP delete,
-overwrite or resume downloads. If a file already exists, it won't be
-touched. Instead, the new file name will have a suffix such as \fB.1\fP,
-\fB.2\fP, \fB.3\fP, and so on.
-.\" --------------------------------------------------------------------
-.SH "USER-SUPPLIED JAVASCRIPT FILES"
+.El
+.Ss Download manager
+.Bl -tag
+.It Sy Ctrl + d , Ctrl + q
+Close the download manager. Active downloads are never aborted. However, if
+there are no more active downloads and no more browsing windows, then the entire
+program will quit.
+.Sh DOWNLOAD MANAGER
+Open the download manager using the appropriate hotkey. A new window listing
+your downloads will appear. Clicking on an item will remove it from the list
+and - if needed - cancel the download.
+.Pp
+There's no file manager integration, nor does
+.Nm
+delete, overwrite or resume downloads. If a file already exists, it won't be
+touched. Instead, the new file name will have a suffix such as
+.Sy .1 , .2 , .3 ,
+and so on.
+.Sh USER-SUPPLIED JAVASCRIPT FILES
After a page has been successfully loaded, the directory
-\fI~/.config\:/lariza\:/user-scripts\fP will be scanned and each file in
-it ending with \fB.js\fP will be run as a JavaScript file in the context
-of said page.
-.P
-During development, you will most likely want to run \fBlariza\fP with
-$\fBLARIZA_ENABLE_CONSOLE_TO_STDOUT\fP enabled.
-.P
-\fBlariza\fP comes with the following scripts:
-.TP
-\fBhints.js\fP
-Press \fBf\fP (open link in current window) or \fBF\fP (open in new
-window) to activate link hints. After typing the characters for one of
-them, press \fBEnter\fP to confirm. Press \fBEscape\fP to abort.
-.P
-Those bundled scripts are automatically installed on \fBmake install\fP.
-To use them, though, make sure to link them to the directory mentioned
-above.
-.\" --------------------------------------------------------------------
-.SH "WEB EXTENSIONS"
-On startup, WebKit checks \fI~/.config/lariza/web_extensions\fP for any
-\fB.so\fP files. See
-.UR http://\:blogs.igalia.com/\:carlosgc/\:2013/\:09/\:10/\:webkit2gtk-\:web-\:process-\:extensions/
-this blog post
-.UE
+.Pa ~/.config/lariza/user-scripts
+will be scanned and each file in it ending with
+.Dq .js
+will be run as a JavaScript file in the context of said page.
+.Pp
+During development, you will most likely want to run
+.Nm
+with
+.Sy $LARIZA_ENABLE_CONSOLE_TO_STDOUT
+enabled.
+.Pp
+.Nm
+comes with the following scripts:
+.Bl -tag
+.It Sy hints.js
+Press
+.Sy f
+.Pq open link in current window
+or
+.Sy F
+.Pq open in new window
+to activate link hints. After typing the characters for one of them press
+.Sy Return
+to confirm.
+Press
+.Sy Escape
+to abort.
+.El
+.Pp
+Those bundled scripts are automatically installed on
+.Sy make install .
+To use them, though, make sure to link them to the directory mentioned above.
+.Sh WEB EXTENSIONS
+On startup, WebKit checks
+.Pa ~/.config/lariza/web_extensions
+for any
+.Sy .so
+files. See this blog post
+.Lk http://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/
for further information on these extensions.
-.P
-\fBlariza\fP comes with the following extensions:
-.TP
-\fBwe_adblock.so\fP
+.Pp
+.Nm
+comes with the following extensions:
+.Bl -tag
+.It Sy we_adblock.so
Generic adblock. Reads patterns from the file
-\fI~/.config/lariza/adblock\fP. Each line can contain a regular
-expression. These expressions match case-insensitive and partially, i.e.
-\fB.*foo.*\fP is the same as \fB.*FOO.*\fP and you can use anchors like
-\fB^https?://...\fP. Please refer to
-.UR https://\:developer.\:gnome.\:org/\:glib/\:stable/\:glib-\:regex-\:syntax.html
-the GLib reference
-.UE
-for more details. Lines starting with \fB#\fP are ignored.
-.P
+.Pa ~/.config/lariza/adblock .
+Each line can contain a regular expression. These expressions match
+case-insensitive and partially, i.e.
+.Sy .*foo.*
+is the same as
+.Sy .*FOO.*
+and you can use anchors like
+.Sy ^https?://... .
+Please refer to the GLib reference
+.Lk https://developer.gnome.org/glib/stable/glib-regex-syntax.html
+for more details. Lines starting with
+.Sy #
+are ignored.
+.El
Those bundled web extensions are automatically compiled when you run
-\fBmake\fP and installed on \fBmake install\fP. To use them, though,
-make sure to link them to the directory mentioned above.
-.\" --------------------------------------------------------------------
-.SH "TRUSTED CERTIFICATES"
-By default, \fBlariza\fP trusts whatever CAs are trusted by WebKit. If
-you wish to trust additional certificates, such as self-signed
-certificates, the first thing you should do is try to add the
-appropriate CAs to your system-wide store.
-.P
-If you wish to add simple exceptions, you can grab the certificate and
-store it in the directory \fI~/.config/lariza/certs\fP. The filename
-must be equal to the hostname:
-.P
-\f(CW
-.nf
-\&$ echo | openssl s_client -connect foo.de:443 | openssl x509 >foo.de
-.fi
-\fP
-.P
-This tells \fBlariza\fP to trust the given certificate when connecting
-to host \fBfoo.de\fP.
-.P
-You can reload these certificates at runtime by pressing the appropriate
-hotkey. Note that removed certificates will be kept in memory until you
-restart \fBlariza\fP.
-.P
-Note: This is NOT equal to certificate pinning. WebKit ignores
-user-specified certificates if the server's certificate can be validated
-by any system-wide CA.
-.\" --------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR lariza (1).
+.Sy make
+and installed on
+.Sy make install .
+To use them, though, make sure to link them to the directory mentioned above.
+.Sh TRUSTED CERTIFICATES
+By default,
+.Nm
+trusts whatever CAs are trusted by WebKit. If you wish to trust additional
+certificates, such as self-signed certificates, the first thing you should do is
+try to add the appropriate CAs to your system-wide store.
+.Pp
+If you wish to add simple exceptions, you can grab the certificate and store it
+in the directory
+.Pa ~/.config/lariza/certs .
+The filename must be equal to the hostname:
+.Bd -literal -offset indent
+$ echo | openssl s_client -connect foo.de:443 | openssl x504 > foo.de
+.Ed
+.Pp
+This tells
+.Nm
+to trust the given certificate when connecting to host
+.Sy foo.de .
+.Pp
+You can reload these certificates at runtime by pressing the appropriate hotkey.
+Note that removed certificates will be kept in memory until you restart
+.Nm .
+.Pp
+Note: This is NOT equal to certificate pinning. WebKit ignores user-specified
+certificates if the server's certificate can be validated by any system-wide CA.
+.Sh SEE ALSO
+.Xr lariza 1