## ____ __ ## / __ \_________ _/ /_____ ## / / / / ___/ __ `/ //_/ _ \ ## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) ## /_____/_/ \__,_/_/|_|\___/ My custom qutebrowser config ## # 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() # Or uncomment this line to load settings from config.py config.load_autoconfig(False) # 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://*/*') # Directory to save downloads to. If unset, a sensible OS-specific # default is used. # Type: Directory c.downloads.location.directory = '~/var/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' # Setting default page for when opening new tabs or new windows with # commands like :open -t and :open -w . c.url.default_page = 'https://start.duckduckgo.com' c.url.start_pages = 'https://start.duckduckgo.com' # 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={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}'} # 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 = '"mononoki 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 = '10pt' # Font used in the completion widget. # Type: Font c.fonts.completion.entry = '10pt "mononoki Nerd Font"' # Font used for the debugging console. # Type: Font c.fonts.debug_console = '10pt "mononoki 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 = '10pt "mononoki Nerd Font"' config.source('gruvbox.py') # 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') # configs config.set('content.notifications.enabled', False) config.set('content.blocking.method', 'both') config.set('content.blocking.enabled', True) config.set('content.autoplay', False) config.set('content.register_protocol_handler', False)