| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
also, default link color is now blue for light terminal backgrounds
|
|
|
|
|
| |
* 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.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This drops libseccomp as a dependency.
Also, move the capsicum/pledge definitions from bindings to sandbox.nim
because they are only used there.
Interestingly, after integrating chaseccomp I found that the
stbi process would mysteriously crash by a getrandom(2) syscall.
Closer investigation revealed it is only called on the initialization
of glibc's malloc; presumably it had never surfaced before because
libseccomp would always allocate before entering the sandbox.
So I've added getrandom to our filter as well.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intention is that only inline code tags have reverse video;
otherwise it often messes with syntax highlighting.
I've made it a descendant selector (instead of a cheaper parent
selector) because I can easily imagine markup like
<pre><div><code>...
which really shouldn't enable reverse video either.
|
|
|
|
| |
apparently this is relative to the current page
|
|
|
|
|
|
|
|
|
|
|
|
| |
Called -cha-reverse.
Mostly to solve the problem that code tags are indistinguishable from
regular text - on a graphical browser this is normally served by
monospace font, but we always use monospace...
So now the default ua.css adds reverse video to code and xmp. pre
remains as it was, because it means "preformatted", not "monospaced".
Also, it would mess with our whatever-to-HTML converter output.
|
|
|
|
|
|
|
|
|
| |
Simple netcat clone, useful for portable scripts. Especially because
some netcats will close the connection as soon as I close stdin... this
one only quits when either stdout or the socket refuses new data.
Also, it uses our standard TCP connection routine, meaning it respects
ALL_PROXY. (i.e. now spartan works with socks5 too)
|
|
|
|
|
| |
Now the dirlist parser lives inside dirlist2html, and the file protocol
just emulates FTP LIST.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This splits out sftp into a separate binary that *does* depend on
libcurl. However, ftp now uses the same socket code as gopher.
ftps is dropped, because I've never even tested it. Maybe I'll add
it back when we have working OpenSSL bindings.
This is still "doing the easy part first", now I have no clue how to
handle sftp because my initial plan ("just use the sftp binary") doesn't
work - sftp batch mode doesn't accept passwords. libssh2 remains the
sole candidate, but that's what libcurl wraps anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:")'
|
|
|
|
|
| |
Now we use QuickJS-NG, which is better maintained than QJS and has
column tracking.
|
|
|
|
|
|
|
|
| |
I'm thinking of making libcurl entirely optional; let's start with the
easiest part.
I've added a SOCKS5 client for ALL_PROXY support; I know curl supported
others too, but whatever.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Welp. The fence was needed after all.
The keybinding was broken anyway; fix that too.
|
| |
|
|
|
|
|
| |
Instead of storing pointers to cstrings, put all of them in a single
huge string and store indices of that.
|
|
|
|
|
|
|
|
|
|
| |
* stream: and passFd is now client-based, and accessible for buffers
* Bitmap's width & height is now int, not uint64
* no more non-network Bitmap special case in the pager for canvas
I just shoehorned it into the static image model, so it still doesn't
render changes after page load. But at least now it doesn't crash the
browser.
|
|
|
|
|
|
|
|
| |
This caches sixel output. Works best when the line height is a multiple
of 6px, but should still be faster than the previous solution everywhere
else too (simply by virtue of encoding separate images in parallel).
Next step: actual color quantization
|
|
|
|
|
|
|
| |
data URIs can get megabytes long; however, you can only stuff so many
bytes into the envp. (This was thwarting my efforts to view pandoc-
generated standalone HTML in Chawan.) So put `data:' back into the
loader process.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
It works fine AFAICT, just missing VP8 deblocking filters, so lossy
WebP images don't look great.
I have extended the API a bit to allow reading from stdin, not just
paths. Otherwise, it's the same as matanui159/jebp.
TODO: add loop filters
|
|
|
|
| |
and enable it by default.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* resize images with stb_image_resize
* use tee for output handle redirection (redirectToFile blocks)
* cache original image files
* accept lseek in sandbox
* misc stbi fixes
For now, I just pulled in stb_image_resize v1. v2 is an extra 150K in
size, not sure if it's worth the cost. (Either way, we can always switch
later if needed, since the API is almost the same.)
Next step: move sixel/kitty encoders to CGI, and cache their output in
memory instead of the intermediate RGBA representation.
|
| |
|
|
|
|
|
|
| |
* preserve alpha in kitty + simplify encoder
* pass unknown image types to stbi (as image/x-unknown) and let it
detect the type
|
|
|
|
|
|
|
| |
Now we have decoders for gif, jpeg, bmp. Also, the in-house PNG decoder
has been replaced in favor of the stbi implementation; this means we
no longer depend on zlib, since stbi comes with a built in inflate
implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* multi-processed and sandboxed PNG decoding & encoding (through local
CGI)
* improved request body passing (including support for output id as
response body)
* simplified & faster blob()/text() - now every request starts
suspended, and OngoingData.buf has been replaced with loader's
buffering capability
* image caching: we no longer pull bitmaps from the container after
every single getLines call
Next steps: replace our bespoke PNG decoder with something more usable,
add other decoders, and make them stream.
|
| |
|
|
|
|
|
|
| |
* refactor form submission
* add options to specify form handling per protocol
* block cross-protocol POST requests
|
|
|
|
|
|
|
|
|
| |
* prepend Mozilla/5.0 to User-Agent; an unfortunate fact is that even
the G-lettered search engine breaks without it, and I've seen sites
that refuse to serve pages at all.
* Add */* to Accept, in the hope that we'll get images more often. (The
ideal solution is to set it to "*/*" when fetching images, but the
API format doesn't let us do this yet; TODO.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.)
|
|
|
|
| |
We have a markdown converter, so why not use it?
|
| |
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
|
|
|
|
|
| |
* use EDITOR environment variable in default config, fix line number
ordering in fallback
* autodetect vi-like editors and add line number
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we didn't actually free the main JS runtime, probably because
you can't do this without first waiting for JS to unwind the stack.
(This has the unfortunate effect that code now *can* run after quit().
TODO: find a fix for this.)
This isn't a huge problem per se, we only have one of these and the OS
can clean it up. However, it also disabled the JS_FreeRuntime leak
check, which resulted in sieve-like behavior (manual refcounting is
a pain).
So now we choose the other tradeoff: quit no longer runs exitnow, but
it waits for the event loop to run to the end and only then exits the
browser. Then, before exit we free the JS context & runtime, and also
all JS values allocated by config.
Fixes:
* fix `ad' flag not being set for just one siteconf/omnirule
* fix various leaks (since leak check is enabled now)
* use ptr UncheckedArray[JSValue] for QJS bindings that take an array
* allow JSAtom in jsgetprop etc., also disallow int types other than
uint32
* do not set a destructor for globals
|