about summary refs log tree commit diff stats
path: root/xxxterm.c
diff options
context:
space:
mode:
authorEdd Barrett <vext01@gmail.com>2010-12-24 16:07:07 +0000
committerEdd Barrett <vext01@gmail.com>2010-12-24 16:07:07 +0000
commita233fbdd1b1ab5c30f7f41e685d696f5f5f8fd3d (patch)
tree3a0d8538aaf8bde66337f6d7e30eb3777c170435 /xxxterm.c
parent88dd6be7c3550de5734273ebaf67e0b95c6c44b3 (diff)
downloadxombrero-a233fbdd1b1ab5c30f7f41e685d696f5f5f8fd3d.tar.gz
add :home
ok marco
Diffstat (limited to 'xxxterm.c')
-rw-r--r--xxxterm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 8dae430..7bbd124 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -2131,6 +2131,18 @@ print_page(struct tab *t, struct karg *args)
 	return (0);
 }
 
+int
+go_home(struct tab *t, struct karg *args)
+{
+	char			*newuri;
+
+	newuri = guess_url_type((char *)home);
+	webkit_web_view_load_uri(t->wv, newuri);
+	free(newuri);
+
+	return (0);
+}
+
 /* inherent to GTK not all keys will be caught at all times */
 /* XXX sort key bindings */
 struct key {
@@ -2234,6 +2246,7 @@ struct cmd {
 	{ "h"		,	0,	xtp_page_hl,		{0} },
 	{ "hist"	,	0,	xtp_page_hl,		{0} },
 	{ "history"	,	0,	xtp_page_hl,		{0} },
+	{ "home"	,	0,	go_home,		{0} },
 
 	{ "1",			0,	move,			{.i = XT_MOVE_TOP} },
 	{ "print",		0,	print_page,		{0} },