diff options
-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} }, |