about summary refs log tree commit diff stats
path: root/res/config.toml
Commit message (Collapse)AuthorAgeFilesLines
* pager: edit source fixesbptato2024-03-301-1/+1
| | | | | | | * URI-decode path name for local files in default config * (ab)use mailcap command quoting for passing params to editor command instead of replicating it badly in formatEditorName * rename mailcap enums
* config: improve input systembptato2024-03-261-213/+342
| | | | as described in <https://todo.sr.ht/~bptato/chawan/6>
* pager: add "save link", "save source"; change & document some keybindingsbptato2024-03-201-7/+9
| | | | | | | | | * `s{Enter}' now saves link, and `sS' saves source. * Changed ;, +, @ to g0, g$, gc so that it's somewhat consistent with vim (and won't conflict with ; for "repeat jump to char") * Changed (, ) to -, + so that it doesn't conflict with vi's "previous/next sentence" (once we have it...) * Add previously missing keybindings to about:chawan
* config: remove system mailcaps from default mailcap pathbptato2024-03-191-4/+1
| | | | | | | | I haven't seen a single OS-shipped mailcap file yet that would be suitable for use with Chawan. The one on Debian wants to open every text file with vim; the one in FreeBSD ports is straight up broken. mime.types works much better and thus stays.
* buffer: add markURLbptato2024-03-191-0/+1
| | | | Useful when browsing plaintext files; w3m has it too.
* pager, loader: add "Save file to" functionalitybptato2024-03-161-1/+2
| | | | | | | As simple as it could be; no download panel yet. Also, remove the xdg-open default mailcap entry; it's better to just save by default.
* config: add start.console-buffer optionbptato2024-03-161-0/+1
| | | | useful for debugging
* config.toml: fix sE bindingbptato2024-03-151-1/+1
|
* pager: add "open in editor" keybinding (sE)bptato2024-03-141-0/+8
| | | | | | only for source for now, rendered document is a bit more complicated (also, get rid of useless extern/editor module)
* Add mouse supportbptato2024-02-291-0/+1
|
* pager: improve URL loading procsbptato2024-02-281-3/+3
| | | | | | | Split up load into loadSubmit, gotoURL: loadSubmit is a replacement for load(s + '\n'), and gotoURL is a load that does no URL expansion. Also, fix a bug where load("\n") would crash the browser.
* config: add yI for yanking image URLsbptato2024-02-271-1/+12
|
* buffer: add image viewer supportbptato2024-02-271-0/+1
|
* term: improve pixels-per-column/line detectionbptato2024-02-251-0/+8
| | | | | | | | | Some terminal emulators (AKA vte) refuse to set ws_xpixel and ws_ypixel in the TIOCGWINSZ ioctl, so we now query for CSI 14 t as well. (Also CSI 18 t for good measure, just in case we can't ioctl for some reason.) Also added some fallback (optionally forced) config values for width, height, ppc, and ppl. (This is especially useful in dump mode.)
* config: replace default-flags with ignore-casebptato2024-02-221-0/+1
| | | | | | default-flags was overly complicated for its purpose. Also, ignore-case is quite useful, so enable it by default.
* Replace Chakasu with Chagashibptato2024-02-221-1/+0
| | | | | | The API is horrid :( but at least it copies less. TODO: think of a better API.
* term: fix coloring messbptato2024-02-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Until now, the config file required manual adjustment for the output to look bearable on terminals colored differently than {bgcolor: black, fgcolor: white}. Also, it only detected RGB when COLORTERM was set, but this is not done by most (any?) terminal emulators (sad). To improve upon the situation, we now query the terminal for some attributes on startup: * OSC(10/11, ?) -> get the terminal's bg/fgcolor * DCS(+, q, 524742) -> XTGETTCAP for the "RGB" capability (only supported by a few terminals, but better than nothing) * Primary device attributes -> check if ANSI colors are supported, also make sure we don't block indefinitely even if the previous queries fail If primary device attributes does not return anything, we hang until the user types something, then notify the user that something went wrong, and tell them how to fix it. Seems like an OK fallback. (The DA1 idea comes from notcurses; since this is implemented by pretty much every terminal emulator, we don't have to rely on slow timing hacks to skip non-supported queries.)
* config: use `yu` for copying URLsbptato2024-02-131-1/+2
| | | | | | | | | | | It's my mistake; it should have been this way all along. `u` is peek URL, so `yu` should copy the same URL. And of course `c` displays a different URL than what is being copied. Ouch. I would make `yc` copy the current page's URL too (instead of M-y...), but that would make things way too confusing. Maybe sometime in the future, when I unlearn `yc`.
* config.toml: C-c cancels setMark/gotoMark operationsbptato2024-02-121-3/+21
|
* Add command to yank link under cursor (yc)bptato2024-01-291-1/+12
|
* Re-design word handling, add e, E, W, B, etc.bptato2024-01-191-2/+6
| | | | | | | | | | | | * Add functions for moving to the beginning/end of words (vi `b', `e'). * As it turns out, there are many possible interpretations of what a word is. Now we have a function for each reasonable interpretation, and the default settings match those of vi (and w3m in w3m.toml). (Exception: it's still broken on line boundaries... TODO) * Remove `bounds` from lineedit, it was horrible API design and mostly useless. In the future, an API similar to what pager now has could be added. * Update docs, and fix some spacing issues with symbols in the tables.
* config: allow overriding default prepended schemebptato2023-12-151-1/+2
|
* Separate gopher conversion from main binarybptato2023-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | 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/+1
| | | | | | * 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-0/+1
| | | | | | | | | * 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.
* config: disable w3m-cgi-compat by defaultbptato2023-12-101-1/+1
| | | | | It was a bad idea to enable by default, as it is mostly pointless and is a potential security hole.
* pager: add marksbptato2023-12-091-0/+4
| | | | | Default is vi-style, but w3m-style marks work as well; see bonus/w3m.toml.
* pager: add precnum to [, ]bptato2023-12-091-2/+2
|
* pager: add `{', `}'; document externIntobptato2023-12-091-0/+2
| | | | | | | | { & } acts like in vi (except the cursor is not moved to the line beginning). No reason to leave externInto undocumented, as it is even used in the default config.
* pager, container: add text selection/copyingbptato2023-12-031-1/+18
| | | | | | | | | | * 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 `\'
* http: use Accept-Encodingbptato2023-11-171-0/+1
| | | | just ask libcurl to decode
* Refactor Consolebptato2023-10-131-2/+4
| | | | | * merge dom.console & client.Console * move client-specific stuff out of Console (into callbacks when necessary)
* config: do not copy url with newlinebptato2023-10-011-1/+1
|
* Add w3m-cgi-compat optionbptato2023-10-011-0/+1
|
* more vi/m compatbptato2023-10-011-9/+13
|
* Improve vi/m compat in scrollingbptato2023-10-011-2/+10
|
* Add urimethodmap supportbptato2023-09-301-0/+6
| | | | yay
* js: improve optional argument handlingbptato2023-09-261-18/+18
| | | | | | | If a fallback argument has been specified, treat undefined as if no argument had been given. This removes the need for the ?? 1 checks in the config.
* Add precnum support to more functionsbptato2023-09-261-11/+11
|
* Add M-p as "load page on clipboard"bptato2023-09-251-4/+16
|
* add arrow keys to default line edit configbptato2023-09-201-0/+4
|
* config: fix invalid use of externbptato2023-09-131-1/+2
|
* container: accept numbers in cursorLeft, cursorRight, etc.bptato2023-09-091-8/+8
| | | | | | These functions now take a numeric argument to determine how many cells/lines to move. Also, update the default config so e.g. 9j now works.
* add extern, refactor some term functionsbptato2023-09-091-0/+5
| | | | | | | | | | | * Add an extern() call. Maybe it should be defined on client. It certainly should accept a dictionary instead of the enum type we use now. Perhaps it should return the error code? I'll leave it undocumented until I figure this out. * Refactor enableRawMode, unblockStdin, etc. so that they operate on the term object instead of global state. * Move editor to a separate folder, and factor out runprocess into a different module.
* Add vi-style numeric prefixes, make gotoLine 1-basedbptato2023-09-081-2/+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)
* container: add separate commands for 0 and ^bptato2023-09-081-1/+2
| | | | | Just as in vi, 0 puts the cursor at the beginning of the current line, and ^ puts the cursor at the position of the first non-blank character.
* config: add gotoLine as M-gbptato2023-09-071-0/+1
|
* config: allow modification through JSbptato2023-08-271-1/+4
| | | | | | | 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.
* Allow overriding default headersbptato2023-08-261-0/+7
|
* Add mailcap, mime.types & misc refactoringsbptato2023-08-131-0/+12
| | | | | | | | * 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