about summary refs log tree commit diff stats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Update docsbptato2024-03-161-3/+0
|
* pager, loader: add "Save file to" functionalitybptato2024-03-161-1/+8
| | | | | | | As simple as it could be; no download panel yet. Also, remove the xdg-open default mailcap entry; it's better to just save by default.
* config: add start.console-buffer optionbptato2024-03-161-0/+10
| | | | useful for debugging
* man: work around parameter insanitybptato2024-03-151-3/+14
| | | | | | | | | | | | | | | | | | | | | This is horrible. -s means completely different things on various systems. -l does not exist on various systems. Nothing is standardized, except that man should take at least one parameter and that -k should perform a search. (Seriously, that's all.) So what we do is: * add a separate env var for overriding apropos * for man:, never use -s to specify sections * for man-k:, fall back to man, EXCEPT on FreeBSD which does not have a working section specifier on man -k (neither -S nor MANSECT does anything) * for man-l:, just pass the path wholesale to man and hope it does something useful. Also, we now set MANCOLOR to 1 so FreeBSD man gives us formatting as well.
* doc: revert capitalization changebptato2024-03-141-1/+1
| | | | it looks weird
* man: rewrite in Nimbptato2024-03-132-3/+3
| | | | | | | | | | | | Depending on Perl just for this is silly. Now we use libregexp for filtering basically the same things as w3mman2html did. This required another patch to QuickJS to avoid pulling in the entire JS engine, but in return, we can now run regexes without a dummy JS context global variable. Also, man.nim now tries to find a man command on the system even if it's not in /usr/bin/man.
* loader: rework process modelbptato2024-03-113-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally we had several loader processes so that the loader did not need asynchronity for loading several buffers at once. Since then, the scope of what loader does has been reduced significantly, and with that loader has become mostly asynchronous. This patch finishes the above work as follows: * We only fork a single loader process for the browser. It is a waste of resources to do otherwise, and would have made future work on a download manager very difficult. * loader becomes (almost) fully async. Now the only sync part is a) processing commands and b) waiting for clients to consume responses. b) is a bit more problematic than a), but should not cause problems unless some other horrible bug exists in a client. (TODO: make it fully async.) This gives us a noticable improvement in CSS loading speed, since all resources can now be queried at once (even before the previous ones are connected). * Buffers now only get processes when the *connection* is finished. So headers, status code, etc. are handled by the client, and the buffer is forked when the loader starts streaming the response body. As a result, mailcap entries can simply dup2 the first UNIX domain socket connection as their stdin. This allows us to remove the ugly (and slow) `canredir' hack, which required us to send file handles on a tour accross the entire codebase. * The "cache" has been reworked somewhat: - Since canredir is gone, buffer-level requests usually start in a suspended state, and are explicitly resumed only after the client could decide whether it wants to cache the response. - Instead of a flag on Request and the URL as the cache key, we now use a global counter and the special `cache:' scheme. * misc fixes: referer_from is now actually respected by buffers (not just the pager), load info display should work slightly better, etc.
* Fix typobptato2024-03-041-1/+1
|
* Update doc/protocolsbptato2024-03-041-10/+29
|
* Add mouse supportbptato2024-02-291-0/+7
|
* pager: improve URL loading procsbptato2024-02-281-3/+19
| | | | | | | Split up load into loadSubmit, gotoURL: loadSubmit is a replacement for load(s + '\n'), and gotoURL is a load that does no URL expansion. Also, fix a bug where load("\n") would crash the browser.
* term: improve pixels-per-column/line detectionbptato2024-02-251-0/+16
| | | | | | | | | Some terminal emulators (AKA vte) refuse to set ws_xpixel and ws_ypixel in the TIOCGWINSZ ioctl, so we now query for CSI 14 t as well. (Also CSI 18 t for good measure, just in case we can't ioctl for some reason.) Also added some fallback (optionally forced) config values for width, height, ppc, and ppl. (This is especially useful in dump mode.)
* Update docsbptato2024-02-251-8/+8
|
* Separate ANSI text decoding from main binarybptato2024-02-251-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling text/plain as ANSI colored text was problematic for two reasons: * You couldn't actually look at the real source of HTML pages or text files that used ANSI colors in the source. In general, I only want ANSI colors when piping something into my pager, not when viewing any random file. * More importantly, it introduced a separate rendering mode for plaintext documents, which resulted in the problem that only some buffers had DOMs. This made it impossible to add functionality that would operate on the buffer's DOM, to e.g. implement w3m's MARK_URL. Also, it locked us into the horribly inefficient line-based rendering model of entire documents. Now we solve the problem in two separate parts: * text/x-ansi is used automatically for documents received through stdin. A text/x-ansi handler ansi2html converts ANSI formatting to HTML. text/x-ansi is also used for .ans, .asc file extensions. * text/plain is a separate input mode in buffer, which places all text in a single <plaintext> tag. Crucially, this does not invoke the HTML parser; that would eat NUL characters, which we should avoid. One blind spot still remains: copiousoutput used to display ANSI colors, and now it doesn't. To solve this, users can put the x-ansioutput extension field to their mailcap entries, which behaves like x-htmloutput except it first pipes the output into ansi2html.
* config: replace default-flags with ignore-casebptato2024-02-221-7/+7
| | | | | | default-flags was overly complicated for its purpose. Also, ignore-case is quite useful, so enable it by default.
* Update docsbptato2024-02-191-8/+37
|
* regex: re-work compileSearchRegexbptato2024-02-171-0/+10
| | | | | | | I've gotten tired of not being able to search for forward slashes. Now it works like in vim, and you can also set default ignore case in the config.
* term: fix coloring messbptato2024-02-171-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Until now, the config file required manual adjustment for the output to look bearable on terminals colored differently than {bgcolor: black, fgcolor: white}. Also, it only detected RGB when COLORTERM was set, but this is not done by most (any?) terminal emulators (sad). To improve upon the situation, we now query the terminal for some attributes on startup: * OSC(10/11, ?) -> get the terminal's bg/fgcolor * DCS(+, q, 524742) -> XTGETTCAP for the "RGB" capability (only supported by a few terminals, but better than nothing) * Primary device attributes -> check if ANSI colors are supported, also make sure we don't block indefinitely even if the previous queries fail If primary device attributes does not return anything, we hang until the user types something, then notify the user that something went wrong, and tell them how to fix it. Seems like an OK fallback. (The DA1 idea comes from notcurses; since this is implemented by pretty much every terminal emulator, we don't have to rely on slow timing hacks to skip non-supported queries.)
* gmifetch: clean up URL handlingbptato2024-02-161-4/+0
| | | | | | extract_hostname is no more, hooray. + add standard error reporting
* Update docsbptato2024-02-143-21/+25
|
* doc: update npr redirect examplebptato2024-02-141-1/+2
| | | | a bit more readable, and it also works with /[0-9]+ pathnames
* Add pager.externFilterSourcebptato2024-02-121-3/+24
| | | | useful for filtering stuff through commands like rdrview
* doc/config: add missing backtickbptato2024-01-301-1/+1
|
* doc: do not emphasize th text, mention pager.locationbptato2024-01-301-33/+38
|
* Add command to yank link under cursor (yc)bptato2024-01-291-4/+14
|
* client: stop entire process group on suspend()bptato2024-01-291-2/+3
| | | | | * pass 0 so e.g. git does not hang * use sigtstp so e.g. cgi scripts can clean up if needed
* Add mancha man page viewerbptato2024-01-263-5/+62
| | | | | | | | | | derived from w3mman2html.cgi, there are only a few minor differences: * different man page opener command * use man:, man-k:, man-l: instead of query string to specify action * no form input (C-lC-uman:pageC-m is faster anyway) TODO rewrite in Nim so we don't have to depend on Perl...
* doc: fix cookie sharing examplebptato2024-01-221-4/+4
| | | | This configuration scheme really is a nightmare to use :(
* Re-design word handling, add e, E, W, B, etc.bptato2024-01-192-26/+75
| | | | | | | | | | | | * Add functions for moving to the beginning/end of words (vi `b', `e'). * As it turns out, there are many possible interpretations of what a word is. Now we have a function for each reasonable interpretation, and the default settings match those of vi (and w3m in w3m.toml). (Exception: it's still broken on line boundaries... TODO) * Remove `bounds` from lineedit, it was horrible API design and mostly useless. In the future, an API similar to what pager now has could be added. * Update docs, and fix some spacing issues with symbols in the tables.
* Add urlenc, urldec; fix a URL encoding bug; improve trans.cgibptato2024-01-081-0/+15
| | | | | | | | | | * Fix incorrect internal definition of the fragment percent-encode set * urlenc, urldec: these are simple utility programs mainly for use with shell local CGI scripts. (Sadly the printf + xargs solution is not portable.) * Pass libexec directory as an env var to local CGI scripts * Update trans.cgi to use urldec and add an example for combining it with selections
* Add spartan supportbptato2024-01-031-0/+12
| | | | why not
* fix broken linkbptato2023-12-221-1/+1
|
* update doc/protocolsbptato2023-12-221-3/+3
|
* cgi: return ConnectionError when script is not executablebptato2023-12-211-5/+5
|
* container: fix gotoMarkYbptato2023-12-211-2/+2
| | | | | | Now it actually does what it was supposed to do. Also, clarify what it does in config.md
* Fix for sourcehut markdown parsing, small doc improvementsbptato2023-12-156-60/+25
| | | | hopefully this works
* Add doc/protocolsbptato2023-12-151-0/+149
|
* config: allow overriding default prepended schemebptato2023-12-151-2/+13
|
* doc/config: finish path handling documentationbptato2023-12-141-1/+5
|
* Update doc/localcgibptato2023-12-141-3/+4
| | | | | multipart through local CGI is now supported as well. (also, fix Cha-Control description inaccuracy)
* Move http out of main binarybptato2023-12-131-5/+28
| | | | | | | | | | | | Now it is (technically) no longer mandatory to link to libcurl. Also, Chawan is at last completely protocol and network backend agnostic :) * Implement multipart requests in local CGI * Implement simultaneous download of CGI data * Add REQUEST_HEADERS env var with all headers * cssparser: add a missing check in consumeEscape
* local CGI improvements, move data: to cgi-binbptato2023-12-121-2/+41
| | | | error codes are WIP, not final yet...
* local CGI: add mapped URI env vars; move about: to adaptersbptato2023-12-121-0/+27
| | | | | | | | | | | | | | | * Add MAPPED_URI_* as environment variables when a request is coming from urimethodmap It costs us compatibility with w3m, but it seems to be a massive improvement over smuggling in the URL as a query string and then writing an ad-hoc parser for every single urimethodmap script. The variables are set for every urimethodmap request, to avoid accidental leaking of global environment variables. * Move about: to adapters (an obvious improvement over the previous solution)
* doc/localcgi: reword/clarifybptato2023-12-111-1/+5
|
* mailcap: add $MAILCAP_URLbptato2023-12-101-4/+23
| | | | | | This is better than %u as it is backwards compatible (i.e. does not rely on other user agents doing whatever upon encountering an unknown substitution template.)
* Separate gopher conversion from main binarybptato2023-12-101-1/+6
| | | | | | | | | | | | | | | | | | | | | Now we use a (much simplified) gopher2html binary in libexec, instead of converting gopher directories to HTML in loader/gopher. This has two advantages: * Less ugly conversion logic in the loader module; we can just convert the file line by line. (The previous converter also had some correctness issues, that is fixed now as well.) * If the user desires, they can replace the gopher converter with another binary using the mailcap mechanism. The disadvantages are: * For now, source display is broken. This is a problem with all mailcap filters in general, and should be fixed in the future. (That said, the previous version also only displayed the converted HTML source, which was not really useful anyway.) * The proper directory structure is required for this to work; OTOH plenty of work has been done so that this is as frictionless as possible, so it should not really be a problem.
* config: better path handling; fix array parsing bugbptato2023-12-101-0/+15
| | | | | | | | | * Paths are now parsed through an unified code path with some useful additions like environment variable substitution. * Fix a bug in parseConfigValue where strings would be appended to existing arrays (and not override them). * Fix beforeLast calling afterLast for some reason. * Add a default CGI directory.
* pager: add marksbptato2023-12-091-0/+56
| | | | | Default is vi-style, but w3m-style marks work as well; see bonus/w3m.toml.
* pager: add `{', `}'; document externIntobptato2023-12-091-0/+18
| | | | | | | | { & } acts like in vi (except the cursor is not moved to the line beginning). No reason to leave externInto undocumented, as it is even used in the default config.
* Makefile: rewritebptato2023-11-281-0/+48
| | | | | | | * Get rid of useless targets * Use real recipes instead of command runner targets * When given, use environment variables * Document Makefile stuff in doc/build.md