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 is the hostname.
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 .Ic previous-line
124 .It C-n
125 .Ic next-line
126 .It C-f
127 .Ic forward-char
128 .It C-b
129 .Ic backward-char
130 .It M-{
131 .Ic backward-paragraph
132 .It M-}
133 .Ic forward-paragraph
134 .It C-a
135 .Ic move-beginning-of-line
136 .It C-e
137 .Ic move-end-of-line
138 .It M-v, M-space
139 .Ic scroll-up
140 .It C-v, space
141 .Ic scroll-down
142 .It M-<
143 .Ic beginning-of-buffer
144 .It M->
145 .Ic end-of-buffer
146 .It C-x C-c
147 .Ic kill-telescope
148 .It C-g
149 .Ic clear-minibuf
150 .It M-x
151 .Ic execute-extended-command
152 .It C-x C-f
153 .Ic load-url
154 .It C-x M-f
155 .Ic load-current-url
156 .It C-x t 0
157 .Ic tab-close
158 .It C-x t 1
159 .Ic tab-close-other
160 .It C-x t 2
161 .Ic tab-new
162 .It C-x t o
163 .Ic tab-next
164 .It C-x t O
165 .Ic tab-previous
166 .It C-x t m
167 .Ic tab-move
168 .It C-x t M
169 .Ic tab-move-to
170 .It C-M-b
171 .Ic previous-page
172 .It C-M-f
173 .Ic next-page
174 .It <f7> a
175 .Ic bookmark-page
176 .It <f7> <f7>
177 .Ic list-bookmarks
178 .El
179 .Ss Xr vi 1 Ns -like keys
180 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
181 .It k
182 .Ic previous-line
183 .It j
184 .Ic next-line
185 .It l
186 .Ic forward-char
187 .It h
188 .Ic backward-char
189 .It {
190 .Ic backward-paragraph
191 .It }
192 .Ic forward-paragraph
193 .It ^
194 .Ic move-beginning-of-line
195 .It $
196 .Ic move-end-of-line
197 .It K
198 .Ic scroll-line-up
199 .It J
200 .Ic scroll-line-down
201 .It g g
202 .Ic beginning-of-buffer
203 .It G
204 .Ic end-of-buffer
205 .It g D
206 .Ic tab-close
207 .It g N
208 .Ic tab-new
209 .It g t
210 .Ic tab-next
211 .It g T
212 .Ic tab-previous
213 .It g M-t
214 .Ic tab-move
215 .It g M-T
216 .Ic tab-move-to
217 .It H
218 .Ic previous-page
219 .It L
220 .Ic next-page
221 .It q
222 .Ic kill-telescope
223 .It ESC
224 .Ic clear-minibuf
225 .It :
226 .Ic execute-extended-command
227 .El
228 .Ss CUA-like keys
229 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
230 .It <up>
231 .Ic previous-line
232 .It <down>
233 .Ic next-line
234 .It <right>
235 .Ic forward-char
236 .It <left>
237 .Ic backward-char
238 .It <prior>
239 .Ic scroll-up
240 .It <next>
241 .Ic scroll-down
242 .It M-<left>
243 .Ic previous-page
244 .It M-<right>
245 .Ic next-page
246 .El
247 .Ss Neither Emacs nor vi specific
248 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
249 .It <f1>
250 .Ic toggle-help
251 .It enter
252 .Ic push-button
253 .It M-enter
254 .Ic push-button-new-tab
255 .It M-tab
256 .Ic previous-button
257 .It tab
258 .Ic next-button
259 .El
260 .Ss Minibuffer-specific keys
261 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
262 .It enter
263 .Ic mini-complete-and-exit
264 .It C-g
265 .Ic mini-abort
266 .It ESC
267 .Ic mini-abort
268 .It C-d
269 .Ic mini-delete-char
270 .It del
271 .Ic mini-delete-backward-char
272 .It backspace
273 .Ic mini-delete-backward-char
274 .It C-h
275 .Ic mini-delete-backward-char
276 .It C-b
277 .Ic backward-char
278 .It C-f
279 .Ic forward-char
280 .It <left>
281 .Ic backward-char
282 .It <right>
283 .Ic forward-char
284 .It C-e
285 .Ic move-end-of-line
286 .It C-a
287 .Ic move-beginning-of-line
288 .It <end>
289 .Ic move-end-of-line
290 .It <home>
291 .Ic move-beginning-of-line
292 .It C-k
293 .Ic mini-kill-line
294 .It M-p
295 .Ic mini-previous-history-element
296 .It M-n
297 .Ic mini-next-history-element
298 .It <up>
299 .Ic mini-previous-history-element
300 .It <down>
301 .Ic 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 .