From f85e083345472696b2af83fedb14f1dcc1fc3023 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Sun, 4 Apr 2021 21:46:54 -0700 Subject: [PATCH] Fix linter on qutebrowser config, set editor, add paywall handling --- .config/qutebrowser/config.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index e467cf4..f1f363c 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -1,3 +1,8 @@ +# Make linter shut up +# pylint: disable=C0111,C0103 +c = c # noqa: F821 pylint: disable=E0602,W0127 +config = config # noqa: F821 pylint: disable=E0602,W0127 + # %%base16_template: qutebrowser##default %% base00 = "#000000" base01 = "#202020" @@ -74,7 +79,7 @@ c.colors.contextmenu.disabled.fg = base04 c.colors.contextmenu.menu.bg = base00 # Foreground color of the context menu. If set to null, the Qt default is used. -c.colors.contextmenu.menu.fg = base05 +c.colors.contextmenu.menu.fg = base05 # Background color of the context menu’s selected item. If set to null, the Qt default is used. c.colors.contextmenu.selected.bg = base02 @@ -315,8 +320,14 @@ c.tabs.background = True # Homepage DDG c.url.default_page = 'https://start.duckduckgo.com' +# Use vim for editing with ^E +c.editor.command = ['x-terminal-emulator', 'vim', '{file}'] + # Custom bindings config.bind(',m', 'spawn mpv {url}') config.bind(',M', 'hint links spawn mpv {hint-url}') +# Try to get around paywalls and adblock-block with Google Cache +c.aliases['paywall'] = 'open https://www.google.com/search?q=cache:{url}' + config.load_autoconfig()