noctiluca 0.0.3

A terminal web browser: page text as terminal text, media as media
Documentation
# Noctiluca's config: a sample with every table. Copy it to
# ~/.config/noctiluca/config.toml (Linux; Application Support on macOS,
# %APPDATA% on Windows), or name another with `noctiluca --config PATH`.
# A key Noctiluca does not know is a warning, never an error.

[startup]
# The first page, when none is named on the command line.
home = "https://docs.rs"
# projection (Chrome's layout in cells), reader (one column), pixels
# (Chrome's pixels in Kitty graphics, sent where they change), or raster.
view = "projection"
# Where a page sets no background of its own, let the terminal's own
# background show (a translucent or themed terminal): in the faithful
# projection, and in Chrome's pixels where the image protocol keeps
# transparency. --transparent sets it for one run.
transparent = false

[search]
# The search engine for words the address bar does not know. {} is the
# query, escaped. No tracking parameters are added.
url = "https://html.duckduckgo.com/html/?q={}"

[shortcuts]
# Keywords: `gh rs-rich` in the address bar, or `noctiluca gh rs-rich`.
# A template's {} takes the words after the keyword; the keyword alone
# opens its site's home. A table sets both; false removes a built-in.
gh = "https://github.com/search?q={}"
wiki = { search = "https://en.wikipedia.org/w/index.php?search={}", home = "https://en.wikipedia.org" }
# mdn = false

[keys]
# vim (o, f, /, H and L, g t) or plain (Ctrl+O, Alt+Left, Ctrl+F).
preset = "vim"
# Any action, by its id (`noctiluca keys` lists them): keys separated by
# spaces are alternatives; `none` (or "") unbinds. A line with a key
# name Noctiluca does not know is a warning, and only that line is skipped.
# hints = "f alt+f"

[media]
# Pages' sound plays on the machine Chrome runs on. Off by default.
audio = false
# The most frames a second a moving picture (a GIF, a video) shows: a
# ceiling, not a target (the byte budget decides how many your terminal
# is sent); video never goes above 30.
fps = 30
# auto, ansi (half blocks), kitty, sixel, iterm2, or none (alt text only).
images = "auto"
# Bytes a second moving pictures may send the terminal, shared by those in
# view; short of it, a picture steps down Kitty, iTerm2, Sixel, then half
# blocks. Unset: 4M on this machine, 256K over SSH, then what the terminal
# is measured taking (here up to 32M; over SSH only ever lower).
# bandwidth = "4M"

[agent]
# A control socket for scripts and coding agents of your own user
# (`noctiluca ls`, `noctiluca action …`): in a private directory under
# $XDG_RUNTIME_DIR, no network listener. Off unless turned on here or with
# --control. Unix only for now.
control = false
# Refuse every action that changes anything (open, click, type, …): an
# agent can only read. --read-only sets it for one run.
read_only = false
# Where Ctrl+G sends the element you pick: clipboard, pane (the pane beside
# this one, through the terminal's API), or pane:ID.
send = "clipboard"

[adapt]
# Terminal adaptations: named rules about constructs, never about a site.
# Every rule is on but text-over-pictures, which changes what a page
# means. `a` toggles all of them off and on while browsing, `?` lists
# them, and --adapt=-RULE or --no-adapt sets them for one run.
decorative-images = true
inline-pictures = true
cap-pictures = true
captions = true
icon-buttons = true
snap-grids = true
collapse-nav = true
collapse-gaps = true
text-over-pictures = false
live-tail = true
# Off: the page's own colours, on white on a light terminal, lightness
# inverted on black on a dark one (COLORFGBG says which).
page-colors = true
bandwidth = true

[profile]
# A kept profile (its cookies and storage stay between runs), opt-in. By
# default each run has a temporary, private one.
# name = "work"

# Per-site settings: a host, a wildcard (*.example.com) or a URL prefix.
# The most specific match wins: a prefix, then a host, then a wildcard.
[site."github.com"]
view = "reader"
# `s WORDS` in the address bar searches this site.
keyword = "s"

[site."github.com".keys]
# A key binds an action, an element by its accessible role and name
# (looked up when the key is pressed), or a list of those. Never a script
# or a CSS selector. Ctrl+K ("Bind a key on this site…") binds one from
# the page itself.
n = "scroll.down"
"]" = { role = "link", name = "Next" }