diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-10-15 22:39:52 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-10-15 22:44:15 +0200 |
| commit | fe0b8ee5f1128ddab8bc8be9c71339243d3e9de2 (patch) | |
| tree | e70b1c37df14ef7b723049da818b281d2378be65 /doc | |
| parent | db0fc5a55e797044c5e404f301f12dba9969e4d8 (diff) | |
| download | chawan-fe0b8ee5f1128ddab8bc8be9c71339243d3e9de2.tar.gz | |
Update docs
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/config.md | 36 | ||||
| -rw-r--r-- | doc/image.md | 29 | ||||
| -rw-r--r-- | doc/troubleshooting.md | 19 |
3 files changed, 62 insertions, 22 deletions
diff --git a/doc/config.md b/doc/config.md index d32166b7..1d5081d8 100644 --- a/doc/config.md +++ b/doc/config.md @@ -106,6 +106,21 @@ appearing on your screen.</td> Buffer options are to be placed in the `[buffer]` section. +These options are global to all buffers. For more granular filtering, +use `[[siteconf]]`. + +Example: + +```toml +[buffer] +# show images on all websites +images = true +# disable website CSS +styling = false +# You *can* set scripting to true here, but I strongly recommend using +# [[siteconf]] to enable it on a per-site basis instead. +``` + Following is a list of buffer options: <table> @@ -243,8 +258,8 @@ correctly. <td>string</td> <td>Character set for keyboard input and displaying documents.<br> Used in dump mode as well.<br> -(This means that e.g. `cha -I EUC-JP -O UTF-8 a > b` is equivalent to `iconv --f EUC-JP -t UTF-8`.)</td> +(This means that e.g. `cha -I EUC-JP -O UTF-8 a > b` is roughly equivalent to +`iconv -f EUC-JP -t UTF-8`.)</td> </tr> </table> @@ -683,6 +698,23 @@ host = '(.*\.)?sr\.ht' # either 'something.sr.ht' or 'sr.ht' cookie = true # enable cookies share-cookie-jar = 'sr.ht' # use the cookie jar of 'sr.ht' for all matched hosts third-party-cookie = '.*\.sr\.ht' # allow cookies from subdomains + +# Use the "vector" skin on Wikipedia, which Chawan can handle better. +[[siteconf]] +url = '^https?://[a-z]+\.wikipedia\.org/wiki/(?!.*useskin=.*)' +rewrite-url = 'x => x.searchParams.append("useskin", "vector")' + +# Make imgur send us images. +[[siteconf]] +host = '(i\.)?imgur\.com' +default-headers = { + User-Agent = "Mozilla/5.0 chawan", + Accept = "*/*", + Accept-Encoding = "gzip, deflate", + Accept-Language = "en;q=1.0", + Pragma = "no-cache", + Cache-Control = "no-cache" +} ``` Siteconf options: diff --git a/doc/image.md b/doc/image.md index 7a3455ee..6038f835 100644 --- a/doc/image.md +++ b/doc/image.md @@ -16,13 +16,19 @@ There are actually two switches for images in the config: * display.image-mode: sets the inline image display method. Defaults to "auto", but may also be set to "sixel" or "kitty" manually. -In most cases, all you need to do is to set "buffer.images" to true; -with the default image-mode, Chawan will find the best image display -method supported by your terminal. +In most cases, all you need to do is to set "buffer.images" to true: -If your terminal does not tell Chawan that it can display sixels, you may also -have to set "display.image-mode" appropriately. See below for further -discussion of sixel configuration. +```toml +# in ~/.config/chawan/config.toml +[buffer] +images = true +``` + +With the default image-mode, Chawan will find the best image display +method supported by your terminal. However, if your terminal fails +to tell Chawan that it can display sixels, you may also have to set +"display.image-mode" appropriately. See below for further discussion of +sixel configuration. ## Output formats @@ -63,7 +69,9 @@ Known quirks and implementation details: can try setting `display.sixel-colors = 2`, which will skip the first pass (but will also display everything in monochrome). * Transparency *is* supported, but looks weird because we approximate an - 8-bit alpha channel with Sixel's 1-bit alpha channel. + 8-bit alpha channel with Sixel's 1-bit alpha channel. Also, some + terminals don't emulate it correctly - when in doubt, try XTerm (which + does). ### Kitty @@ -184,3 +192,10 @@ following: * This *is* an implementation detail, and might change at any time in the future (e.g. if we add a "no cache files" mode). Always check for S_ISREG to ensure that you are actually dealing with a file. + +<!-- MANON + +## See also + +**cha**(1) +MANOFF --> diff --git a/doc/troubleshooting.md b/doc/troubleshooting.md index 59104576..13600a9e 100644 --- a/doc/troubleshooting.md +++ b/doc/troubleshooting.md @@ -31,11 +31,6 @@ particular: See [config.md](config.md#display) for details. -## Can I view Markdown files using Chawan? - -Yes; Chawan now has a built-in markdown converter. If you don't like it, you -can always [replace it](mailcap.md) with e.g. pandoc. - ## I set my `$PAGER` to `cha` and now man pages are unreadable. Most `man` implementations print formatted manual pages by default, which @@ -64,14 +59,6 @@ exec cha -T text/x-ansi "$@" and `export PAGER=pcha`. -## Where are the keybindings? - -Please run `cha about:chawan` for a list of default keybindings. Users familiar -with *vi*, *vim*, etc. should find these defaults familiar. - -A w3m-like keymap also exists at [bonus/w3m.toml](bonus/w3m.toml). Note that not -every w3m feature is implemented yet, so it's not 100% compatible. - ## How do I view text files with wrapping? By default, text files are not auto-wrapped, so viewing plain text files that @@ -130,3 +117,9 @@ Some potential fixes: console, then follow step 3. of the previous answer.<br> Warning: remote JavaScript execution is inherently unsafe. Please only enable JavaScript on websites you trust. + +<!-- MANON +## See also + +**cha**(1) +MANOFF --> |