static void run_user_scripts(WebKitWebView *);
static void search(gpointer, gint);
static void show_web_view(WebKitWebView *, gpointer);
-static Window tabbed_launch(void);
static void trust_user_certs(WebKitWebContext *);
static int cooperative_pipe_fp = 0;
static gchar *download_dir = "/var/tmp";
static gboolean enable_console_to_stdout = FALSE;
-static Window embed = 0;
static gchar *fifo_suffix = "main";
static gdouble global_zoom = 1.0;
static gchar *history_file = NULL;
static gboolean initial_wc_setup_done = FALSE;
static GHashTable *keywords = NULL;
static gchar *search_text = NULL;
-static gboolean tabbed_automagic = TRUE;
static gchar *user_agent = NULL;
exit(EXIT_FAILURE);
}
- if (embed != 0)
- {
- c->win = gtk_plug_new(embed);
- if (!gtk_plug_get_embedded(GTK_PLUG(c->win)))
- {
- fprintf(stderr, __NAME__": Can't plug-in to XID %ld.\n", embed);
- gtk_widget_destroy(c->win);
- c->win = NULL;
- embed = 0;
- }
- }
-
if (c->win == NULL)
c->win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show_all(c->win);
}
-Window
-tabbed_launch(void)
-{
- gint tabbed_stdout;
- GIOChannel *tabbed_stdout_channel;
- GError *err = NULL;
- gchar *output = NULL;
- char *argv[] = { "tabbed", "-c", "-d", "-p", "s1", "-n", __NAME__, NULL };
- Window plug_into;
-
- if (!g_spawn_async_with_pipes(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
- NULL, NULL, NULL, &tabbed_stdout, NULL,
- &err))
- {
- fprintf(stderr, __NAME__": Could not launch tabbed: %s\n", err->message);
- g_error_free(err);
- return 0;
- }
-
- tabbed_stdout_channel = g_io_channel_unix_new(tabbed_stdout);
- if (tabbed_stdout_channel == NULL)
- {
- fprintf(stderr, __NAME__": Could open tabbed's stdout\n");
- return 0;
- }
- g_io_channel_read_line(tabbed_stdout_channel, &output, NULL, NULL, NULL);
- g_io_channel_shutdown(tabbed_stdout_channel, FALSE, NULL);
- if (output == NULL)
- {
- fprintf(stderr, __NAME__": Could not read XID from tabbed\n");
- return 0;
- }
- g_strstrip(output);
- plug_into = strtol(output, NULL, 16);
- g_free(output);
- if (plug_into == 0)
- fprintf(stderr, __NAME__": The XID from tabbed is 0\n");
- return plug_into;
-}
-
void
trust_user_certs(WebKitWebContext *wc)
{
grab_environment_configuration();
- while ((opt = getopt(argc, argv, "e:CT")) != -1)
+ while ((opt = getopt(argc, argv, "C")) != -1)
{
switch (opt)
{
- case 'e':
- embed = atol(optarg);
- tabbed_automagic = FALSE;
- break;
case 'C':
cooperative_instances = FALSE;
break;
- case 'T':
- tabbed_automagic = FALSE;
- break;
default:
fprintf(stderr, "Usage: "__NAME__" [OPTION]... [URI]...\n");
exit(EXIT_FAILURE);
cooperation_setup();
downloadmanager_setup();
- if (tabbed_automagic && !(cooperative_instances && !cooperative_alone))
- embed = tabbed_launch();
-
if (!cooperative_instances || cooperative_alone)
{
c = g_build_filename(g_get_user_config_dir(), __NAME__, "web_extensions",
-.TH lariza 1 "2020-03-11" "lariza" "User Commands"
+.TH lariza 1 "2020-04-24" "lariza" "User Commands"
.\" --------------------------------------------------------------------
.SH NAME
lariza \- simple web browser
.\" --------------------------------------------------------------------
.SH SYNOPSIS
\fBlariza\fP
-[\fB\-e\fP \fIwid\fP]
[\fB\-C\fP]
-[\fB\-T\fP]
[\fIURI ...\fP]
.\" --------------------------------------------------------------------
.SH DESCRIPTION
In addition to the standard arguments of GTK+ 3, \fBlariza\fP knows
about the following options:
.TP
-\fB\-e\fP \fIwid\fP
-Embeds the main window and all newly created windows in the window
-specified by \fIwid\fP. The download manager is always a \(lqpopup\(rq.
-.TP
\fB\-C\fP
Disables cooperative instances.
-.TP
-\fB\-T\fP
-Disables automatic launching of suckless' \fBtabbed\fP(1).
.P
After these options there can be any number of URIs. If no URIs are
given, $\fBLARIZA_HOME_URI\fP will be opened.
was started in June 2014.
.\" --------------------------------------------------------------------
.SH "SEE ALSO"
-.BR lariza.usage (1),
-.BR tabbed (1).
+.BR lariza.usage (1).
-.TH lariza 1 "2020-04-17" "lariza" "User Commands"
+.TH lariza 1 "2020-04-24" "lariza" "User Commands"
.\" --------------------------------------------------------------------
.SH NAME
lariza.usage \- extended usage hints
user-specified certificates if the server's certificate can be validated
by any system-wide CA.
.\" --------------------------------------------------------------------
-.SH "USING LARIZA WITH TABBED"
-By default, \fBlariza\fP automatically launches an instance of suckless'
-\fBtabbed\fP(1).
-.P
-You can turn this feature off (see command line arguments) or you can
-specify a command line argument to embed \fBlariza\fP into an arbitrary
-container (XEMBED). Note that \fBlariza\fP will also automatically embed
-new windows in the same container.
-.P
-When using the automatically launched \fBtabbed\fP(1) instance, you
-can't use \fBtabbed\fP(1)'s \fBCtrl + Shift + Return\fP hotkey. This is
-because \fBtabbed\fP(1) is launched with \fB\-d\fP, so it knows nothing
-about \fBlariza\fP. However, \fBlariza\fP provides its own hotkey to
-launch a new window which will be embedded in the same instance of
-\fBtabbed\fP(1).
-.\" --------------------------------------------------------------------
.SH "WEBKIT LOCAL STORAGE"
WebKit does create files in your $\fBXDG_*\fP directories, i.e.
\fI~/.local/share\fP or \fI~/.cache\fP. It's up to you what you want to