| 1 | # This is the default config file. |
| 2 | # It also shows all the default values, if you don't create the file. |
| 3 | # You can edit this file to set your own configuration for Amfora. |
| 4 | |
| 5 | # When Amfora updates, defaults may change, but this file on your drive will not. |
| 6 | # You can always get the latest defaults on GitHub. |
| 7 | # https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml |
| 8 | |
| 9 | # Please also check out the Amfora Wiki for more help |
| 10 | # https://github.com/makeworld-the-better-one/amfora/wiki |
| 11 | # gemini://makeworld.space/amfora-wiki/ |
| 12 | |
| 13 | |
| 14 | |
| 15 | # All URL values may omit the scheme and/or port, as well as the beginning double slash |
| 16 | # Valid URL examples: |
| 17 | # gemini://example.com |
| 18 | # //example.com |
| 19 | # example.com |
| 20 | # example.com:123 |
| 21 | |
| 22 | |
| 23 | [a-general] |
| 24 | # Press Ctrl-H to access it |
| 25 | home = "gemini://geminiprotocol.net" |
| 26 | |
| 27 | # Follow up to 5 Gemini redirects without prompting. |
| 28 | # A prompt is always shown after the 5th redirect and for redirects to protocols other than Gemini. |
| 29 | # If set to false, a prompt will be shown before following redirects. |
| 30 | auto_redirect = false |
| 31 | |
| 32 | # What command to run to open a HTTP(S) URL. |
| 33 | # Set to "default" to try to guess the browser, or set to "off" to not open HTTP(S) URLs. |
| 34 | # If a command is set, than the URL will be added (in quotes) to the end of the command. |
| 35 | # A space will be prepended to the URL. |
| 36 | # |
| 37 | # The best way to define a command is using a string array. |
| 38 | # Examples: |
| 39 | # http = ['firefox'] |
| 40 | # http = ['custom-browser', '--flag', '--option=2'] |
| 41 | # http = ['/path/with spaces/in it/firefox'] |
| 42 | # |
| 43 | # Note the use of single quotes, so that backslashes will not be escaped. |
| 44 | # Using just a string will also work, but it is deprecated, and will degrade if |
| 45 | # you use paths with spaces. |
| 46 | |
| 47 | http = 'default' |
| 48 | |
| 49 | # Any URL that will accept a query string can be put here |
| 50 | search = "gemini://kennedy.gemi.dev/search" |
| 51 | |
| 52 | # Whether colors will be used in the terminal |
| 53 | color = true |
| 54 | |
| 55 | # Whether ANSI color codes from the page content should be rendered |
| 56 | ansi = true |
| 57 | |
| 58 | # Whether or not to support source code highlighting in preformatted blocks based on alt text |
| 59 | highlight_code = true |
| 60 | |
| 61 | # Which highlighting style to use (see https://xyproto.github.io/splash/docs/) |
| 62 | highlight_style = "monokai" |
| 63 | |
| 64 | # Whether to replace list asterisks with unicode bullets |
| 65 | bullets = true |
| 66 | |
| 67 | # Whether to show link after link text |
| 68 | show_link = false |
| 69 | |
| 70 | # The max number of columns to wrap a page's text to. Preformatted blocks are not wrapped. |
| 71 | max_width = 80 |
| 72 | |
| 73 | # 'downloads' is the path to a downloads folder. |
| 74 | # An empty value means the code will find the default downloads folder for your system. |
| 75 | # If the path does not exist it will be created. |
| 76 | # Note the use of single quotes, so that backslashes will not be escaped. |
| 77 | downloads = '' |
| 78 | |
| 79 | # Max size for displayable content in bytes - after that size a download window pops up |
| 80 | page_max_size = 2097152 # 2 MiB |
| 81 | # Max time it takes to load a page in seconds - after that a download window pops up |
| 82 | page_max_time = 10 |
| 83 | |
| 84 | # When a scrollbar appears. "never", "auto", and "always" are the only valid values. |
| 85 | # "auto" means the scrollbar only appears when the page is longer than the window. |
| 86 | scrollbar = "auto" |
| 87 | |
| 88 | # Underline non-gemini URLs |
| 89 | # This is done to help color blind users |
| 90 | underline = true |
| 91 | |
| 92 | |
| 93 | [auth] |
| 94 | # Authentication settings |
| 95 | # Note the use of single quotes for values, so that backslashes will not be escaped. |
| 96 | |
| 97 | [auth.certs] |
| 98 | # Client certificates |
| 99 | # Set URL equal to path to client cert file |
| 100 | # |
| 101 | # "example.com" = 'mycert.crt' # Cert is used for all paths on this domain |
| 102 | # "example.com/dir/"= 'mycert.crt' # Cert is used for /dir/ and everything below only |
| 103 | # |
| 104 | # See the comment at the beginning of this file for examples of all valid types of |
| 105 | # URLs, ports and schemes can be used too |
| 106 | "stevedylan.dev" = '/Users/stevedylandev/.local/share/amfora/cert.pem' |
| 107 | |
| 108 | |
| 109 | [auth.keys] |
| 110 | # Client certificate keys |
| 111 | # Same as [auth.certs] but the path is to the client key file. |
| 112 | "stevedylan.dev" = '/Users/stevedylandev/.local/share/amfora/key.pem' |
| 113 | |
| 114 | |
| 115 | [commands] |
| 116 | # Define up to 10 custom commands to execute on the corresponding hotkey press. |
| 117 | # Commands are run in a new process and will not terminate when Amfora is closed. |
| 118 | # If you need your command to accept additional input, it is recommended to open |
| 119 | # a GUI or use a terminal multiplexer like screen or tmux. The string ${url} will |
| 120 | # be replaced with the current or selected URL. Note that pipes and redirections |
| 121 | # are not allowed, if these are needed then you should set up a script. Use only |
| 122 | # absolute paths and/or reference executables in your $PATH. |
| 123 | # command1 = "my-script -a -b -c ${url}" |
| 124 | # command2 = "" |
| 125 | # command3 = "" |
| 126 | # command4 = "" |
| 127 | # command5 = "" |
| 128 | # command6 = "" |
| 129 | # command7 = "" |
| 130 | # command8 = "" |
| 131 | # command9 = "" |
| 132 | # command0 = "" |
| 133 | |
| 134 | |
| 135 | [keybindings] |
| 136 | # If you have a non-US keyboard, use bind_tab1 through bind_tab0 to |
| 137 | # setup the shift-number bindings: Eg, for US keyboards (the default): |
| 138 | # bind_tab1 = "!" |
| 139 | # bind_tab2 = "@" |
| 140 | # bind_tab3 = "#" |
| 141 | # bind_tab4 = "$" |
| 142 | # bind_tab5 = "%" |
| 143 | # bind_tab6 = "^" |
| 144 | # bind_tab7 = "&" |
| 145 | # bind_tab8 = "*" |
| 146 | # bind_tab9 = "(" |
| 147 | # bind_tab0 = ")" |
| 148 | |
| 149 | # Whitespace is not allowed in any of the keybindings! Use 'Space' and 'Tab' to bind to those keys. |
| 150 | # Multiple keys can be bound to one command, just use a TOML array. |
| 151 | # To add the Alt modifier, the binding must start with Alt-, should be reasonably universal |
| 152 | # Ctrl- won't work on all keys, see this for a list: |
| 153 | # https://github.com/gdamore/tcell/blob/cb1e5d6fa606/key.go#L83 |
| 154 | |
| 155 | # An example of a TOML array for multiple keys being bound to one command is the default |
| 156 | # binding for reload: |
| 157 | # bind_reload = ["R","Ctrl-R"] |
| 158 | # One thing to note here is that "R" is capitalization sensitive, so it means shift-r. |
| 159 | # "Ctrl-R" means both ctrl-r and ctrl-shift-R (this is a quirk of what ctrl-r means on |
| 160 | # an ANSI terminal) |
| 161 | |
| 162 | # The default binding for opening the bottom bar for entering a URL or link number is: |
| 163 | # bind_bottom = "Space" |
| 164 | # This is how to get the Spacebar as a keybinding, if you try to use " ", it won't work. |
| 165 | # And, finally, an example of a simple, unmodified character is: |
| 166 | # bind_edit = "e" |
| 167 | # This binds the "e" key to the command to edit the current URL. |
| 168 | |
| 169 | # The bind_link[1-90] options are for the commands to go to the first 10 links on a page, |
| 170 | # typically these are bound to the number keys: |
| 171 | # bind_link1 = "1" |
| 172 | # bind_link2 = "2" |
| 173 | # bind_link3 = "3" |
| 174 | # bind_link4 = "4" |
| 175 | # bind_link5 = "5" |
| 176 | # bind_link6 = "6" |
| 177 | # bind_link7 = "7" |
| 178 | # bind_link8 = "8" |
| 179 | # bind_link9 = "9" |
| 180 | # bind_link0 = "0" |
| 181 | |
| 182 | # The bind_command[0-9] options are for the command hotkeys. This will pass the URL of the |
| 183 | # current tab as an argument. |
| 184 | # bind_command1 = "Alt-!" |
| 185 | # bind_command2 = "Alt-@" |
| 186 | # bind_command3 = "Alt-#" |
| 187 | # bind_command4 = "Alt-$" |
| 188 | # bind_command5 = "Alt-%" |
| 189 | # bind_command6 = "Alt-^" |
| 190 | # bind_command7 = "Alt-&" |
| 191 | # bind_command8 = "Alt-*" |
| 192 | # bind_command9 = "Alt-(" |
| 193 | # bind_command0 = "Alt-)" |
| 194 | |
| 195 | # The bind_commandtarget[0-9] options are for command hotkeys that operate on the currently |
| 196 | # highlighted link. This will pass the URL of the highlighted link as an argument. |
| 197 | # bind_command_target1 = "Alt-1" |
| 198 | # bind_command_target2 = "Alt-2" |
| 199 | # bind_command_target3 = "Alt-3" |
| 200 | # bind_command_target4 = "Alt-4" |
| 201 | # bind_command_target5 = "Alt-5" |
| 202 | # bind_command_target6 = "Alt-6" |
| 203 | # bind_command_target7 = "Alt-7" |
| 204 | # bind_command_target8 = "Alt-8" |
| 205 | # bind_command_target9 = "Alt-9" |
| 206 | # bind_command_target0 = "Alt-0" |
| 207 | |
| 208 | # All keybindings: |
| 209 | # |
| 210 | # bind_bottom |
| 211 | # bind_edit |
| 212 | # bind_home |
| 213 | # bind_bookmarks |
| 214 | # bind_add_bookmark |
| 215 | # bind_save |
| 216 | # bind_reload |
| 217 | # bind_back |
| 218 | # bind_forward |
| 219 | # bind_moveup |
| 220 | # bind_movedown |
| 221 | # bind_moveleft |
| 222 | # bind_moveright |
| 223 | # bind_pgup |
| 224 | # bind_pgdn |
| 225 | # bind_new_tab |
| 226 | # bind_close_tab |
| 227 | # bind_next_tab |
| 228 | # bind_prev_tab |
| 229 | # bind_quit |
| 230 | # bind_help |
| 231 | # bind_sub: for viewing the subscriptions page |
| 232 | # bind_add_sub |
| 233 | # bind_copy_page_url |
| 234 | # bind_copy_target_url |
| 235 | # bind_beginning: moving to beginning of page (top left) |
| 236 | # bind_end: same but the for the end (bottom left) |
| 237 | # bind_url_handler_open: Open highlighted URL with URL handler (#143) |
| 238 | |
| 239 | # Search |
| 240 | # bind_search = "/" |
| 241 | # bind_next_match = "n" |
| 242 | # bind_prev_match = "N" |
| 243 | |
| 244 | [url-handlers] |
| 245 | # Allows setting the commands to run for various URL schemes. |
| 246 | # E.g. to open FTP URLs with FileZilla set the following key: |
| 247 | # ftp = ['filezilla'] |
| 248 | # You can set any scheme to 'off' or '' to disable handling it, or |
| 249 | # just leave the key unset. |
| 250 | # |
| 251 | # DO NOT use this for setting the HTTP command. |
| 252 | # Use the http setting in the "a-general" section above. |
| 253 | # |
| 254 | # NOTE: These settings are overridden by the ones in the proxies section. |
| 255 | # |
| 256 | # The best way to define a command is using a string array. |
| 257 | # Examples: |
| 258 | # magnet = ['transmission'] |
| 259 | # foo = ['custom-browser', '--flag', '--option=2'] |
| 260 | # tel = ['/path/with spaces/in it/telephone'] |
| 261 | # |
| 262 | # Note the use of single quotes, so that backslashes will not be escaped. |
| 263 | # Using just a string will also work, but it is deprecated, and will degrade if |
| 264 | # you use paths with spaces. |
| 265 | |
| 266 | # This is a special key that defines the handler for all URL schemes for which |
| 267 | # no handler is defined. |
| 268 | # It uses the special value 'default', which will try and use the default |
| 269 | # application on your computer for opening this kind of URI. |
| 270 | other = 'default' |
| 271 | |
| 272 | [url-prompts] |
| 273 | # Specify whether a confirmation prompt should be shown before following URL schemes. |
| 274 | # The special key 'other' matches all schemes that don't match any other key. |
| 275 | # |
| 276 | # Example: prompt on every non-gemini URL |
| 277 | # other = true |
| 278 | # gemini = false |
| 279 | # |
| 280 | # Example: only prompt on HTTP(S) |
| 281 | # other = false |
| 282 | # http = true |
| 283 | # https = true |
| 284 | |
| 285 | # [[mediatype-handlers]] section |
| 286 | # --------------------------------- |
| 287 | # |
| 288 | # Specify what applications will open certain media types. |
| 289 | # By default your default application will be used to open the file when you select "Open". |
| 290 | # You only need to configure this section if you want to override your default application, |
| 291 | # or do special things like streaming. |
| 292 | # |
| 293 | # Note the use of single quotes for commands, so that backslashes will not be escaped. |
| 294 | # |
| 295 | # |
| 296 | # To open jpeg files with the feh command: |
| 297 | # |
| 298 | # [[mediatype-handlers]] |
| 299 | # cmd = ['feh'] |
| 300 | # types = ["image/jpeg"] |
| 301 | # |
| 302 | # Each command that you specify must come under its own [[mediatype-handlers]]. You may |
| 303 | # specify as many [[mediatype-handlers]] as you want to setup multiple commands. |
| 304 | # |
| 305 | # If the subtype is omitted then the specified command will be used for the |
| 306 | # entire type: |
| 307 | # |
| 308 | # [[mediatype-handlers]] |
| 309 | # command = ['vlc', '--flag'] |
| 310 | # types = ["audio", "video"] |
| 311 | # |
| 312 | # A catch-all handler can by specified with "*". |
| 313 | # Note that there are already catch-all handlers in place for all OSes, |
| 314 | # that open the file using your default application. This is only if you |
| 315 | # want to override that. |
| 316 | # |
| 317 | # [[mediatype-handlers]] |
| 318 | # cmd = ['some-command'] |
| 319 | # types = [ |
| 320 | # "application/pdf", |
| 321 | # "*", |
| 322 | # ] |
| 323 | # |
| 324 | # You can also choose to stream the data instead of downloading it all before |
| 325 | # opening it. This is especially useful for large video or audio files, as |
| 326 | # well as radio streams, which will never complete. You can do this like so: |
| 327 | # |
| 328 | # [[mediatype-handlers]] |
| 329 | # cmd = ['vlc', '-'] |
| 330 | # types = ["audio", "video"] |
| 331 | # stream = true |
| 332 | # |
| 333 | # This uses vlc to stream all video and audio content. |
| 334 | # By default stream is set to off for all handlers |
| 335 | # |
| 336 | # |
| 337 | # If you want to always open a type in its viewer without the download or open |
| 338 | # prompt appearing, you can add no_prompt = true |
| 339 | # |
| 340 | # [[mediatype-handlers]] |
| 341 | # cmd = ['feh'] |
| 342 | # types = ["image"] |
| 343 | # no_prompt = true |
| 344 | # |
| 345 | # Note: Multiple handlers cannot be defined for the same full media type, but |
| 346 | # still there needs to be an order for which handlers are used. The following |
| 347 | # order applies regardless of the order written in the config: |
| 348 | # |
| 349 | # 1. Full media type: "image/jpeg" |
| 350 | # 2. Just type: "image" |
| 351 | # 3. Catch-all: "*" |
| 352 | |
| 353 | |
| 354 | [cache] |
| 355 | # Options for page cache - which is only for text pages |
| 356 | # Increase the cache size to speed up browsing at the expense of memory |
| 357 | # Zero values mean there is no limit |
| 358 | |
| 359 | max_size = 0 # Size in bytes |
| 360 | max_pages = 30 # The maximum number of pages the cache will store |
| 361 | |
| 362 | # How long a page will stay in cache, in seconds. |
| 363 | timeout = 1800 # 30 mins |
| 364 | |
| 365 | [proxies] |
| 366 | # Allows setting a Gemini proxy for different schemes. |
| 367 | # The settings are similar to the url-handlers section above. |
| 368 | # E.g. to open a gopher page by connecting to a Gemini proxy server: |
| 369 | # gopher = "example.com:123" |
| 370 | # |
| 371 | # Port 1965 is assumed if no port is specified. |
| 372 | # |
| 373 | # NOTE: These settings override any external handlers specified in |
| 374 | # the url-handlers section. |
| 375 | # |
| 376 | # Note that HTTP and HTTPS are treated as separate protocols here. |
| 377 | |
| 378 | |
| 379 | [subscriptions] |
| 380 | # For tracking feeds and pages |
| 381 | |
| 382 | # Whether a pop-up appears when viewing a potential feed |
| 383 | popup = true |
| 384 | |
| 385 | # How often to check for updates to subscriptions in the background, in seconds. |
| 386 | # Set it to 0 to disable this feature. You can still update individual feeds |
| 387 | # manually, or restart the browser. |
| 388 | # |
| 389 | # Note Amfora will check for updates on browser start no matter what this setting is. |
| 390 | update_interval = 1800 # 30 mins |
| 391 | |
| 392 | # How many subscriptions can be checked at the same time when updating. |
| 393 | # If you have many subscriptions you may want to increase this for faster |
| 394 | # update times. Any value below 1 will be corrected to 1. |
| 395 | workers = 3 |
| 396 | |
| 397 | # The number of subscription updates displayed per page. |
| 398 | entries_per_page = 20 |
| 399 | |
| 400 | # Set to false to remove the explanatory text from the top of the subscription page |
| 401 | header = true |
| 402 | |
| 403 | |
| 404 | [theme] |
| 405 | # This section is for changing the COLORS used in Amfora. |
| 406 | # These colors only apply if 'color' is enabled above. |
| 407 | # Colors can be set using a W3C color name, or a hex value such as "#ffffff". |
| 408 | # Setting a background to "default" keeps the terminal default |
| 409 | # If your terminal has transparency, set any background to "default" to keep it transparent |
| 410 | # The key "bg" is already set to "default", but this can be used on other backgrounds, |
| 411 | # like for modals. |
| 412 | |
| 413 | # Note that not all colors will work on terminals that do not have truecolor support. |
| 414 | # If you want to stick to the standard 16 or 256 colors, you can get |
| 415 | # a list of those here: https://jonasjacek.github.io/colors/ |
| 416 | # DO NOT use the names from that site, just the hex codes. |
| 417 | |
| 418 | # Definitions: |
| 419 | # bg = background |
| 420 | # fg = foreground |
| 421 | # dl = download |
| 422 | # btn = button |
| 423 | # hdg = heading |
| 424 | # bkmk = bookmark |
| 425 | # modal = a popup window/box in the middle of the screen |
| 426 | |
| 427 | # EXAMPLES: |
| 428 | # hdg_1 = "green" |
| 429 | # hdg_2 = "#5f0000" |
| 430 | # bg = "default" |
| 431 | |
| 432 | # Available keys to set: |
| 433 | |
| 434 | # bg: background for pages, tab row, app in general |
| 435 | # tab_num: The number/highlight of the tabs at the top |
| 436 | # tab_divider: The color of the divider character between tab numbers: | |
| 437 | # bottombar_label: The color of the prompt that appears when you press space |
| 438 | # bottombar_text: The color of the text you type |
| 439 | # bottombar_bg |
| 440 | # scrollbar: The scrollbar that appears on the right for long pages |
| 441 | |
| 442 | # You can also set an 'include' key to process another TOML file that contains theme keys. |
| 443 | # Example: |
| 444 | # include = "my/path/to/special-theme.toml" |
| 445 | # |
| 446 | # Any other theme keys will override this external file. |
| 447 | # You can use this special key to switch between themes easily. |
| 448 | # Download other themes here: https://github.com/makeworld-the-better-one/amfora/tree/master/contrib/themes |
| 449 | |
| 450 | |
| 451 | # hdg_1 |
| 452 | # hdg_2 |
| 453 | # hdg_3 |
| 454 | # amfora_link: A link that Amfora supports viewing. For now this is only gemini:// |
| 455 | # foreign_link: HTTP(S), Gopher, etc |
| 456 | # link_number: The silver number that appears to the left of a link |
| 457 | # regular_text: Normal gemini text, and plaintext documents |
| 458 | # quote_text |
| 459 | # preformatted_text |
| 460 | # list_text |
| 461 | |
| 462 | # btn_bg: The bg color for all modal buttons |
| 463 | # btn_text: The text color for all modal buttons |
| 464 | |
| 465 | # dl_choice_modal_bg |
| 466 | # dl_choice_modal_text |
| 467 | # dl_modal_bg |
| 468 | # dl_modal_text |
| 469 | # info_modal_bg |
| 470 | # info_modal_text |
| 471 | # error_modal_bg |
| 472 | # error_modal_text |
| 473 | # yesno_modal_bg |
| 474 | # yesno_modal_text |
| 475 | # tofu_modal_bg |
| 476 | # tofu_modal_text |
| 477 | # subscription_modal_bg |
| 478 | # subscription_modal_text |
| 479 | |
| 480 | # input_modal_bg |
| 481 | # input_modal_text |
| 482 | # input_modal_field_bg: The bg of the input field, where you type the text |
| 483 | # input_modal_field_text: The color of the text you type |
| 484 | |
| 485 | # bkmk_modal_bg |
| 486 | # bkmk_modal_text |
| 487 | # bkmk_modal_label |
| 488 | # bkmk_modal_field_bg |
| 489 | # bkmk_modal_field_text |
| 490 | |
| 491 | # Darkmatter Theme |
| 492 | bg = "#121113" |
| 493 | tab_num = "#e78a53" |
| 494 | tab_divider = "#333333" |
| 495 | bottombar_label = "#e78a53" |
| 496 | bottombar_text = "#ffffff" |
| 497 | bottombar_bg = "#222222" |
| 498 | scrollbar = "#333333" |
| 499 | |
| 500 | hdg_1 = "#ffffff" |
| 501 | hdg_2 = "#c1c1c1" |
| 502 | hdg_3 = "#aaaaaa" |
| 503 | amfora_link = "#e78a53" |
| 504 | foreign_link = "#fbcb97" |
| 505 | link_number = "#888888" |
| 506 | regular_text = "#ffffff" |
| 507 | quote_text = "#5f8787" |
| 508 | preformatted_text = "#fbcb97" |
| 509 | list_text = "#ffffff" |
| 510 | |
| 511 | btn_bg = "#333333" |
| 512 | btn_text = "#ffffff" |
| 513 | |
| 514 | dl_choice_modal_bg = "#222222" |
| 515 | dl_choice_modal_text = "#ffffff" |
| 516 | dl_modal_bg = "#222222" |
| 517 | dl_modal_text = "#ffffff" |
| 518 | info_modal_bg = "#222222" |
| 519 | info_modal_text = "#ffffff" |
| 520 | error_modal_bg = "#222222" |
| 521 | error_modal_text = "#e78a53" |
| 522 | yesno_modal_bg = "#222222" |
| 523 | yesno_modal_text = "#ffffff" |
| 524 | tofu_modal_bg = "#222222" |
| 525 | tofu_modal_text = "#ffffff" |
| 526 | subscription_modal_bg = "#222222" |
| 527 | subscription_modal_text = "#ffffff" |
| 528 | |
| 529 | input_modal_bg = "#222222" |
| 530 | input_modal_text = "#ffffff" |
| 531 | input_modal_field_bg = "#333333" |
| 532 | input_modal_field_text = "#ffffff" |
| 533 | |
| 534 | bkmk_modal_bg = "#222222" |
| 535 | bkmk_modal_text = "#ffffff" |
| 536 | bkmk_modal_label = "#e78a53" |
| 537 | bkmk_modal_field_bg = "#333333" |
| 538 | bkmk_modal_field_text = "#ffffff" |