about summary refs log tree commit diff stats
path: root/res/config.toml
blob: 14b746fda399159586917d11ea694e414b39c262 (plain) (blame)
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[start]
visual-home = "about:chawan"
startup-script = ""
headless = false

[search]
wrap = true

[encoding]
document-charset = ["utf-8", "sjis", "euc-jp", "latin2"]
display-charset = "auto"
#system-charset = "auto" #TODO

[external]
mailcap = [
	"~/.mailcap",
	"/etc/mailcap",
	"/usr/etc/mailcap",
	"/usr/local/etc/mailcap"
]
mime-types = [
	"~/.mime.types",
	"/etc/mime.types",
	"/usr/etc/mime.types",
	"/usr/local/etc/mime.types"
]
tmpdir = "/tmp/cha"
editor = "vi %s +%d"

[network]
max-redirect = 10
prepend-https = true
default-headers = {
	User-Agent = "chawan",
	Accept = "text/html,text/*;q=0.5",
	Accept-Language = "en;q=1.0",
	Pragma = "no-cache",
	Cache-Control = "no-cache"
}

[input]
vi-numeric-prefix = true

[display]
color-mode = "auto"
format-mode = "auto"
no-format-mode = ["overline"]
emulate-overline = true
alt-screen = "auto"
highlight-color = "cyan"
double-width-ambiguous = false
minimum-contrast = 100
force-clear = false
set-title = true
default-background-color = "#000000"
default-foreground-color = "#FFFFFF"

[[omnirule]]
match = '^ddg:'
substitute-url = '(x) => "https://lite.duckduckgo.com/lite/?kp=-1&kd=-1&q=" + encodeURIComponent(x.split(":").slice(1).join(":"))'

[page]
q = 'quit()'
C-z = 'suspend()'
h = 'pager.cursorLeft()' 
j = 'pager.cursorDown()'
k = 'pager.cursorUp()'
l = 'pager.cursorRight()'
'M-[D' = 'pager.cursorLeft()' 
'M-[B' = 'pager.cursorDown()'
'M-[A' = 'pager.cursorUp()'
'M-[C' = 'pager.cursorRight()'
'0' = 'pager.cursorLineBegin()'
'^' = 'pager.cursorLineTextStart()'
'$' = 'pager.cursorLineEnd()'
b = 'pager.cursorPrevWord()'
w = 'pager.cursorNextWord()'
'[' = 'pager.cursorPrevLink()'
']' = 'pager.cursorNextLink()'
H = 'pager.cursorTop()'
M = 'pager.cursorMiddle()'
L = 'pager.cursorBottom()'
';' = 'pager.cursorLeftEdge()'
'+' = 'pager.cursorMiddleColumn()'
'@' = 'pager.cursorRightEdge()'
C-d = 'pager.halfPageDown()'
C-u = 'pager.halfPageUp()'
C-f = 'pager.pageDown()'
C-b = 'pager.pageUp()'
'M-[6~' = 'pager.pageDown()'
'M-[5~' = 'pager.pageUp()'
'>' = 'pager.pageRight()'
'<' = 'pager.pageLeft()'
C-e = 'pager.scrollDown()'
C-y = 'pager.scrollUp()'
J = 'pager.scrollDown()'
K = 'pager.scrollUp()'
'('= 'pager.scrollLeft()'
')' = 'pager.scrollRight()'
C-m = 'pager.click()'
C-j = 'pager.click()'
M-u = 'pager.dupeBuffer()'
C-l = 'pager.load()'
C-k = 'pager.load("ddg:")'
M-b = 'pager.load("~/.w3m/bookmark.html\n")'
U = 'pager.reload()'
r = 'pager.redraw()'
R = 'pager.reshape()'
M-C-c = 'pager.cancel()'
g = 'pager.cursorFirstLine()'
G = 'n => n ? pager.gotoLine(n) : pager.cursorLastLine()'
M-g = 'pager.gotoLine()'
z = 'pager.centerLine()'
C-g = 'pager.lineInfo()'
v = 'pager.toggleSource()'
D = 'pager.discardBuffer()'
M-d = 'pager.discardTree()'
',' = 'pager.prevBuffer()'
'M-,' = 'pager.prevSiblingBuffer()'
'.' = 'pager.nextBuffer()'
'M-.' = 'pager.nextSiblingBuffer()'
'M-/' = 'pager.parentBuffer()'
M-c = 'pager.command()'
'/' = 'pager.isearchForward()'
'?' = 'pager.isearchBackward()'
n = 'pager.searchNext()'
N = 'pager.searchPrev()'
c = 'pager.peek()'
u = 'pager.peekCursor()'
C-w = '''
config.search.wrap = !config.search.wrap;
pager.alert("Wrap search " + (config.search.wrap ? "on" : "off"));
'''

[line]
C-m = 'line.submit()'
C-j = 'line.submit()'
C-h = 'line.backspace()'
'C-?' = 'line.backspace()'
C-d = 'line.delete()'
C-c = 'line.cancel()'
M-b = 'line.prevWord()'
M-f = 'line.nextWord()'
C-b = 'line.backward()'
C-f = 'line.forward()'
C-u = 'line.clear()'
C-_ = 'line.clear()'
M-k = 'line.clear()'
C-k = 'line.kill()'
C-w = 'line.clearWord()'
M-C-h = 'line.clearWord()'
'M-C-?' = 'line.clearWord()'
M-d = 'line.killWord()'
C-a = 'line.begin()'
C-e = 'line.end()'
C-v = 'line.escape()'
C-p = 'line.prevHist()'
C-n = 'line.nextHist()'
M-c = '''
pager.commandMode = !(console.buffer == pager.buffer);
console[pager.commandMode ? "show" : "hide"]();
'''