Hi there, started to manage my terminal colors and gtk theme with pywal
and went to qutebrowser theming at some point. Here the summary of what i found. You don’t need to use pywal
yourself, it just updates .Xresources and some other templates for me.
Here the examples of how you can color it:
Got some interest? Here we go. Few simple steps:
- Add loading colors from
.Xresources
to very beginning of yourconfig.py
ofqutebrowser
import subprocess
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('*')
# can be userd now like `c.colors.statusbar.normal.bg = xresources['*.background']`
-
Now you can customize your config with new colors from
.Xresources
or use part of my config, which available here. -
You can reload running instance of
qutebrowser
with simplepython
script, check it here.
Don’t hesitate to play with the coloring qute UI in config.