-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqutebrowser_config.py
66 lines (49 loc) · 2.23 KB
/
qutebrowser_config.py
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
#print(c.bindings.commands)
c.tabs.position = "left"
c.tabs.show = "multiple"
c.auto_save.session = True
c.completion.use_best_match = True
c.content.cookies.store = False
c.content.geolocation = False
c.content.tls.certificate_errors = "ask-block-thirdparty" # Block all invalid HTTPS certificate requests (often google ads)
c.content.javascript.can_access_clipboard = True
c.editor.command = [ "emacsclient", "-c", "-e", "(quickedit \"{file}\" {line} {column})" ]
c.downloads.location.directory = "~/Downloads/"
c.downloads.location.prompt = False
c.content.headers.user_agent = "Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {qt_key}/{qt_version} {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}"
config.bind('n', 'run-with-count 2 scroll down')
config.bind('e', 'run-with-count 2 scroll up')
config.bind('y', 'scroll left')
config.bind('o', 'scroll right')
config.bind('O', 'set-cmd-text -s :open ')
config.bind('t', 'set-cmd-text -s :open -t ')
config.bind('s', 'tab-focus stack-prev')
config.bind('h', 'tab-focus stack-next')
config.bind('<Ctrl-s>', 'tab-prev')
config.bind('<Ctrl-h>', 'tab-next')
# <Alt-Num> for jumping to tab Num
config.bind('<Ctrl-k>', 'tab-clone')
config.bind('<Ctrl-O>', 'back')
config.bind('<Ctrl-F>', 'forward')
config.bind('<Ctrl-I>', 'forward')
config.bind('k', 'search-next')
config.bind('K', 'search-prev')
# config.bind('<Ctrl-i>', 'open-editor')
config.bind('<Ctrl-i>', 'open-editor', mode="insert")
config.bind('j', 'yank pretty-url')
config.bind('<Ctrl-0>', 'zoom 100')
config.bind('<Ctrl-Alt-H>', 'history')
config.bind(',m', "spawn mpv {url}")
config.bind(',M', "hint links spawn mpv {hint-url}")
config.bind(',z', "jseval var d=document,s=d.createElement('script');s.src='https://www.zotero.org/bookmarklet/loader.js';(d.body?d.body:d.documentElement).appendChild(s);void(0);")
# Remove binding to close all other tabs
config.unbind('co')
# Set the default font family
c.fonts.default_family = "Arial"
c.fonts.default_size = "12pt"
# tabbar
def makePadding(top, bottom, left, right):
return { 'top': top, 'bottom': bottom, 'left': left , 'right': right }
c.tabs.padding = makePadding(3,1,8,8)
c.tabs.indicator.padding = makePadding(0,0,0,0)
config.load_autoconfig()