astronaut(1)
# NAME
astronaut - a Gemini browser for the terminal
# SYNOPSIS
_astronaut_ [-v] [URL]
# 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.
*jump*
Enters jump mode. A table of contents will be presented as a series of
links. Clicking a link will jump to the location of the heading in the
page.
*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 lines. 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*.