From: Andre Ramnitz Date: Fri, 8 Dec 2023 20:13:06 +0000 (+0100) Subject: qutebrowser: autorewrite of config.py after Qt6 migration X-Git-Tag: v0.2~375 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=e6912bed800c61ae51184daf51dc99b2a0cc6a46;p=dotfiles.git qutebrowser: autorewrite of config.py after Qt6 migration --- diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index 7825b1d9..63e3d296 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -23,6 +23,7 @@ settings: : zoom-out : back : forward + : scroll-page +3 Ctrl-+: zoom-in Ctrl--: zoom-out E: edit-url diff --git a/qutebrowser/config.py b/qutebrowser/config.py index 60477411..22c00600 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -1,368 +1,1284 @@ -import subprocess -config.load_autoconfig() - -## testing +# Autogenerated config.py # -config.bind('', 'spawn --userscript qute-keepassxc --key 285D16B66B11BD45BFD57B6CB22C3113D0E83104', mode='insert') -config.bind('pw', 'spawn --userscript qute-keepassxc --key 285D16B66B11BD45BFD57B6CB22C3113D0E83104', mode='normal') - -## Generic +# 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. # -c.auto_save.session = True +# 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) + +# Require a confirmation before quitting the application. +# Type: ConfirmQuit +# Valid values: +# - always: Always show a confirmation. +# - multiple-tabs: Show a confirmation if multiple tabs are opened. +# - downloads: Show a confirmation if downloads are running +# - never: Never show a confirmation. +c.confirm_quit = ['never'] + +# When to show a changelog after qutebrowser was upgraded. +# Type: String +# Valid values: +# - major: Show changelog for major upgrades (e.g. v2.0.0 -> v3.0.0). +# - minor: Show changelog for major and minor upgrades (e.g. v2.0.0 -> v2.1.0). +# - patch: Show changelog for major, minor and patch upgrades (e.g. v2.0.0 -> v2.0.1). +# - never: Never show changelog after upgrades. +c.changelog_after_upgrade = 'patch' + +# How to open links in an existing instance if a new one is launched. +# This happens when e.g. opening a link from a terminal. See +# `new_instance_open_target_window` to customize in which window the +# link is opened in. +# Type: String +# Valid values: +# - tab: Open a new tab in the existing window and activate the window. +# - tab-bg: Open a new background tab in the existing window and activate the window. +# - tab-silent: Open a new tab in the existing window without activating the window. +# - tab-bg-silent: Open a new background tab in the existing window without activating the window. +# - window: Open in a new window. +# - private-window: Open in a new private window. +c.new_instance_open_target = 'tab-bg' + +# Load a restored tab as soon as it takes focus. +# Type: Bool c.session.lazy_restore = True + +# Backend to use to display websites. qutebrowser supports two different +# web rendering engines / backends, QtWebEngine and QtWebKit (not +# recommended). QtWebEngine is Qt's official successor to QtWebKit, and +# both the default/recommended backend. It's based on a stripped-down +# Chromium and regularly updated with security fixes and new features by +# the Qt project: https://wiki.qt.io/QtWebEngine QtWebKit was +# qutebrowser's original backend when the project was started. However, +# support for QtWebKit was discontinued by the Qt project with Qt 5.6 in +# 2016. The development of QtWebKit was picked up in an official fork: +# https://github.com/qtwebkit/qtwebkit - however, the project seems to +# have stalled again. The latest release (5.212.0 Alpha 4) from March +# 2020 is based on a WebKit version from 2016, with many known security +# vulnerabilities. Additionally, there is no process isolation and +# sandboxing. Due to all those issues, while support for QtWebKit is +# still available in qutebrowser for now, using it is strongly +# discouraged. +# Type: String +# Valid values: +# - webengine: Use QtWebEngine (based on Chromium - recommended). +# - webkit: Use QtWebKit (based on WebKit, similar to Safari - many known security issues!). +c.backend = 'webengine' + +# Force software rendering for QtWebEngine. This is needed for +# QtWebEngine to work with Nouveau drivers and can be useful in other +# scenarios related to graphic issues. +# Type: String +# Valid values: +# - software-opengl: Tell LibGL to use a software implementation of GL (`LIBGL_ALWAYS_SOFTWARE` / `QT_XCB_FORCE_SOFTWARE_OPENGL`) +# - qt-quick: Tell Qt Quick to use a software renderer instead of OpenGL. (`QT_QUICK_BACKEND=software`) +# - chromium: Tell Chromium to disable GPU support and use Skia software rendering instead. (`--disable-gpu`) +# - none: Don't force software rendering. +c.qt.force_software_rendering = 'chromium' + +# 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 = None + +# Force a Qt platformtheme to use. This sets the `QT_QPA_PLATFORMTHEME` +# environment variable which controls dialogs like the filepicker. By +# default, Qt determines the platform theme based on the desktop +# environment. +# Type: String +c.qt.force_platformtheme = 'qt6ct' + +# Which Chromium process model to use. Alternative process models use +# less resources, but decrease security and robustness. See the +# following pages for more details: - +# https://www.chromium.org/developers/design-documents/process-models +# - https://doc.qt.io/qt-6/qtwebengine-features.html#process-models +# Type: String +# Valid values: +# - process-per-site-instance: Pages from separate sites are put into separate processes and separate visits to the same site are also isolated. +# - process-per-site: Pages from separate sites are put into separate processes. Unlike Process per Site Instance, all visits to the same site will share an OS process. The benefit of this model is reduced memory consumption, because more web pages will share processes. The drawbacks include reduced security, robustness, and responsiveness. +# - single-process: Run all tabs in a single process. This should be used for debugging purposes only, and it disables `:open --private`. +c.qt.chromium.process_model = 'process-per-site' + +# Turn on Qt HighDPI scaling. This is equivalent to setting +# QT_ENABLE_HIGHDPI_SCALING=1 (Qt >= 5.14) in the environment. It's off +# by default as it can cause issues with some bitmap fonts. As an +# alternative to this, it's possible to set font sizes and the +# `zoom.default` setting. +# Type: Bool +c.qt.highdpi = False + +# 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 = True + +# Automatically start playing `