about summary refs log tree commit diff stats
path: root/doc/config.md
Commit message (Collapse)AuthorAgeFilesLines
* config: fix semicolon handling in user-style importbptato2025-04-011-2/+2
| | | | | ok so apparently you can leave out the semicolon, but *only* if the at rule is at EOF
* config: add user-style, deprecate [css] and stylesheetbptato2025-04-011-12/+27
| | | | | I'm not 100% content with this syntax either, but it's a significant improvement over the previous solution.
* Update docsbptato2025-02-201-27/+33
|
* Add mark-links featurebptato2025-02-181-0/+15
| | | | ref. https://todo.sr.ht/~bptato/chawan/43
* buffer: wait for scripts in headless modebptato2025-02-151-3/+11
| | | | | Dump mode remains the same, except now it can be controlled in config.toml as well.
* container, config.toml: add | commandbptato2025-01-191-0/+7
| | | | | | Particularly useful when debugging minified JS. vi always wraps; the centering behavior is from vim.
* buffer: remove server socketbptato2025-01-091-1/+2
| | | | | | | | | | | Now we just pass through a socket created in pager. This removes the need for a socket directory, and strengthens the buffer sandbox slightly. I've kept the ServerSocket code, because I want to add some form of RPC and communication between separate instances in the future. However, I don't expect this to be handled outside the main process, so I've removed the Capsicum-specific connectat/bindat code.
* Add built-in image viewerbptato2024-12-301-0/+7
| | | | | | It works by emitting a base64 URI inside an img tag. Very inefficient, but useful if no external viewer is set up (e.g. over SSH).
* 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-291-2/+3
| | | | | "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-271-5/+7
| | | | | | | 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-271-92/+144
| | | | | 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.
* 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
* 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-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* config: add copy-cmd, paste-cmdbptato2024-12-011-0/+14
| | | | ref. https://todo.sr.ht/~bptato/chawan/29
* pager: do not make pointless requests in viewImage, add saveImagebptato2024-11-301-0/+6
| | | | | | | with buffer.images enabled, we already cache them, so we can skip the additional request also, add saveImage, bound to sI
* Update docsbptato2024-11-261-1/+1
|
* 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-131-3/+2
| | | | | | | 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.
* cssparser: fix parsing of unrecognized at rulesbptato2024-11-021-1/+1
| | | | + clean up a bit
* config: refactor, accept more possible config dirsbptato2024-10-281-7/+10
| | | | | | | | | | | | | | | | | | | | | 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.)
* Update docsbptato2024-10-151-2/+34
|
* 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.
* Update docsbptato2024-09-261-5/+53
|
* pager: improve hover text handlingbptato2024-09-221-1/+32
| | | | | | | | | | | * 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
* config: add display.sixel-colorsbptato2024-09-101-0/+10
|
* config: fix broken references to commandsbptato2024-09-101-155/+165
|
* doc: update manpagesbptato2024-09-021-1/+1
|
* Update docsbptato2024-08-101-0/+14
|
* buffer, pager, config: add meta-refresh + misc fixesbptato2024-07-281-11/+32
| | | | | | | | | * 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
* 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-031-1/+1
|
* 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.
* 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
* pager: rework D/discard bufferbptato2024-05-311-3/+8
| | | | | | | | | | | | | | | | | | | | | 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-161-31/+23
|
* term: optimize canvas redraw, remove emulate-overlinebptato2024-05-101-7/+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-041-52/+17
|
* config: add insecure-ssl-no-verify option to siteconfbptato2024-05-011-7/+18
| | | | | | | 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-271-0/+15
|
* Update docsbptato2024-04-241-363/+161
|
* 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.