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 xxxxxxxxxxxxx
37 Show all available colors and exit.
39 Specify an alternative configuration file.
41 .Pa $HOME/.telescope/config
44 Display version and usage.
47 Only check the configuration file for validity.
48 .It Fl v , Fl -version
53 aims to use the "Trust, but Verify (where appropriate)" approach.
54 The idea is to define three level of verification for a certificate:
57 the server fingerprint does NOT match the stored value
59 the server fingerprint matches the store one
61 the fingerprint matches and has been verified out-of-band
66 level is enough, but where is appropriate users should be able to
67 verify out-of-band the certificate.
69 At the moment, there is no built-in support for an out-of-band
72 Known certificates are store in
73 .Pa ~/.telescope/known_hosts
74 with a format similar to the
78 Each line is a record and it's made up by three fields, separated by a
79 single space, according to the following format:
84 the hostname, optionally followed by a colon (":") and a port number.
86 is the hash of the certificate, as outputted by
87 .Xr tls_peer_cert_hash 3 .
90 0 means trusted, 1 verified.
92 .Sh DEFAULT KEY BINDINGS
93 The default key bindings are very similar to GNU Emacs, but care has
94 been taken to include also bindings familiar for
99 In the following examples, C-x means Control-x, M-x means Meta-x,
100 where the Meta key may be either a special key on the keyboard or the
101 ALT key; otherwise ESC followed by the key X works as well, and C-M-x
102 means to press the key X together with both Control and Meta.
104 Keys are usually a single character, like
108 but some special keys are accepted as well.
110 .Bl -tag -width 16m -offset indent -compact
120 Previous page/Page up
140 Depends on the configuration of the terminal emulator.
141 Usually is shift tab though.
143 .Ss GNU Emacs-like keys
144 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
158 move-beginning-of-line
174 execute-extended-command
216 .Ss Xr vi 1 Ns -like keys
217 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
231 move-beginning-of-line
263 execute-extended-command
266 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
276 move-beginning-of-line
300 .Ss Neither Emacs nor vi specific
301 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
325 .Ss Minibuffer-specific keys
326 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
328 mini-complete-and-exit
336 mini-delete-backward-char
338 mini-delete-backward-char
340 mini-delete-backward-char
352 move-beginning-of-line
356 move-beginning-of-line
360 mini-previous-history-element
362 mini-next-history-element
372 insert-current-candidate
374 .Sh INTERACTIVE COMMANDS
375 Follows the documentation for the interactive commands.
376 These commands can be bound to a key or executed with
377 .Ic execute-extended-command .
378 .Ss Movement commands
379 .Bl -tag -width execute-extended-command -compact
381 Move point one character backward.
382 .It Ic backward-paragraph
383 Move point one paragraph backward.
384 .It Ic beginning-of-buffer
385 Move point to the beginning of the buffer.
387 Move point to the end of the buffer.
389 Move point one character forward.
390 .It Ic forward-paragraph
391 Move point one paragraph forward.
392 .It Ic insert-current-candidate
393 Copy the current selection text as minibuffer input.
394 .It Ic move-beginning-of-line
395 Move point at the beginning of the current (visual) line.
396 .It Ic move-end-of-line
397 Move point at the end of the current (visual) line.
399 Move point to the next link.
400 .It Ic next-completion
401 Select the next completion.
403 Move point to the next heading.
405 Move point to the next (visual) line, in the same column if possible.
406 .It Ic previous-button
407 Move point to the previous link.
408 .It Ic previous-completion
409 Select the previous completion.
410 .It Ic previous-heading
411 Move point to the previous heading.
413 Move point to the previous (visual) line.
415 .Ss Bookmark-related commands
416 .Bl -tag -width execute-extended-command -compact
418 Add a link to the bookmark file.
419 It preloads the minibuffer with the current URL.
420 .It Ic list-bookmarks
421 Load the bookmarks page.
423 .Ss Tab-related commands
424 .Bl -tag -width execute-extended-command -compact
426 Close the current tab.
427 .It Ic tab-close-other
428 Close all tabs but the current one.
430 Move the current tab after the next one, wrapping around if
433 Move the current tab before the previous one, wrapping around if needed.
437 Focus next tab, wrapping around eventually.
439 Focus the previous tab, wrapping around eventually.
441 Switch to a tab using the minibuffer.
444 .Bl -tag -width execute-extended-command -compact
446 Clears the echo area.
447 .It Ic dec-fill-column
448 Decrements fill-column by two.
449 .It Ic execute-extended-command
450 Prompts for a command name using the minibuffer.
451 .It Ic kill-telescope
454 .It Ic inc-fill-column
455 Increments fill-column by two.
457 Select and visit a link using the minibuffer.
458 .It Ic load-current-url
459 Prompts for an URL, the minibuffer is preloaded with the current
464 Load the next item in the history list.
466 Toggle olivetti mode (i.e. horizontal centering of the lines of the
469 Load the previous item in the history list.
471 Follow the link on the current line, or toggle the visibility of the
472 following preformatted block if called when the cursor is on the
473 heading of the block.
474 .It Ic push-button-new-tab
475 Follow the link on the current line on a new tab.
477 Redraw the screen, useful if some background program messed up the
480 Reload the current page.
482 Scroll down by one visual page.
483 .It Ic scroll-line-down
484 Scroll down by one line.
485 .It Ic scroll-line-up
486 Scroll up by one line.
488 Scroll up by one visual page.
489 .It Ic suspend-telescope
494 Jump to a line using the minibuffer.
496 Select and jump to a heading of the page using the minibuffer.
498 Toggle side window with help about available keys and their associated
500 .It Ic toggle-pre-wrap
501 Toggle the wrapping of preformatted blocks.
503 .Ss Minibuffer commands
504 .Bl -tag -width execute-extended-command -compact
506 Abort the current minibuffer action.
507 .It Ic mini-complete-and-exit
508 Complete the current minibuffer action.
509 .It Ic mini-delete-backward-char
510 Delete the character before the point.
511 .It Ic mini-delete-char
512 Delete the character after the point.
513 .It Ic mini-goto-beginning
514 Select the first completion, if any.
516 Select the last completion, if any.
517 .It Ic mini-kill-line
518 Delete from the point until the end of the line.
519 .It Ic mini-next-history-element
520 Load the previous history element.
521 .It Ic mini-previous-history-element
522 Load the next history element.
525 The following aliases are available during
526 .Ic execute-extended-command :
527 .Bl -tag -width 16m -compact
534 .It Ic q No and Ic wq
537 .Sh CONFIGURATION FILE
540 reads the configuration file at
541 .Pa ~/.telescope/config
542 or the one given with the
547 will also load a file called
551 is the name of the terminal type
552 .Pq i.e. the TERM variable ,
555 The format of the configuration file is fairly flexible.
556 The current line can be extended over multiple ones using a
559 Comments can be put anywhere in the file using a hash mark
561 and extend to the end of the current line, but backslashes can't be
562 used to extend comments over multiple lines.
564 The following constructs are available:
566 .It Ic bind Ar map Ar key Ar cmd
573 Valid values for map are
575 .Pq i.e. when the user is viewing a page
578 .Pq i.e. when the minibuffer has the focus.
580 follows the same syntax described in
581 .Sx DEFAULT KEY BINDINGS
582 and all the possible functions are listed in
583 .Sx INTERACTIVE COMMANDS .
584 .It Ic proxy Ar proto Ic via Ar url
587 as proxy for all URLs with
591 must be a Gemini URI without path, query and fragment component.
592 .It Ic set Ar opt No = Ar val
599 .Bl -tag -width twelveletters -compact
602 If nonzero, don't wrap preformatted blocks.
605 If not zero, when the text of a link starts with an emoji followed by
606 a space, use that emoji as line prefix.
610 If not zero, enable colours.
613 is not set, 0 otherwise.
616 If greater than zero, lines of text will be formatted in a way that
617 don't exceed the given number of columns.
621 If nonzero, hide by default the body of the preformatted blocks.
624 can be used to toggle the visibility per-block.
625 .It hide-pre-closing-line
627 If nonzero, hide the closing line of preformatted blocks.
630 If nonzero, hide the start and end line of the preformatted blocks.
631 If both hide-pre-context and hide-pre-blocks are nonzero, preformatted
632 blocks are irremediably hidden.
636 URL for the new tab page.
647 If nonzero, set the terminal title.
650 .It Ic style Ar name Ar option
651 Change the styling of the element identified by
653 Multiple options may be specified within curly braces.
654 Valid style identifiers are:
655 .Bl -tag -width 16m -compact -offset Ds
657 for the area outside the lines in the body of the page.
659 for the completion in the minibuffer
660 .It line.compl.current
661 for the current completion
673 for the heading of a preformatted block.
675 for the content of a preformatted block.
677 for the closing line of a preformatted block.
680 .Dq i.e. the last line of the window
683 .Dq i.e. the info line right above the minibuffer
687 for the non-focused tabs.
694 .It Ic attr Ar prefix Oo Ar line Oo Ar trail Oc Oc
695 Sets the text attributes.
696 If only one value is given,
700 default to that; if two values are given then
704 Each attribute is a comma-separated list of keywords:
705 .Bl -tag -width underline -compact -offset Ds
709 best highlighting mode for the terminal.
713 reverses background/foreground colors.
715 makes the text blinking.
719 extra bright or bold.
722 Only the styles under the
724 prefix accept up to three attributes.
725 The other will only use the first one given.
726 .It Ic bg Ar prefix Oo Ar line Oo Ar trail Oc Oc
727 Sets the background color.
728 Follows the same behaviour as
730 regarding the optional parameters.
731 The colour is one of black, red, green, yellow, blue,
732 magenta, cyan and white; colour0 to colour255
733 .Pq or color0 to color255
734 from the 256-colour set;
735 default for the default colour.
736 .It Ic fg Ar prefix Oo Ar line Oo Ar trail Oc Oc
737 Sets the foreground color.
740 .It Ic prefix Ar prfx Op Ar cont
741 Sets the prefix for the current line type to
745 as the prefix for the continuation lines
746 .Pq i.e. when a long line gets wrapped.
749 is not given its value will be the same of
754 .Bl -tag -width Ds -compact
755 .It Pa ~/.telescope/bookmarks.gmi
757 .It Pa ~/.telescope/config
758 Default configuration file.
759 .It Pa ~/.telescope/known_hosts
760 Contains a list of host keys for all the hosts the user has visited.
761 See the TOFU section for more info.
762 .It Pa ~/.telescope/lock
763 Lock file used to prevent multiple instance of
765 from running at the same time.
766 .It Pa ~/.telescope/session
767 Contains the list of tabs from the last session.
768 Every line identifies a tab.
769 The syntax is the full URL, followed by a space, followed by an
770 optional comma-separated list of attributes.
773 and loaded on startup.
776 The following is my config file:
777 .Bd -literal -offset indent
778 # enable colors regardless of $NO_COLOR
779 set enable-colors = 1
794 It's possible to browse
796 .Pq i.e. simple websites
797 by using programs like the duckling-proxy by defining a proxy in
798 .Pa ~/.telescope/config :
799 .Bd -literal -offset indent
800 proxy http via "gemini://localhost:1965"
801 proxy https via "gemini://localhost:1965"
806 without any configuration use
807 .Bd -literal -offset indent
808 telescope -c /dev/null
814 program was written by
815 .An Omar Polo Aq Mt op@omarpolo.com .