This feature request maybe a little out there, not sure...
The i3wm for example lets you source colors for it windows, fonts and bar from Xresources with the following command:
set_from_resource $fg i3wm.color5
Maybe there is way also to implement this in the qutebrowser config so that we can source a variable for the colors. For example
tabs.fg.selected.odd = $fg
Then qutebrowser sources those colors while its loading
With the new configuration in v1.0, you can do that yourself in a config.py - I think @pkillnine had something like that?
Something like this can be used in your config.py:
def read_xresources(prefix):
props = {}
x = subprocess.run(['xrdb', '-query'], stdout=subprocess.PIPE)
lines = x.stdout.decode().split('\n')
for line in filter(lambda l : l.startswith(prefix), lines):
prop, _, value = line.partition(':\t')
props[prop] = value
return props
xresources = read_xresources('*')
c.colors.statusbar.normal.bg = xresources['*background']
I got the read_xresources from someone on IRC, can't remember who (sorry :P).
I added this to https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc#reading-colors-from-xresources now.
Most helpful comment
Something like this can be used in your config.py:
I got the
read_xresourcesfrom someone on IRC, can't remember who (sorry :P).