# pylint: disable=C0111,E0601 # pyflakes: noqa from qutebrowser.config.configfiles import ConfigAPI # noqa: F401 from qutebrowser.config.config import ConfigContainer # noqa: F401 # 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 # Autogenerated config.py # # NOTE: config.py is intended for advanced users who are comfortable # with manually migrating the config file on qutebrowser upgrades. If # you prefer, you can also configure qutebrowser using the # :set/:bind/:config-* commands without having to write a config.py # file. # # Documentation: # qute://help/configuring.html # qute://help/settings.html # Change the argument to True to still load settings configured via # 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 c.aliases = { 'w': 'session-save --only-active-window', 'q': 'quit', 'qa': 'quit', 'wq': 'quit --save', 'wqa': 'quit --save', 'tor': 'config-cycle -p content.proxy socks://localhost:9050/ system', 'toroff': 'set content.proxy system', 'toron': 'set content.proxy socks://localhost:9050' } # Force a Qt platform to use. This sets the `QT_QPA_PLATFORM` # environment variable and is useful to force using the XCB plugin when # running QtWebEngine on Wayland. # Type: String c.qt.force_platform = 'wayland' # Always restore open sites when qutebrowser is reopened. Without this # option set, `:wq` (`:quit --save`) needs to be used to save open tabs # (and restore them), while quitting qutebrowser in any other way will # not save/restore the session. By default, this will save to the # session which was last loaded. This behavior can be customized via the # `session.default_name` setting. # Type: Bool c.auto_save.session = False c.session.lazy_restore = True # Automatically start playing `