about summary refs log tree commit diff stats
path: root/src/config/config.nim
Commit message (Collapse)AuthorAgeFilesLines
...
* mailcap: add $MAILCAP_URLbptato2023-12-101-1/+1
| | | | | | This is better than %u as it is backwards compatible (i.e. does not rely on other user agents doing whatever upon encountering an unknown substitution template.)
* Separate gopher conversion from main binarybptato2023-12-101-1/+13
| | | | | | | | | | | | | | | | | | | | | Now we use a (much simplified) gopher2html binary in libexec, instead of converting gopher directories to HTML in loader/gopher. This has two advantages: * Less ugly conversion logic in the loader module; we can just convert the file line by line. (The previous converter also had some correctness issues, that is fixed now as well.) * If the user desires, they can replace the gopher converter with another binary using the mailcap mechanism. The disadvantages are: * For now, source display is broken. This is a problem with all mailcap filters in general, and should be fixed in the future. (That said, the previous version also only displayed the converted HTML source, which was not really useful anyway.) * The proper directory structure is required for this to work; OTOH plenty of work has been done so that this is as frictionless as possible, so it should not really be a problem.
* Enable finger protocol by defaultbptato2023-12-101-1/+5
| | | | | | * Add a default urimethodmap that points finger: to cha-finger * Install cha-finger to /usr/local/libexec/cha/cgi-bin by default * cha-finger: use ALL_PROXY if given, die if curl is not installed
* config: better path handling; fix array parsing bugbptato2023-12-101-17/+33
| | | | | | | | | * Paths are now parsed through an unified code path with some useful additions like environment variable substitution. * Fix a bug in parseConfigValue where strings would be appended to existing arrays (and not override them). * Fix beforeLast calling afterLast for some reason. * Add a default CGI directory.
* pager: add marksbptato2023-12-091-0/+1
| | | | | Default is vi-style, but w3m-style marks work as well; see bonus/w3m.toml.
* pager, container: add text selection/copyingbptato2023-12-031-0/+2
| | | | | | | | | | * Add select & copy selection functionality to container * Fix bug in generateSwapOutput where output could be misplaced because of zero-width cells * Add fromJSPromise, call runJSJobs in every iteration of the headed event loop * "await" pager actions that output a promise * Change default view source keybinding to `\'
* config: add bare aliases for "8bit", "24bit"bptato2023-11-261-2/+2
| | | | | | | | | | | Without this, setting color-mode using -o required quoting the values, and then shell-quoting the quotes themselves (cha -o 'display-color-mode="24bit"'). Instead of more special casing in the TOML parser, we just add aliases for these enum values that can be parsed using TOML bare string rules. So now this works: cha -o display.color-mode=true-color
* Add -C optionbptato2023-10-271-6/+9
|
* reduce new() usagebptato2023-10-251-2/+2
|
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-1/+10
|
* container: add cursorNthLink, cursorRevNthLinkbptato2023-10-141-1/+1
|
* config: fix `include` namingbptato2023-10-091-4/+4
| | | | use what is documented
* Add w3m-cgi-compat optionbptato2023-10-011-1/+3
|
* Add urimethodmap supportbptato2023-09-301-19/+31
| | | | yay
* loader: add local-cgibptato2023-09-301-1/+4
| | | | | | | | | | | Add w3m-style local CGI support. It is not quite as powerful as w3m's local CGI, because it lacks an equivalent to W3m-control. Not sure if it's worth adding; we certainly shouldn't allow passing JS in headers, but a custom language for headers does not sound like a great idea either... eh, idk. also, TODO add multipart
* config: add missing \nbptato2023-09-201-1/+1
|
* Accept bare strings in -o, fix -o with missing newlinebptato2023-09-201-8/+16
| | | | | | | | * Bare strings are now allowed when specifying config options through -o. * Fix a bug where options specified with -o would be disregarded unless a newline was included. * (Also, add a TOML stringifier routine for debugging.)
* move around more modulesbptato2023-09-141-3/+3
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* Add vi-style numeric prefixes, make gotoLine 1-basedbptato2023-09-081-0/+4
| | | | | | | | * it is now possible to jump to the nth line by typing {n}G * gotoLine is now 1-based, so to go to the first line you would use pager.gotoLine(1) * it is now allowed to return a function from a keybinding (which will be subsequently executed as a regular keybinding)
* loader: add data URLsbptato2023-09-011-1/+6
|
* Add jsdelprop, allow deletion of ActionMap propsbptato2023-08-291-0/+6
| | | | mostly for symmetry with real objects
* Add jssetprop, make ActionMap editable from JSbptato2023-08-291-18/+20
| | | | | | | | | jssetprop just adds the set_property exotic function. ActionMap is now editable from JS; the setter is implemented in the same way as bindPagerKey/bindLineKey. (In fact, now those two just call the setter.) But this is still rather inefficient and subject to change.
* javascript: refactorbptato2023-08-281-2/+3
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* javascript: de-ref some interfacesbptato2023-08-281-7/+16
| | | | | | | Also, make ActionMap use getters/hasprop instead of a table copy. peakmem remains up +200M at 950M after commit 9991bd3393483158ab0d1b9d995f695dee3c65dc. :(
* config: allow modification through JSbptato2023-08-271-44/+59
| | | | | | | This used to be possible until I moved everything under separate headers to their respective objects. Now it works again, mostly; modification of some attributes is still missing.
* config: fix overriding default headersbptato2023-08-261-26/+25
| | | | | * simplify ActionMap reading * introduce separate case for Table
* Allow overriding default headersbptato2023-08-261-10/+4
|
* Move charsets into chakasubptato2023-08-141-1/+2
| | | | Operation "modularize Chawan somewhat" part 1
* Add mailcap, mime.types & misc refactoringsbptato2023-08-131-12/+61
| | | | | | | | * add mailcap: works with copiousoutput, needsterminal, etc. * add mime.types (only works with mailcap) * refactor pipeBuffer * remove "dispatcher" * fix bug in directory display where baseurl would not be used
* Add default background/foreground color overridebptato2023-07-291-0/+11
|
* Add compileMatchRegexbptato2023-07-251-4/+4
| | | | | | | This makes it so that host = 'example\.org' mandates an exact match, but host = '^example' matches example.org, example.com, etc. (Previously, 'example\.org' would have matched exampleexample.org as well, which was quite counter-intuitive.)
* Add proxy supportbptato2023-07-041-2/+22
|
* return Result[T, JSError] from fromJSbptato2023-07-021-6/+4
|
* Factor out headers into separate modulebptato2023-07-011-1/+1
|
* use =destroy instead of finalizersbptato2023-07-011-0/+2
| | | | | This should help with moving to ORC in the future. (Also, finalizers do not work very well in the first place.)
* config: add stylesheet, apply siteconf to piped inputbptato2023-06-261-5/+6
|
* Remove unused config variablebptato2023-06-261-1/+0
|
* Fix crash in openEditor if SIGINT was deliveredbptato2023-06-261-0/+1
| | | | | | | | | | | nvi for example sets ISIG and traps SIGINT. Without this patch, this would propagate to all processes in the same process group and kill them. (It still does, but we set a signalHandler to ignore that.) Still not perfect, because for some reason we receive WIFSIGNALED even if the signal did not actually kill the editor. For now, we just treat this as a success.
* Option -> Opt in config, return error in compileSearchRegexbptato2023-06-241-36/+36
|
* Rework JS exception systembptato2023-06-191-2/+2
| | | | | Now we use Result for passing exceptions to JS. As a result, we can finally get rid of the .jserr pragma.
* Use utils/opt in toml parserbptato2023-06-181-15/+2
|
* Fix various layout bugs, prepare for image supportbptato2023-06-121-3/+9
|
* Add XTERM title renamingbptato2023-06-071-0/+1
|
* Fix more config inconsistenciesbptato2023-06-011-22/+23
| | | | So that the default config actually works again. Also some doc updates.
* config: fix omnirulesbptato2023-06-011-3/+3
| | | | Rename variable so it's mapped properly...
* Rewrite new Request bindingbptato2023-05-211-3/+3
| | | | | Still far from perfect, but now at least it has a bit more to do with what the standard mandates.
* Add display/output encodingbptato2023-05-191-15/+5
| | | | Some encodings are still missing
* make it compile...bptato2023-05-161-1/+1
|
* Refactor config, add charset optsbptato2023-05-161-179/+274
| | | | Only document-charset supported for now.
* pager: proxy values in container; js: bugfixesbptato2022-12-201-6/+12
| | | | Also, a little bonus: w3m keybindings