nixos/config/qutebrowser/config.py

200 lines
9.1 KiB
Python
Raw Permalink Normal View History

2023-07-05 00:30:44 +04:00
# 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)
# Which cookies to accept. With QtWebEngine, this setting also controls
# other features with tracking capabilities similar to those of cookies;
# including IndexedDB, DOM storage, filesystem API, service workers, and
# AppCache. Note that with QtWebKit, only `all` and `never` are
# supported as per-domain values. Setting `no-3rdparty` or `no-
# unknown-3rdparty` per-domain on QtWebKit will have the same effect as
# `all`. If this setting is used with URL patterns, the pattern gets
# applied to the origin/first party URL of the page making the request,
# not the request URL. With QtWebEngine 5.15.0+, paths will be stripped
# from URLs, so URL patterns using paths will not match. With
# QtWebEngine 5.15.2+, subdomains are additionally stripped as well, so
# you will typically need to set this setting for `example.com` when the
# cookie is set on `somesubdomain.example.com` for it to work properly.
# To debug issues with this setting, start qutebrowser with `--debug
# --logfilter network --debug-flag log-cookies` which will show all
# cookies being set.
# Type: String
# Valid values:
# - all: Accept all cookies.
# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
# - never: Don't accept cookies at all.
2023-08-10 14:42:24 +04:00
config.set("content.cookies.accept", "all", "chrome-devtools://*")
2023-07-05 00:30:44 +04:00
# Which cookies to accept. With QtWebEngine, this setting also controls
# other features with tracking capabilities similar to those of cookies;
# including IndexedDB, DOM storage, filesystem API, service workers, and
# AppCache. Note that with QtWebKit, only `all` and `never` are
# supported as per-domain values. Setting `no-3rdparty` or `no-
# unknown-3rdparty` per-domain on QtWebKit will have the same effect as
# `all`. If this setting is used with URL patterns, the pattern gets
# applied to the origin/first party URL of the page making the request,
# not the request URL. With QtWebEngine 5.15.0+, paths will be stripped
# from URLs, so URL patterns using paths will not match. With
# QtWebEngine 5.15.2+, subdomains are additionally stripped as well, so
# you will typically need to set this setting for `example.com` when the
# cookie is set on `somesubdomain.example.com` for it to work properly.
# To debug issues with this setting, start qutebrowser with `--debug
# --logfilter network --debug-flag log-cookies` which will show all
# cookies being set.
# Type: String
# Valid values:
# - all: Accept all cookies.
# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
# - never: Don't accept cookies at all.
2023-08-10 14:42:24 +04:00
config.set("content.cookies.accept", "all", "devtools://*")
2023-07-05 00:30:44 +04:00
# Value to send in the `Accept-Language` header. Note that the value
# read from JavaScript is always the global value.
# Type: String
2023-08-10 14:42:24 +04:00
config.set("content.headers.accept_language", "", "https://matchmaker.krunker.io/*")
2023-07-05 00:30:44 +04:00
# User agent to send. The following placeholders are defined: *
# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
# The underlying WebKit version (set to a fixed value with
# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
# QtWebEngine. * `{qt_version}`: The underlying Qt version. *
# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
# QtWebEngine. * `{upstream_browser_version}`: The corresponding
# Safari/Chrome version. * `{qutebrowser_version}`: The currently
# running qutebrowser version. The default value is equal to the
# unchanged user agent of QtWebKit/QtWebEngine. Note that the value
# read from JavaScript is always the global value. With QtWebEngine
# between 5.12 and 5.14 (inclusive), changing the value exposed to
# JavaScript requires a restart.
# Type: FormatString
2023-08-10 14:42:24 +04:00
config.set(
"content.headers.user_agent",
"Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}",
"https://web.whatsapp.com/",
)
2023-07-05 00:30:44 +04:00
# User agent to send. The following placeholders are defined: *
# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
# The underlying WebKit version (set to a fixed value with
# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
# QtWebEngine. * `{qt_version}`: The underlying Qt version. *
# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
# QtWebEngine. * `{upstream_browser_version}`: The corresponding
# Safari/Chrome version. * `{qutebrowser_version}`: The currently
# running qutebrowser version. The default value is equal to the
# unchanged user agent of QtWebKit/QtWebEngine. Note that the value
# read from JavaScript is always the global value. With QtWebEngine
# between 5.12 and 5.14 (inclusive), changing the value exposed to
# JavaScript requires a restart.
# Type: FormatString
2023-08-10 14:42:24 +04:00
config.set(
"content.headers.user_agent",
"Mozilla/5.0 ({os_info}; rv:90.0) Gecko/20100101 Firefox/90.0",
"https://accounts.google.com/*",
)
2023-07-05 00:30:44 +04:00
# SEarch Engine
c.url.searchengines = {
2023-08-10 14:42:24 +04:00
"DEFAULT": "https://duckduckgo.com/?ia=web&q={}",
"nixpkgs": "https://search.nixos.org/packages?query={}",
"nixopts": "https://search.nixos.org/options?query={}",
2023-07-05 00:30:44 +04:00
}
# User agent to send. The following placeholders are defined: *
# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
# The underlying WebKit version (set to a fixed value with
# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
# QtWebEngine. * `{qt_version}`: The underlying Qt version. *
# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
# QtWebEngine. * `{upstream_browser_version}`: The corresponding
# Safari/Chrome version. * `{qutebrowser_version}`: The currently
# running qutebrowser version. The default value is equal to the
# unchanged user agent of QtWebKit/QtWebEngine. Note that the value
# read from JavaScript is always the global value. With QtWebEngine
# between 5.12 and 5.14 (inclusive), changing the value exposed to
# JavaScript requires a restart.
# Type: FormatString
2023-08-10 14:42:24 +04:00
config.set(
"content.headers.user_agent",
"Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36",
"https://*.slack.com/*",
)
2023-07-05 00:30:44 +04:00
# Load images automatically in web pages.
# Type: Bool
2023-08-10 14:42:24 +04:00
config.set("content.images", True, "chrome-devtools://*")
2023-07-05 00:30:44 +04:00
# Load images automatically in web pages.
# Type: Bool
2023-08-10 14:42:24 +04:00
config.set("content.images", True, "devtools://*")
2023-07-05 00:30:44 +04:00
# Enable JavaScript.
# Type: Bool
2023-08-10 14:42:24 +04:00
config.set("content.javascript.enabled", True, "chrome-devtools://*")
2023-07-05 00:30:44 +04:00
# Enable JavaScript.
# Type: Bool
2023-08-10 14:42:24 +04:00
config.set("content.javascript.enabled", True, "devtools://*")
2023-07-05 00:30:44 +04:00
# Enable JavaScript.
# Type: Bool
2023-08-10 14:42:24 +04:00
config.set("content.javascript.enabled", True, "chrome://*/*")
2023-07-05 00:30:44 +04:00
# Enable JavaScript.
# Type: Bool
2023-08-10 14:42:24 +04:00
config.set("content.javascript.enabled", True, "qute://*/*")
# dark mode
2023-08-10 14:42:24 +04:00
config.set("colors.webpage.preferred_color_scheme", "dark")
2023-07-05 14:49:41 +04:00
# kee pass x c
# anyone who uses pass is NOT real
2024-09-12 15:48:36 +04:00
# config.bind("pw", "spawn --userscript qute-keepassxc --insecure", mode="normal")
# config.bind("pt", "spawn --userscript qute-keepassxc --totp --insecure", mode="normal")
2023-07-06 00:01:15 +04:00
2023-08-10 14:41:14 +04:00
# lmao i use pass now
2024-09-12 15:48:36 +04:00
config.bind("pwa", "spawn --userscript qute-pass")
2024-09-12 15:51:53 +04:00
config.bind(
"pwu",
"spawn --userscript qute-pass --username-only --username-target secret --username-pattern 'login: (.*)'",
)
2024-09-12 15:48:36 +04:00
config.bind("pwp", "spawn --userscript qute-pass --password-only")
config.bind("pwo", "spawn --userscript qute-pass --otp-only")
2023-08-10 14:41:14 +04:00
2023-07-06 00:01:15 +04:00
# adblock lists
2023-08-10 14:42:24 +04:00
config.set(
"content.blocking.adblock.lists",
[
"https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters.txt",
"https://github.com/uBlockOrigin/uAssets/raw/master/filters/badware.txt",
# im paranoid ok?
"https://github.com/uBlockOrigin/uAssets/raw/master/filters/lan-block.txt",
"https://github.com/uBlockOrigin/uAssets/raw/master/filters/privacy.txt",
"https://easylist.to/easylist/easylist.txt",
"https://easylist.to/easylist/easyprivacy.txt",
"https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext",
"https://easylist-downloads.adblockplus.org/easylistdutch.txt",
"https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt",
"https://www.i-dont-care-about-cookies.eu/abp/",
"https://secure.fanboy.co.nz/fanboy-cookiemonster.txt",
],
)
2023-07-31 18:38:40 +04:00
# fonts
2023-08-10 14:42:24 +04:00
config.set("fonts.default_family", "JetBrainsMono")
config.set("fonts.default_size", "9pt")