about summary refs log blame commit diff stats
path: root/res/config.toml
blob: dcf98951dd4f1a608c7e3bd77ece518bff3ec8c3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
       
                            
                   

                


           

                                                        
                        

                              
          











                                   





                                         

                    
                     
 


                    






                                          
 


                        
         

                    

                             
                   
                        
                              
                      
                   
                

                                    
 

               
                                                                                                                                  
 
      
            
                 







                                    

                                   




                              
                             
                                
                                
                              
                                  
                               









                                  

                                

                                  



                                 

                     
                          
                    
                          
                                            
                    

                     
                        
                                                           
                                                         
                        








                                        


                           
                           
                          
                                   
                          

                                   
                       

                               

                              

                        



                                                                  
         
       
                                                               













                                                                                       
   

      




















                            

                       
         



                                                        
   



                          
[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 = true

[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 = '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.cursorPrevWord()'
w = 'pager.cursorNextWord()'
'[' = 'pager.cursorPrevLink()'
']' = 'pager.cursorNextLink()'
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)'
'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 = '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?)");
}
'''
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()'