"Uri to load at startup (equivalent to 'set uri = URI')", "URI" },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &uzbl.state.verbose,
"Whether to print all messages or just errors.", NULL },
- { "name", 'n', 0, G_OPTION_ARG_STRING, &uzbl.state.instance_name,
+ { "name", 'n', 0, G_OPTION_ARG_STRING, &uzbl.state.instance_name,
"Name of the current instance (defaults to Xorg window id)", "NAME" },
- { "config", 'c', 0, G_OPTION_ARG_STRING, &uzbl.state.config_file,
+ { "config", 'c', 0, G_OPTION_ARG_STRING, &uzbl.state.config_file,
"Config file (this is pretty much equivalent to uzbl < FILE )", "FILE" },
- { "socket", 's', 0, G_OPTION_ARG_INT, &uzbl.state.socket_id,
+ { "socket", 's', 0, G_OPTION_ARG_INT, &uzbl.state.socket_id,
"Socket ID", "SOCKET" },
- { "geometry", 'g', 0, G_OPTION_ARG_STRING, &uzbl.gui.geometry,
+ { "geometry", 'g', 0, G_OPTION_ARG_STRING, &uzbl.gui.geometry,
"Set window geometry (format: WIDTHxHEIGHT+-X+-Y)", "GEOMETRY" },
{ "version", 'V', 0, G_OPTION_ARG_NONE, &uzbl.behave.print_version,
"Print the version and exit", NULL },
{ "status_pbar_pending", PTR_V(uzbl.gui.sbar.progress_u, STR, 1, update_title)},
{ "status_pbar_width", PTR_V(uzbl.gui.sbar.progress_w, INT, 1, update_title)},
{ "status_background", PTR_V(uzbl.behave.status_background, STR, 1, update_title)},
- { "insert_indicator", PTR_V(uzbl.behave.insert_indicator, STR, 1, update_title)},
- { "command_indicator", PTR_V(uzbl.behave.cmd_indicator, STR, 1, update_title)},
+ { "insert_indicator", PTR_V(uzbl.behave.insert_indicator, STR, 1, update_indicator)},
+ { "command_indicator", PTR_V(uzbl.behave.cmd_indicator, STR, 1, update_indicator)},
{ "title_format_long", PTR_V(uzbl.behave.title_format_long, STR, 1, update_title)},
{ "title_format_short", PTR_V(uzbl.behave.title_format_short, STR, 1, update_title)},
{ "icon", PTR_V(uzbl.gui.icon, STR, 1, set_icon)},
guint etype;
char upto = ' ';
char *end_simple_var = "^°!\"§$%&/()=?'`'+~*'#-.:,;@<>| \\{}[]¹²³¼½";
- char str_end[2];
+ char str_end[3];
char ret[4096];
char *vend = NULL;
GError *err = NULL;
g_free(uzbl.state.keycmd);
g_hash_table_destroy(uzbl.bindings);
g_hash_table_destroy(uzbl.behave.commands);
- g_scanner_destroy(uzbl.scan);
}
/* used for html_mode_timeout
if(uzbl.state.verbose)
printf("Error in geometry string: %s\n", uzbl.gui.geometry);
}
- /* update geometry var with the actual geometry
+ /* update geometry var with the actual geometry
this is necessary as some WMs don't seem to honour
the above setting and we don't want to end up with
wrong geometry information
}
void
+update_indicator() {
+ set_mode_indicator();
+ update_title();
+}
+
+void
set_insert_mode(gboolean mode) {
uzbl.behave.insert_mode = mode;
set_mode_indicator();
char *buf = NULL;
if( (c = g_hash_table_lookup(uzbl.comm.proto_var, name)) ) {
- if(!c->writeable) return TRUE;
+ if(!c->writeable) return FALSE;
/* check for the variable type */
if (c->type == TYPE_STR) {
return TRUE;
}
- if (uzbl.behave.insert_mode &&
- ( ((event->state & uzbl.behave.modmask) != uzbl.behave.modmask) ||
+ if (uzbl.behave.insert_mode &&
+ ( ((event->state & uzbl.behave.modmask) != uzbl.behave.modmask) ||
(!uzbl.behave.modmask)
)
)
if(setup_signal(SIGALRM, catch_alrm) == SIG_ERR)
fprintf(stderr, "uzbl: error hooking SIGALARM\n");
- uzbl.gui.sbar.progress_s = g_strdup("=");
+ uzbl.gui.sbar.progress_s = g_strdup("="); //TODO: move these to config.h
uzbl.gui.sbar.progress_u = g_strdup("·");
uzbl.gui.sbar.progress_w = 10;
retreive_geometry();
gchar *uri_override = (uzbl.state.uri ? g_strdup(uzbl.state.uri) : NULL);
+ if (argc > 1 && !uzbl.state.uri)
+ uri_override = g_strdup(argv[1]);
gboolean verbose_override = uzbl.state.verbose;
settings_init ();