about summary refs log tree commit diff stats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* Update docsbptato2024-12-291-0/+22
|
* cookie: add persistent cookies, misc refactoring/fixesbptato2024-12-291-5/+21
| | | | | | | | | | | | | Mostly compatible with other browsers/tools that follow the Netscape/curl format. Cookie jars are represented by prepending "jar@" to the host part, but *only* if the target jar is different than the domain. Hopefully, other software at least does not choke on this convention. (At least curl seems to simply ignore the entries.) Also, I've moved cookies.nim to config so that code for local files parsed at startup remains in one place.
* config: clean up redundant CHA_DIR, update CGI docsbptato2024-12-292-25/+6
| | | | | "No CGI dir configured" is no longer a common case, so it's OK to just return "CGI file not found".
* cookie: remove broken third-party-cookie optionbptato2024-12-271-14/+2
| | | | | | | | | Looking at it closer, this never actually did what it advertised to do. It only affected first-party cookies from subdomains, but that has been fixed; third-party cookies were never supported in the first place. (In fact, even first-party cookies are still skipped unless directly received on navigation. This should probably be fixed.)
* CHA_CONFIG_DIR -> CHA_DIRbptato2024-12-273-7/+9
| | | | | | | It isn't really limited to config. It just happens to be in XDG_CONFIG_HOME because XDG basedirs suck. (W3M_DIR works similarly.)
* Update docsbptato2024-12-272-93/+145
| | | | | Licenses now ordered by "explicitly PD", "PD-equivalent" and "not PD-equivalent".
* dom: add focus()bptato2024-12-271-2/+6
| | | | Respects autofocus.
* buffer: add "app" scripting modebptato2024-12-261-3/+9
| | | | | | | | | | For APIs that cannot be implemented in a privacy-friendly manner. As a start, I've added accurate screen size queries; getComputedStyle, getBoundingClientRect, etc. should follow. (We have a harmless getComputedStyle already, but it's broken.) Probably, things like JS-based scroll belong in here too, but I'm not sure yet. (Perhaps autofocus should be reused instead?)
* Add historybptato2024-12-171-0/+28
| | | | | It's still missing a "color visited links" feature, but it's better than nothing.
* img: add nanosvgbptato2024-12-191-0/+1
| | | | | | | | | | | | | | | | | | Only for SVG in image tags for now. Plus it comes with NanoSVG's limitations, i.e. no text. Still, better than nothing. I've gone through open tickets and PRs at upstream to check for known security issues. As a recurring theme I found that parseTransform fails to check the result of parseTransformArgs, so I fixed and refactored that part. (Probably not a security issue, but still UB.) Also, I've added a fix for an OOB read in parseColorRGB. Future directions: * replace nanosvgrast with our own rasterizer in canvas (will have to be extended somewhat...) * add text rendering (with unifont, which canvas already includes)
* default(T) -> T.default, add some strict defsbptato2024-12-171-1/+1
|
* chabookmark fixes & improvementsbptato2024-12-151-0/+19
| | | | | | | | * correct action on M-b * add external.bookmark option * move openFileExpand functionality into unquote * add menu items * update docs
* client: document readFile, writeFile; add getenv, setenvbptato2024-12-141-0/+30
| | | | | | | | Both are quite useful. readFile and writeFile got a small makeover in error handling; in particular, readFile now returns null instead of the empty string when the file is missing and writeFile throws a TypeError on I/O errors.
* cookie: allow first-party cookies for subdomains with cookie sharingbptato2024-12-141-5/+6
| | | | | | | | Cookie jar separation is already enough to mitigate tracking issues in this case. (Also, the fact that third-party-cookie controlled this made things even more confusing.) Also, add the previously missing host-only flag.
* pager, mailcap: misc fixes, add prompt for global mailcapbptato2024-12-114-132/+127
| | | | | | | | | | | | | | | | | | | | | | | | In the past, Chawan would read global mailcap (/etc/mailcap, ...) too, but every now and then that would run entries that I didn't even know existed and definitely didn't intend to run. So I changed it to only use ~/.mailcap, but this meant users now had to add mailcap entries for every single mime type. At some point I also changed application/octet-stream to always save to disk, which is usually nice except when a text file is misrecognized as binary. Often times I just want to decide myself what to do. So now there are two layers. First, the global mailcap files (path as per RFC) prompt before executing. Then there is ~/.chawan/auto.mailcap (or ~/.config/chawan/auto.mailcap) which runs entries automatically. If you press shift before selecting an option in the prompt, the corresponding entry gets copied to auto.mailcap. It's also possible to type a new entry on the fly. Overall I think it's quite convenient. One unfortunate side effect is that existing users will have to migrate their entries to auto.mailcap, or redefine external.auto-mailcap to e.g. ~/.mailcap, but this seems acceptable.
* Update docsbptato2024-12-103-4/+22
|
* Update docs, w3m.tomlbptato2024-12-091-1/+1
|
* Update docsbptato2024-12-081-0/+17
|
* 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.