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: October 8 2021$
15 .Dt TELESCOPE 1
16 .Os
17 .Sh NAME
18 .Nm telescope
19 .Nd multi-protocol browser
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Fl ChnSv
24 .Op Fl c Pa config
25 .Op Ar URL
26 .Ek
27 .Sh DESCRIPTION
28 .Nm
29 is an interactive browser that supports the Finger, Gemini and Gopher
30 protocols.
31 .Nm
32 features tabs, a minibuffer, interactive completions, bookmarks and
33 out-of-band TOFU verification.
34 .Pp
35 The arguments are as follows:
36 .Bl -tag -width xxxxxxxxxxxxx
37 .It Fl C , Fl -colors
38 Show all available colors and exit.
39 .It Fl c Pa config
40 Specify an alternative configuration file.
41 By default
42 .Pa $HOME/.config/telescope/config
43 is loaded.
44 .It Fl h , Fl -help
45 Display version and usage.
46 .It Fl n
47 Configtest mode.
48 Only check the configuration file for validity.
49 .It Fl S , Fl -safe
50 .Dq Safe
51 .Pq or Dq sandbox
52 mode.
53 Prevent
54 .Nm
55 from writing files to the disk and to acquire the lock, allowing to
56 run multiple instances at the same time.
57 .Nm
58 still loads the session file and the custom about pages.
59 .It Fl v , Fl -version
60 Display version.
61 .El
62 .Sh UI CONCEPTS
63 .Nm
64 interface is divided into four areas: the tabline, the body, the
65 modeline and the echoarea/minibuffer.
66 .Pp
67 The tabline is always at the top of the screen and displays the tabs
68 separated by a vertical line.
69 When there are more tabs than the size of the window allow to display,
70 the characters
71 .Sq \&<
72 or
73 .Sq \&>
74 are shown at the start/end of the tabline to indicate that there are
75 more tabs in that direction.
76 .Pp
77 The body occupies the majority of the visible area.
78 It contains the current page and optionally a side window.
79 .Pp
80 The modeline is the second to last row of the screen.
81 It shows some information about the page: a spinner when the page is
82 loading, the trust level, the document type, the scroll offset and the
83 URL.
84 .Pp
85 The echoarea is usually the last line of the screen.
86 Messages are often showed there, and link addresses too.
87 The echoarea is also used to obtain input from the user.
88 When commands like
89 .Ic swiper
90 or
91 .Ic link-select
92 are invoked, the minibuffer area grows to show possible completions.
93 .Sh TOFU
94 .Nm
95 aims to use the
96 .Dq Trust, but Verify Pq where appropriate
97 approach for
98 TOFU
99 .Pq Dq Trust On First Use .
100 The idea is to define three level of verification for a certificate:
101 .Bl -tag -width 12m
102 .It untrusted
103 .Pq Sq \&!
104 the server fingerprint does NOT match the stored value.
105 .It trusted
106 .Pq Sq v
107 the server fingerprint matches the store one.
108 .It verified
109 .Pq Sq V
110 the fingerprint matches and has been verified out-of-band.
111 .El
112 .Pp
113 The trust level of the page is indicated in the modeline with the
114 indicated character.
115 .Pp
116 Most of the time the
117 .Dq trusted
118 level is enough, but where is appropriate users should be able to
119 verify out-of-band the certificate.
120 .Pp
121 At the moment, there is no built-in support for an out-of-band
122 verification though.
123 .Sh SUPPORTED PROTOCOLS
124 The following protocols are supported:
125 .Bl -tag -width gemini://
126 .It about:
127 About pages are
128 .Nm
129 internal page.
130 See about:about for a list of all these pages.
131 .It file://
132 File types know to
133 .Nm ,
134 such as .gmi, .gemini, .txt, .md, .markdown, .diff or .patch, can be
135 viewed inside the application.
136 Types of local files are detected solely based on the file extension.
137 On some systems, such as
138 .Ox ,
139 only files inside special directories
140 .Pq like Pa /tmp No or Pa ~/Downloads
141 are available.
142 .It finger://
143 Finger URLs are interpreted as follows:
144 .Bl -bullet -compact
145 .It
146 the host is determined by the host name portion of the URL
147 .It
148 if the user portion of the URL is provided, it's interpreted as the
149 user to finger, otherwise the path component will be used
150 .El
151 thus
152 .Lk finger://user@hostname
153 and
154 .Lk finger://hostname/user
155 are treated as the same URL.
156 .It gemini://
157 Gemini is fully supported, with the exception of client-certificates.
158 .It gopher://
159 Gopher support is limited to items type 0, 1 and 7.
160 All text is assumed to be encoded in UTF-8 (or ASCII).
161 .El
162 .Pp
163 User-entered URLs, given as argument on the command line or entered
164 with
165 .Ic load-url ,
166 are intepreted with a simple heuristic:
167 .Bl -bullet -compact
168 .It
169 if it's a proper absolute URL then use it as-is,
170 .It
171 if it starts with
172 .Dq ./
173 or
174 .Dq /
175 assume it's a file:// URL,
176 .It
177 otherwise assume it's a Gemini URL.
178 .El
179 .Sh DEFAULT KEY BINDINGS
180 The default key bindings are very similar to GNU Emacs, but care has
181 been taken to include also bindings familiar for
182 .Xr vi 1
183 and
184 .Dq CUA
185 users.
186 In the following examples, C-x means Control-x, M-x means Meta-x,
187 where the Meta key may be either a special key on the keyboard or the
188 ALT key; otherwise ESC followed by the key X works as well, and C-M-x
189 means to press the key X together with both Control and Meta.
190 .Pp
191 Keys are usually a single character, like
192 .Sq p
193 or
194 .Sq n ,
195 but some special keys are accepted as well.
196 .Pp
197 .Bl -tag -width 16m -offset indent -compact
198 .It <up>
199 Up arrow
200 .It <down>
201 Down arrow
202 .It <left>
203 Left arrow
204 .It <right>
205 Right arrow
206 .It <prior>
207 Previous page/Page up
208 .It <next>
209 Next page/Page down
210 .It <home>
211 Home
212 .It <end>
213 End
214 .It <f0> thru <f63>
215 Function keys
216 .It del or backspace
217 Backspace
218 .It esc
219 Escape
220 .It space or spc
221 Space
222 .It enter or ret
223 Enter
224 .It tab
225 Tab
226 .It backtab
227 Depends on the configuration of the terminal emulator; usually shift
228 tab.
229 .El
230 .Ss GNU Emacs-like keys
231 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
232 .It C-p
233 previous-line
234 .It C-n
235 next-line
236 .It C-f
237 forward-char
238 .It C-b
239 backward-char
240 .It M-{
241 backward-paragraph
242 .It M-}
243 forward-paragraph
244 .It C-a
245 move-beginning-of-line
246 .It C-e
247 move-end-of-line
248 .It M-v, M-space
249 scroll-up
250 .It C-v, space
251 scroll-down
252 .It M-<
253 beginning-of-buffer
254 .It M->
255 end-of-buffer
256 .It C-x C-c
257 kill-telescope
258 .It C-g
259 clear-minibuf
260 .It M-x
261 execute-extended-command
262 .It C-c {
263 dec-fill-column
264 .It C-c }
265 inc-fill-column
266 .It C-c p
267 previous-heading
268 .It C-c n
269 next-heading
270 .It >
271 load-url
272 .It <
273 load-current-url
274 .It C-x C-f
275 load-url
276 .It C-x M-f
277 load-current-url
278 .It C-x o
279 other-window
280 .It C-x t 0
281 tab-close
282 .It C-x t 1
283 tab-close-other
284 .It C-x t 2
285 tab-new
286 .It C-x t o
287 tab-next
288 .It C-x t O
289 tab-previous
290 .It C-x t m
291 tab-move
292 .It C-x t M
293 tab-move-to
294 .It B, C-M-b
295 previous-page
296 .It F, C-M-f
297 next-page
298 .It <f7> a
299 bookmark-page
300 .It <f7> <f7>
301 list-bookmarks
302 .It C-z
303 suspend-telescope
304 .El
305 .Ss Xr vi 1 Ns -like keys
306 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
307 .It k
308 previous-line
309 .It j
310 next-line
311 .It l
312 forward-char
313 .It h
314 backward-char
315 .It {
316 backward-paragraph
317 .It }
318 forward-paragraph
319 .It ^
320 move-beginning-of-line
321 .It $
322 move-end-of-line
323 .It K
324 scroll-line-up
325 .It J
326 scroll-line-down
327 .It g g
328 beginning-of-buffer
329 .It G
330 end-of-buffer
331 .It g D
332 tab-close
333 .It g N
334 tab-new
335 .It g t
336 tab-next
337 .It g T
338 tab-previous
339 .It g M-t
340 tab-move
341 .It g M-T
342 tab-move-to
343 .It H
344 previous-page
345 .It L
346 next-page
347 .It q
348 kill-telescope
349 .It ESC
350 clear-minibuf
351 .It :
352 execute-extended-command
353 .El
354 .Ss CUA-like keys
355 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
356 .It <up>
357 previous-line
358 .It <down>
359 next-line
360 .It <right>
361 forward-char
362 .It <left>
363 backward-char
364 .It <home>
365 move-beginning-of-line
366 .It <end>
367 move-end-of-line
368 .It <prior>
369 scroll-up
370 .It <next>
371 scroll-down
372 .It C-w
373 tab-close
374 .It C-t
375 tab-new
376 .It M-<prior>
377 tab-previous
378 .It M-<next>
379 tab-next
380 .It M-<left>
381 previous-page
382 .It M-<right>
383 next-page
384 .It <f5>
385 reload-page
386 .It r
387 reload-page
388 .El
389 .Ss Neither Emacs nor vi specific
390 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
391 .It <f1>
392 toggle-help
393 .It enter
394 push-button
395 .It M-enter
396 push-button-new-tab
397 .It M-tab
398 previous-button
399 .It backtab
400 previous-button
401 .It tab
402 next-button
403 .It M-t
404 tab-select
405 .It \&[
406 tab-previous
407 .It \&]
408 tab-next
409 .It M-\&[
410 tab-move-to
411 .It M-\&]
412 tab-move
413 .It M-l
414 link-select
415 .It M-/
416 swiper
417 .El
418 .Ss Minibuffer-specific keys
419 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
420 .It enter
421 mini-complete-and-exit
422 .It C-g
423 mini-abort
424 .It ESC
425 mini-abort
426 .It C-d
427 mini-delete-char
428 .It del
429 mini-delete-backward-char
430 .It backspace
431 mini-delete-backward-char
432 .It C-h
433 mini-delete-backward-char
434 .It C-b
435 backward-char
436 .It C-f
437 forward-char
438 .It <left>
439 backward-char
440 .It <right>
441 forward-char
442 .It C-e
443 move-end-of-line
444 .It C-a
445 move-beginning-of-line
446 .It <end>
447 move-end-of-line
448 .It <home>
449 move-beginning-of-line
450 .It C-k
451 mini-kill-line
452 .It M-p
453 mini-previous-history-element
454 .It M-n
455 mini-next-history-element
456 .It C-p
457 previous-completion
458 .It C-n
459 next-completion
460 .It <up>
461 previous-completion
462 .It <down>
463 next-completion
464 .It tab
465 insert-current-candidate
466 .It M-<
467 mini-goto-beginning
468 .It M->
469 mini-goto-end
470 .El
471 .Sh INTERACTIVE COMMANDS
472 Follows the documentation for the interactive commands.
473 These commands can be bound to a key or executed with
474 .Ic execute-extended-command .
475 .Ss Movement commands
476 .Bl -tag -width execute-extended-command -compact
477 .It Ic backward-char
478 Move point one character backward.
479 .It Ic backward-paragraph
480 Move point one paragraph backward.
481 .It Ic beginning-of-buffer
482 Move point to the beginning of the buffer.
483 .It Ic end-of-buffer
484 Move point to the end of the buffer.
485 .It Ic forward-char
486 Move point one character forward.
487 .It Ic forward-paragraph
488 Move point one paragraph forward.
489 .It Ic insert-current-candidate
490 Copy the current selection text as minibuffer input.
491 .It Ic move-beginning-of-line
492 Move point at the beginning of the current (visual) line.
493 .It Ic move-end-of-line
494 Move point at the end of the current (visual) line.
495 .It Ic next-button
496 Move point to the next link.
497 .It Ic next-completion
498 Select the next completion.
499 .It Ic next-heading
500 Move point to the next heading.
501 .It Ic next-line
502 Move point to the next (visual) line, in the same column if possible.
503 .It Ic previous-button
504 Move point to the previous link.
505 .It Ic previous-completion
506 Select the previous completion.
507 .It Ic previous-heading
508 Move point to the previous heading.
509 .It Ic previous-line
510 Move point to the previous (visual) line.
511 .El
512 .Ss Bookmark-related commands
513 .Bl -tag -width execute-extended-command -compact
514 .It Ic bookmark-page
515 Save a page in the bookmark file.
516 It preloads the minibuffer with the current URL.
517 .It Ic list-bookmarks
518 Load the bookmarks page.
519 .El
520 .Ss Tab-related commands
521 .Bl -tag -width execute-extended-command -compact
522 .It Ic tab-close
523 Close the current tab.
524 .It Ic tab-close-other
525 Close all tabs but the current one.
526 .It Ic tab-move
527 Move the current tab after the next one, wrapping around if
528 needed.
529 .It Ic tab-move-to
530 Move the current tab before the previous one, wrapping around if needed.
531 .It Ic tab-new
532 Open a new tab.
533 .It Ic tab-next
534 Focus next tab, wrapping around eventually.
535 .It Ic tab-previous
536 Focus the previous tab, wrapping around eventually.
537 .It Ic tab-select
538 Switch to a tab using the minibuffer.
539 .El
540 .Ss Misc commands
541 .Bl -tag -width execute-extended-command -compact
542 .It Ic clear-minibuf
543 Clear the echo area.
544 .It Ic dec-fill-column
545 Decrement fill-column by two.
546 .It Ic execute-extended-command
547 Execute an internal command.
548 .It Ic kill-telescope
549 Quit
550 .Nm .
551 .It Ic inc-fill-column
552 Increment fill-column by two.
553 .It Ic link-select
554 Select and visit a link using the minibuffer.
555 .It Ic load-current-url
556 Edit the current URL.
557 .It Ic load-url
558 Prompt for an URL.
559 .It Ic next-page
560 Go forward in the page history.
561 .It Ic olivetti-mode
562 Toggle olivetti mode (i.e. horizontal centering of the lines of the
563 window.)
564 .It Ic other-window
565 Select the other window.
566 .It Ic previous-page
567 Go backward in the page history.
568 .It Ic push-button
569 Follow link at point, or toggle the visibility of the following
570 preformatted block if called when the cursor is on the heading of the block.
571 .It Ic push-button-new-tab
572 Follow link at point in a new tab.
573 .It Ic redraw
574 Redraw the screen, useful if some background program messed up the
575 display.
576 .It Ic reload-page
577 Reload the current page.
578 .It Ic scroll-down
579 Scroll down by one visual page.
580 .It Ic scroll-line-down
581 Scroll down by one line.
582 .It Ic scroll-line-up
583 Scroll up by one line.
584 .It Ic scroll-up
585 Scroll up by one visual page.
586 .It Ic suspend-telescope
587 Suspend the current
588 .Nm
589 session.
590 .It Ic swiper
591 Jump to a line using the minibuffer.
592 .It Ic toc
593 Jump to a heading using the minibuffer.
594 .It Ic toggle-help
595 Toggle side window with help about available keys and their associated
596 interactive command.
597 .It Ic toggle-pre-wrap
598 Toggle the wrapping of preformatted blocks.
599 .El
600 .Ss Minibuffer commands
601 .Bl -tag -width execute-extended-command -compact
602 .It Ic mini-abort
603 Abort the current minibuffer action.
604 .It Ic mini-complete-and-exit
605 Complete the current minibuffer action.
606 .It Ic mini-delete-backward-char
607 Delete the character before the point.
608 .It Ic mini-delete-char
609 Delete the character after the point.
610 .It Ic mini-goto-beginning
611 Select the first completion, if any.
612 .It Ic mini-goto-end
613 Select the last completion, if any.
614 .It Ic mini-kill-line
615 Delete from point until the end of the line.
616 .It Ic mini-next-history-element
617 Load the previous history element.
618 .It Ic mini-previous-history-element
619 Load the next history element.
620 .El
621 .Ss Aliases
622 The following aliases are available during
623 .Ic execute-extended-command :
624 .Bl -tag -width 16m -compact
625 .It Ic tabn
626 .Ic tab-next
627 .It Ic tabnew
628 .Ic tab-new
629 .It Ic tabp
630 .Ic tab-previous
631 .It Ic q No and Ic wq
632 .Ic kill-telescope
633 .El
634 .Sh CONFIGURATION FILE
635 During the startup,
636 .Nm
637 reads the configuration file at
638 .Pa ~/.config/telescope/config
639 or
640 .Pa ~/.telescope/config .
641 .Pp
642 It's possible to load a custom configuration file using the
643 .Fl c
644 flag.
645 .Pp
646 .Nm
647 will also load a file called
648 .Pa config-TERM ,
649 where
650 .Dq TERM
651 is the name of the terminal type
652 .Pq i.e. the TERM environment variable ,
653 if it exists.
654 .Pp
655 The format of the configuration file is fairly flexible.
656 The current line can be extended over multiple ones using a
657 backslash
658 .Pq Sq \e .
659 Comments can be put anywhere in the file using a hash mark
660 .Pq Sq # ,
661 and extend to the end of the current line, but backslashes can't be
662 used to extend comments over multiple lines.
663 .Pp
664 The following constructs are available:
665 .Bl -tag -width Ds
666 .It Ic bind Ar map Ar key Ar cmd
667 Bind
668 .Ar key
669 to the function
670 .Ar cmd
671 in the keymap
672 .Ar map .
673 Valid values for map are
674 .Dq global-map
675 .Pq i.e. when the user is viewing a page
676 and
677 .Dq minibuffer-map
678 .Pq i.e. when the minibuffer has the focus.
679 .Ar key
680 follows the same syntax described in
681 .Sx DEFAULT KEY BINDINGS
682 and all the possible functions are listed in
683 .Sx INTERACTIVE COMMANDS .
684 .It Ic proxy Ar proto Ic via Ar url
685 Use
686 .Ar url
687 as proxy for all URLs with
688 protocol
689 .Ar proto .
690 .Ar url
691 must be a Gemini URI without path, query and fragment component.
692 .It Ic set Ar opt No = Ar val
693 Set the option
694 .Ar opt
695 to the value
696 .Ar val .
697 Valid options are:
698 .Pp
699 .Bl -tag -width twelveletters -compact
700 .It autosave
701 .Pq integer
702 If greater than zero, save the session after the specified amount of
703 seconds after some events happens
704 .Pq new or closed tabs, visited a link ...
705 Defaults to 20.
706 .It dont-wrap-pre
707 .Pq integer
708 If nonzero, don't wrap preformatted blocks.
709 Defaults to 0.
710 .It download-path
711 .Pq string
712 The default download path.
713 Defaults to
714 .Pa /tmp .
715 .It emojify-link
716 .Pq integer
717 If nonzero, when the text of a link starts with an emoji followed by a
718 space, use that emoji as line prefix.
719 Defaults to 1.
720 .It enable-colors
721 .Pq integer
722 If nonzero, enable colours.
723 Defaults to 0 if
724 .Ev NO_COLORS
725 is set, 1 otherwise.
726 .It fill-column
727 .Pq integer
728 If greater than zero, lines of text will be formatted in a way that
729 don't exceed the given number of columns.
730 Defaults to 80.
731 .It hide-pre-blocks
732 .Pq integer
733 If nonzero, hide by default the body of the preformatted blocks.
734 Defaults to zero.
735 .Ic push-button
736 can be used to toggle the visibility per-block.
737 .It hide-pre-closing-line
738 .Pq integer
739 If nonzero, hide the closing line of preformatted blocks.
740 Defaults to 0.
741 .It hide-pre-context
742 .Pq integer
743 If nonzero, hide the start and end line of the preformatted blocks.
744 If both hide-pre-context and hide-pre-blocks are nonzero, preformatted
745 blocks are irremediably hidden.
746 Defaults to zero.
747 .It new-tab-url
748 .Pq string
749 URL for the new tab page.
750 Defaults to
751 .Dq about:new .
752 .It olivetti-mode
753 .Pq integer
754 If nonzero, enable
755 .Ic olivetti-mode
756 Defaults to 1.
757 .It set-title
758 .Pq integer
759 If nonzero, set the terminal title to the page title.
760 Defaults to 1.
761 .It tab-bar-show
762 .Pq integer
763 If tab-bar-show is -1 hide the tab bar permanently, if 0 show it
764 unconditionally.
765 If it's 1, show the bar only when there is more than one tab.
766 Defaults to 1.
767 .El
768 .It Ic style Ar name Ar option
769 Change the styling of the element identified by
770 .Ar name .
771 Multiple options may be specified within curly braces.
772 Valid style identifiers are:
773 .Bl -tag -width line.compl.current -compact -offset Ds
774 .It line
775 the area outside the lines in the body of the page.
776 .It line.compl
777 the completions.
778 .It line.compl.current
779 the current completion.
780 .It line.help
781 text in the *Help* buffer.
782 .It line.text
783 text lines.
784 .It line.link
785 link lines.
786 .It line.title1..3
787 headings
788 .It line.item
789 item lines.
790 .It line.quote
791 quotes.
792 .It line.pre.start
793 the heading of a preformatted block.
794 .It line.pre
795 the content of a preformatted block.
796 .It line.pre.end
797 the closing line of a preformatted block.
798 .It minibuffer
799 the minibuffer.
800 .It modeline
801 the modeline.
802 .It tabline
803 the tabline.
804 .It tabline.tab
805 the non-focused tabs.
806 .It tabline.current
807 the focused tab.
808 .El
809 .Pp
810 Valid options are:
811 .Bl -tag -width Ds
812 .It Ic attr Ar prefix Oo Ar line Oo Ar trail Oc Oc
813 Sets the text attributes.
814 If only one value is given,
815 .Ar line
816 and
817 .Ar trail
818 default to that; if two values are given then
819 .Ar trail
820 defaults to
821 .Ar prefix .
822 Each attribute is a comma-separated list of keywords:
823 .Bl -tag -width underline -compact -offset Ds
824 .It Ic normal
825 no attributes.
826 .It Ic standout
827 best highlighting mode for the terminal.
828 .It Ic underline
829 underlines the text.
830 .It Ic reverse
831 reverses background/foreground colors.
832 .It Ic blink
833 makes the text blinking.
834 .It Ic dim
835 half bright.
836 .It Ic bold
837 extra bright or bold.
838 .El
839 .Pp
840 Only the style identifiers with the
841 .Dq line.
842 prefix accept up to three attributes.
843 The other will only use the first one given.
844 .It Ic bg Ar prefix Oo Ar line Oo Ar trail Oc Oc
845 Sets the background color.
846 Follows the same behaviour as
847 .Ic attr
848 regarding the optional parameters.
849 The colour is one of black, red, green, yellow, blue,
850 magenta, cyan and white; colour0 to colour255
851 .Pq or color0 to color255
852 from the 256-colour set;
853 default for the default colour.
854 .It Ic fg Ar prefix Oo Ar line Oo Ar trail Oc Oc
855 Sets the foreground color.
856 It behaves just like
857 .Ic bg .
858 .It Ic prefix Ar prfx Op Ar cont
859 Sets the prefix for the current line type to
860 .Ar prfx
861 and
862 .Ar cont
863 as the prefix for the continuation lines
864 .Pq i.e. when a long line gets wrapped.
865 If
866 .Ar cont
867 is not given its value will be the same of
868 .Ar prfx .
869 .El
870 .El
871 .Sh ENVIRONMENT
872 When
873 .Nm
874 is started, it inspects the following environment variables:
875 .Bl -tag -width NO_COLORS
876 .It Ev HOME
877 The user's login directory.
878 .It Ev NO_COLORS
879 To decide whether to use colors or not.
880 The content of the variable doesn't matter.
881 .It Ev TERM
882 The user's terminal name.
883 .It Ev XDG_CACHE_HOME , Ev XDG_CONFIG_HOME , Ev XDG_DATA_HOME
884 If defined can alter the default location of the files used.
885 .El
886 .Sh FILES
887 By default
888 .Nm
889 follows the XDG Base Directory Specification.
890 However, if
891 .Pa ~/.telescope
892 exists, XDG is ignored and all the files are stored inside it.
893 The usage of
894 .Ev XDG_CACHE_HOME ,
895 .Ev XDG_CONFIG_HOME
896 and
897 .Ev XDG_DATA_HOME
898 can further alter the location of these files.
899 .Pp
900 .Bl -tag -width Ds -compact
901 .It Pa ~/.config/telescope/config
902 Default configuration file.
903 .It Pa ~/.config/telescope/pages/about_*.gmi
904 Overrides for built-in about: pages.
905 .It Pa ~/.local/share/telescope/bookmarks.gmi
906 Bookmarks file.
907 .It Pa ~/.local/share/telescope/known_hosts
908 Hash of the certificates for all the known hosts.
909 Each line contains three fields: hostname with optional port number,
910 hash of the certificate and a numeric flag.
911 .It Pa ~/.cache/telescope/lock
912 Lock file used to prevent multiple instance of
913 .Nm
914 from running at the same time.
915 .It Pa ~/.cache/telescope/session
916 The list of tabs from the last session.
917 Every line identifies a tab and contains three space-separated fields:
918 the full URL, a comma-separated list of attributes and the cached
919 title.
920 Is written by
921 .Ic kill-telescope
922 and loaded during startup.
923 .El
924 .Sh EXAMPLES
925 It's possible to browse
926 .Dq the small web
927 .Pq i.e. simple websites
928 by using programs like the duckling-proxy by defining a proxy in
929 .Pa ~/.config/telescope/config :
930 .Bd -literal -offset indent
931 proxy http via "gemini://127.0.0.1:1965"
932 proxy https via "gemini://127.0.0.1:1965"
933 .Ed
934 .Pp
935 To load
936 .Nm
937 without any configuration
938 .Bd -literal -offset indent
939 telescope -c /dev/null
940 .Ed
941 .Sh STANDARDS
942 .Rs
943 .%B XDG Base Directory Specification
944 .%U https://specifications.freedesktop.org/basedir-spec/latest/
945 .Re
946 .Sh AUTHORS
947 .An -nosplit
948 The
949 .Nm
950 program was written by
951 .An Omar Polo Aq Mt op@omarpolo.com .
952 .Sh BUGS
953 There's no UI for out-of-band certificates validation.