diff options
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | events.c | 4 | ||||
-rwxr-xr-x | uzbl-browser | 2 | ||||
-rw-r--r-- | uzbl-core.c | 3 | ||||
-rw-r--r-- | uzbl-core.h | 1 |
5 files changed, 8 insertions, 3 deletions
@@ -206,6 +206,7 @@ Besides the builtin variables you can also define your own ones and use them in - `scheme_handler`: handler to execute for each URI navigated to - the navigation request will be ignored if handler prints "USED\n" - `fifo_dir`: location to store fifo's - `socket_dir`: location to store sockets + - `print_events`: show events on stdout - `http_debug`: http debug mode (value 0-3) - `shell_cmd`: alias which will be expanded to use shell commands (eg sh -c) - `proxy_url`: http traffic socks proxy (eg: http://<host>:<port>) @@ -169,8 +169,8 @@ send_event(int type, const gchar *details, const gchar *custom_event) { } if(event_message->str) { - /* TODO: a means to select the interface to which events are sent */ - send_event_stdout(event_message); + if(uzbl.state.events_stdout) + send_event_stdout(event_message); send_event_socket(event_message); g_string_free(event_message, TRUE); diff --git a/uzbl-browser b/uzbl-browser index eebf9e3..57c5087 100755 --- a/uzbl-browser +++ b/uzbl-browser @@ -63,4 +63,4 @@ DAEMON_PID=${DAEMON_SOCKET}.pid uzbl-event-manager -va start #fi -uzbl-core "$@" --connect-socket $DAEMON_SOCKET | grep -v ^EVENT +uzbl-core "$@" --connect-socket $DAEMON_SOCKET diff --git a/uzbl-core.c b/uzbl-core.c index 9203fd0..9c8660e 100644 --- a/uzbl-core.c +++ b/uzbl-core.c @@ -53,6 +53,8 @@ GOptionEntry entries[] = "Socket ID", "SOCKET" }, { "connect-socket", 0, 0, G_OPTION_ARG_STRING_ARRAY, &uzbl.state.connect_socket_names, "Connect to server socket", "CSOCKET" }, + { "print-events", 'p', 0, G_OPTION_ARG_NONE, &uzbl.state.events_stdout, + "Whether to print events to stdout.", NULL }, { "geometry", 'g', 0, G_OPTION_ARG_STRING, &uzbl.gui.geometry, "Set window geometry (format: WIDTHxHEIGHT+-X+-Y or maximized)", "GEOMETRY" }, { "version", 'V', 0, G_OPTION_ARG_NONE, &uzbl.behave.print_version, @@ -85,6 +87,7 @@ const struct var_name_to_ptr_t { /* ---------------------------------------------------------------------------------------------- */ { "uri", PTR_V_STR(uzbl.state.uri, 1, cmd_load_uri)}, { "verbose", PTR_V_INT(uzbl.state.verbose, 1, NULL)}, + { "print_events", PTR_V_INT(uzbl.state.events_stdout, 1, NULL)}, { "inject_html", PTR_V_STR(uzbl.behave.inject_html, 0, cmd_inject_html)}, { "geometry", PTR_V_STR(uzbl.gui.geometry, 1, cmd_set_geometry)}, { "keycmd", PTR_V_STR(uzbl.state.keycmd, 1, NULL)}, diff --git a/uzbl-core.h b/uzbl-core.h index 83fa4b2..df9eb1a 100644 --- a/uzbl-core.h +++ b/uzbl-core.h @@ -93,6 +93,7 @@ typedef struct { gchar* keycmd; gchar* searchtx; gboolean verbose; + gboolean events_stdout; GPtrArray *event_buffer; gchar** connect_socket_names; GdkEventButton *last_button; |