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
|
import os
# Keybindings
mpv_cmd = 'mpv'
config.bind('x', f'spawn {mpv_cmd} {{url}}')
config.bind(',x', f'hint links spawn {mpv_cmd} {{hint-url}}')
config.bind('<Ctrl-l>', 'spawn --userscript password_fill')
terminal = os.environ['TERMINAL']
if terminal in ["st", "urxvt", "alacritty"]:
c.editor.command = [terminal, "-e", os.environ['VISUAL'], "{}"]
else:
c.editor.command = [terminal, "-e", f"{os.environ['VISUAL']} {{}}"]
c.content.headers.do_not_track = True
# Disable javascript by default
config.set('content.javascript.enabled', False)
config.set('content.cookies.accept', 'no-3rdparty')
config.set('content.autoplay', False)
# Load autoconfig to enable javascript on trusted domains
config.load_autoconfig()
# Load theme
import theme
# set qutebrowser colors
for setting, color in theme.theme.items():
config.set(setting, color)
# request dark mode from pages
config.set("colors.webpage.preferred_color_scheme", "dark")
|