1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
.\" Automatically generated by Pandoc 3.5
.\"
.TH "cha\-troubleshooting" "5" "" "" "Troubleshooting Chawan"
.SH Troubleshooting Chawan
This document lists common problems you may run into when using Chawan.
.SS I can\[cq]t select/copy text with my mouse?
Your options are:
.IP \[bu] 2
Press \f[CR]v\f[R] (and copy with \f[CR]y\f[R]).
You can then expand the selection with the mouse.
.IP \[bu] 2
Hold down the shift key while selecting.
Drawback: can only select text currently on the screen, and you
can\[cq]t select tabs.
.IP \[bu] 2
Disable mouse support (\f[CR]input.use\-mouse = false\f[R] in
config.toml).
Drawback: see above.
.SS Why do I get strange/incorrect/ugly colors?
Chawan\[cq]s display capabilities depend on what your terminal reports.
In particular:
.IP \[bu] 2
if the \f[CR]$COLORTERM\f[R] variable is not set, then it may fall back
to 8\-bit or ANSI colors.
Make sure you export it as \f[CR]COLORTERM=truecolor\f[R].
.IP \[bu] 2
if it does not respond to querying the background color, then
Chawan\[cq]s color contrast correction will likely malfunction.
you can correct this using the
\f[CR]display.default\-background\-color\f[R]/\f[CR]display.default\-foreground\-color\f[R]
variables.
.PP
See config.md for details.
.SS I set my \f[CR]$PAGER\f[R] to \f[CR]cha\f[R] and now man pages are unreadable.
Most \f[CR]man\f[R] implementations print formatted manual pages by
default, which Chawan \f[I]can\f[R] parse if they are passed through
standard input.
.PP
Unfortunately, mandoc passes us the formatted document as a
\f[I]file\f[R], which Chawan reasonably interprets as plain text without
formatting.
.PP
At this point, you have two options:
.IP \[bu] 2
\f[CR]export PAGER=\[aq]cha \-T text/x\-ansi\[aq]\f[R] and see that man
suddenly works as expected.
.IP \[bu] 2
\f[CR]alias man=mancha\f[R] and see that man suddenly works better than
expected.
.PP
Ideally you should do both, to deal with cases like git help which
shells out to man directly.
.PP
There is still one problem with this solution: some programs will try to
call \f[CR]$PAGER\f[R] without shell expansion, breaking the
\f[CR]\-T text/x\-ansi\f[R] trick.
To fix this, put a script somewhere in your \f[CR]PATH\f[R]:
.IP
.EX
\f[I]#!/bin/sh\f[R]
exec cha \-T text/x\-ansi \[dq]$\[at]\[dq]
.EE
.PP
and \f[CR]export PAGER=pcha\f[R].
.SS How do I view text files with wrapping?
By default, text files are not auto\-wrapped, so viewing plain text
files that were not wrapped properly by the authors is somewhat
annoying.
.PP
A workaround is to add this to your config\[cq]s \f[CR][page]\f[R]
section:
.IP
.EX
\[aq] f\[aq] = \[dq]pager.externFilterSource(\[aq]fmt\[aq])\[dq]
.EE
.PP
and then press \f[CR]<space> f\f[R] to view a wrapped version of the
current text file.
(This assumes your system has an \f[CR]fmt\f[R] program \- if not,
\f[CR]fold \-s\f[R] may be an alternative.)
.PP
To always automatically wrap, you can add this to your user style:
.IP
.EX
plaintext { \f[B]white\-space\f[R]: pre\-wrap }
.EE
.PP
To do the same for HTML and ANSI text, use \f[CR]plaintext, pre\f[R].
.SS Why does \f[CR]$WEBSITE\f[R] look awful?
Usually, this is because it uses some CSS features that are not yet
implemented in Chawan.
The most common offenders are grid and CSS variables.
.PP
There are three ways of dealing with this:
.IP "1." 3
If the website\[cq]s contents are mostly text, install \c
.UR https://github.com/eafer/rdrview
rdrview
.UE \c
\&.
Then bind the following command to a key of your choice in the config
(e.g.\ \f[CR]<space> r\f[R]):
\f[CR]\[aq] r\[aq] = \[dq]pager.externFilterSource(\[aq]rdrview \-H \-u \[dq]$CHA_URL\[dq]\[aq])\[dq]\f[R]
This does not fix the core problem, but will significantly improve your
reading experience anyway.
.IP "2." 3
Complain \c
.UR https://todo.sr.ht/~bptato/chawan
here
.UE \c
, and wait until the problem goes away.
.IP "3." 3
Write a patch to fix the problem, and send it \c
.UR https://lists.sr.ht/~bptato/chawan-devel
here
.UE \c
\&.
.SS \f[CR]$WEBSITE\f[R]\[cq]s interactive features don\[cq]t work!
Some potential fixes:
.IP \[bu] 2
Logging in to websites requires cookies.
Some websites also require cookie sharing across domains.
For security reasons, Chawan does not allow any of this by default, so
you will have to fiddle with siteconf to fix it.
See config.md#siteconf for details.
.IP \[bu] 2
Set the \f[CR]referer\-from\f[R] siteconf value to true; this will cause
Chawan to send a \f[CR]Referer\f[R] header when navigating to other URLs
from the target URL.
.IP \[bu] 2
Enable JavaScript.
If something broke, type M\-c M\-c to check the browser console, then
follow step 3.
of the previous answer.
Warning: remote JavaScript execution is inherently unsafe.
Please only enable JavaScript on websites you trust.
.SS See also
\f[B]cha\f[R](1)
|