Blob


1 .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd $Mdocdate: March 28 2021$
15 .Dt TELESCOPE 1
16 .Os
17 .Sh NAME
18 .Nm telescope
19 .Nd Gemini client
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Ar URL
24 .Ek
25 .Sh DESCRIPTION
26 .Nm
27 is an interactive browser for the Gemini protocol.
28 It is able to process text/gemini and more in general every text/* file.
29 .Nm
30 also features tabs, bookmarks and out-of-band TOFU verification.
31 .Sh TOFU
32 .Nm
33 aims to use the "Trust, but Verify (where appropriate)" approach.
34 The idea is to define three level of verification for a certificate:
35 .Bl -tag -width 12m
36 .It untrusted
37 the server fingerprint does NOT match the stored value
38 .It trusted
39 the server fingerprint matches the store one
40 .It verified
41 the fingerprint matches and has been verified out-of-band
42 .El
43 .Pp
44 Most of the time the
45 .Dq trusted
46 level is enough, but where is appropriate users should be able to
47 verify out-of-band the certificate.
48 .Pp
49 At the moment, there is no built-in support for an out-of-band
50 verification though.
51 .Pp
52 Known certificates are store in
53 .Pa ~/.telescope/known_hosts
54 with a format similar to the
55 .Xr ssh 1 Ns '
56 .Pa known_hosts
57 file.
58 Each line is a record and it's made up by three fields, separated by a
59 single space, according to the following format:
60 .Dq HOST HASH TRUSTED
61 where:
62 .Bl -tag -width 12m
63 .It HOST
64 the hostname, optionally followed by a colon (":") and a port number.
65 .It HASH
66 is the hash of the certificate, as outputted by
67 .Xr tls_peer_cert_hash 3 .
68 .It TRUSTED
69 a single digit.
70 0 means trusted, 1 verified.
71 .El
72 .Sh DEFAULT KEY BINDINGS
73 The default key bindings are very similar to GNU Emacs, but care has
74 been taken to include also bindings familiar for
75 .Xr vi 1
76 and
77 .Dq CUA
78 users.
79 In the following examples, C-x means Control-x, M-x means Meta-x,
80 where the Meta key may be either a special key on the keyboard or the
81 ALT key; otherwise ESC followed by the key X works as well, and C-M-x
82 means to press the key X together with both Control and Meta.
83 .Pp
84 Keys are usually a single character, like
85 .Sq p
86 or
87 .Sq n ,
88 but some special keys are accepted as well.
89 .Pp
90 .Bl -tag -width 16m -offset indent -compact
91 .It <up>
92 Up arrow
93 .It <down>
94 Down arrow
95 .It <left>
96 Left arrow
97 .It <right>
98 Right arrow
99 .It <prior>
100 Previous page/Page up
101 .It <next>
102 Next page/Page down
103 .It <home>
104 Home
105 .It <end>
106 End
107 .It <f0> thru <f63>
108 Function keys
109 .It del or backspace
110 Backspace
111 .It esc
112 Escape
113 .It space or spc
114 Space
115 .It enter or ret
116 Enter
117 .It tab
118 Tab
119 .El
120 .Ss GNU Emacs-like keys
121 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
122 .It C-p
123 previous-line
124 .It C-n
125 next-line
126 .It C-f
127 forward-char
128 .It C-b
129 backward-char
130 .It M-{
131 backward-paragraph
132 .It M-}
133 forward-paragraph
134 .It C-a
135 move-beginning-of-line
136 .It C-e
137 move-end-of-line
138 .It M-v, M-space
139 scroll-up
140 .It C-v, space
141 scroll-down
142 .It M-<
143 beginning-of-buffer
144 .It M->
145 end-of-buffer
146 .It C-x C-c
147 kill-telescope
148 .It C-g
149 clear-minibuf
150 .It M-x
151 execute-extended-command
152 .It C-x C-f
153 load-url
154 .It C-x M-f
155 load-current-url
156 .It C-x t 0
157 tab-close
158 .It C-x t 1
159 tab-close-other
160 .It C-x t 2
161 tab-new
162 .It C-x t o
163 tab-next
164 .It C-x t O
165 tab-previous
166 .It C-x t m
167 tab-move
168 .It C-x t M
169 tab-move-to
170 .It C-M-b
171 previous-page
172 .It C-M-f
173 next-page
174 .It <f7> a
175 bookmark-page
176 .It <f7> <f7>
177 list-bookmarks
178 .El
179 .Ss Xr vi 1 Ns -like keys
180 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
181 .It k
182 previous-line
183 .It j
184 next-line
185 .It l
186 forward-char
187 .It h
188 backward-char
189 .It {
190 backward-paragraph
191 .It }
192 forward-paragraph
193 .It ^
194 move-beginning-of-line
195 .It $
196 move-end-of-line
197 .It K
198 scroll-line-up
199 .It J
200 scroll-line-down
201 .It g g
202 beginning-of-buffer
203 .It G
204 end-of-buffer
205 .It g D
206 tab-close
207 .It g N
208 tab-new
209 .It g t
210 tab-next
211 .It g T
212 tab-previous
213 .It g M-t
214 tab-move
215 .It g M-T
216 tab-move-to
217 .It H
218 previous-page
219 .It L
220 next-page
221 .It q
222 kill-telescope
223 .It ESC
224 clear-minibuf
225 .It :
226 execute-extended-command
227 .El
228 .Ss CUA-like keys
229 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
230 .It <up>
231 previous-line
232 .It <down>
233 next-line
234 .It <right>
235 forward-char
236 .It <left>
237 backward-char
238 .It <prior>
239 scroll-up
240 .It <next>
241 scroll-down
242 .It M-<left>
243 previous-page
244 .It M-<right>
245 next-page
246 .El
247 .Ss Neither Emacs nor vi specific
248 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
249 .It <f1>
250 toggle-help
251 .It enter
252 push-button
253 .It M-enter
254 push-button-new-tab
255 .It M-tab
256 previous-button
257 .It tab
258 next-button
259 .El
260 .Ss Minibuffer-specific keys
261 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
262 .It enter
263 mini-complete-and-exit
264 .It C-g
265 mini-abort
266 .It ESC
267 mini-abort
268 .It C-d
269 mini-delete-char
270 .It del
271 mini-delete-backward-char
272 .It backspace
273 mini-delete-backward-char
274 .It C-h
275 mini-delete-backward-char
276 .It C-b
277 backward-char
278 .It C-f
279 forward-char
280 .It <left>
281 backward-char
282 .It <right>
283 forward-char
284 .It C-e
285 move-end-of-line
286 .It C-a
287 move-beginning-of-line
288 .It <end>
289 move-end-of-line
290 .It <home>
291 move-beginning-of-line
292 .It C-k
293 mini-kill-line
294 .It M-p
295 mini-previous-history-element
296 .It M-n
297 mini-next-history-element
298 .It <up>
299 mini-previous-history-element
300 .It <down>
301 mini-next-history-element
302 .El
303 .Sh INTERACTIVE COMMANDS
304 Follows the documentation for the interactive commands.
305 These commands can be bound to a key or executed with
306 .Ic execute-extended-command .
307 .Ss Movement commands
308 .Bl -tag -width execute-extended-command -compact
309 .It Ic backward-char
310 Move point one character backward.
311 .It Ic backward-paragraph
312 Move point one paragraph backward.
313 .It Ic beginning-of-buffer
314 Move point to the beginning of the buffer.
315 .It Ic end-of-buffer
316 Move point to the end of the buffer.
317 .It Ic forward-char
318 Move point one character forward.
319 .It Ic forward-paragraph
320 Move point one paragraph forward.
321 .It Ic move-beginning-of-line
322 Move point at the beginning of the current (visual) line.
323 .It Ic move-end-of-line
324 Move point at the end of the current (visual) line.
325 .It Ic next-button
326 Move point to the next link.
327 .It Ic next-line
328 Move point to the next (visual) line, in the same column if possible.
329 .It Ic previous-button
330 Move point to the previous link.
331 .It Ic previous-line
332 Move point to the previous (visual) line.
333 .El
334 .Ss Bookmark-related commands
335 .Bl -tag -width execute-extended-command -compact
336 .It Ic bookmark-page
337 Add a link to the bookmark file.
338 It preloads the minibuffer with the current URL.
339 .It Ic list-bookmarks
340 Load the bookmarks page.
341 .El
342 .Ss Tab-related commands
343 .Bl -tag -width execute-extended-command -compact
344 .It Ic tab-close
345 Close the current tab.
346 .It Ic tab-close-other
347 Close all tabs but the current one.
348 .It Ic tab-move
349 Move the current tab after the next one, wrapping around if
350 needed.
351 .It Ic tab-move-to
352 Move the current tab before the previous one, wrapping around if needed.
353 .It Ic tab-new
354 Open a new tab.
355 .It Ic tab-next
356 Focus next tab, wrapping around eventually.
357 .It Ic tab-previous
358 Focus the previous tab, wrapping around eventually.
359 .El
360 .Ss Misc commands
361 .Bl -tag -width execute-extended-command -compact
362 .It Ic clear-minibuf
363 Clears the echo area.
364 .It Ic execute-extended-command
365 Prompts for a command name using the minibuffer.
366 .It Ic kill-telescope
367 Quit
368 .Nm .
369 .It Ic load-current-url
370 Prompts for an URL, the minibuffer is preloaded with the current
371 one.
372 .It Ic load-url
373 Prompts for an URL.
374 .It Ic next-page
375 Load the next item in the history list.
376 .It Ic previous-page
377 Load the previous item in the history list.
378 .It Ic push-button
379 Follow the link on the current line.
380 .It Ic push-button-new-tab
381 Follow the link on the current line on a new tab.
382 .It Ic redraw
383 Redraws the screen, useful if some background program messed up the
384 display.
385 .It Ic scroll-down
386 Scroll down by one visual page.
387 .It Ic scroll-line-down
388 Scroll down by one line.
389 .It Ic scroll-line-up
390 Scroll up by one line.
391 .It Ic scroll-up
392 Scroll up by one visual page.
393 .It Ic toggle-help
394 Toggle side window with help about available keys and their associated
395 interactive command.
396 .El
397 .Ss Minibuffer commands
398 .Bl -tag -width execute-extended-command -compact
399 .It Ic mini-abort
400 Abort the current minibuffer action.
401 .It Ic mini-complete-and-exit
402 Complete the current minibuffer action.
403 .It Ic mini-delete-backward-char
404 Delete the character before the point.
405 .It Ic mini-delete-char
406 Delete the character after the point.
407 .It Ic mini-kill-line
408 Delete from the point until the end of the line.
409 .It Ic mini-next-history-element
410 Load the previous history element.
411 .It Ic mini-previous-history-element
412 Load the next history element.
413 .El
414 .Sh FILES
415 .Bl -tag -width Ds -compact
416 .It Pa ~/.telescope/bookmarks.gmi
417 Holds the bookmarks.
418 .It Pa ~/.telescope/known_hosts
419 Contains a list of host keys for all the hosts the user has visited.
420 See the TOFU section for more info.
421 .It Pa ~/.telescope/session
422 Contains the list of opened tabs in the last session, one per line.
423 Gets written on
424 .Ic kill-telescope
425 and loaded on startup.
426 .El
427 .Sh AUTHORS
428 .An -nosplit
429 The
430 .Nm
431 program was written by
432 .An Omar Polo Aq Mt op@omarpolo.com .