| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
| |
* correct action on M-b
* add external.bookmark option
* move openFileExpand functionality into unquote
* add menu items
* update docs
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* fix broken newline skipping logic in consume
* remove reconsume char buffer (it's not needed with mmap)
* pass on backslash to unquote - this makes backslashes in
unquoteCommand work as expected (since it parses the command again)
* close ps on write failure
* add entries even before parse error - this drops a pointless copy of
mailcaps. (we could theoretically just use old behavior without the
copy, but this feels more intuitive anyway)
|
|
|
|
| |
we hadn't before, and it's annoying when using cha as a pager
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* use PosixStream/mmap for mailcap reading too; this finally lets us get
rid of std/streams in the entire codebase
* split up recvDataLoopOrMmap into 3 functions: one that can fall back
to recvAll, one that falls back to recvDataLoop, and one that does not
fall back to anything
* use MAP_PRIVATE in mmap for read (we don't care if changes are
propagated, as we do no changes to cached files)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove std/streams use from mime.types; mmap and parse directly
* use mime.types for inline image extensions
* add some jpeg file extensions
Latter came up because I was trying to add a format locally and it
wouldn't recognize it on images from my file system (i.e. by extension).
As a security measure we still do not allow additional extensions for
predefined inline image types.
|
|
|
|
|
|
|
| |
one std/streams less
I used mmap for reading the user config. It shouldn't matter in any
realistically sized config, but who knows.
|
|
|
|
| |
ref. https://todo.sr.ht/~bptato/chawan/29
|
|
|
|
|
| |
This couldn't get into system.nim for technical reasons, but it's still
pretty useful when iterating over non-mutable openArrays.
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
one less mystery
|
| |
|
|
|
|
|
|
|
| |
most of it has already been moved to monoucha, and the rest fits better
in other directories.
also, move urimethodmap to config
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
also, fix a bug in the chapath parser so that param expansion actually
works
|
|
|
|
|
| |
* line, vector, matrix -> path
* twtuni, charcategory -> twtstr
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
|
| |
* use more PosixStream (because it has double-close checking)
* factor out some common mailcap operations
* move console from client to pager
* fix case-insensitive mime type matching
* replace convoluted fdin/fdout comparison logic (that only accidentally
worked) with a boolean flag
|
|
|
|
|
| |
* remove unused DateTime toml type
* add parseIntP for pointer-size int parsing
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add document.forms
* add form.elements
* remove redundant jshasprop functions
* use mpairs for attribute iteration (mpairs use pointers, but pairs
copies)
* fix remove() crash
* fix remove() collection invalidation for children (if parent is not
in the collection)
* update monoucha
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
std/unicode has the following issues:
* Rune is an int32, which implies overflow checking. Also, it is
distinct, so you have to convert it manually to do arithmetic.
* QJS libunicode and Chagashi work with uint32, interfacing with these
required pointless type conversions.
* fastRuneAt is a template, meaning it's pasted into every call
site. Also, it decodes to UCS-4, so it generates two branches that
aren't even used. Overall this lead to quite some code bloat.
* fastRuneAt and lastRune have frustratingly different
interfaces. Writing code to handle both cases is error prone.
* On older Nim versions which we still support, std/unicode takes
strings, not openArray[char]'s.
Replace it with "twtuni", which includes some improved versions of
the few procedures from std/unicode that we actually use.
|
|
|
|
|
|
| |
* don't accept flags specified as named fields
* don't error out on named field specified as flag
* allow trailing whitespace on named fields & flags
|
|
|
|
|
|
| |
* parse last line even if it doesn't end with LF
* parse flags & named fields case-insensitively
* update naming
|
|
|
|
| |
Dispatch manually with fromJS instead.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
and enable it by default.
|
| |
|
|
|
|
| |
Same as [[siteconf]] autofocus.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
naturally, it's opt-in
|
|
|
|
|
|
| |
* refactor form submission
* add options to specify form handling per protocol
* block cross-protocol POST requests
|
|
|
|
| |
Operation "modularize Chawan somewhat" part 3
|
| |
|
|
|
|
|
|
|
| |
* add $LOGNAME to the tmp directory name, so that tmpdirs of separate
users don't conflict
* use separate directory for sockets, so that we do not have to give
buffers access to all cached pages
|
| |
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* prefix to-be-separated modules with js
* remove dynstreams dependency
* untangle from EmptyPromise
* move typeptr into tojs
|