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: March 28 2021$
15 .Dt TELESCOPE 1
16 .Os
17 .Sh NAME
18 .Nm telescope
19 .Nd Gemini client
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Fl hn
24 .Op Fl c Pa config
25 .Op Ar URL
26 .Ek
27 .Sh DESCRIPTION
28 .Nm
29 is an interactive browser for the Gemini protocol.
30 It is able to process text/gemini and more in general every text/* file.
31 .Nm
32 also features tabs, bookmarks and out-of-band TOFU verification.
33 .Pp
34 The arguments are as follows:
35 .Bl -tag -width tenletters
36 .It Fl h
37 Display version and usage.
38 .It Fl n
39 Configtest mode.
40 Only check the configuration file for validity.
41 .It Fl c Pa config
42 Specify an alternative configuration file.
43 By default
44 .Pa $HOME/.telescope/config
45 is loaded.
46 .El
47 .Sh TOFU
48 .Nm
49 aims to use the "Trust, but Verify (where appropriate)" approach.
50 The idea is to define three level of verification for a certificate:
51 .Bl -tag -width 12m
52 .It untrusted
53 the server fingerprint does NOT match the stored value
54 .It trusted
55 the server fingerprint matches the store one
56 .It verified
57 the fingerprint matches and has been verified out-of-band
58 .El
59 .Pp
60 Most of the time the
61 .Dq trusted
62 level is enough, but where is appropriate users should be able to
63 verify out-of-band the certificate.
64 .Pp
65 At the moment, there is no built-in support for an out-of-band
66 verification though.
67 .Pp
68 Known certificates are store in
69 .Pa ~/.telescope/known_hosts
70 with a format similar to the
71 .Xr ssh 1 Ns '
72 .Pa known_hosts
73 file.
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:
76 .Dq HOST HASH TRUSTED
77 where:
78 .Bl -tag -width 12m
79 .It HOST
80 the hostname, optionally followed by a colon (":") and a port number.
81 .It HASH
82 is the hash of the certificate, as outputted by
83 .Xr tls_peer_cert_hash 3 .
84 .It TRUSTED
85 a single digit.
86 0 means trusted, 1 verified.
87 .El
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
91 .Xr vi 1
92 and
93 .Dq CUA
94 users.
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.
99 .Pp
100 Keys are usually a single character, like
101 .Sq p
102 or
103 .Sq n ,
104 but some special keys are accepted as well.
105 .Pp
106 .Bl -tag -width 16m -offset indent -compact
107 .It <up>
108 Up arrow
109 .It <down>
110 Down arrow
111 .It <left>
112 Left arrow
113 .It <right>
114 Right arrow
115 .It <prior>
116 Previous page/Page up
117 .It <next>
118 Next page/Page down
119 .It <home>
120 Home
121 .It <end>
122 End
123 .It <f0> thru <f63>
124 Function keys
125 .It del or backspace
126 Backspace
127 .It esc
128 Escape
129 .It space or spc
130 Space
131 .It enter or ret
132 Enter
133 .It tab
134 Tab
135 .It backtab
136 Depends on the configuration of the terminal emulator.
137 Usually is shift tab though.
138 .El
139 .Ss GNU Emacs-like keys
140 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
141 .It C-p
142 previous-line
143 .It C-n
144 next-line
145 .It C-f
146 forward-char
147 .It C-b
148 backward-char
149 .It M-{
150 backward-paragraph
151 .It M-}
152 forward-paragraph
153 .It C-a
154 move-beginning-of-line
155 .It C-e
156 move-end-of-line
157 .It M-v, M-space
158 scroll-up
159 .It C-v, space
160 scroll-down
161 .It M-<
162 beginning-of-buffer
163 .It M->
164 end-of-buffer
165 .It C-x C-c
166 kill-telescope
167 .It C-g
168 clear-minibuf
169 .It M-x
170 execute-extended-command
171 .It C-x C-f
172 load-url
173 .It C-x M-f
174 load-current-url
175 .It C-x t 0
176 tab-close
177 .It C-x t 1
178 tab-close-other
179 .It C-x t 2
180 tab-new
181 .It C-x t o
182 tab-next
183 .It C-x t O
184 tab-previous
185 .It C-x t m
186 tab-move
187 .It C-x t M
188 tab-move-to
189 .It C-M-b
190 previous-page
191 .It C-M-f
192 next-page
193 .It <f7> a
194 bookmark-page
195 .It <f7> <f7>
196 list-bookmarks
197 .El
198 .Ss Xr vi 1 Ns -like keys
199 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
200 .It k
201 previous-line
202 .It j
203 next-line
204 .It l
205 forward-char
206 .It h
207 backward-char
208 .It {
209 backward-paragraph
210 .It }
211 forward-paragraph
212 .It ^
213 move-beginning-of-line
214 .It $
215 move-end-of-line
216 .It K
217 scroll-line-up
218 .It J
219 scroll-line-down
220 .It g g
221 beginning-of-buffer
222 .It G
223 end-of-buffer
224 .It g D
225 tab-close
226 .It g N
227 tab-new
228 .It g t
229 tab-next
230 .It g T
231 tab-previous
232 .It g M-t
233 tab-move
234 .It g M-T
235 tab-move-to
236 .It H
237 previous-page
238 .It L
239 next-page
240 .It q
241 kill-telescope
242 .It ESC
243 clear-minibuf
244 .It :
245 execute-extended-command
246 .El
247 .Ss CUA-like keys
248 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
249 .It <up>
250 previous-line
251 .It <down>
252 next-line
253 .It <right>
254 forward-char
255 .It <left>
256 backward-char
257 .It <prior>
258 scroll-up
259 .It <next>
260 scroll-down
261 .It M-<left>
262 previous-page
263 .It M-<right>
264 next-page
265 .El
266 .Ss Neither Emacs nor vi specific
267 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
268 .It <f1>
269 toggle-help
270 .It enter
271 push-button
272 .It M-enter
273 push-button-new-tab
274 .It M-tab
275 previous-button
276 .It backtab
277 previous-button
278 .It tab
279 next-button
280 .El
281 .Ss Minibuffer-specific keys
282 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
283 .It enter
284 mini-complete-and-exit
285 .It C-g
286 mini-abort
287 .It ESC
288 mini-abort
289 .It C-d
290 mini-delete-char
291 .It del
292 mini-delete-backward-char
293 .It backspace
294 mini-delete-backward-char
295 .It C-h
296 mini-delete-backward-char
297 .It C-b
298 backward-char
299 .It C-f
300 forward-char
301 .It <left>
302 backward-char
303 .It <right>
304 forward-char
305 .It C-e
306 move-end-of-line
307 .It C-a
308 move-beginning-of-line
309 .It <end>
310 move-end-of-line
311 .It <home>
312 move-beginning-of-line
313 .It C-k
314 mini-kill-line
315 .It M-p
316 mini-previous-history-element
317 .It M-n
318 mini-next-history-element
319 .It <up>
320 mini-previous-history-element
321 .It <down>
322 mini-next-history-element
323 .El
324 .Sh INTERACTIVE COMMANDS
325 Follows the documentation for the interactive commands.
326 These commands can be bound to a key or executed with
327 .Ic execute-extended-command .
328 .Ss Movement commands
329 .Bl -tag -width execute-extended-command -compact
330 .It Ic backward-char
331 Move point one character backward.
332 .It Ic backward-paragraph
333 Move point one paragraph backward.
334 .It Ic beginning-of-buffer
335 Move point to the beginning of the buffer.
336 .It Ic end-of-buffer
337 Move point to the end of the buffer.
338 .It Ic forward-char
339 Move point one character forward.
340 .It Ic forward-paragraph
341 Move point one paragraph forward.
342 .It Ic move-beginning-of-line
343 Move point at the beginning of the current (visual) line.
344 .It Ic move-end-of-line
345 Move point at the end of the current (visual) line.
346 .It Ic next-button
347 Move point to the next link.
348 .It Ic next-line
349 Move point to the next (visual) line, in the same column if possible.
350 .It Ic previous-button
351 Move point to the previous link.
352 .It Ic previous-line
353 Move point to the previous (visual) line.
354 .El
355 .Ss Bookmark-related commands
356 .Bl -tag -width execute-extended-command -compact
357 .It Ic bookmark-page
358 Add a link to the bookmark file.
359 It preloads the minibuffer with the current URL.
360 .It Ic list-bookmarks
361 Load the bookmarks page.
362 .El
363 .Ss Tab-related commands
364 .Bl -tag -width execute-extended-command -compact
365 .It Ic tab-close
366 Close the current tab.
367 .It Ic tab-close-other
368 Close all tabs but the current one.
369 .It Ic tab-move
370 Move the current tab after the next one, wrapping around if
371 needed.
372 .It Ic tab-move-to
373 Move the current tab before the previous one, wrapping around if needed.
374 .It Ic tab-new
375 Open a new tab.
376 .It Ic tab-next
377 Focus next tab, wrapping around eventually.
378 .It Ic tab-previous
379 Focus the previous tab, wrapping around eventually.
380 .El
381 .Ss Misc commands
382 .Bl -tag -width execute-extended-command -compact
383 .It Ic clear-minibuf
384 Clears the echo area.
385 .It Ic execute-extended-command
386 Prompts for a command name using the minibuffer.
387 .It Ic kill-telescope
388 Quit
389 .Nm .
390 .It Ic load-current-url
391 Prompts for an URL, the minibuffer is preloaded with the current
392 one.
393 .It Ic load-url
394 Prompts for an URL.
395 .It Ic next-page
396 Load the next item in the history list.
397 .It Ic previous-page
398 Load the previous item in the history list.
399 .It Ic push-button
400 Follow the link on the current line.
401 .It Ic push-button-new-tab
402 Follow the link on the current line on a new tab.
403 .It Ic redraw
404 Redraws the screen, useful if some background program messed up the
405 display.
406 .It Ic scroll-down
407 Scroll down by one visual page.
408 .It Ic scroll-line-down
409 Scroll down by one line.
410 .It Ic scroll-line-up
411 Scroll up by one line.
412 .It Ic scroll-up
413 Scroll up by one visual page.
414 .It Ic toggle-help
415 Toggle side window with help about available keys and their associated
416 interactive command.
417 .El
418 .Ss Minibuffer commands
419 .Bl -tag -width execute-extended-command -compact
420 .It Ic mini-abort
421 Abort the current minibuffer action.
422 .It Ic mini-complete-and-exit
423 Complete the current minibuffer action.
424 .It Ic mini-delete-backward-char
425 Delete the character before the point.
426 .It Ic mini-delete-char
427 Delete the character after the point.
428 .It Ic mini-kill-line
429 Delete from the point until the end of the line.
430 .It Ic mini-next-history-element
431 Load the previous history element.
432 .It Ic mini-previous-history-element
433 Load the next history element.
434 .El
435 .Ss Aliases
436 The following aliases are available during
437 .Ic execute-extended-command :
438 .Bl -tag -width 16m -compact
439 .It Ic tabn
440 .Ic tab-next
441 .It Ic tabnew
442 .Ic tab-new
443 .It Ic tabp
444 .Ic tab-previous
445 .It Ic q No and Ic wq
446 .Ic kill-telescope
447 .El
448 .Sh FILES
449 .Bl -tag -width Ds -compact
450 .It Pa ~/.telescope/bookmarks.gmi
451 Holds the bookmarks.
452 .It Pa ~/.telescope/known_hosts
453 Contains a list of host keys for all the hosts the user has visited.
454 See the TOFU section for more info.
455 .It Pa ~/.telescope/session
456 Contains the list of opened tabs in the last session, one per line.
457 Gets written on
458 .Ic kill-telescope
459 and loaded on startup.
460 .El
461 .Sh AUTHORS
462 .An -nosplit
463 The
464 .Nm
465 program was written by
466 .An Omar Polo Aq Mt op@omarpolo.com .