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, a minibuffer, bookmarks and out-of-band TOFU
35 The arguments are as follows:
36 .Bl -tag -width xxxxxxxxxxxxx
38 Show all available colors and exit.
40 Specify an alternative configuration file.
42 .Pa $HOME/.telescope/config
45 Display version and usage.
48 Only check the configuration file for validity.
49 .It Fl v , Fl -version
54 interface is divided into four areas: the tabline, the body, the
55 modeline and the echoarea/minibuffer.
57 The tabline is always at the top of the screen and displays the tabs
58 separated by a vertical line.
59 When there are more tabs than the size of the window allow to display,
64 are shown at the start/end of the tabline to indicate that there are
65 more tabs in that direction.
67 The body occupies the majority of the visible area.
68 It contains the current page and optionally a side window.
70 The modeline is the second to last row of the screen.
71 It shows some information about the page: a spinner when the page is
72 loading, the trust level, the document type, the scroll offset and the
75 The echoarea is usually the last line of the screen.
76 Messages are often showed there, and link addresses too.
77 The echoarea is also used to obtain input from the user.
82 are invoked, the minibuffer area grows to show possible completions
83 and navigate through them.
87 .Dq Trust, but Verify Pq where appropriate
90 .Pq Dq Trust On First Use .
91 The idea is to define three level of verification for a certificate:
95 the server fingerprint does NOT match the stored value.
98 the server fingerprint matches the store one.
101 the fingerprint matches and has been verified out-of-band.
104 The trust level of the page is indicated in the modeline with the
109 level is enough, but where is appropriate users should be able to
110 verify out-of-band the certificate.
112 At the moment, there is no built-in support for an out-of-band
114 .Sh DEFAULT KEY BINDINGS
115 The default key bindings are very similar to GNU Emacs, but care has
116 been taken to include also bindings familiar for
121 In the following examples, C-x means Control-x, M-x means Meta-x,
122 where the Meta key may be either a special key on the keyboard or the
123 ALT key; otherwise ESC followed by the key X works as well, and C-M-x
124 means to press the key X together with both Control and Meta.
126 Keys are usually a single character, like
130 but some special keys are accepted as well.
132 .Bl -tag -width 16m -offset indent -compact
142 Previous page/Page up
162 Depends on the configuration of the terminal emulator.
163 Usually is shift tab though.
165 .Ss GNU Emacs-like keys
166 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
180 move-beginning-of-line
196 execute-extended-command
238 .Ss Xr vi 1 Ns -like keys
239 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
253 move-beginning-of-line
285 execute-extended-command
288 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
298 move-beginning-of-line
322 .Ss Neither Emacs nor vi specific
323 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
347 .Ss Minibuffer-specific keys
348 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
350 mini-complete-and-exit
358 mini-delete-backward-char
360 mini-delete-backward-char
362 mini-delete-backward-char
374 move-beginning-of-line
378 move-beginning-of-line
382 mini-previous-history-element
384 mini-next-history-element
394 insert-current-candidate
400 .Sh INTERACTIVE COMMANDS
401 Follows the documentation for the interactive commands.
402 These commands can be bound to a key or executed with
403 .Ic execute-extended-command .
404 .Ss Movement commands
405 .Bl -tag -width execute-extended-command -compact
407 Move point one character backward.
408 .It Ic backward-paragraph
409 Move point one paragraph backward.
410 .It Ic beginning-of-buffer
411 Move point to the beginning of the buffer.
413 Move point to the end of the buffer.
415 Move point one character forward.
416 .It Ic forward-paragraph
417 Move point one paragraph forward.
418 .It Ic insert-current-candidate
419 Copy the current selection text as minibuffer input.
420 .It Ic move-beginning-of-line
421 Move point at the beginning of the current (visual) line.
422 .It Ic move-end-of-line
423 Move point at the end of the current (visual) line.
425 Move point to the next link.
426 .It Ic next-completion
427 Select the next completion.
429 Move point to the next heading.
431 Move point to the next (visual) line, in the same column if possible.
432 .It Ic previous-button
433 Move point to the previous link.
434 .It Ic previous-completion
435 Select the previous completion.
436 .It Ic previous-heading
437 Move point to the previous heading.
439 Move point to the previous (visual) line.
441 .Ss Bookmark-related commands
442 .Bl -tag -width execute-extended-command -compact
444 Save a page in the bookmark file.
445 It preloads the minibuffer with the current URL.
446 .It Ic list-bookmarks
447 Load the bookmarks page.
449 .Ss Tab-related commands
450 .Bl -tag -width execute-extended-command -compact
452 Close the current tab.
453 .It Ic tab-close-other
454 Close all tabs but the current one.
456 Move the current tab after the next one, wrapping around if
459 Move the current tab before the previous one, wrapping around if needed.
463 Focus next tab, wrapping around eventually.
465 Focus the previous tab, wrapping around eventually.
467 Switch to a tab using the minibuffer.
470 .Bl -tag -width execute-extended-command -compact
473 .It Ic dec-fill-column
474 Decrement fill-column by two.
475 .It Ic execute-extended-command
476 Execute an internal command.
477 .It Ic kill-telescope
480 .It Ic inc-fill-column
481 Increment fill-column by two.
483 Select and visit a link using the minibuffer.
484 .It Ic load-current-url
485 Edit the current URL.
489 Go forward in the page history.
491 Toggle olivetti mode (i.e. horizontal centering of the lines of the
494 Go backward in the page history.
496 Follow link at point, or toggle the visibility of the following
497 preformatted block if called when the cursor is on the heading of the block.
498 .It Ic push-button-new-tab
499 Follow link at point in a new tab.
501 Redraw the screen, useful if some background program messed up the
504 Reload the current page.
506 Scroll down by one visual page.
507 .It Ic scroll-line-down
508 Scroll down by one line.
509 .It Ic scroll-line-up
510 Scroll up by one line.
512 Scroll up by one visual page.
513 .It Ic suspend-telescope
518 Jump to a line using the minibuffer.
520 Jump to a heading using the minibuffer.
522 Toggle side window with help about available keys and their associated
524 .It Ic toggle-pre-wrap
525 Toggle the wrapping of preformatted blocks.
527 .Ss Minibuffer commands
528 .Bl -tag -width execute-extended-command -compact
530 Abort the current minibuffer action.
531 .It Ic mini-complete-and-exit
532 Complete the current minibuffer action.
533 .It Ic mini-delete-backward-char
534 Delete the character before the point.
535 .It Ic mini-delete-char
536 Delete the character after the point.
537 .It Ic mini-goto-beginning
538 Select the first completion, if any.
540 Select the last completion, if any.
541 .It Ic mini-kill-line
542 Delete from point until the end of the line.
543 .It Ic mini-next-history-element
544 Load the previous history element.
545 .It Ic mini-previous-history-element
546 Load the next history element.
549 The following aliases are available during
550 .Ic execute-extended-command :
551 .Bl -tag -width 16m -compact
558 .It Ic q No and Ic wq
561 .Sh CONFIGURATION FILE
564 reads the configuration file at
565 .Pa ~/.telescope/config
566 or the one given with the
571 will also load a file called
575 is the name of the terminal type
576 .Pq i.e. the TERM environment variable ,
579 The format of the configuration file is fairly flexible.
580 The current line can be extended over multiple ones using a
583 Comments can be put anywhere in the file using a hash mark
585 and extend to the end of the current line, but backslashes can't be
586 used to extend comments over multiple lines.
588 The following constructs are available:
590 .It Ic bind Ar map Ar key Ar cmd
597 Valid values for map are
599 .Pq i.e. when the user is viewing a page
602 .Pq i.e. when the minibuffer has the focus.
604 follows the same syntax described in
605 .Sx DEFAULT KEY BINDINGS
606 and all the possible functions are listed in
607 .Sx INTERACTIVE COMMANDS .
608 .It Ic proxy Ar proto Ic via Ar url
611 as proxy for all URLs with
615 must be a Gemini URI without path, query and fragment component.
616 .It Ic set Ar opt No = Ar val
623 .Bl -tag -width twelveletters -compact
626 If nonzero, don't wrap preformatted blocks.
630 If nonzero, when the text of a link starts with an emoji followed by a
631 space, use that emoji as line prefix.
635 If nonzero, enable colours.
641 If greater than zero, lines of text will be formatted in a way that
642 don't exceed the given number of columns.
646 If nonzero, hide by default the body of the preformatted blocks.
649 can be used to toggle the visibility per-block.
650 .It hide-pre-closing-line
652 If nonzero, hide the closing line of preformatted blocks.
656 If nonzero, hide the start and end line of the preformatted blocks.
657 If both hide-pre-context and hide-pre-blocks are nonzero, preformatted
658 blocks are irremediably hidden.
662 URL for the new tab page.
672 If nonzero, set the terminal title to the page title.
675 .It Ic style Ar name Ar option
676 Change the styling of the element identified by
678 Multiple options may be specified within curly braces.
679 Valid style identifiers are:
680 .Bl -tag -width line.compl.current -compact -offset Ds
682 the area outside the lines in the body of the page.
685 .It line.compl.current
686 the current completion.
698 the heading of a preformatted block.
700 the content of a preformatted block.
702 the closing line of a preformatted block.
710 the non-focused tabs.
717 .It Ic attr Ar prefix Oo Ar line Oo Ar trail Oc Oc
718 Sets the text attributes.
719 If only one value is given,
723 default to that; if two values are given then
727 Each attribute is a comma-separated list of keywords:
728 .Bl -tag -width underline -compact -offset Ds
732 best highlighting mode for the terminal.
736 reverses background/foreground colors.
738 makes the text blinking.
742 extra bright or bold.
745 Only the style identifiers with the
747 prefix accept up to three attributes.
748 The other will only use the first one given.
749 .It Ic bg Ar prefix Oo Ar line Oo Ar trail Oc Oc
750 Sets the background color.
751 Follows the same behaviour as
753 regarding the optional parameters.
754 The colour is one of black, red, green, yellow, blue,
755 magenta, cyan and white; colour0 to colour255
756 .Pq or color0 to color255
757 from the 256-colour set;
758 default for the default colour.
759 .It Ic fg Ar prefix Oo Ar line Oo Ar trail Oc Oc
760 Sets the foreground color.
763 .It Ic prefix Ar prfx Op Ar cont
764 Sets the prefix for the current line type to
768 as the prefix for the continuation lines
769 .Pq i.e. when a long line gets wrapped.
772 is not given its value will be the same of
779 is started, it inspects the following environment variables:
780 .Bl -tag -width NO_COLORS
782 The user's login directory.
784 To decide whether to use colors or not.
785 The content of the variable doesn't matter.
787 The user's terminal name.
790 .Bl -tag -width Ds -compact
791 .It Pa ~/.telescope/bookmarks.gmi
793 .It Pa ~/.telescope/config
794 Default configuration file.
795 .It Pa ~/.telescope/known_hosts
796 Hash of the certificates for all the known hosts.
797 Each line contains three fields: hostname with optional port number,
798 hash of the certificate and a numeric flag.
799 .It Pa ~/.telescope/lock
800 Lock file used to prevent multiple instance of
802 from running at the same time.
803 .It Pa ~/.telescope/pages/about_*.gmi
804 Overrides for built-in about: pages.
805 .It Pa ~/.telescope/session
806 The list of tabs from the last session.
807 Every line identifies a tab and contains three space-separated fields:
808 the full URL, a comma-separated list of attributes and the cached
812 and loaded during startup.
815 It's possible to browse
817 .Pq i.e. simple websites
818 by using programs like the duckling-proxy by defining a proxy in
819 .Pa ~/.telescope/config :
820 .Bd -literal -offset indent
821 proxy http via "gemini://127.0.0.1:1965"
822 proxy https via "gemini://127.0.0.1:1965"
827 without any configuration
828 .Bd -literal -offset indent
829 telescope -c /dev/null
835 program was written by
836 .An Omar Polo Aq Mt op@omarpolo.com .
838 There's no UI for out-of-band certificates validation.