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