(bobpaul) - session script patches
Tom Adams (holizz) - few patches
neutralinsomniac - load_progress = 0 fix
+ Maximilian Gaß (mxey) - small patches
+ Abel Camarillo (00z) - make it compile on OpenBSD
Originaly based on http://trac.webkit.org/browser/trunk/WebKitTools/GtkLauncher/main.c
Which is copyrighted:
-CPPFLAGS:=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS)
-LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0) $(LDFLAGS)
+CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS)
+LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4) -pthread $(LDFLAGS)
all: uzbl uzblctrl
PREFIX?=$(DESTDIR)/usr
* `<string>` ends with an asterisk: similar behavior as with an underscore, but also makes the binding incremental (i.e. the command will be invoked on every keystroke).
* `<string>` ends on a different character: you need to type the full string, which will trigger the command immediately, without pressing enter/return.
- examples:
-
- # uzbl will load the url when you type: 'o <url><enter>'
- bind o _ = uri %s
- # a search command which is called on every character typed after the slash, letting you see the search narrow down while typing.
- # Hitting return, enter or esc will terminate the search.
- bind /* = search %s
- # when you type `ZZ` and nothing else, the exit command will be triggered immediately.
- bind ZZ = exit
+ * `bind o _ = uri %s`
+ - uzbl will load the url when you type: 'o <url><enter>'
+ * `bind /* = search %s`
+ - a search command which is called on every character typed after the slash, letting you see the search narrow down while typing.
+ - Hitting return, enter or esc will terminate the search.
+ * `bind ZZ = exit`
+ - When you type `ZZ` and nothing else, the exit command will be triggered immediately.
* `back`
* `forward`
More or less in order of importance/urgency
-* cookie handler. storing seems to work, but not yet sending
+* improve cookie handler.
* a variable that holds the page state: loading, pending, seen. this can be shown in titlebar/statusbar and used for multiple instances management
* allow to tag , to group instances together
* store uri/tag/name/state in xorg window properties
* split up uzbl.c into multiple files
* shortcuts to focus other instances (see docs/multiple-instances-management)
-* password handler (manager)
* recognize -h with GOption?
* implement a vimperator-like link following scheme.
* let users attach handlers to the most common events/signals in uzbl.
great use case: automatically calling formfiller for certain sites
* write little script to open new urls with the urxvt url thing +document.
+* document:
+ stylesheet overridding
+ formfiller
+ link following
+ webkit inspector usage
+ scroll commands can take %s, eg scroll 100% for pages
+ chaining of actions, dump_config, print (and other actions that aren't documented yet)
+ overriding variables (such as -u)
+ variable expansion (@var, @{var}, where do they get expanded? can users have their own vars?, should we merge this with the replacement we do for useragent/window title etc?)
+ how %s works for the js command
+* consider switching to CMAKE. (someone already ported the makefile etc)
+
SOMEDAY:
figure out caching with webkit and in general how we can speed up everything
[ -z "$cookie_data" ] && exit 1
-#notifier=
+notifier=
#notifier=notify-send
-notify_wrapper () {
- echo "$@" >> $HOME/cookielog
-}
+#notify_wrapper () {
+# echo "$@" >> $HOME/cookielog
+#}
+#notifier=notifier_wrapper
# if this variable is set, we will use it to inform you when and which cookies we store, and when/which we send.
-notifier=notify_wrapper
+# it's primarily used for debugging
+notifier=
which zenity &>/dev/null || exit 2
# Example cookie:
if [[ $8 =~ .*(.torrent) ]]
then
- pushd $HOME
+ cd $HOME
$WGET $8
else
- pushd $HOME
+ cd $HOME
$WGET $8
fi
-popd
this.test = test;
this.toString = toString;
this.numbers = numbers;
+ function matchAgainst(element){
+ if(element.node.nodeName == "INPUT"){
+ return element.node.value;
+ } else {
+ return element.node.textContent;
+ }
+ }
function test(element) {
// test all the regexp
- return words.every(function (regex) { return element.node.textContent.match(regex)});
+ var item = matchAgainst(element);
+ return words.every(function (regex) { return item.match(regex)});
}
}
#define LENGTH(x) (sizeof x / sizeof x[0])
#define MAX_BINDINGS 256
+#define _POSIX_SOURCE
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
// make sure that the args string you pass can properly be interpreted (eg properly escaped against whitespace, quotes etc)
static gboolean
run_command (const gchar *command, const guint npre, const gchar **args,
- const gboolean sync, char **stdout) {
+ const gboolean sync, char **output_stdout) {
//command <uzbl conf> <uzbl pid> <uzbl win id> <uzbl fifo file> <uzbl socket file> [args]
GError *err = NULL;
gboolean result;
if (sync) {
- if (*stdout) *stdout = strfree(*stdout);
+ if (*output_stdout) *output_stdout = strfree(*output_stdout);
result = g_spawn_sync(NULL, (gchar **)a->data, NULL, G_SPAWN_SEARCH_PATH,
- NULL, NULL, stdout, NULL, NULL, &err);
+ NULL, NULL, output_stdout, NULL, NULL, &err);
} else result = g_spawn_async(NULL, (gchar **)a->data, NULL, G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, &err);
g_string_append_printf(s, " -- result: %s", (result ? "true" : "false"));
printf("%s\n", s->str);
g_string_free(s, TRUE);
- if(stdout) {
- printf("Stdout: %s\n", *stdout);
+ if(output_stdout) {
+ printf("Stdout: %s\n", *output_stdout);
}
}
if (err) {
} else if (c->type == TYPE_FLOAT) {
float *fp = (float *)c->ptr;
buf = expand_vars(val);
- *fp = atof(buf);
+ *fp = strtod(buf, &endp);
g_free(buf);
}
gtk_misc_set_alignment (GTK_MISC(g->mainbar_label), 0, 0);
gtk_misc_set_padding (GTK_MISC(g->mainbar_label), 2, 2);
gtk_box_pack_start (GTK_BOX (g->mainbar), g->mainbar_label, TRUE, TRUE, 0);
+ g_signal_connect (G_OBJECT (g->mainbar), "key-press-event", G_CALLBACK (key_press_cb), NULL);
return g->mainbar;
}
static gboolean
run_command(const gchar *command, const guint npre,
- const gchar **args, const gboolean sync, char **stdout);
+ const gchar **args, const gboolean sync, char **output_stdout);
static void
spawn(WebKitWebView *web_view, GArray *argv);