[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" ] urimethodmap = [ "~/.urimethodmap", "~/.w3m/urimethodmap", "/etc/urimethodmap", "/usr/local/etc/w3m/urimethodmap" ] tmpdir = "/tmp/cha" editor = "vi %s +%d" w3m-cgi-compat = false cgi-dir = "${%CHA_LIBEXEC_DIR}/cgi-bin" [network] max-redirect = 10 prepend-scheme = "https://" prepend-https = true # deprecated, kept only for backwards-compatibility default-headers = { User-Agent = "chawan", Accept = "text/html,text/*;q=0.5", Accept-Encoding = "gzip, deflate", 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" highlight-marks = true 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 = 'n => pager.cursorLeft(n)' j = 'n => pager.cursorDown(n)' k = 'n => pager.cursorUp(n)' l = 'n => pager.cursorRight(n)' 'M-[D' = 'n => pager.cursorLeft(n)' 'M-[B' = 'n => pager.cursorDown(n)' 'M-[A' = 'n => pager.cursorUp(n)' 'M-[C' = 'n => pager.cursorRight(n)' '0' = 'pager.cursorLineBegin()' '^' = 'pager.cursorLineTextStart()' '$' = 'pager.cursorLineEnd()' b = 'pager.cursorViWordBegin()' e = 'pager.cursorViWordEnd()' w = 'pager.cursorNextViWord()' B = 'pager.cursorBigWordBegin()' E = 'pager.cursorBigWordEnd()' W = 'pager.cursorNextBigWord()' '[' = 'n => pager.cursorPrevLink(n)' ']' = 'n => pager.cursorNextLink(n)' '{' = 'n => pager.cursorPrevParagraph(n)' '}' = 'n => pager.cursorNextParagraph(n)' H = 'n => pager.cursorTop(n)' M = '() => pager.cursorMiddle()' L = 'n => pager.cursorBottom(n)' ';' = 'pager.cursorLeftEdge()' '+' = 'pager.cursorMiddleColumn()' '@' = 'pager.cursorRightEdge()' C-d = 'n => pager.halfPageDown(n)' C-u = 'n => pager.halfPageUp(n)' C-f = 'n => pager.pageDown(n)' C-b = 'n => pager.pageUp(n)' 'M-[6~' = 'n => pager.pageDown(n)' 'M-[5~' = 'n => pager.pageUp(n)' 'zH'= 'n => pager.pageLeft(n)' 'zL' = 'n => pager.pageRight(n)' '<' = 'n => pager.pageLeft(n)' '>' = 'n => pager.pageRight(n)' C-e = 'n => pager.scrollDown(n)' C-y = 'n => pager.scrollUp(n)' m = ''' async () => { const c = await pager.askChar("m"); if (c.charCodeAt() != 3) /* ctrl-c */ pager.setMark(c); } ''' '`' = ''' async () => { const c = await pager.askChar('`'); if (c.charCodeAt() != 3) /* C-c */ pager.gotoMark(c); } ''' "'" = ''' async () => { const c = await pager.askChar('`'); if (c.charCodeAt() != 3) /* C-c */ pager.gotoMarkY(c); } ''' 'zh'= 'n => pager.scrollLeft(n)' 'zl' = 'n => pager.scrollRight(n)' J = 'n => pager.scrollDown(n)' K = 'n => pager.scrollUp(n)' '('= 'n => pager.scrollLeft(n)' ')' = 'n => pager.scrollRight(n)' 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()' gg = 'n => n ? pager.gotoLine(n) : pager.cursorFirstLine()' G = 'n => n ? pager.gotoLine(n) : pager.cursorLastLine()' M-g = 'pager.gotoLine()' 'z.' = 'n => pager.centerLineBegin(n)' 'zC-m' = 'n => pager.raisePageBegin(n)' 'zC-j' = 'n => pager.raisePageBegin(n)' 'z-' = 'n => pager.lowerPageBegin(n)' zz = 'n => pager.centerLine(n)' 'zt' = 'n => pager.raisePage(n)' 'zb' = 'n => pager.lowerPage(n)' 'z+' = 'n => pager.nextPageBegin(n)' 'z^' = 'n => pager.previousPageBegin(n)' C-g = 'pager.lineInfo()' v = 'n => pager.cursorToggleSelection(n)' V = 'n => pager.cursorToggleSelection(n, {selectionType: "line"})' C-v = 'n => pager.cursorToggleSelection(n, {selectionType: "block"})' y = ''' async () => { if (!pager.currentSelection) { feedNext(); return; } const text = await pager.getSelectionText(pager.currentSelection); if (pager.externInto('xsel -bi', text)) pager.alert("Copied selection to clipboard."); else pager.alert("Failed to copy selection to clipboard. (Is xsel installed?)"); pager.cursorToggleSelection(); } ''' '\' = '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 = 'n => pager.searchNext(n)' N = 'n => pager.searchPrev(n)' c = 'pager.peek()' u = 'pager.peekCursor()' C-w = ''' config.search.wrap = !config.search.wrap; pager.alert("Wrap search " + (config.search.wrap ? "on" : "off")); ''' M-y = ''' () => { if (pager.extern('printf \'%s\' "$CHA_URL" | xsel -bi', {suspend: false, setenv: true})) pager.alert("Copied URL to clipboard."); else pager.alert("Failed to copy URL to clipboard. (Is xsel installed?)"); } ''' yc = ''' () => { const link = pager.hoverLink if (!link) pager.alert("Please move the cursor above a link and try again."); else if (pager.externInto('xsel -bi', link)) pager.alert("Copied URL to clipboard."); else pager.alert("Failed to copy URL to clipboard. (Is xsel installed?)"); } ''' M-p = ''' () => { const s = pager.externCapture('xsel -bo'); if (s === null) pager.alert("Failed to read URL from clipboard. (Is xsel installed?)"); else pager.load(s + '\n'); } ''' [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 = ''' if ((pager.commandMode = consoleBuffer != pager.buffer)) console.show(); else console.hide(); ''' 'M-[D' = 'line.backward()' 'M-[B' = 'line.nextHist()' 'M-[A' = 'line.prevHist()' 'M-[C' = 'line.forward()'