Prompts, downloads and permissions
Prompts
Everything that needs an answer appears in a box floating near the bottom of the page, one at a time. prompt.position = "center" puts the box in the middle of the page, "docked" puts it in a strip above the status bar, and prompt.width sets the box's width. The floating box lists each answer on its own line with its key, and you can click an answer instead of pressing the key:
- JavaScript
alert,confirm,promptand leave-page warnings - HTTP logins (username, then a hidden password)
- where to save a download
- site permission requests (camera, microphone, location, notifications…)
| Mode | Keys |
|---|---|
| prompt (text) | type, readline keys (Ctrl-w deletes one path component), Return accepts, Escape cancels |
| yesno | y / n, Return (the default), Escape cancels |
Permissions
A permission request shows the asking site in large type, with its host in bold so a look-alike name stands out, and an icon for each thing it wants (camera, microphone, location, notifications, screen…). A question belongs to the tab that asked: if a tab in the background asks, you stay where you are, the tab gets a ? badge in the tab bar, and the question shows when you go to that tab.
For permission prompts:
yallows once andn(orEscape) means "not now".Aalways allows andNalways blocks. These are saved as per-site settings inautoconfig.toml, so they survive restarts. That includes camera and microphone. Chromium also remembersyfor its own permission prompts.
The content.geolocation, content.notifications.enabled, content.media.audio_capture, content.media.video_capture, content.desktop_capture, content.mouse_lock (pointer lock, as games use) and content.register_protocol_handler (a site offering to handle mailto: links) settings (ask, true or false) answer without asking.
Notifications
content.notifications.presenter picks where notifications from sites go:
| Presenter | Where |
|---|---|
auto (the default) | Your desktop, sent by Chromium |
libnotify | Your desktop, sent by riptide with notify-send (from libnotify), following the settings below. Clicking one shows its tab. Linux only; elsewhere it acts as auto. |
messages | riptide's status bar, for messages.timeout milliseconds |
With libnotify:
| Setting | What it does |
|---|---|
content.notifications.app_name | The app name on the notification (riptide), which notification services can match to style riptide's own |
content.notifications.urgency | low, normal or critical |
content.notifications.timeout | Milliseconds it stays; -1 lets your desktop decide and 0 keeps it until you dismiss it |
content.notifications.site_icon | Show the site's icon |
content.notifications.show_origin | Put the site it came from on the first line (this also starts status bar messages with it) |
How notifications look (colors, fonts, position, sound) is up to your notification service: dunst, mako, GNOME or KDE. Most can style one app differently, for example in dunst:
[riptide]
appname = riptide
background = "#181616"
foreground = "#c5c9c5"
If notify-send isn't installed, riptide shows the notification in the status bar and says why.
Links to other programs
A link riptide can't show, like mailto:, magnet: or zoommtg:, asks before going to your desktop's handler (xdg-open). content.unknown_url_scheme_policy = "allow-all" hands them over without asking, and "disallow" never does.
Untrusted TLS certificates (self-signed, expired, wrong host…) ask before the page loads: y loads it once, A always loads that site, N always blocks it. content.tls.certificate_errors (ask, block or load-insecurely) sets the default and can be set per site. :debug-clear-ssl-errors forgets the y answers given this session.
Per-site settings
The permission settings above, content.tls.certificate_errors, content.blocking.enabled, content.headers.user_agent and the content.* settings listed in Privacy can differ per site. The last matching pattern wins. Patterns are hosts (example.com, *.example.com for subdomains too), origins (https://meet.example.com) or match patterns (*://*.example.com/app/*):
:set -u https://meet.example.com content.media.video_capture true
:set -u *.example.org content.javascript.enabled false
:config-unset -u https://meet.example.com content.media.video_capture forgets one site's value, and the Sites tab of :settings lists and forgets them with a click.
[per_domain."*.example.com"] # config.toml or autoconfig.toml
"content.blocking.enabled" = false
rt.set("content.geolocation", "false", "*.tracker.example") -- config.lua
Downloads
Downloads go to downloads.location.directory, or the system Downloads folder if that's empty (on Linux, XDG_DOWNLOAD_DIR or ~/.config/user-dirs.dirs). Server-suggested names are reduced to a plain file name, existing files get (1) appended, and typing an existing path asks before overwriting. Set downloads.location.prompt = false to skip the question. The status bar shows ↓2 41% while downloads run. Private windows keep their own list (see Private windows).
| Command | |
|---|---|
:download [url] | Download a URL, or the current page |
;d | Hint a link to download |
:download-cancel, :download-open | The newest running / finished download, or the one given as a count (2:download-open) |
:download-retry | Start the newest failed or cancelled download again |
:download-remove [--all] | Take a download off the list, cancelling it if it's running; --all takes every finished one, like :download-clear |
:download-delete | Delete the newest finished download's file |
:download-clear | Forget finished downloads |
:downloads | A page listing this session's downloads with their numbers and progress |
In the "Save file to" prompt, Tab completes file and directory names, as in a shell, and Alt-e picks the folder with fileselect.folder.command (see below). Ctrl-x opens the file instead of keeping it: it downloads to a temporary folder and opens with downloads.open_dispatcher or your desktop's default; :prompt-open-download zathura names a program. Alt-y copies the download's URL, in any prompt that has one.
With downloads.location.picker = true, the save prompt lists what's in the folder you're typing in, the way the upload file picker does. The name typed narrows it, so a file it would replace shows up. Delete the name (Ctrl-w) to see the folder's files and folders, type to narrow them, and press Tab (or Down/Up) to complete a match into the path. Type / after a folder to list it. Return saves to what's typed; a folder keeps the download's name. Alt-o opens the system's save dialog at the path typed instead.
:download-open uses downloads.open_dispatcher if you set one ({} is the file, or it goes at the end), and the system's opener (xdg-open, open or start) otherwise.
| Setting | What it does |
|---|---|
downloads.location.suggestion | What the save prompt starts with: folder and name (both), the folder (path), or the name (filename; a bare name saves into the download folder) |
downloads.location.remember | Start the prompt in the folder the last download went to (on by default) |
downloads.location.picker | List the folder under the prompt, as the file picker does (off by default) |
downloads.remove_finished | Take finished downloads off the list after this many milliseconds (-1, the default, keeps them) |
Choosing files to upload
Upload fields open Chromium's file dialog. fileselect.handler picks something else:
fileselect.handler | What an upload field opens |
|---|---|
default | Chromium's file dialog |
prompt | riptide's fuzzy file picker, in the prompt area |
external | a program of yours, such as ranger, yazi or fzf in a terminal |
The file picker
With fileselect.handler = "prompt", the picker lists the files under a folder, nearest first, and typing narrows them the way :open completion does: words in any order, then letters with gaps (dgprm finds docs/guide/prompts.md). If the page accepts only some file types (accept=".pdf"), other files are hidden.
| Key | What it does |
|---|---|
Down/Up, Ctrl-n/Ctrl-p | select the next or previous file |
Tab/Shift-Tab | complete, as on the command line: put the next or previous match's path in the text while the list stays; type / after a folder to list it. In a field that takes several files, Tab on a file marks it instead |
Return | choose the marked files, or the selected (or best) one; on a folder, list it instead |
Ctrl-l | list the selected folder |
Ctrl-w | go up a folder |
Alt-e | choose with the field's fileselect.*.command instead |
Alt-o | choose with the system's file dialog instead; cancelling it comes back to the picker |
Escape | cancel |
The keys are also buttons on the picker's last line, for the mouse. Typing a path that starts with / or ~/ lists that folder: ~/Pictures/ cat finds the cats in your Pictures. In a folder field, the first entry, ./, is the folder being listed.
It starts in fileselect.directory, or the folder you last chose files from. These settings change what it lists:
| Setting | What it does |
|---|---|
fileselect.prompt.hidden | Offer names starting with a dot |
fileselect.prompt.ignore | Folders not to look inside (node_modules, target and __pycache__ by default) |
fileselect.prompt.max_files | The most it lists (50,000) |
fileselect.prompt.command | A program that lists the files instead, one path per line |
For example, to list what fd finds, which skips what .gitignore ignores:
fileselect.handler = "prompt"
fileselect.prompt.command = ["fd", "--hidden", "--exclude", ".git"]
The program runs in the folder being listed, gets {dir} and {extensions} filled in like the external commands below, and may print paths relative to that folder or absolute ones.
An external picker
With fileselect.handler = "external", riptide runs the command for the field (fileselect.single_file.command, fileselect.multiple_files.command or fileselect.folder.command) with {} replaced by a file to write the chosen paths to, one per line. The defaults run ranger in xterm. For yazi in foot:
fileselect.handler = "external"
fileselect.single_file.command = ["foot", "yazi", "--chooser-file={}"]
fileselect.multiple_files.command = ["foot", "yazi", "--chooser-file={}"]
The command also gets what the page asked for:
| Placeholder | Environment variable | |
|---|---|---|
| The folder to start in | {dir} | RIPTIDE_FILESELECT_DIR |
| The extensions the page accepts, comma-separated (empty for any) | {extensions} | RIPTIDE_FILESELECT_EXTENSIONS |
file, files or folder | RIPTIDE_FILESELECT_MODE |
For fzf in a terminal, from the folder riptide suggests:
fileselect.handler = "external"
fileselect.single_file.command = ["foot", "sh", "-c", "cd \"$RIPTIDE_FILESELECT_DIR\" && fd --type f | fzf | sed \"s|^|$PWD/|\" > \"$1\"", "sh", "{}"]
fileselect.multiple_files.command = ["foot", "sh", "-c", "cd \"$RIPTIDE_FILESELECT_DIR\" && fd --type f | fzf --multi | sed \"s|^|$PWD/|\" > \"$1\"", "sh", "{}"]
Pressing Escape in fzf writes nothing, which cancels the upload. To decide per site, or to write your own picker in Lua, see the fileselect event.