about summary refs log tree commit diff stats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Update docsbptato2024-07-292-8/+291
|
* buffer, pager, config: add meta-refresh + misc fixesbptato2024-07-282-12/+36
| | | | | | | | | * buffer, pager, config: add meta-refresh value, which makes it possible to follow http-equiv=refresh META tags. * config: clean up redundant format mode parser * timeout: accept varargs for params to pass on to functions * pager: add "options" dict to JS gotoURL * twtstr: remove redundant startsWithNoCase
* Update docsbptato2024-07-192-17/+148
|
* Makefile: add distcleanbptato2024-07-191-1/+2
|
* config: support smart casebptato2024-07-161-2/+4
| | | | and enable it by default.
* config: add buffer.autofocusbptato2024-07-041-3/+12
| | | | Same as [[siteconf]] autofocus.
* Update docsbptato2024-07-042-11/+19
|
* Update docsbptato2024-07-033-12/+137
|
* config: add various missing optionsbptato2024-06-291-3/+90
| | | | | | | Mainly things you could already set with [[siteconf]] but not normally. Also, a `styling' option to disable author styles. Also, `images' is now documented as an "experimental" option, since it's halfway usable now.
* doc: update manpagesbptato2024-06-247-350/+287
|
* buffer: add autofocusbptato2024-06-081-0/+7
| | | | naturally, it's opt-in
* pager, buffer: improve forms, protocol configbptato2024-06-081-0/+25
| | | | | | * refactor form submission * add options to specify form handling per protocol * block cross-protocol POST requests
* Update docsbptato2024-06-021-10/+3
|
* pager: rework D/discard bufferbptato2024-05-312-7/+12
| | | | | | | | | | | | | | | | | | | | | The previous solution had the issue that it switched between "delete buffer, then move back" and "delete buffer, then move forward" depending on whether the buffer was the root of the buffer tree, which made its behavior quite unpredictable. Now the pager (sort of) remembers the direction you are coming from, and D moves in that direction. So e.g.: * Enter, D just moves back to where you were coming from (as before) * Comma, D deletes the previous buffer, then returns to the current buffer If no buffer exists in the target direction, then we alert. Also, new commands are: `d,' `d.'. They do the same thing the non-d-prefixed variations do, but also delete the current buffer. Useful if you're no longer sure where you are coming from, but know where you want to go. (`d,' in particular is equivalent to w3m's `B'.)
* Update docsbptato2024-05-163-207/+157
|
* term: optimize canvas redraw, remove emulate-overlinebptato2024-05-102-16/+0
| | | | | | | * Replaced the `pcanvas' comparison with a much simpler tracking of the first damaged cell in writeGrid, which is significantly faster. * Removed emulate-overline: it's of too little utility compared to the maintenance burden it caused.
* Update docsbptato2024-05-044-492/+278
|
* config: add insecure-ssl-no-verify option to siteconfbptato2024-05-012-350/+328
| | | | | | | Equivalent to curl --insecure. Note: unfortunately this does not help if the server is using unsafe legacy renegotiation, you have to allow that in the OpenSSL config.
* config: fix copy image URL, document copy commandsbptato2024-04-272-0/+33
|
* doc: include auto-generated manpages in repositorybptato2024-04-268-1/+3361
| | | | | The 100kb or so doesn't hurt as much as not having manual pages at all without pandoc (+ not auto-updating them through make all) does.
* Update docsbptato2024-04-244-381/+838
|
* sandbox: seccomp support on Linuxbptato2024-04-181-1/+8
| | | | | | | | | | | | | | | | | We use libseccomp, which is now a semi-mandatory dependency on Linux. (You can still build without it, but only if you pass a scary long flag to make.) For this to work I had to disable getTimezoneOffset, which would otherwise call localtime_r which in turn reads in some files from /usr/share/zoneinfo. To allow this we would have to give unrestricted openat(2) access to buffer processes, which is unacceptable. (Giving websites access to the local timezone is a fingerprinting vector so if this ever gets fixed then it should be an opt-in config setting.) This patch also includes misc fixes to buffer cloning, and fixes the LIBEXECDIR override in the makefile so that it is actually useful.
* Initial flexbox supportbptato2024-04-051-2/+2
| | | | | | | | | Still far from being fully standards-compliant, or even complete, but it seems to work slightly less horribly than having no flexbox support at all on sites that do use it. (Also includes various refactorings in layout to make it possible at all to add flexbox.)
* loader: constant time key comparisonbptato2024-04-021-4/+4
| | | | | GCC seems to generate something that strongly resembles a constant time comparison, so I guess this should be good enough.
* update docsbptato2024-04-011-9/+61
|
* update readme, add doc/architecture.mdbptato2024-03-251-0/+328
|
* config: add default-headers to siteconfbptato2024-03-211-1/+9
| | | | | | | So long as we have to live with siteconf, let's at least make it useful. Also, rewrite the header overriding logic because while it did work, it only did so accidentally.
* ftp: basic sftp supportbptato2024-03-211-4/+7
| | | | | | | it still sucks, but it is at least slightly more usable. this also fixes a bug in dirlist where sort would mess up item name association
* pager: add "save link", "save source"; change & document some keybindingsbptato2024-03-201-0/+10
| | | | | | | | | * `s{Enter}' now saves link, and `sS' saves source. * Changed ;, +, @ to g0, g$, gc so that it's somewhat consistent with vim (and won't conflict with ; for "repeat jump to char") * Changed (, ) to -, + so that it doesn't conflict with vi's "previous/next sentence" (once we have it...) * Add previously missing keybindings to about:chawan
* config: remove system mailcaps from default mailcap pathbptato2024-03-191-4/+14
| | | | | | | | I haven't seen a single OS-shipped mailcap file yet that would be suitable for use with Chawan. The one on Debian wants to open every text file with vim; the one in FreeBSD ports is straight up broken. mime.types works much better and thus stays.
* buffer: add markURLbptato2024-03-191-0/+5
| | | | Useful when browsing plaintext files; w3m has it too.
* 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