Simplify qutebrowser config

This commit is contained in:
Henrik Lissner 2021-02-02 01:32:43 -05:00
parent 895a2daf92
commit 9f856bbe47
2 changed files with 201 additions and 204 deletions

View file

@ -434,9 +434,7 @@ config.bind('<Ctrl-F>', 'rl-forward-word', mode='prompt')
# extra config files manually -- if they exists.
for path in glob.glob(os.path.expanduser('~/.config/qutebrowser/extra/*.py')):
try:
f = open(path)
with open(path) as f:
exec(compile(f.read(), path, 'exec'))
theme_init(c)
f.close()
except IOError:
pass

View file

@ -1,4 +1,3 @@
def theme_init(c, cfg = {}):
## Colors
palette = {
'background': '#282a36',
@ -20,17 +19,17 @@ def theme_init(c, cfg = {}):
'yellow': '#f1fa8c'
}
spacing = cfg.get('spacing', {
spacing = {
'vertical': 5,
'horizontal': 5
})
}
padding = cfg.get('padding', {
padding = {
'top': spacing['vertical'],
'right': spacing['horizontal'],
'bottom': spacing['vertical'],
'left': spacing['horizontal']
})
}
## Background color of the completion widget category headers.
c.colors.completion.category.bg = palette['background']