about summary refs log tree commit diff stats
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
parent88dd6be7c3550de5734273ebaf67e0b95c6c44b3 (diff)
downloadxombrero-a233fbdd1b1ab5c30f7f41e685d696f5f5f8fd3d.tar.gz
add :home
ok marco
-rw-r--r--xxxterm.12
-rw-r--r--xxxterm.c13
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} },
3a8a9402558f0736fb7dba3'>^
1a4de9dd ^
1f08b541 ^







37d53a70 ^
1f08b541 ^



9c1056f5 ^
1f08b541 ^
37d53a70 ^
9c1056f5 ^















































































1a4de9dd ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159