A text-mode web browser. It displays websites in your terminal and allows you to navigate on them.
It can also be used as a terminal pager.
Note: a POSIX-compliant operating system is required. (Windows is not supported yet.)
git clone https://git.sr.ht/~bptato/chawan && cd chawan
nim -v
.)make submodule
make release
- optimized release buildmake
- debug build (slow, for development)make manpage
make install
(e.g. sudo make install
)Then, try:
$ cha -V # open in visual mode for a list of default keybindings
$ cha example.org # open your favorite website directly from the shell
Currently implemented features are:
...with a lot more planned.
Many other text-based web browsers exist. Here's some recommendations if you want to try more established ones:
ed
than
less
or vi
. Mainly designed for blind users.Chawan assumes the terminal's default background/foreground colors are black and white. If this is not true for your terminal, make sure to set the display.default-background-color and display.default-foreground-color properties in your Chawan configuration file.
Also, by default, Chawan uses the eight ANSI colors to display colored text. To use true colors, either export COLORTERM=truecolor or set the display.color-mode to "24bit". To use 256 colors, set display.color-mode to "8bit" instead. (You can also turn off colors and/or styling altogether in the configuration; please consult doc/config.md for details.)
I've found other text-based web browsers insufficient for my needs, so I thought it'd be a fun excercise to write one by myself, for myself.
Generally, I'm happy if Chawan works on websites I use frequently. If it also works on other websites, that's a bonus.
At bonus/w3m.toml. Note that not every w3m feature is implemented yet, so it's not 100% compatible.
I use vi for editing text, and I prefer my pager to function similarly to my editor. Hence the default vi-like keybindings.
As mentioned above, the layout engine is still very much a work in progress. At this point, it's more interesting if a website works as intended in Chawan than if it doesn't.
Chawan does not have browser tabs. Instead, each website is opened in a new buffer, which is added to the buffer tree. This is very similar to how w3m handles buffers, except a) source files are stored in memory, not on the disk, and b) instead of a linked list of buffers, they are stored in a tree. (And of course, c) there are no tabs.)
This model has the advantage of allowing the user to instantly view the previous page in all cases, without any complicated caching mechanism. It also opens up many interesting possibilities concering buffer organization; unfortunately, not much of that is implemented yet (except for basic tree traversal commands.)
Chawan is dedicated to the public domain. See the UNLICENSE file for details.
Chawan also includes and depends on several other libraries. For further details, see license.html or check the about:license page in Chawan.