~adnano/astronaut

ref: 93cad79670b644def1d36ea74f54b3bec6b23b1c astronaut/doc/astronaut.1.scd -rw-r--r-- 4.5 KiB
93cad796Adnan Maolood browser: Implement support for jumping to headings 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
astronaut(1)

# NAME

astronaut - a Gemini browser for the terminal

# SYNOPSIS

_astronaut_ [-v]

# OPTIONS

*-v*
	Prints version information for the astronaut program.

# COMMANDS

The following commands are supported:

*prompt* [command...]
	Opens the command prompt. If a command is provided, the prompt will be
	populated with the command and the user will be able to edit it before
	execution.

*follow*
	Enters follow mode. Visible links will be assigned a unique label, and
	can be focused by typing the label.

*open* <url>
	Opens the given URL. If the scheme is ommitted, a scheme of "gemini" is
	assumed.

*close*
	Closes the current tab.

*newtab*
	Creates a new tab adjacent to the current tab.

*clone*
	Clones the current tab.

*reload*
	Reloads the current page.

*cancel*
	Cancels the current request.

*back*
	Loads the previous page.

*forward*
	Loads the next page.

*previous*
	Switches to the previous tab.

*next*
	Switches to the next tab.

*quit*
	Quits the browser.

*scroll* _top_ | _bottom_ | <n>[%]
	Scrolls the current page.

	If _top_ or _bottom_ is specified, moves to the top or bottom of the page
	respectively.

	If specified as a number, the page is moved by that number of columns. If
	specified as a percentage, the page is moved by that percentage of the
	visible page height. Positive values scroll down and negative values scroll
	up.

	Examples:

	```
	scroll top
	scroll +1
	scroll 3
	scroll -50%
	```

*bookmark*
	Adds the current page to your bookmarks.

*search* <query...>
	Uses your configured search engine to search for the provided query.

*save* <path>
	Saves the current page to the given path.

# CONFIGURATION

There are currently two config files: *astronaut.conf* and *style.conf*.
Config files should be placed in XDG config home plus "astronaut", which
defaults to ~/.config/astronaut.

Examples of these config files are typically included with your installation
of astronaut and are usually installed in /usr/share/astronaut.

Configuration files use the _scfg_ format.
See https://git.sr.ht/~emersion/scfg for more information.

# ASTRONAUT.CONF

This file is used to configure the behavior of astronaut.

The following directives are supported:

*display*
	Configures the display of Gemini text documents.

	The following child directives are supported:

	*graphics* _true_ | _false_
		Enables or disables the display of ASCII art and other inaccessible
		graphics. Default: _true_

	*alt-text* _true_ | _false_
		Enables or disables the display of alt-text. Default: _false_

	Example:

	```
	display {
		# Show ASCII art
		graphics true
		# Hide alt-text
		alt-text false
	}
	```

*search*
	Configures the behavior of searches.

	The following child directives are supported:

	*url* <url>
		Configures the URL used for searches. The URL query will be replaced with
		the search query.

	Example:

	```
	search {
		url gemini://example.com/search
	}
	```

*follow*
	Configures the behavior of follow mode.

	The following child directives are supported:

	*letters* <chars>
		Configures the characters used to generate link labels. Must contain at
		least two characters.

	Example:

	```
	follow {
		letters asdfjkl
	}
	```

*bind* <key> <command...>
	Binds the key sequence to the given command. Currently only one key can be
	bound to a command.

# STYLE.CONF

This file is used to configure the appearance of astronaut.
If this file is present it will override the default appearance.

The following directives configure the style of a Gemini line type.
Each directive accepts the directives in *STYLE DIRECTIVES* as children.

*default*
	The default style. All other styles inherit from this style.

*h1*
	Heading 1 style.

*h2*
	Heading 2 style.

*h3*
	Heading 3 style.

*link*
	Link style.

*li*
	List item style.

*pre*
	Preformatted text style.

*quote*
	Quoted text style.

*text*
	Normal text style.

## STYLE DIRECTIVES

The following directives configure the properties of a style.

*background*
	Sets the background color.
	Accepts a color parameter.
	See *COLORS* for more details.

*foreground*
	Sets the foreground color.
	Accepts a color parameter.
	See *COLORS* for more details.

*bold*
	Enables bold.

*italic*
	Enables italic.

*underline*
	Enables underline.

*reverse*
	Reverses the style.
	The background color and the foreground color are swapped.

*reset*
	Resets the style.
	Useful to prevent inheriting from the default style.

## COLORS

Some directives accept color parameters. The parameter must be either a HTML
color name or a hex value in the format *#ffffff*.