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.
|
# extra config files manually -- if they exists.
|
||||||
for path in glob.glob(os.path.expanduser('~/.config/qutebrowser/extra/*.py')):
|
for path in glob.glob(os.path.expanduser('~/.config/qutebrowser/extra/*.py')):
|
||||||
try:
|
try:
|
||||||
f = open(path)
|
with open(path) as f:
|
||||||
exec(compile(f.read(), path, 'exec'))
|
exec(compile(f.read(), path, 'exec'))
|
||||||
theme_init(c)
|
|
||||||
f.close()
|
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
def theme_init(c, cfg = {}):
|
|
||||||
## Colors
|
## Colors
|
||||||
palette = {
|
palette = {
|
||||||
'background': '#282a36',
|
'background': '#282a36',
|
||||||
|
@ -20,17 +19,17 @@ def theme_init(c, cfg = {}):
|
||||||
'yellow': '#f1fa8c'
|
'yellow': '#f1fa8c'
|
||||||
}
|
}
|
||||||
|
|
||||||
spacing = cfg.get('spacing', {
|
spacing = {
|
||||||
'vertical': 5,
|
'vertical': 5,
|
||||||
'horizontal': 5
|
'horizontal': 5
|
||||||
})
|
}
|
||||||
|
|
||||||
padding = cfg.get('padding', {
|
padding = {
|
||||||
'top': spacing['vertical'],
|
'top': spacing['vertical'],
|
||||||
'right': spacing['horizontal'],
|
'right': spacing['horizontal'],
|
||||||
'bottom': spacing['vertical'],
|
'bottom': spacing['vertical'],
|
||||||
'left': spacing['horizontal']
|
'left': spacing['horizontal']
|
||||||
})
|
}
|
||||||
|
|
||||||
## Background color of the completion widget category headers.
|
## Background color of the completion widget category headers.
|
||||||
c.colors.completion.category.bg = palette['background']
|
c.colors.completion.category.bg = palette['background']
|
||||||
|
|
Loading…
Reference in a new issue