1 bba111bc 2021-03-28 op .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 bba111bc 2021-03-28 op .\" Permission to use, copy, modify, and distribute this software for any
4 bba111bc 2021-03-28 op .\" purpose with or without fee is hereby granted, provided that the above
5 bba111bc 2021-03-28 op .\" copyright notice and this permission notice appear in all copies.
7 bba111bc 2021-03-28 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 bba111bc 2021-03-28 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 bba111bc 2021-03-28 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 bba111bc 2021-03-28 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 bba111bc 2021-03-28 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 bba111bc 2021-03-28 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 bba111bc 2021-03-28 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 bba111bc 2021-03-28 op .Dd $Mdocdate: March 28 2021$
15 bba111bc 2021-03-28 op .Dt TELESCOPE 1
19 bba111bc 2021-03-28 op .Nd Gemini client
24 c92e529c 2021-06-15 op .Op Fl c Pa config
27 bba111bc 2021-03-28 op .Sh DESCRIPTION
29 bba111bc 2021-03-28 op is an interactive browser for the Gemini protocol.
30 bba111bc 2021-03-28 op It is able to process text/gemini and more in general every text/* file.
32 bba111bc 2021-03-28 op also features tabs, bookmarks and out-of-band TOFU verification.
34 c92e529c 2021-06-15 op The arguments are as follows:
35 c92e529c 2021-06-15 op .Bl -tag -width tenletters
37 c92e529c 2021-06-15 op Display version and usage.
39 c92e529c 2021-06-15 op Configtest mode.
40 c92e529c 2021-06-15 op Only check the configuration file for validity.
41 c92e529c 2021-06-15 op .It Fl c Pa config
42 c92e529c 2021-06-15 op Specify an alternative configuration file.
44 c92e529c 2021-06-15 op .Pa $HOME/.telescope/config
49 bba111bc 2021-03-28 op aims to use the "Trust, but Verify (where appropriate)" approach.
50 bba111bc 2021-03-28 op The idea is to define three level of verification for a certificate:
51 bba111bc 2021-03-28 op .Bl -tag -width 12m
53 bba111bc 2021-03-28 op the server fingerprint does NOT match the stored value
55 bba111bc 2021-03-28 op the server fingerprint matches the store one
57 bba111bc 2021-03-28 op the fingerprint matches and has been verified out-of-band
60 bba111bc 2021-03-28 op Most of the time the
62 bba111bc 2021-03-28 op level is enough, but where is appropriate users should be able to
63 bba111bc 2021-03-28 op verify out-of-band the certificate.
65 bba111bc 2021-03-28 op At the moment, there is no built-in support for an out-of-band
66 bba111bc 2021-03-28 op verification though.
68 bba111bc 2021-03-28 op Known certificates are store in
69 bba111bc 2021-03-28 op .Pa ~/.telescope/known_hosts
70 bba111bc 2021-03-28 op with a format similar to the
71 bba111bc 2021-03-28 op .Xr ssh 1 Ns '
72 bba111bc 2021-03-28 op .Pa known_hosts
74 bba111bc 2021-03-28 op Each line is a record and it's made up by three fields, separated by a
75 bba111bc 2021-03-28 op single space, according to the following format:
76 bba111bc 2021-03-28 op .Dq HOST HASH TRUSTED
78 bba111bc 2021-03-28 op .Bl -tag -width 12m
80 eb4388ee 2021-04-25 op the hostname, optionally followed by a colon (":") and a port number.
82 bba111bc 2021-03-28 op is the hash of the certificate, as outputted by
83 6c04e8b6 2021-04-01 op .Xr tls_peer_cert_hash 3 .
85 bba111bc 2021-03-28 op a single digit.
86 bba111bc 2021-03-28 op 0 means trusted, 1 verified.
88 bba111bc 2021-03-28 op .Sh DEFAULT KEY BINDINGS
89 bba111bc 2021-03-28 op The default key bindings are very similar to GNU Emacs, but care has
90 bba111bc 2021-03-28 op been taken to include also bindings familiar for
95 bba111bc 2021-03-28 op In the following examples, C-x means Control-x, M-x means Meta-x,
96 bba111bc 2021-03-28 op where the Meta key may be either a special key on the keyboard or the
97 bba111bc 2021-03-28 op ALT key; otherwise ESC followed by the key X works as well, and C-M-x
98 bba111bc 2021-03-28 op means to press the key X together with both Control and Meta.
100 bba111bc 2021-03-28 op Keys are usually a single character, like
104 bba111bc 2021-03-28 op but some special keys are accepted as well.
106 bba111bc 2021-03-28 op .Bl -tag -width 16m -offset indent -compact
116 bba111bc 2021-03-28 op Previous page/Page up
118 bba111bc 2021-03-28 op Next page/Page down
123 bba111bc 2021-03-28 op .It <f0> thru <f63>
124 bba111bc 2021-03-28 op Function keys
125 bba111bc 2021-03-28 op .It del or backspace
129 bba111bc 2021-03-28 op .It space or spc
131 bba111bc 2021-03-28 op .It enter or ret
136 8dc60352 2021-06-15 op Depends on the configuration of the terminal emulator.
137 8dc60352 2021-06-15 op Usually is shift tab though.
139 bba111bc 2021-03-28 op .Ss GNU Emacs-like keys
140 bba111bc 2021-03-28 op .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
142 7dbaef94 2021-04-22 op previous-line
148 7dbaef94 2021-04-22 op backward-char
150 7dbaef94 2021-04-22 op backward-paragraph
152 7dbaef94 2021-04-22 op forward-paragraph
154 7dbaef94 2021-04-22 op move-beginning-of-line
156 7dbaef94 2021-04-22 op move-end-of-line
157 bba111bc 2021-03-28 op .It M-v, M-space
159 bba111bc 2021-03-28 op .It C-v, space
162 7dbaef94 2021-04-22 op beginning-of-buffer
164 7dbaef94 2021-04-22 op end-of-buffer
166 7dbaef94 2021-04-22 op kill-telescope
168 7dbaef94 2021-04-22 op clear-minibuf
170 7dbaef94 2021-04-22 op execute-extended-command
174 7dbaef94 2021-04-22 op load-current-url
178 7dbaef94 2021-04-22 op tab-close-other
190 7dbaef94 2021-04-22 op previous-page
194 7dbaef94 2021-04-22 op bookmark-page
195 bba111bc 2021-03-28 op .It <f7> <f7>
196 7dbaef94 2021-04-22 op list-bookmarks
198 bba111bc 2021-03-28 op .Ss Xr vi 1 Ns -like keys
199 bba111bc 2021-03-28 op .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
201 7dbaef94 2021-04-22 op previous-line
207 7dbaef94 2021-04-22 op backward-char
209 7dbaef94 2021-04-22 op backward-paragraph
211 7dbaef94 2021-04-22 op forward-paragraph
213 7dbaef94 2021-04-22 op move-beginning-of-line
215 7dbaef94 2021-04-22 op move-end-of-line
217 7dbaef94 2021-04-22 op scroll-line-up
219 7dbaef94 2021-04-22 op scroll-line-down
221 7dbaef94 2021-04-22 op beginning-of-buffer
223 7dbaef94 2021-04-22 op end-of-buffer
237 7dbaef94 2021-04-22 op previous-page
241 7dbaef94 2021-04-22 op kill-telescope
243 7dbaef94 2021-04-22 op clear-minibuf
245 7dbaef94 2021-04-22 op execute-extended-command
247 bba111bc 2021-03-28 op .Ss CUA-like keys
248 bba111bc 2021-03-28 op .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
250 7dbaef94 2021-04-22 op previous-line
256 7dbaef94 2021-04-22 op backward-char
262 7dbaef94 2021-04-22 op previous-page
263 bba111bc 2021-03-28 op .It M-<right>
266 bba111bc 2021-03-28 op .Ss Neither Emacs nor vi specific
267 bba111bc 2021-03-28 op .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
273 7dbaef94 2021-04-22 op push-button-new-tab
275 7dbaef94 2021-04-22 op previous-button
277 8dc60352 2021-06-15 op previous-button
281 bba111bc 2021-03-28 op .Ss Minibuffer-specific keys
282 bba111bc 2021-03-28 op .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
284 7dbaef94 2021-04-22 op mini-complete-and-exit
290 7dbaef94 2021-04-22 op mini-delete-char
292 7dbaef94 2021-04-22 op mini-delete-backward-char
293 bba111bc 2021-03-28 op .It backspace
294 7dbaef94 2021-04-22 op mini-delete-backward-char
296 7dbaef94 2021-04-22 op mini-delete-backward-char
298 7dbaef94 2021-04-22 op backward-char
302 7dbaef94 2021-04-22 op backward-char
306 7dbaef94 2021-04-22 op move-end-of-line
308 7dbaef94 2021-04-22 op move-beginning-of-line
310 7dbaef94 2021-04-22 op move-end-of-line
312 7dbaef94 2021-04-22 op move-beginning-of-line
314 7dbaef94 2021-04-22 op mini-kill-line
316 7dbaef94 2021-04-22 op mini-previous-history-element
318 7dbaef94 2021-04-22 op mini-next-history-element
320 7dbaef94 2021-04-22 op mini-previous-history-element
322 7dbaef94 2021-04-22 op mini-next-history-element
324 bba111bc 2021-03-28 op .Sh INTERACTIVE COMMANDS
325 bba111bc 2021-03-28 op Follows the documentation for the interactive commands.
326 bba111bc 2021-03-28 op These commands can be bound to a key or executed with
327 bba111bc 2021-03-28 op .Ic execute-extended-command .
328 bba111bc 2021-03-28 op .Ss Movement commands
329 bba111bc 2021-03-28 op .Bl -tag -width execute-extended-command -compact
330 bba111bc 2021-03-28 op .It Ic backward-char
331 bba111bc 2021-03-28 op Move point one character backward.
332 bba111bc 2021-03-28 op .It Ic backward-paragraph
333 bba111bc 2021-03-28 op Move point one paragraph backward.
334 bba111bc 2021-03-28 op .It Ic beginning-of-buffer
335 bba111bc 2021-03-28 op Move point to the beginning of the buffer.
336 bba111bc 2021-03-28 op .It Ic end-of-buffer
337 bba111bc 2021-03-28 op Move point to the end of the buffer.
338 bba111bc 2021-03-28 op .It Ic forward-char
339 bba111bc 2021-03-28 op Move point one character forward.
340 bba111bc 2021-03-28 op .It Ic forward-paragraph
341 bba111bc 2021-03-28 op Move point one paragraph forward.
342 bba111bc 2021-03-28 op .It Ic move-beginning-of-line
343 bba111bc 2021-03-28 op Move point at the beginning of the current (visual) line.
344 bba111bc 2021-03-28 op .It Ic move-end-of-line
345 bba111bc 2021-03-28 op Move point at the end of the current (visual) line.
346 bba111bc 2021-03-28 op .It Ic next-button
347 bba111bc 2021-03-28 op Move point to the next link.
348 bba111bc 2021-03-28 op .It Ic next-line
349 bba111bc 2021-03-28 op Move point to the next (visual) line, in the same column if possible.
350 bba111bc 2021-03-28 op .It Ic previous-button
351 bba111bc 2021-03-28 op Move point to the previous link.
352 bba111bc 2021-03-28 op .It Ic previous-line
353 bba111bc 2021-03-28 op Move point to the previous (visual) line.
355 bba111bc 2021-03-28 op .Ss Bookmark-related commands
356 bba111bc 2021-03-28 op .Bl -tag -width execute-extended-command -compact
357 bba111bc 2021-03-28 op .It Ic bookmark-page
358 bba111bc 2021-03-28 op Add a link to the bookmark file.
359 bba111bc 2021-03-28 op It preloads the minibuffer with the current URL.
360 63875195 2021-04-01 op .It Ic list-bookmarks
361 bba111bc 2021-03-28 op Load the bookmarks page.
363 bba111bc 2021-03-28 op .Ss Tab-related commands
364 bba111bc 2021-03-28 op .Bl -tag -width execute-extended-command -compact
365 bba111bc 2021-03-28 op .It Ic tab-close
366 bba111bc 2021-03-28 op Close the current tab.
367 bba111bc 2021-03-28 op .It Ic tab-close-other
368 bba111bc 2021-03-28 op Close all tabs but the current one.
369 bba111bc 2021-03-28 op .It Ic tab-move
370 bba111bc 2021-03-28 op Move the current tab after the next one, wrapping around if
372 bba111bc 2021-03-28 op .It Ic tab-move-to
373 bba111bc 2021-03-28 op Move the current tab before the previous one, wrapping around if needed.
374 bba111bc 2021-03-28 op .It Ic tab-new
375 bba111bc 2021-03-28 op Open a new tab.
376 bba111bc 2021-03-28 op .It Ic tab-next
377 bba111bc 2021-03-28 op Focus next tab, wrapping around eventually.
378 bba111bc 2021-03-28 op .It Ic tab-previous
379 bba111bc 2021-03-28 op Focus the previous tab, wrapping around eventually.
381 bba111bc 2021-03-28 op .Ss Misc commands
382 bba111bc 2021-03-28 op .Bl -tag -width execute-extended-command -compact
383 bba111bc 2021-03-28 op .It Ic clear-minibuf
384 bba111bc 2021-03-28 op Clears the echo area.
385 bba111bc 2021-03-28 op .It Ic execute-extended-command
386 bba111bc 2021-03-28 op Prompts for a command name using the minibuffer.
387 bba111bc 2021-03-28 op .It Ic kill-telescope
390 bba111bc 2021-03-28 op .It Ic load-current-url
391 bba111bc 2021-03-28 op Prompts for an URL, the minibuffer is preloaded with the current
393 bba111bc 2021-03-28 op .It Ic load-url
394 bba111bc 2021-03-28 op Prompts for an URL.
395 bba111bc 2021-03-28 op .It Ic next-page
396 bba111bc 2021-03-28 op Load the next item in the history list.
397 9f3f9f5e 2021-06-19 op .It Ic olivetti-mode
398 9f3f9f5e 2021-06-19 op Toggle olivetti mode (i.e. horizontal centering of the lines of the
400 bba111bc 2021-03-28 op .It Ic previous-page
401 bba111bc 2021-03-28 op Load the previous item in the history list.
402 bba111bc 2021-03-28 op .It Ic push-button
403 bba111bc 2021-03-28 op Follow the link on the current line.
404 bba111bc 2021-03-28 op .It Ic push-button-new-tab
405 bba111bc 2021-03-28 op Follow the link on the current line on a new tab.
406 bba111bc 2021-03-28 op .It Ic redraw
407 708fab48 2021-06-19 op Redraw the screen, useful if some background program messed up the
409 bba111bc 2021-03-28 op .It Ic scroll-down
410 bba111bc 2021-03-28 op Scroll down by one visual page.
411 bba111bc 2021-03-28 op .It Ic scroll-line-down
412 bba111bc 2021-03-28 op Scroll down by one line.
413 bba111bc 2021-03-28 op .It Ic scroll-line-up
414 bba111bc 2021-03-28 op Scroll up by one line.
415 bba111bc 2021-03-28 op .It Ic scroll-up
416 bba111bc 2021-03-28 op Scroll up by one visual page.
417 7a014cef 2021-04-01 op .It Ic toggle-help
418 7a014cef 2021-04-01 op Toggle side window with help about available keys and their associated
419 7a014cef 2021-04-01 op interactive command.
421 bba111bc 2021-03-28 op .Ss Minibuffer commands
422 bba111bc 2021-03-28 op .Bl -tag -width execute-extended-command -compact
423 bba111bc 2021-03-28 op .It Ic mini-abort
424 bba111bc 2021-03-28 op Abort the current minibuffer action.
425 bba111bc 2021-03-28 op .It Ic mini-complete-and-exit
426 bba111bc 2021-03-28 op Complete the current minibuffer action.
427 bba111bc 2021-03-28 op .It Ic mini-delete-backward-char
428 bba111bc 2021-03-28 op Delete the character before the point.
429 bba111bc 2021-03-28 op .It Ic mini-delete-char
430 bba111bc 2021-03-28 op Delete the character after the point.
431 bba111bc 2021-03-28 op .It Ic mini-kill-line
432 bba111bc 2021-03-28 op Delete from the point until the end of the line.
433 bba111bc 2021-03-28 op .It Ic mini-next-history-element
434 bba111bc 2021-03-28 op Load the previous history element.
435 bba111bc 2021-03-28 op .It Ic mini-previous-history-element
436 bba111bc 2021-03-28 op Load the next history element.
439 7d2d15f5 2021-04-30 op The following aliases are available during
440 7d2d15f5 2021-04-30 op .Ic execute-extended-command :
441 7d2d15f5 2021-04-30 op .Bl -tag -width 16m -compact
444 c82b3fd6 2021-05-12 op .It Ic tabnew
447 c82b3fd6 2021-05-12 op .Ic tab-previous
448 7d2d15f5 2021-04-30 op .It Ic q No and Ic wq
449 7d2d15f5 2021-04-30 op .Ic kill-telescope
451 74ca8ef4 2021-06-19 op .Sh CONFIGURATION FILE
452 74ca8ef4 2021-06-19 op During the startup,
454 74ca8ef4 2021-06-19 op reads the configuration file at
455 74ca8ef4 2021-06-19 op .Pa ~/.telescope/config
456 74ca8ef4 2021-06-19 op or the one given with the
460 74ca8ef4 2021-06-19 op The format of the configuration file is fairly flexible.
461 74ca8ef4 2021-06-19 op The current line can be extended over multiple ones using a
464 74ca8ef4 2021-06-19 op Comments can be put anywhere in the file using a hash mark
466 74ca8ef4 2021-06-19 op and extend to the end of the current line, but backslashes can't be
467 74ca8ef4 2021-06-19 op used to extend comments over multiple lines.
469 74ca8ef4 2021-06-19 op The following constructs are available:
470 74ca8ef4 2021-06-19 op .Bl -tag -width Ds
471 74ca8ef4 2021-06-19 op .It Ic set Ar opt No = Ar val
472 74ca8ef4 2021-06-19 op Set the option
476 74ca8ef4 2021-06-19 op Valid options are:
478 74ca8ef4 2021-06-19 op .Bl -tag -width twelveletters -compact
479 74ca8ef4 2021-06-19 op .It fill-column
481 74ca8ef4 2021-06-19 op If greater than zero, lines of text will be formatted in a way that
482 74ca8ef4 2021-06-19 op don't exceed the given number of columns.
483 74ca8ef4 2021-06-19 op .It new-tab-url
485 74ca8ef4 2021-06-19 op Default URL for the new tab page.
486 74ca8ef4 2021-06-19 op .It olivetti-mode
489 74ca8ef4 2021-06-19 op .Ic olivetti-mode
490 74ca8ef4 2021-06-19 op by default if non zero.
492 74ca8ef4 2021-06-19 op .It Ic style Ar name Ar option
493 74ca8ef4 2021-06-19 op Change the styling of the element identified by
495 74ca8ef4 2021-06-19 op Multiple options may be specified within curly braces.
496 74ca8ef4 2021-06-19 op Valid style identifiers are:
497 74ca8ef4 2021-06-19 op .Bl -tag -width 14m -compact -offset Ds
498 74ca8ef4 2021-06-19 op .It line.text
499 74ca8ef4 2021-06-19 op for text lines
500 74ca8ef4 2021-06-19 op .It line.link
501 74ca8ef4 2021-06-19 op for link lines
502 74ca8ef4 2021-06-19 op .It line.title1..3
504 74ca8ef4 2021-06-19 op .It line.item
505 74ca8ef4 2021-06-19 op for item lines
506 74ca8ef4 2021-06-19 op .It line.quote
508 74ca8ef4 2021-06-19 op .It line.pre.start
509 74ca8ef4 2021-06-19 op for the heading of a preformatted block
511 74ca8ef4 2021-06-19 op for the content of a preformatted block
512 74ca8ef4 2021-06-19 op .It line.pre.end
513 74ca8ef4 2021-06-19 op for the closing line of a preformatted block
516 74ca8ef4 2021-06-19 op Valid options are:
517 74ca8ef4 2021-06-19 op .Bl -tag -width tenletters -compact -offset Ds
518 74ca8ef4 2021-06-19 op .It Ic prefix Ar str
519 74ca8ef4 2021-06-19 op Set the prefix for the given line to
521 74ca8ef4 2021-06-19 op .It Ic cont Ar str
522 74ca8ef4 2021-06-19 op Set the prefix for the continuation line to
527 bba111bc 2021-03-28 op .Bl -tag -width Ds -compact
528 bba111bc 2021-03-28 op .It Pa ~/.telescope/bookmarks.gmi
529 bba111bc 2021-03-28 op Holds the bookmarks.
530 dca97b00 2021-06-19 op .It Pa ~/.telescope/config
531 dca97b00 2021-06-19 op Default configuration file.
532 bba111bc 2021-03-28 op .It Pa ~/.telescope/known_hosts
533 bba111bc 2021-03-28 op Contains a list of host keys for all the hosts the user has visited.
534 bba111bc 2021-03-28 op See the TOFU section for more info.
535 e9b1e094 2021-04-01 op .It Pa ~/.telescope/session
536 e9b1e094 2021-04-01 op Contains the list of opened tabs in the last session, one per line.
537 e9b1e094 2021-04-01 op Gets written on
538 e9b1e094 2021-04-01 op .Ic kill-telescope
539 e9b1e094 2021-04-01 op and loaded on startup.
542 74ca8ef4 2021-06-19 op The following is the config file as used by me
543 74ca8ef4 2021-06-19 op .Bd -literal -offset indent
544 74ca8ef4 2021-06-19 op set fill-column = 72
545 74ca8ef4 2021-06-19 op set olivetti-mode = 1
547 74ca8ef4 2021-06-19 op style line.item {
552 74ca8ef4 2021-06-19 op style line.link {
557 74ca8ef4 2021-06-19 op style line.quote {
566 bba111bc 2021-03-28 op program was written by
567 bba111bc 2021-03-28 op .An Omar Polo Aq Mt op@omarpolo.com .