diff options
| author | Philip Wittamore <philip@wittamore.com> | 2026-05-03 12:35:28 +0200 |
|---|---|---|
| committer | Philip Wittamore <philip@wittamore.com> | 2026-05-03 12:35:28 +0200 |
| commit | fc25af426d106dec38e6681996e7eae592374975 (patch) | |
| tree | dbeada7cad50b51c961f2446fb1efced9999cb81 /config.toml | |
Diffstat (limited to 'config.toml')
| -rwxr-xr-x | config.toml | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/config.toml b/config.toml new file mode 100755 index 0000000..f7fea92 --- /dev/null +++ b/config.toml @@ -0,0 +1,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;} +} +''' + + + + + |
