diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 0ec5daa..505f58d 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -2,7 +2,11 @@ # pyflakes: noqa from qutebrowser.config.configfiles import ConfigAPI # noqa: F401 from qutebrowser.config.config import ConfigContainer # noqa: F401 -import dracula.draw +# import dracula.draw + +import os +from urllib.request import urlopen + config: ConfigAPI = config # noqa: F821 pylint: disable=E0602,C0103 c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103 # ref: https://www.qutebrowser.org/doc/help/configuring.html @@ -23,6 +27,18 @@ c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103 # autoconfig.yml config.load_autoconfig(False) + +if not os.path.exists(config.configdir / "theme.py"): + theme = "https://raw.githubusercontent.com/catppuccin/qutebrowser/main/setup.py" + with urlopen(theme) as themehtml: + with open(config.configdir / "theme.py", "a") as file: + file.writelines(themehtml.read().decode("utf-8")) + +if os.path.exists(config.configdir / "theme.py"): + import theme + theme.setup(c, 'mocha', True) + + # Aliases for commands. The keys of the given dictionary are the # aliases, while the values are the commands they map to. # Type: Dict @@ -408,10 +424,10 @@ config.bind('', 'zoom-out') config.bind(',sm', 'set-cmd-text :download --mhtml') -dracula.draw.blood(c, { - 'spacing': { - # set to zero to not alter the default tab sizes - 'vertical': 0, - 'horizontal': 0 - } -}) +#dracula.draw.blood(c, { +# 'spacing': { +# # set to zero to not alter the default tab sizes +# 'vertical': 0, +# 'horizontal': 0 +# } +#})