config.py 1.12 KB
Newer Older
1
2
from qutebrowser.config.configfiles import ConfigAPI  # noqa: F401
from qutebrowser.config.config import ConfigContainer # noqa: F401
Jay Kamat's avatar
Jay Kamat committed
3

Jay Kamat's avatar
Jay Kamat committed
4
5
import sys, os

Jay Kamat's avatar
Jay Kamat committed
6
config = config  # type: ConfigAPI # noqa: F821 pylint: disable=E0602,C0103
Jay Kamat's avatar
Jay Kamat committed
7
c = c  # type: ConfigContainer # noqa: F821 pylint: disable=E0602,C0103
8

9
10
# Load autoconfig before the rest of python config
config.load_autoconfig()
Jay Kamat's avatar
Jay Kamat committed
11

Jay Kamat's avatar
Jay Kamat committed
12
13
14
config.source('pyconfig/aliases.py')
config.source('pyconfig/themes.py')
config.source('pyconfig/bunny.py')
Jay Kamat's avatar
Jay Kamat committed
15
config.source('pyconfig/chrome-tz-workaround.py')
16

Jay Kamat's avatar
Jay Kamat committed
17

Jay Kamat's avatar
Jay Kamat committed
18
19
20
21
22
try:
	from qutebrowser.api import message

	# 'plugins'
	config.source('pyconfig/qute-tracemalloc.py')
23
	config.source('pyconfig/qute-cprofile.py')
Jay Kamat's avatar
Jay Kamat committed
24

Jay Kamat's avatar
Jay Kamat committed
25
	config.source('pyconfig/redirectors.py')
Jay Kamat's avatar
Jay Kamat committed
26
	config.source('pyconfig/smartyank.py')
Jay Kamat's avatar
Jay Kamat committed
27

Jay Kamat's avatar
Jay Kamat committed
28
29
	sys.path.append(os.path.join(sys.path[0], 'jmatrix'))
	config.source("jmatrix/jmatrix/integrations/qutebrowser.py")
Jay Kamat's avatar
Jay Kamat committed
30
31
32
	sys.path.append(os.path.join(sys.path[0], 'jblock'))
	config.source("jblock/jblock/integrations/qutebrowser.py")

33
34
35
	# must load late as possible
	config.source("pyconfig/whitelist-first-party.py")

Jay Kamat's avatar
Jay Kamat committed
36
37
38
except ImportError:
	pass

Jay Kamat's avatar
Jay Kamat committed
39
config.source('qutenyan/nyan.py')