From 8497f018ebcd0b3bcfb8852331e6159f3fe08e24 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Tue, 1 Oct 2024 11:28:51 -0700 Subject: [PATCH] Update qutebrowser configs - Formatter swapped some quotes around - Small color tweaks - Hardware decoding --- .config/qutebrowser/config.py | 59 ++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index b2c9207..bba3338 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -1,7 +1,5 @@ -# Make linter shut up -# pylint: disable=C0111,C0103 -c = c # noqa: F821 pylint: disable=E0602,W0127 -config = config # noqa: F821 pylint: disable=E0602,W0127 +c = c # noqa: PLW0127 F821 # pyright: ignore [reportUndefinedVariable] +config = config # noqa: PLW0127 F821 # pyright: ignore [reportUndefinedVariable] # %%base16_template: qutebrowser##default %% base00 = "#000000" @@ -81,10 +79,10 @@ 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 -# Background color of the context menu’s selected item. If set to null, the Qt default is used. +# Background color of the context menu's selected item. If set to null, the Qt default is used. c.colors.contextmenu.selected.bg = base02 -#Foreground color of the context menu’s selected item. If set to null, the Qt default is used. +# Foreground color of the context menu's selected item. If set to null, the Qt default is used. c.colors.contextmenu.selected.fg = base05 # Background color for the download bar. @@ -170,10 +168,10 @@ c.colors.statusbar.normal.fg = base0B c.colors.statusbar.normal.bg = base00 # Foreground color of the statusbar in insert mode. -c.colors.statusbar.insert.fg = base00 +c.colors.statusbar.insert.fg = base05 # Background color of the statusbar in insert mode. -c.colors.statusbar.insert.bg = base0D +c.colors.statusbar.insert.bg = base02 # Foreground color of the statusbar in passthrough mode. c.colors.statusbar.passthrough.fg = base00 @@ -294,13 +292,10 @@ c.colors.tabs.selected.even.fg = base05 # Background color of selected even tabs. c.colors.tabs.selected.even.bg = base02 -# Background color for webpages if unset (or empty to use the theme's -# color). -# c.colors.webpage.bg = base00 # %%base16_template_end%% -### END COLOR SCHEME +# END COLOR SCHEME c.fonts.default_size = "10pt" c.fonts.default_family = "monospace" @@ -312,39 +307,51 @@ c.tabs.show = "multiple" c.content.autoplay = False # Sites that honor UA pref will serve dark themes -c.colors.webpage.preferred_color_scheme = 'dark' +c.colors.webpage.preferred_color_scheme = "dark" # Allow notifications c.content.notifications.enabled = True # Enable spellcheck -c.spellcheck.languages = ['en-US'] +c.spellcheck.languages = ["en-US"] # Open Tabs in background c.tabs.background = True # Homepage DDG -c.url.default_page = 'https://start.duckduckgo.com' +c.url.default_page = "https://start.duckduckgo.com" # Use vim for editing with ^E -c.editor.command = ['/home/trysdyn/bin/kitty-float', 'vim', '{file}'] +c.editor.command = ["foot", "vim", "{file}"] # Custom bindings -config.bind(',m', 'spawn mpv --force-window {url}') -config.bind(',M', 'hint links spawn mpv --force-window {hint-url}') +config.bind(",m", "spawn mpv --force-window {url}") +config.bind(",M", "hint links spawn mpv --force-window {hint-url}") +config.bind("", "hint") +config.bind("", "fake-key ") # Set using both adblock methods available c.content.blocking.enabled = True -c.content.blocking.method = 'both' +c.content.blocking.method = "both" -# Try to get around paywalls and adblock-block with Google Cache -c.aliases['paywall'] = 'open https://www.google.com/search?q=cache:{url}' +# Get HWDec on Wayland +config.set( + "qt.args", + [ + "enable-gpu", + "enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks", + "enable-zero-copy", + "enable-gpu-rasterization", + "ignore-gpu-blocklist", + "enable-accelerated-mjpeg-decode", + "enable-accelerated-video", + "enable-accelerated-video-decode", + "use-gl=desktop", + ], +) -# Remove service workers on start to get around different bugs in Win and Lin -#c.qt.workarounds.remove_service_workers = True - -## Begin site-specific settings and workarounds +# Begin site-specific settings and workarounds # Defeat columbian's paywall -config.set('content.javascript.enabled', False, '*.columbian.com/*') +config.set("content.javascript.enabled", False, "*.columbian.com/*") # noqa: FBT003 config.load_autoconfig()