diff options
author | Edd Barrett <vext01@gmail.com> | 2010-12-24 16:07:07 +0000 |
---|---|---|
committer | Edd Barrett <vext01@gmail.com> | 2010-12-24 16:07:07 +0000 |
commit | a233fbdd1b1ab5c30f7f41e685d696f5f5f8fd3d (patch) | |
tree | 3a0d8538aaf8bde66337f6d7e30eb3777c170435 | |
parent | 88dd6be7c3550de5734273ebaf67e0b95c6c44b3 (diff) | |
download | xombrero-a233fbdd1b1ab5c30f7f41e685d696f5f5f8fd3d.tar.gz |
add :home
ok marco
-rw-r--r-- | xxxterm.1 | 2 | ||||
-rw-r--r-- | xxxterm.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/xxxterm.1 b/xxxterm.1 index 1f37493..9f6bfdf 100644 --- a/xxxterm.1 +++ b/xxxterm.1 @@ -299,6 +299,8 @@ Print page Global history .It Cm help Show help page. +.It Cm home +Go to home URL. .It Cm about, version Show about page. .It Cm cookies 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} }, |