From f43e62d9e49811a7bc3cdb6f642747f0905df563 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Mon, 30 Oct 2023 22:38:21 +0000 Subject: [PATCH] qutebrowser: tidy config file Remove unused redirector and remove top comment. --- qutebrowser/config.py | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/qutebrowser/config.py b/qutebrowser/config.py index 3988c42..6a55fd1 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -1,15 +1,4 @@ # noqa: D100 -## 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 from qutebrowser.config.configfiles import ConfigAPI from qutebrowser.config.config import ConfigContainer @@ -17,6 +6,7 @@ from qutebrowser.config.config import ConfigContainer c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103 config: ConfigAPI = config # noqa: F821 pylint: disable=E0602,C0103 + def in_terminal(cmd: list): """Wraps cmd to be run in the default TERMINAL, as set by environment. @@ -27,31 +17,6 @@ def in_terminal(cmd: list): t = getenv('TERMINAL', 'xterm') return [t, '-e'] + cmd -try: - from qutebrowser.api import interceptor, message - from PyQt5.QtCore import QUrl - - def intercept(info: interceptor.Request): - url = info.request_url - if url.host() == "twitter.com": - url.setHost("nitter.eu") - message.info("Redirecting to " + url.toString()) - info.redirect(url) - if url.host() == "xkcd.com": - url.setHost("m.xkcd.com") - message.info("Redirecting to " + url.toString()) - info.redirect(url) - if url.host() == "www.bristolpost.co.uk": - url.setUrl("https://outline.com/" + url.toString()) - message.info("Redirecting to " + url.toString()) - info.redirect(url) - - #FIXME: trying this disabled for a bit to test if qb crashes less - #2022-08-16 enabling it again (and off again) - # yeah crashed immediately - # interceptor.register(intercept) -except ImportError: - pass ## This is here so configs done via the GUI are still loaded. ## Remove it to not load settings done via the GUI. -- 2.48.1