-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
120 lines (101 loc) · 4.55 KB
/
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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# defaults
config.load_autoconfig(False)
config.set('content.cookies.accept', 'all', 'chrome-devtools://*')
config.set('content.cookies.accept', 'all', 'devtools://*')
# config.set('content.headers.accept_language', '', 'https://matchmaker.krunker.io/*')
config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}', 'https://web.whatsapp.com/')
config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:90.0) Gecko/20100101 Firefox/90.0', 'https://accounts.google.com/*')
config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36', 'https://*.slack.com/*')
config.set('content.images', True, 'chrome-devtools://*')
config.set('content.images', True, 'devtools://*')
config.set('content.javascript.enabled', True, 'chrome-devtools://*')
config.set('content.javascript.enabled', True, 'devtools://*')
config.set('content.javascript.enabled', True, 'chrome://*/*')
config.set('content.javascript.enabled', True, 'qute://*/*')
# Disable "do not track" header for certain websites
c.content.headers.do_not_track = False
# config.set('content.headers.do_not_track', False, '*://chat.openai.com/*')
# colors
c.tabs.show = 'multiple'
config.source('colors.py')
# config.bind(',', 'config-cycle content.user_stylesheets ~/css/solarized-dark-all-sites.css ""')
# font
c.fonts.default_family = 'Bitstream Vera Sans Mono'
# c.fonts.default_size = '10pt'
# settings
c.qt.force_platform = 'wayland'
config.set('content.javascript.clipboard', 'access-paste')
c.editor.command = ['kitty', 'nvim', '{file}', '-c', 'normal {line}G{column0}l']
c.messages.timeout = 1000
## fileselect
c.fileselect.handler = 'external'
c.fileselect.folder.command = ['qutebrowser-fileselect.sh', 'directory', '{}']
c.fileselect.single_file.command = ['qutebrowser-fileselect.sh', 'file', '{}']
c.fileselect.multiple_files.command = ['qutebrowser-fileselect.sh', 'files', '{}']
## statusbar
c.statusbar.widgets = ['url', 'scroll', 'progress']
## search engines
config.source('search_engines.py')
c.url.searchengines['gh'] = 'https://github.com/search?q={}'
c.url.searchengines['ghf'] = 'https://github.com/fritzrehde/{}'
c.url.searchengines['yt'] = 'https://youtube.com/search?q={}'
c.url.searchengines['go'] = 'https://google.com/search?q={}'
c.url.searchengines['maps'] = 'https://www.google.com/maps/search/?api=1&query={}'
c.url.searchengines['amaz'] = 'https://amazon.de/s?k={}'
# c.url.searchengines['rs'] = 'https://doc.rust-lang.org/search?q={}'
## downloads
c.downloads.location.directory = '~/Downloads'
c.downloads.location.prompt = False
c.downloads.position = 'bottom'
c.downloads.remove_finished = 0
## completion
c.completion.open_categories = ['quickmarks', 'history']
## tabs
c.tabs.title.format = "{audio}{index}: {current_title}"
# keybindings
# config.unbind('<Alt-v>')
config.bind('<Alt-r>', 'config-source ;; message-info "qutebrowser reloaded"')
config.bind('<Alt-p>', 'spawn --userscript qute-pass')
# config.bind('<Alt-P>', 'spawn --userscript qute-pass --password-only')
## zoom
config.bind('-', 'zoom-out')
config.bind('=', 'zoom-in')
config.bind('0', 'zoom')
config.bind('<Alt-f>', 'fullscreen')
## scrolling
config.bind('J', 'scroll-page 0 1')
config.bind('K', 'scroll-page 0 -1')
## tabs
config.bind('<Alt-j>', 'tab-prev')
config.bind('<Alt-k>', 'tab-next')
config.bind('<Alt-Left>', 'tab-move -')
config.bind('<Alt-Right>', 'tab-move +')
config.bind('<Alt-n>', 'cmd-set-text -s :open -t')
config.bind('<Alt-o>', 'cmd-set-text -s :open -t {url}')
config.bind('<Alt-Shift-n>', 'cmd-set-text -s :open -p')
config.bind('<Alt-b>', 'cmd-set-text -s :quickmark-load -t')
config.bind('x', 'tab-close')
config.unbind('d')
config.bind('w', 'tab-give')
config.bind('t', 'selection-follow --tab')
# config.bind('vt', 'tab-give')
## yank
config.bind('yy', 'yank --quiet url')
config.bind('yf', 'hint links yank')
config.bind('yt', 'open --related --tab {url}')
config.bind('yw', 'open --window {url}')
## history
config.bind('H', 'back')
config.bind('L', 'forward')
## hints
config.bind('i', 'hint --first inputs')
config.bind('I', 'hint inputs')
config.bind('<Alt-i>', 'mode-enter passthrough')
config.bind('q', 'jseval -q document.activeElement.blur()')
config.bind('<Escape>', 'mode-leave ;; jseval -q document.activeElement.blur()', mode='insert')
## marks
# config.bind('m', 'set-cmd-text -s :set-mark')
# config.bind('M', 'set-cmd-text -s :jump-mark')
## paste
config.bind('p', 'open -- {clipboard}')
config.bind('P', 'open -t -- {clipboard}')