1 .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
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.
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$
29 is an interactive browser for the Gemini protocol.
30 It is able to process text/gemini and more in general every text/* file.
32 also features tabs, bookmarks and out-of-band TOFU verification.
34 The arguments are as follows:
35 .Bl -tag -width tenletters
37 Display version and usage.
40 Only check the configuration file for validity.
42 Specify an alternative configuration file.
44 .Pa $HOME/.telescope/config
49 aims to use the "Trust, but Verify (where appropriate)" approach.
50 The idea is to define three level of verification for a certificate:
53 the server fingerprint does NOT match the stored value
55 the server fingerprint matches the store one
57 the fingerprint matches and has been verified out-of-band
62 level is enough, but where is appropriate users should be able to
63 verify out-of-band the certificate.
65 At the moment, there is no built-in support for an out-of-band
68 Known certificates are store in
69 .Pa ~/.telescope/known_hosts
70 with a format similar to the
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:
80 the hostname, optionally followed by a colon (":") and a port number.
82 is the hash of the certificate, as outputted by
83 .Xr tls_peer_cert_hash 3 .
86 0 means trusted, 1 verified.
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
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.
100 Keys are usually a single character, like
104 but some special keys are accepted as well.
106 .Bl -tag -width 16m -offset indent -compact
116 Previous page/Page up
136 Depends on the configuration of the terminal emulator.
137 Usually is shift tab though.
139 .Ss GNU Emacs-like keys
140 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
154 move-beginning-of-line
170 execute-extended-command
210 .Ss Xr vi 1 Ns -like keys
211 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
225 move-beginning-of-line
257 execute-extended-command
260 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
290 .Ss Neither Emacs nor vi specific
291 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
311 .Ss Minibuffer-specific keys
312 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
314 mini-complete-and-exit
322 mini-delete-backward-char
324 mini-delete-backward-char
326 mini-delete-backward-char
338 move-beginning-of-line
342 move-beginning-of-line
346 mini-previous-history-element
348 mini-next-history-element
358 insert-current-candidate
360 .Sh INTERACTIVE COMMANDS
361 Follows the documentation for the interactive commands.
362 These commands can be bound to a key or executed with
363 .Ic execute-extended-command .
364 .Ss Movement commands
365 .Bl -tag -width execute-extended-command -compact
367 Move point one character backward.
368 .It Ic backward-paragraph
369 Move point one paragraph backward.
370 .It Ic beginning-of-buffer
371 Move point to the beginning of the buffer.
373 Move point to the end of the buffer.
375 Move point one character forward.
376 .It Ic forward-paragraph
377 Move point one paragraph forward.
378 .It Ic insert-current-candidate
379 Copy the current selection text as minibuffer input.
380 .It Ic move-beginning-of-line
381 Move point at the beginning of the current (visual) line.
382 .It Ic move-end-of-line
383 Move point at the end of the current (visual) line.
385 Move point to the next link.
386 .It Ic next-completion
387 Select the next completion.
389 Move point to the next heading.
391 Move point to the next (visual) line, in the same column if possible.
392 .It Ic previous-button
393 Move point to the previous link.
394 .It Ic previous-completion
395 Select the previous completion.
396 .It Ic previous-heading
397 Move point to the previous heading.
399 Move point to the previous (visual) line.
401 .Ss Bookmark-related commands
402 .Bl -tag -width execute-extended-command -compact
404 Add a link to the bookmark file.
405 It preloads the minibuffer with the current URL.
406 .It Ic list-bookmarks
407 Load the bookmarks page.
409 .Ss Tab-related commands
410 .Bl -tag -width execute-extended-command -compact
412 Close the current tab.
413 .It Ic tab-close-other
414 Close all tabs but the current one.
416 Move the current tab after the next one, wrapping around if
419 Move the current tab before the previous one, wrapping around if needed.
423 Focus next tab, wrapping around eventually.
425 Focus the previous tab, wrapping around eventually.
427 Switch to a tab using the minibuffer.
430 .Bl -tag -width execute-extended-command -compact
432 Clears the echo area.
433 .It Ic dec-fill-column
434 Decrements fill-column by two.
435 .It Ic execute-extended-command
436 Prompts for a command name using the minibuffer.
437 .It Ic kill-telescope
440 .It Ic inc-fill-column
441 Increments fill-column by two.
443 Select and visit a link using the minibuffer.
444 .It Ic load-current-url
445 Prompts for an URL, the minibuffer is preloaded with the current
450 Load the next item in the history list.
452 Toggle olivetti mode (i.e. horizontal centering of the lines of the
455 Load the previous item in the history list.
457 Follow the link on the current line, or toggle the visibility of the
458 following preformatted block if called when the cursor is on the
459 heading of the block.
460 .It Ic push-button-new-tab
461 Follow the link on the current line on a new tab.
463 Redraw the screen, useful if some background program messed up the
466 Reload the current page.
468 Scroll down by one visual page.
469 .It Ic scroll-line-down
470 Scroll down by one line.
471 .It Ic scroll-line-up
472 Scroll up by one line.
474 Scroll up by one visual page.
476 Jump to a line using the minibuffer.
478 Toggle side window with help about available keys and their associated
481 .Ss Minibuffer commands
482 .Bl -tag -width execute-extended-command -compact
484 Abort the current minibuffer action.
485 .It Ic mini-complete-and-exit
486 Complete the current minibuffer action.
487 .It Ic mini-delete-backward-char
488 Delete the character before the point.
489 .It Ic mini-delete-char
490 Delete the character after the point.
491 .It Ic mini-kill-line
492 Delete from the point until the end of the line.
493 .It Ic mini-next-history-element
494 Load the previous history element.
495 .It Ic mini-previous-history-element
496 Load the next history element.
499 The following aliases are available during
500 .Ic execute-extended-command :
501 .Bl -tag -width 16m -compact
508 .It Ic q No and Ic wq
511 .Sh CONFIGURATION FILE
514 reads the configuration file at
515 .Pa ~/.telescope/config
516 or the one given with the
520 The format of the configuration file is fairly flexible.
521 The current line can be extended over multiple ones using a
524 Comments can be put anywhere in the file using a hash mark
526 and extend to the end of the current line, but backslashes can't be
527 used to extend comments over multiple lines.
529 The following constructs are available:
531 .It Ic bind Ar map Ar key Ar cmd
538 Valid values for map are
540 .Pq i.e. when the user is viewing a page
543 .Pq i.e. when the minibuffer has the focus.
545 follows the same syntax described in
546 .Sx DEFAULT KEY BINDINGS
547 and all the possible functions are listed in
548 .Sx INTERACTIVE COMMANDS .
549 .It Ic proxy Ar proto Ic via Ar url
552 as proxy for all URLs with
556 must be a Gemini URI without path, query and fragment component.
557 .It Ic set Ar opt No = Ar val
564 .Bl -tag -width twelveletters -compact
567 If not zero, enable colours.
570 is not set, 0 otherwise.
573 If greater than zero, lines of text will be formatted in a way that
574 don't exceed the given number of columns.
578 If nonzero, hide by default the body of the preformatted blocks.
581 can be used to toggle the visibility per-block.
584 If nonzero, hide the start and end line of the preformatted blocks.
585 If both hide-pre-context and hide-pre-blocks are nonzero, preformatted
586 blocks are irremediably hidden.
590 URL for the new tab page.
600 .It Ic style Ar name Ar option
601 Change the styling of the element identified by
603 Multiple options may be specified within curly braces.
604 Valid style identifiers are:
605 .Bl -tag -width 16m -compact -offset Ds
607 for the area outside the lines in the body of the page.
609 for the completion in the minibuffer
610 .It line.compl.current
611 for the current completion
623 for the heading of a preformatted block.
625 for the content of a preformatted block.
627 for the closing line of a preformatted block.
630 .Dq i.e. the last line of the window
633 .Dq i.e. the info line right above the minibuffer
637 for the non-focused tabs.
644 .It Ic attr Ar prefix Oo Ar line Oo Ar trail Oc Oc
645 Sets the text attributes.
646 If only one value is given,
650 default to that; if two values are given then
654 Each attribute is a comma-separated list of keywords:
655 .Bl -tag -width underline -compact -offset Ds
659 best highlighting mode for the terminal.
663 reverses background/foreground colors.
665 makes the text blinking.
669 extra bright or bold.
672 Only the styles under the
674 prefix accept up to three attributes.
675 The other will only use the first one given.
676 .It Ic bg Ar prefix Oo Ar line Oo Ar trail Oc Oc
677 Sets the background color.
678 Follows the same behaviour as
680 regarding the optional parameters.
681 The colour is one of black, red, green, yellow, blue,
682 magenta, cyan and white; colour0 to colour255
683 .Pq or color0 to color255
684 from the 256-colour set;
685 default for the default colour.
686 .It Ic fg Ar prefix Oo Ar line Oo Ar trail Oc Oc
687 Sets the foreground color.
690 .It Ic prefix Ar prfx Op Ar cont
691 Sets the prefix for the current line type to
695 as the prefix for the continuation lines
696 .Pq i.e. when a long line gets wrapped.
699 is not given its value will be the same of
704 .Bl -tag -width Ds -compact
705 .It Pa ~/.telescope/bookmarks.gmi
707 .It Pa ~/.telescope/config
708 Default configuration file.
709 .It Pa ~/.telescope/known_hosts
710 Contains a list of host keys for all the hosts the user has visited.
711 See the TOFU section for more info.
712 .It Pa ~/.telescope/session
713 Contains the list of opened tabs in the last session, one per line.
716 and loaded on startup.
719 The following is my config file:
720 .Bd -literal -offset indent
721 # enable colors regardless of $NO_COLOR
722 set enable-colors = 1
737 It's possible to browse
739 .Pq i.e. simple websites
740 by using programs like the duckling-proxy by defining a proxy in
741 .Pa ~/.telescope/config :
742 .Bd -literal -offset indent
743 proxy http via "gemini://localhost:1965"
744 proxy https via "gemini://localhost:1965"
749 without any configuration use
750 .Bd -literal -offset indent
751 telescope -c /dev/null
757 program was written by
758 .An Omar Polo Aq Mt op@omarpolo.com .