about summary refs log tree commit diff stats
path: root/src/config
Commit message (Collapse)AuthorAgeFilesLines
* config: fix prepend-https parsingbptato2025-05-131-0/+1
|
* config: print warning for prepend-httpsbptato2025-05-131-1/+14
| | | | Use prepend-scheme = '' instead.
* config: remove excessive dot from warning messagebptato2025-05-131-3/+2
|
* Eliminate some superfluous copiesbptato2025-05-112-5/+5
|
* config: warn on unused valuesbptato2025-05-112-35/+31
|
* config: add external.show-download-panelbptato2025-05-091-0/+1
|
* config: remove sockdirbptato2025-05-081-1/+0
|
* url: add schemeType, fix port bug on protocol assignmentbptato2025-05-031-1/+2
| | | | Allows branching on the scheme without string comparisons.
* cookie: do not match port in Domainbptato2025-05-021-7/+7
| | | | That's how cookies *should have* worked, not how they actually work.
* history: simplify a bitbptato2025-04-301-21/+12
|
* config: misc optimizationbptato2025-04-291-4/+4
|
* config: fix arrays not being cleared on reassignmentbptato2025-04-291-0/+1
|
* term: replace termcap with a built-in terminal databasebptato2025-04-231-1/+1
| | | | | | | | | | | | | I considered using terminfo, but it works *worse* on several terminals I've tried than whatever this is. So out with ncurses, I say. In this new scheme, if the terminal is unrecognized, it is assumed to be XTerm-compatible. This does mean that an unrecognized terminal that doesn't do XTGETTCAP or COLORTERM will not get true colors. Another drawback is that non-VT-compatible terminals now have zero chance of working. This is unfortunate, but realistically they probably didn't work until now either.
* toml: fix underscores in integer literalsbptato2025-04-171-9/+8
| | | | while at it, prefer seek to discarding consume
* config: remove bindPagerKey, bindLineKeybptato2025-04-171-6/+0
| | | | undocumented and likely unused.
* toml: remove broken special case, update docsbptato2025-04-151-10/+2
| | | | | | Turns out the cure was worse than the disease. Let's just make it a backwards incompatible change, so that at least the error message is no longer nonsensical.
* config: unify table arrays and tablesbptato2025-04-112-81/+96
| | | | | | | | | | | | | | | | | | [[siteconf]] now just means [siteconf.0], etc. So you can now override parts of default siteconfs/omnirules, e.g. to change the Google search substitute-url, etc. To celebrate this, I've added some more default search engines: * wk: -> Wikipedia * wd: -> Wiktionary * ms: -> Marginalia Search These can be replaced by setting e.g. omnirule.wk = {}, etc. Also, siteconf = {} can be used to clear pre-defined siteconfs. This is an unfortunate deviation in semantics from TOML, but in practice the way it worked before didn't match the spec either, so at least it is now consistent.
* cookie: accept secure through http on localhostbptato2025-04-101-1/+1
| | | | others do this too
* config: remove deprecated ColorMode valuesbptato2025-04-091-19/+0
|
* loader: support Set-Cookie for non-initial requestsbptato2025-04-052-11/+19
| | | | | | | | | For compatibility with mainstream browsers. e.g. this should allow log-ins through ajax. To synchronize the loader's cookie jar with that of the pager, we open a stream (about:cookie-stream) to pass over serialized cookies when required.
* mailcap: remove double negativebptato2025-04-041-1/+1
|
* mailcap: various fixesbptato2025-04-043-27/+30
| | | | | | | * print path on error (like in toml) * fix line tracking * accept non-ASCII commands * (also adjusted some error messages in config & toml)
* cssparser: optimize out some copiesbptato2025-04-021-1/+1
| | | | | | | | | The input buffer is no longer copied, and parseFloat32 gets an openArray instead of a copy of the string to parse. I've also simplified the parser somewhat so it now operates on openArrays of CSSComponentValues. It's still far more complex and wasteful than it should be, but it's progress.
* config: fix semicolon handling in user-style importbptato2025-04-011-0/+8
| | | | | ok so apparently you can leave out the semicolon, but *only* if the at rule is at EOF
* config: remove exceptionsbptato2025-04-011-164/+187
| | | | | in this case they actually made sense, but I want to remove them altogether
* config: add user-style, deprecate [css] and stylesheetbptato2025-04-011-1/+55
| | | | | I'm not 100% content with this syntax either, but it's a significant improvement over the previous solution.
* Re-add JSValueConstbptato2025-03-122-2/+3
| | | | | | | | | This time, I've also ported over the consistency check to prevent some ownership bugs. Unfortunately, the check is very limited, and it is still possible to double-free or leak JSValues. I think it would be possible to make coverage 100%, but only with ARC...
* tojs: misc cleanupbptato2025-03-071-2/+6
| | | | | | | * optimize toJS set * change defineProperty wrappers to return an enum If we're going to wrap defineProperty, then let's do it properly.
* history, cookie: fsync before renamebptato2025-03-062-6/+12
| | | | | In theory, it is possible for rename to succeed before the buffers are flushed, and then we lose data.
* dynstream: remove exceptionsbptato2025-02-264-75/+66
| | | | | | | | | | | | | Now we just pass down the value of n and check errno, plus readDataLoop/writeDataLoop returns a bool indicating whether it failed. For now this seems to work OK, but maybe I'll add a better abstraction in the future. EOFError is still used for handling failed packets; this is brittle, and should be replaced once we have a proper buffering mechanism for them. (That will also let us kill BufStream.) Unrelated: this also fixes a bug in buffer with cacheId.
* Add mark-links featurebptato2025-02-181-4/+6
| | | | ref. https://todo.sr.ht/~bptato/chawan/43
* client: remove client getterbptato2025-02-151-2/+2
| | | | Undocumented, plus and globalThis/window are enough.
* buffer: wait for scripts in headless modebptato2025-02-151-1/+19
| | | | | Dump mode remains the same, except now it can be controlled in config.toml as well.
* config: fix compilation on older Nim versionsbptato2025-01-241-1/+2
|
* Add annotations for move semanticsbptato2025-01-222-3/+3
| | | | | | | | | Supposedly they aren't broken in refc after 2.0.0, so we can do this now that 1.6.14 is dropped. I've confirmed lent to work as advertised; it indeed reduces copies. sink doesn't seem to help much, but I guess it will be useful once we switch to ORC.
* config: expandTilde -> expandPathbptato2025-01-191-2/+2
|
* cookie: improve Expires parsingbptato2025-01-131-52/+32
|
* config: switch to camel casebptato2025-01-131-56/+56
| | | | | | We already need a camel -> kebab converter anyway. Unfortunately this also changes JS binding names, so it's a breaking change. Oh well.
* cssvalues: reduce CSSValues sizebptato2025-01-121-2/+2
| | | | | | | | | | | | | | | | * switch from float64 -> float32; other browsers use 32-bit floats too * specify integer size as 32-bit * use NetworkBitmap for background-image value (currently just an invalid dummy value) * remove "none" property & value types CSSValue's payload is always one word (plus another for the type tag). CSSValues keeps its size, but no longer has to heap-alloc + refcount word-sized CSSValues. (On 32-bit systems, CSSValues might actually be larger than before, but I expect it's still a net benefit with the removal of refcounting and the switch to 32-bit floats.)
* Fix some strict defsbptato2025-01-122-2/+3
|
* config: deprecate 8bit, 24bit color-mode aliasesbptato2025-01-011-0/+2
|
* cookie: add persistent cookies, misc refactoring/fixesbptato2024-12-292-3/+457
| | | | | | | | | | | | | 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.
* history: remove comment parsing, fix fd leakbptato2024-12-291-8/+7
|
* cookie: remove broken third-party-cookie optionbptato2024-12-271-1/+0
| | | | | | | | | 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-1/+6
| | | | | | | It isn't really limited to config. It just happens to be in XDG_CONFIG_HOME because XDG basedirs suck. (W3M_DIR works similarly.)
* Optimize some Option[string] outbptato2024-12-261-3/+4
| | | | toJS is generally more efficient
* buffer: add "app" scripting modebptato2024-12-261-2/+16
| | | | | | | | | | 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?)
* history: fix entry droppingbptato2024-12-221-0/+2
| | | | | next's pointer backwards must be updated too, or it the dropped ref will be erroneously displayed on the history screen.
* config: fix overriding substring bindingsbptato2024-12-222-10/+6
| | | | | | | | | | | | | | | | | It is unfortunately a breaking change, but the existing behavior was practically broken anyway. The only issue I can think of is that keybindings like `yy' now override `y', which previously worked because y (regrettably) calls feedNext. But those should be added to the default config anyway. (If a user really desires the old behavior, they can just re-bind y to cmd.buffer.copySelection after their own custom bindings. Config values are now stored in an ordered table, so this should work.) I've left the undocumented JS setter as it is, because the old behavior seems more useful there. (Perhaps there should be a separate function that behaves like toml?)
* Add historybptato2024-12-172-0/+131
| | | | | It's still missing a "color visited links" feature, but it's better than nothing.