about summary refs log tree commit diff stats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix casingbptato2024-12-051-2/+2
|
* Update docsbptato2024-12-052-5/+31
|
* config: add copy-cmd, paste-cmdbptato2024-12-011-0/+14
| | | | ref. https://todo.sr.ht/~bptato/chawan/29
* term: respect LINES, COLUMNS; do not crash without vi/vebptato2024-12-011-0/+4
|
* pager: do not make pointless requests in viewImage, add saveImagebptato2024-11-302-4/+14
| | | | | | | with buffer.images enabled, we already cache them, so we can skip the additional request also, add saveImage, bound to sI
* Update docsbptato2024-11-285-90/+158
|
* twtstr: add mypairsbptato2024-11-281-8/+30
| | | | | This couldn't get into system.nim for technical reasons, but it's still pretty useful when iterating over non-mutable openArrays.
* mailcap: add x-needsstyle extension fieldbptato2024-11-271-3/+5
| | | | | | | Useful when an x-htmloutput handler needs styling for the HTML output to be formatted correctly (as a sort of pseudo-ua style sheet). ref. https://todo.sr.ht/~bptato/chawan/28
* Update docsbptato2024-11-262-1/+25
|
* pager, select: add more items, misc fixesbptato2024-11-251-8/+1
| | | | | | eh probably have to move the event loop to pager...
* loader/* -> serverbptato2024-11-241-3/+2
| | | | one less mystery
* Update docsbptato2024-11-241-54/+97
|
* container: add Lynx-style navigation commandscommodorian2024-11-231-0/+7
|
* Update docsbptato2024-11-201-5/+5
|
* Update docsbptato2024-11-171-1/+1
|
* js: reorganize modules, update docsbptato2024-11-151-13/+17
| | | | | | | most of it has already been moved to monoucha, and the rest fits better in other directories. also, move urimethodmap to config
* Update docsbptato2024-11-141-189/+202
|
* chapath: fix a few more bugs, simplifybptato2024-11-131-7/+8
| | | | | | | | | * fix incorrect :- behavior * merge non-standard '${%VARIABLE}' syntax with regular syntax; now all internal variables are exported to the environment, so the behavior should be equivalent. * handle terminal symbol appropriately in all states * deny numeric curly substitutions
* config: resolve download-dir as path, update docsbptato2024-11-137-30/+73
| | | | | | | Turns out it's more useful to have env vars in the variable than to allow incomplete path names. Also, fix the disappearing backslash issue in docs.
* config.toml: respect TMPDIRbptato2024-11-121-0/+4
| | | | | also, fix a bug in the chapath parser so that param expansion actually works
* Fix some C warnings, more makefile vars, etc.bptato2024-11-081-35/+42
| | | | | | | * add some more env vars to makefile * remove fpermissive from GCC builds * update Monoucha * fix borked seccomp filter length safety check (ugh)
* cssparser: fix parsing of unrecognized at rulesbptato2024-11-021-1/+1
| | | | + clean up a bit
* chaseccomp: fix compilation with newest dash, misc changesbptato2024-10-311-12/+10
| | | | | | | | | | | | | | * fix matching on unstripped whitespace: caught after upgrading to upstream dash & chaseccomp wouldn't compile * add defines to ensure that we computed the filter length correctly * inline cut_label * EPERM on sigaction, sigprocmask, gettid, and kill on tgkill (so a crash doesn't trigger sandbox violations) * move SIGSYS handler to C and add one for the network The last change removes the stack trace from SIGSYS, but gives us the syscall number which is probably more useful. (Indeed, we don't even have a stack trace in release builds.)
* config: refactor, accept more possible config dirsbptato2024-10-2815-119/+141
| | | | | | | | | | | | | | | | | | | | | I'm starting to favor dotfiles over XDG basedirs, but there's no reason why we couldn't have both. So now the search path is: 0. if config was set through -C, use that 1. $CHA_CONFIG_DIR is set -> $CHA_CONFIG_DIR/config.toml 2. $XDG_CONFIG_HOME is set -> $XDG_CONFIG_HOME/chawan/config.toml 3. ~/.config/chawan/config.toml exists -> use that 4. ~/.chawan/config.toml exists -> use that Notably, this makes it so the default directory is ~/.chawan *if* you don't have an existing config.toml file. So in that case known_hosts will be placed in ~/.chawan/known_hosts. However, configurations with a config in ~/.config/chawan/config.toml continue to work as expected, as for those the known_hosts file remains inside ~/.config/chawan/. Finally, I've added a default user CGI directory to reduce friction in setting CGI up. (Like known_hosts, it's also relative to whatever config dir you have.)
* pager: misc extern fixesbptato2024-10-271-5/+7
| | | | | * fix externFilterSource ignoring content types other than html * refactor runProcess to use a custom fork/exec instead of system(3)
* Update docsbptato2024-10-232-6/+6
|
* sandbox: replace libseccomp with chaseccompbptato2024-10-231-1/+1
| | | | | | | | | | | | | | | This drops libseccomp as a dependency. Also, move the capsicum/pledge definitions from bindings to sandbox.nim because they are only used there. Interestingly, after integrating chaseccomp I found that the stbi process would mysteriously crash by a getrandom(2) syscall. Closer investigation revealed it is only called on the initialization of glibc's malloc; presumably it had never surfaced before because libseccomp would always allocate before entering the sandbox. So I've added getrandom to our filter as well.
* Update docsbptato2024-10-153-22/+62
|
* Add `nc' tool & adjust finger/spartan to use itbptato2024-10-121-8/+6
| | | | | | | | | Simple netcat clone, useful for portable scripts. Especially because some netcats will close the connection as soon as I close stdin... this one only quits when either stdout or the socket refuses new data. Also, it uses our standard TCP connection routine, meaning it respects ALL_PROXY. (i.e. now spartan works with socks5 too)
* gmifetch: rewrite in Nimbptato2024-10-122-14/+11
| | | | | | | | | | This finally makes it possible to use socks5 for Gemini. Also slightly refactored the config, to make it easier to pass on the config dir. By the way, the known_hosts file is now stored in the config dir too. The adapter will try to move it to there from the old location.
* Update docsbptato2024-10-1011-65/+104
|
* ftp: remove libcurl dependencybptato2024-10-012-14/+59
| | | | | | | | | | | | | This splits out sftp into a separate binary that *does* depend on libcurl. However, ftp now uses the same socket code as gopher. ftps is dropped, because I've never even tested it. Maybe I'll add it back when we have working OpenSSL bindings. This is still "doing the easy part first", now I have no clue how to handle sftp because my initial plan ("just use the sftp binary") doesn't work - sftp batch mode doesn't accept passwords. libssh2 remains the sole candidate, but that's what libcurl wraps anyway.
* config.toml: switch to Google searchbptato2024-09-301-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not happy about this, but the alternatives are worse. * DDG has degraded a lot lately: - (I think?) it appends my location to the Bing queries, which might be useful for searching restaurants, but only increases noise when looking for something technical. - Lately it also shoves LLM-generated summaries of websites in my face - which I wouldn't even mind if the "summaries" weren't in the typical overly verbose LLM style... Also, not a degradation per se, but DDG can't load images without JS (neither lite nor html), while Google can. Only relevant now that we have images. * Other large search providers either don't load without JS, or give us a layout that we can't render. * Smaller search providers (Mojeek, Marginalia) sadly don't have CJK support. (DDG performs quite poorly here, too.) * Metasearch engines (Searx, etc.) require self-hosting to work consistently, which I lack resources for. I'm sending ucbcb=1 and gbv=1, both of which are appended by Google and apparently stand for "no cookies" and "no JS", respectively. Also, I have added a siteconf entry to strip the click tracking. The default ddg: omni-rule remains, so users who wish to switch back can set in config.toml: [page] C-k = '() => pager.load("ddg:")'
* pager: improve rewrite-url semanticsbptato2024-09-301-2/+3
| | | | | | | | | | | | | Previously, it just changed the URL before loading the site; now it's an actual redirect. Technically, the previous behavior was more flexible, because it let you apply siteconf rules exclusively for sites where you redirected from. Practically, this was not very useful, and probably unexpected for anybody trying to use the feature. This also fixes a bug where the loader filter would be set for the original page, so you couldn't switch from https to http, etc.
* gopher: do not depend on libcurlbptato2024-09-281-2/+2
| | | | | | | | I'm thinking of making libcurl entirely optional; let's start with the easiest part. I've added a SOCKS5 client for ALL_PROXY support; I know curl supported others too, but whatever.
* loader: clean up connecterrorbptato2024-09-281-9/+10
| | | | | | * allow string values for public errors * remove unused errors * update naming
* Update docsbptato2024-09-264-223/+496
|
* sixel: support transparencybptato2024-09-241-16/+17
| | | | | | | | | | | | | | | | | | Sixel can only represent transparency for fully transparent (alpha = 0) and fully opaque (alpha = 255) pixels, i.e. we would have to do blending ourselves to do this "properly". But what do you even blend? Background color? Images? Clearly you can't do text... So instead of going down the blending route, we now just approximate the 8-bit channel with Sixel's 1-bit channel and then patch it up with dither. It does look a bit weird, but it's not *that* bad, especially compared to the previous strategy of "blend with some color which hopefully happens to be the background color" (it rarely was). Note that this requires us to handle transparent images specially in term. That is, for opaque ones, we can leave out the "clear cells affected by image" part, but for transparent ones, we must clear the entire image every time.
* loader: mmap intermediate image files, misc refactoringbptato2024-09-221-36/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor parseHeader * optimize response blob() * add direct "to cache" mode for loader requests which sets stdout to a file, and use it for image processing * move image resizing into a separate process * mmap cache files in between processing steps when possible At last, resize is no longer a part of image decoding. Also, it feels much nicer to keep encoded image data in the same cache as everything else. The mmap operations *should* be more efficient than copying the whole RGBA data through a pipe. In practice, it only makes a difference for loading (well, now just mmapping) the encoded image into the pager, where it singlehandedly speeds up image display by 10x on my test image. For the other steps, the unfortunate fact that "tocache" must delay the next fork/exec in the pipeline until the entire image is processed seems to equal out any wins we might have gotten from skipping a single raw RGBA copy. I have tried moving the delay before the exec (it's possible with yet another pipe), but it didn't help much and made the code much uglier. (Not that tocache didn't, but I can live with this...)
* pager: improve hover text handlingbptato2024-09-222-1/+37
| | | | | | | | | | | * align status truncating behavior with w3m (not exactly, clipping is still different, but this should be fine for now) * add "su" for "show last alert" - w3m's solution here is to scroll one char at a time with "u", but that's extremely annoying to use. We already have a line editor that can navigate lines, so reuse that instead. * fix peekCursor showing empty text * update todo
* Refactor img/*bptato2024-09-151-2/+0
| | | | | I've moved most image logic to adapter, so it doesn't really make sense to have this subdir anymore.
* Update docsbptato2024-09-131-4/+36
|
* config: add display.sixel-colorsbptato2024-09-101-0/+10
|
* config: fix broken references to commandsbptato2024-09-101-155/+165
|
* doc: update manpagesbptato2024-09-0213-29/+385
|
* Update showcase.pngbptato2024-08-271-0/+0
|
* sixel: proper color quantizationbptato2024-08-271-1/+1
| | | | | | | | just use an octree. works fine afaict, though obviously somewhat slower than the static method (encoding is 2-pass now) & still has banding issues with many colors (will need dithering) also, fixed a bug that caused initial masks of bands to get misplaced
* Add image docsbptato2024-08-251-0/+143
| | | | Somewhat rough, but better than nothing.
* Update docsbptato2024-08-102-0/+24
|
* Update monouchabptato2024-08-091-2/+3
|