blob: f7fea920a8bf5a053362c4af13ae562d1632abe6 (
plain)
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
|
[siteconf.wittamore]
host = '(.*\.)?wittamore\.fr'
cookie = true
share-cookie-jar = 'wittamore.fr'
[siteconf.gopher]
url = 'gopher://.*'
autofocus = true
[siteconf.sr-ht]
host = '(.*\.)?sr\.ht'
cookie = true
share-cookie-jar = 'sr.ht'
[encoding]
document-charset = "utf-8"
[display]
highlight-color = "#ffffff"
image-mode = "auto"
[external]
editor = "micro %s"
bookmark = "~/.chawan/bookmarks"
download-dir = "~/Downloads"
[omnirule.ddg]
match = '^ddg:'
substitute-url = '(x) => "https://lite.duckduckgo.com/lite/?kp=-1&kd=-1&q=" + encodeURIComponent(x.split(":").slice(1).join(":"))'
[page]
# Search using DuckDuckGo Lite.
'C-k' = '() => pager.load("ddg:")'
# Lynx style navigation
'M-[A' = '() => pager.cursorPrevLink()'
'M-[B' = '() => pager.cursorNextLink()'
'M-[C' = '() => pager.nextBuffer()'
'M-[D' = '() => pager.prevBuffer()'
#
'M-[7~' = '() => pager.cursorLineBegin()'
'M-[8~' = '() => pager.cursorLineEnd()'
'M-[5~' = '() => pager.scrollUp(5)'
'M-[6~' = '() => pager.scrollDown(5)'
# External commands
gr = "pager.externFilterSource(`rdrview -Hu \"$CHA_URL\"`, null, 'text/html')"
gy = 'pager.extern(`notify-send "opening mpv $u" && mpv "$u" 2>/dev/null &`, {env: {u: pager.hoverLink}})'
gd = 'pager.extern(`notify-send "Downloading $(basename $u)" && curl -s "$u" > "/tmp/$(basename $u)" &`, {env: {u: pager.hoverLink}})'
ge = 'pager.extern(`notify-send "opening email $u" && chawan-email-handler "$u" &`, {env: {u: pager.hoverLink}})'
gt = 'pager.externFilterSource(`trans :en -b`, null, null)'
# FR keyboard replacement
';' = 'cmd.pager.nextBuffer'
[buffer]
images = true
scripting = 'app'
referer-from = true
cookie = 'save'
# filetype display
user-style = '''
plaintext {
white-space: pre-wrap;
text-align: justify;
padding:0 10px 0 10px;
a {color:#00af5f;}
pre::first-line {color:red}
}
@media (-cha-content-type: "text/gopher") {
html {height:100%;width:100%}
html * {cursor:none;}
body {min-height:100%;color: #fffff0;}
pre {padding-left:7ch; margin:0; white-space: pre-wrap;word-wrap: break-word; }
pre::before { content: ' '; width: 0; display: block; }
a {color:#00af5f;}
a[item-type]::before { min-width: 7ch; text-align: right; display: inline-block;
white-space: pre; text-decoration: none; color:#222;}
a[item-type]::before { content:""; }
a[item-type='1']::before { content:" 📁 "; }
a[item-type='3']::before { content:" ⚠ "; color:red; }
a[item-type='7']::before { content:" ? "; }
a[item-type='h']::before { content:" 🌐 "; }
}
@media (-cha-content-type: "text/markdown") {
h1 {color:#0087ff;}
h2 {color:#00d787;}
h3 {color:#d7afaf;}
h4 {color:#ffffaf;}
h5 {color:#ffaf5f;}
h6 {color:#d7afff;}
h7 {color:#87875f;}
b,code,em {color:#808080;}
a {color:#00af5f;}
table {color:#ffffff;background-color:#870000;}
}
'''
|