Simplify qutebrowser config
This commit is contained in:
parent
895a2daf92
commit
9f856bbe47
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue