From 441f56257d23e075b009c34cc0366b1c48971848 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Fri, 16 Oct 2020 14:01:31 -0500 Subject: [PATCH] Adding qutebrowser config. --- .config/qutebrowser/config.py | 373 ++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100755 .config/qutebrowser/config.py diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py new file mode 100755 index 0000000..77eeffd --- /dev/null +++ b/.config/qutebrowser/config.py @@ -0,0 +1,373 @@ +# 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 + +# Uncomment this to still load settings configured via autoconfig.yml +# config.load_autoconfig() + +# Aliases for commands. The keys of the given dictionary are the +# aliases, while the values are the commands they map to. +# Type: Dict +c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save'} + +# Setting dark mode +config.set("colors.webpage.darkmode.enabled", True) + + +# 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`. +# 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. +config.set('content.cookies.accept', 'all', 'chrome-devtools://*') + +# 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`. +# 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. +config.set('content.cookies.accept', 'all', 'devtools://*') + +# 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 +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/') + +# 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 +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://accounts.google.com/*') + +# 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 +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/*') + +# 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 +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://docs.google.com/*') + +# 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 +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://drive.google.com/*') + +# Load images automatically in web pages. +# Type: Bool +config.set('content.images', True, 'chrome-devtools://*') + +# Load images automatically in web pages. +# Type: Bool +config.set('content.images', True, 'devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'chrome-devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'chrome://*/*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'qute://*/*') + +# Allow websites to show notifications. +# Type: BoolAsk +# Valid values: +# - true +# - false +# - ask +config.set('content.notifications', True, 'https://www.reddit.com') + +# Allow websites to show notifications. +# Type: BoolAsk +# Valid values: +# - true +# - false +# - ask +config.set('content.notifications', True, 'https://www.youtube.com') + +# Directory to save downloads to. If unset, a sensible OS-specific +# default is used. +# Type: Directory +c.downloads.location.directory = '/home/dt/Downloads' + +# When to show the tab bar. +# Type: String +# Valid values: +# - always: Always show the tab bar. +# - never: Always hide the tab bar. +# - multiple: Hide the tab bar if only one tab is open. +# - switching: Show the tab bar when switching tabs. +c.tabs.show = 'always' + +# Search engines which can be used via the address bar. Maps a search +# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}` +# placeholder. The placeholder will be replaced by the search term, use +# `{{` and `}}` for literal `{`/`}` braces. The following further +# placeholds are defined to configure how special characters in the +# search terms are replaced by safe characters (called 'quoting'): * +# `{}` and `{semiquoted}` quote everything except slashes; this is the +# most sensible choice for almost all search engines (for the search +# term `slash/and&` this placeholder expands to `slash/and%26amp`). +# * `{quoted}` quotes all characters (for `slash/and&` this +# placeholder expands to `slash%2Fand%26amp`). * `{unquoted}` quotes +# nothing (for `slash/and&` this placeholder expands to +# `slash/and&`). The search engine named `DEFAULT` is used when +# `url.auto_search` is turned on and something else than a URL was +# entered to be opened. Other search engines can be used by prepending +# the search engine name to the search term, e.g. `:open google +# qutebrowser`. +# Type: Dict +c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}', 'am': 'https://www.amazon.com/s?k={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'goog': 'https://www.google.com/search?q={}', 'hoog': 'https://hoogle.haskell.org/?hoogle={}', 're': 'https://www.reddit.com/r/{}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}', 'yt': 'https://www.youtube.com/results?search_query={}'} + +# Text color of the completion widget. May be a single color to use for +# all columns or a list of three colors, one for each column. +# Type: List of QtColor, or QtColor +c.colors.completion.fg = ['#9cc4ff', 'white', 'white'] + +# Background color of the completion widget for odd rows. +# Type: QssColor +c.colors.completion.odd.bg = '#1c1f24' + +# Background color of the completion widget for even rows. +# Type: QssColor +c.colors.completion.even.bg = '#232429' + +# Foreground color of completion widget category headers. +# Type: QtColor +c.colors.completion.category.fg = '#e1acff' + +# Background color of the completion widget category headers. +# Type: QssColor +c.colors.completion.category.bg = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #000000, stop:1 #232429)' + +# Top border color of the completion widget category headers. +# Type: QssColor +c.colors.completion.category.border.top = '#3f4147' + +# Bottom border color of the completion widget category headers. +# Type: QssColor +c.colors.completion.category.border.bottom = '#3f4147' + +# Foreground color of the selected completion item. +# Type: QtColor +c.colors.completion.item.selected.fg = '#282c34' + +# Background color of the selected completion item. +# Type: QssColor +c.colors.completion.item.selected.bg = '#ecbe7b' + +# Foreground color of the matched text in the selected completion item. +# Type: QtColor +c.colors.completion.item.selected.match.fg = '#c678dd' + +# Foreground color of the matched text in the completion. +# Type: QtColor +c.colors.completion.match.fg = '#c678dd' + +# Color of the scrollbar handle in the completion view. +# Type: QssColor +c.colors.completion.scrollbar.fg = 'white' + +# Background color for the download bar. +# Type: QssColor +c.colors.downloads.bar.bg = '#282c34' + +# Background color for downloads with errors. +# Type: QtColor +c.colors.downloads.error.bg = '#ff6c6b' + +# Font color for hints. +# Type: QssColor +c.colors.hints.fg = '#282c34' + +# Font color for the matched part of hints. +# Type: QtColor +c.colors.hints.match.fg = '#98be65' + +# Background color of an info message. +# Type: QssColor +c.colors.messages.info.bg = '#282c34' + +# Background color of the statusbar. +# Type: QssColor +c.colors.statusbar.normal.bg = '#282c34' + +# Foreground color of the statusbar in insert mode. +# Type: QssColor +c.colors.statusbar.insert.fg = 'white' + +# Background color of the statusbar in insert mode. +# Type: QssColor +c.colors.statusbar.insert.bg = '#497920' + +# Background color of the statusbar in passthrough mode. +# Type: QssColor +c.colors.statusbar.passthrough.bg = '#34426f' + +# Background color of the statusbar in command mode. +# Type: QssColor +c.colors.statusbar.command.bg = '#282c34' + +# Foreground color of the URL in the statusbar when there's a warning. +# Type: QssColor +c.colors.statusbar.url.warn.fg = 'yellow' + +# Background color of the tab bar. +# Type: QssColor +c.colors.tabs.bar.bg = '#1c1f34' + +# Background color of unselected odd tabs. +# Type: QtColor +c.colors.tabs.odd.bg = '#282c34' + +# Background color of unselected even tabs. +# Type: QtColor +c.colors.tabs.even.bg = '#282c34' + +# Background color of selected odd tabs. +# Type: QtColor +c.colors.tabs.selected.odd.bg = '#282c34' + +# Background color of selected even tabs. +# Type: QtColor +c.colors.tabs.selected.even.bg = '#282c34' + +# Background color of pinned unselected odd tabs. +# Type: QtColor +c.colors.tabs.pinned.odd.bg = 'seagreen' + +# Background color of pinned unselected even tabs. +# Type: QtColor +c.colors.tabs.pinned.even.bg = 'darkseagreen' + +# Background color of pinned selected odd tabs. +# Type: QtColor +c.colors.tabs.pinned.selected.odd.bg = '#282c34' + +# Background color of pinned selected even tabs. +# Type: QtColor +c.colors.tabs.pinned.selected.even.bg = '#282c34' + +# Default font families to use. Whenever "default_family" is used in a +# font setting, it's replaced with the fonts listed here. If set to an +# empty value, a system-specific monospace default is used. +# Type: List of Font, or Font +c.fonts.default_family = '"SauceCodePro Nerd Font"' + +# Default font size to use. Whenever "default_size" is used in a font +# setting, it's replaced with the size listed here. Valid values are +# either a float value with a "pt" suffix, or an integer value with a +# "px" suffix. +# Type: String +c.fonts.default_size = '11pt' + +# Font used in the completion widget. +# Type: Font +c.fonts.completion.entry = '11pt "SauceCodePro Nerd Font"' + +# Font used for the debugging console. +# Type: Font +c.fonts.debug_console = '11pt "SauceCodePro Nerd Font"' + +# Font used for prompts. +# Type: Font +c.fonts.prompts = 'default_size sans-serif' + +# Font used in the statusbar. +# Type: Font +c.fonts.statusbar = '11pt "SauceCodePro Nerd Font"' + +# Bindings for normal mode +config.bind('M', 'hint links spawn mpv {hint-url}') +config.bind('Z', 'hint links spawn st -e youtube-dl {hint-url}') +config.bind('t', 'set-cmd-text -s :open -t') +config.bind('xb', 'config-cycle statusbar.show always never') +config.bind('xt', 'config-cycle tabs.show always never') +config.bind('xx', 'config-cycle statusbar.show always never;; config-cycle tabs.show always never')