Skip to content

Instantly share code, notes, and snippets.

@mvlsqz
Created November 25, 2022 00:49
Show Gist options
  • Save mvlsqz/2998c3a98758c52fc9f35724f957f5df to your computer and use it in GitHub Desktop.
Save mvlsqz/2998c3a98758c52fc9f35724f957f5df to your computer and use it in GitHub Desktop.
qutebrowser maincfg
"""
qutebrowser config
"""
import os
c = c # noqa: F821 pylint: disable=E0602,C0103
config = config # noqa: F821 pylint: disable=E0602,C0103
config.load_autoconfig(False)
c.auto_save.session = True
# Format of timestamps (e.g. for the history completion).
c.completion.timestamp_format = '%d-%m-%Y %H:%M'
# Confirm quit if downloading
c.confirm_quit = ["downloads"]
# Download locations
c.downloads.location.directory = "~/Downloads"
c.url.searchengines = {
'DEFAULT': 'https://start.duckduckgo.com/?q={}',
'goog': 'https://www.google.com/search?q={}',
're': 'https://www.reddit.com/search?q={}',
'sr': 'https://www.reddit.com/r/{unquoted}',
'gh': 'https://github.com/search?q={}',
'ghr': 'https://github.com/{unquoted}',
'wiki': 'https://en.wikipedia.org/wiki/{}',
'yt': 'https://www.youtube.com/results?search_query={}',
'bbs': 'https://git.xoom.com/plugins/servlet/search?q={}',
'bbp': 'https://git.xoom.com/projects/{}',
'pup': 'https://git.xoom.com/projects/INFPUP/repos/{}/browse'}
c.url.default_page = 'https://www.google.com'
c.url.start_pages = ['https://www.google.com', "https://git.xoom.com"]
config.set('content.cookies.accept', 'all', 'chrome-devtools://*')
c.content.private_browsing = True
config.set('content.cookies.accept', 'all', 'devtools://*')
config.set(
'content.headers.accept_language',
'',
'https://matchmaker.krunker.io/*')
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/')
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} Edg/{upstream_browser_version}',
'https://accounts.google.com/*')
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/*')
config.set('content.images', True, 'chrome-devtools://*')
config.set('content.images', True, 'devtools://*')
config.set('content.javascript.enabled', True, 'chrome-devtools://*')
config.set('content.javascript.enabled', True, 'devtools://*')
config.set('content.javascript.enabled', True, 'chrome://*/*')
config.set('content.javascript.enabled', True, 'qute://*/*')
config.set('content.notifications.enabled', True, 'https://www.netflix.com')
config.set(
'content.register_protocol_handler',
True,
'https://mail.google.com?extsrc=mailto&url=%25s')
c.editor.command = [
'/opt/homebrew/bin/kitty',
'-c None', '-e',
'/opt/homebrew/bin/nvim',
'{file}']
c.fileselect.multiple_files.command = [
'kitty',
'-e',
'ranger',
'--choosefiles={}']
c.fileselect.folder.command = ['kitty', '-e', 'ranger', '--choosedir={}']
c.spellcheck.languages = ['en-US']
c.tabs.padding = {'bottom': 4, 'left': 5, 'right': 5, 'top': 2}
c.tabs.position = "left"
c.tabs.title.format = ""
c.tabs.width = 50
c.tabs.select_on_remove = 'prev'
# Background color of unselected tabs.
# c.colors.tabs.even.bg = "#9399b2"
# c.colors.tabs.odd.bg = "#7f849c"
# Foreground color of unselected tabs.
c.colors.tabs.even.fg = "#1e1e1d"
c.colors.tabs.odd.fg = c.colors.tabs.even.fg
c.fonts.default_family = 'Iosevka Nerd Font Mono'
c.fonts.default_size = '10pt'
c.fonts.web.family.standard = 'Iosevka Nerd Font Mono'
c.fonts.web.size.default = 14
c.fonts.tabs.selected = '25pt default_family'
c.fonts.tabs.unselected = '25pt default_family'
# Font used for the context menu. If set to null, the Qt default is
# used.
# Type: Font
c.fonts.contextmenu = 'default_size default_family'
config.bind(',M', 'hint links spawn mpv {hint-url}')
config.bind('xb', 'config-cycle statusbar.show never always')
config.bind('xt', 'config-cycle tabs.show never always ')
config.bind('xx', 'config-cycle statusbar.show never always;; \
config-cycle tabs.show never always ')
# config.source("theme.py")
# Custom stylesheet for qt to set tab mouse hover info window font size
# stylesheet = os.environ['HOME'] + '/.qutebrowser/stylesheet.qss'
# c.qt.args += [stylesheet]
c.content.autoplay = False
# theming
# Custom theme for qutebrowser
BASE00 = "#0f1419"
BASE01 = "#131721"
BASE02 = "#272d38"
BASE03 = "#3e4b59"
BASE04 = "#bfbdb6"
BASE05 = "#e6e1cf"
BASE06 = "#e6e1cf"
BASE07 = "#f3f4f5"
BASE08 = "#f07178"
BASE09 = "#ff8f40"
BASE0A = "#ffb454"
BASE0B = "#b8cc52"
BASE0C = "#95e6cb"
BASE0D = "#59c2ff"
BASE0E = "#d2a6ff"
BASE0F = "#e6b673"
# set qutebrowser colors
# 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.
c.colors.completion.fg = BASE05
# Background color of the completion widget for odd rows.
c.colors.completion.odd.bg = BASE01
# Background color of the completion widget for even rows.
c.colors.completion.even.bg = BASE00
# Foreground color of completion widget category headers.
c.colors.completion.category.fg = BASE0A
# Background color of the completion widget category headers.
c.colors.completion.category.bg = BASE00
# Top border color of the completion widget category headers.
c.colors.completion.category.border.top = BASE00
# Bottom border color of the completion widget category headers.
c.colors.completion.category.border.bottom = BASE00
# Foreground color of the selected completion item.
c.colors.completion.item.selected.fg = BASE00
# Background color of the selected completion item.
c.colors.completion.item.selected.bg = BASE07
# Top border color of the selected completion item.
c.colors.completion.item.selected.border.top = BASE02
# Bottom border color of the selected completion item.
c.colors.completion.item.selected.border.bottom = BASE02
# Foreground color of the matched text in the selected completion item.
c.colors.completion.item.selected.match.fg = BASE0B
# Foreground color of the matched text in the completion.
c.colors.completion.match.fg = BASE0B
# Color of the scrollbar handle in the completion view.
c.colors.completion.scrollbar.fg = BASE05
# Color of the scrollbar in the completion view.
c.colors.completion.scrollbar.bg = BASE00
# Background color of disabled items in the context menu.
c.colors.contextmenu.disabled.bg = BASE01
# Foreground color of disabled items in the context menu.
c.colors.contextmenu.disabled.fg = BASE04
# Background color of the context menu. If set to null, the Qt default is used.
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.
c.colors.contextmenu.selected.bg = BASE02
# 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.
c.colors.downloads.bar.bg = BASE00
# Color gradient start for download text.
c.colors.downloads.start.fg = BASE00
# Color gradient start for download backgrounds.
c.colors.downloads.start.bg = BASE0D
# Color gradient end for download text.
c.colors.downloads.stop.fg = BASE00
# Color gradient stop for download backgrounds.
c.colors.downloads.stop.bg = BASE0C
# Foreground color for downloads with errors.
c.colors.downloads.error.fg = BASE08
# Font color for hints.
c.colors.hints.fg = BASE00
# Background color for hints. Note that you can use a `rgba(...)` value
# for transparency.
c.colors.hints.bg = BASE0A
# Font color for the matched part of hints.
c.colors.hints.match.fg = BASE05
# Text color for the keyhint widget.
c.colors.keyhint.fg = BASE05
# Highlight color for keys to complete the current keychain.
c.colors.keyhint.suffix.fg = BASE05
# Background color of the keyhint widget.
c.colors.keyhint.bg = BASE00
# Foreground color of an error message.
c.colors.messages.error.fg = BASE00
# Background color of an error message.
c.colors.messages.error.bg = BASE08
# Border color of an error message.
c.colors.messages.error.border = BASE08
# Foreground color of a warning message.
c.colors.messages.warning.fg = BASE00
# Background color of a warning message.
c.colors.messages.warning.bg = BASE0E
# Border color of a warning message.
c.colors.messages.warning.border = BASE0E
# Foreground color of an info message.
c.colors.messages.info.fg = BASE05
# Background color of an info message.
c.colors.messages.info.bg = BASE00
# Border color of an info message.
c.colors.messages.info.border = BASE00
# Foreground color for prompts.
c.colors.prompts.fg = BASE05
# Border used around UI elements in prompts.
c.colors.prompts.border = BASE00
# Background color for prompts.
c.colors.prompts.bg = BASE00
# Background color for the selected item in filename prompts.
c.colors.prompts.selected.bg = BASE02
# Foreground color for the selected item in filename prompts.
c.colors.prompts.selected.fg = BASE05
# Foreground color of the statusbar.
c.colors.statusbar.normal.fg = BASE0B
# Background color of the statusbar.
c.colors.statusbar.normal.bg = BASE00
# Foreground color of the statusbar in insert mode.
c.colors.statusbar.insert.fg = BASE00
# Background color of the statusbar in insert mode.
c.colors.statusbar.insert.bg = BASE0D
# Foreground color of the statusbar in passthrough mode.
c.colors.statusbar.passthrough.fg = BASE00
# Background color of the statusbar in passthrough mode.
c.colors.statusbar.passthrough.bg = BASE0C
# Foreground color of the statusbar in private browsing mode.
c.colors.statusbar.private.fg = BASE00
# Background color of the statusbar in private browsing mode.
c.colors.statusbar.private.bg = BASE01
# Foreground color of the statusbar in command mode.
c.colors.statusbar.command.fg = BASE05
# Background color of the statusbar in command mode.
c.colors.statusbar.command.bg = BASE00
# Foreground color of the statusbar in private browsing + command mode.
c.colors.statusbar.command.private.fg = BASE05
# Background color of the statusbar in private browsing + command mode.
c.colors.statusbar.command.private.bg = BASE00
# Foreground color of the statusbar in caret mode.
c.colors.statusbar.caret.fg = BASE00
# Background color of the statusbar in caret mode.
c.colors.statusbar.caret.bg = BASE0E
# Foreground color of the statusbar in caret mode with a selection.
c.colors.statusbar.caret.selection.fg = BASE00
# Background color of the statusbar in caret mode with a selection.
c.colors.statusbar.caret.selection.bg = BASE0D
# Background color of the progress bar.
c.colors.statusbar.progress.bg = BASE0D
# Default foreground color of the URL in the statusbar.
c.colors.statusbar.url.fg = BASE05
# Foreground color of the URL in the statusbar on error.
c.colors.statusbar.url.error.fg = BASE08
# Foreground color of the URL in the statusbar for hovered links.
c.colors.statusbar.url.hover.fg = BASE05
# Foreground color of the URL in the statusbar on successful load
# (http).
c.colors.statusbar.url.success.http.fg = BASE0C
# Foreground color of the URL in the statusbar on successful load
# (https).
c.colors.statusbar.url.success.https.fg = BASE0B
# Foreground color of the URL in the statusbar when there's a warning.
c.colors.statusbar.url.warn.fg = BASE0E
# Background color of the tab bar.
c.colors.tabs.bar.bg = BASE00
# Color gradient start for the tab indicator.
c.colors.tabs.indicator.start = BASE00
# Color gradient end for the tab indicator.
c.colors.tabs.indicator.stop = BASE00
# Color for the tab indicator on errors.
c.colors.tabs.indicator.error = BASE08
# Foreground color of unselected odd tabs.
c.colors.tabs.odd.fg = BASE05
# Background color of unselected odd tabs.
c.colors.tabs.odd.bg = BASE01
# Foreground color of unselected even tabs.
c.colors.tabs.even.fg = BASE05
# Background color of unselected even tabs.
c.colors.tabs.even.bg = BASE00
# Background color of pinned unselected even tabs.
c.colors.tabs.pinned.even.bg = BASE0C
# Foreground color of pinned unselected even tabs.
c.colors.tabs.pinned.even.fg = BASE07
# Background color of pinned unselected odd tabs.
c.colors.tabs.pinned.odd.bg = BASE0B
# Foreground color of pinned unselected odd tabs.
c.colors.tabs.pinned.odd.fg = BASE07
# Background color of pinned selected even tabs.
c.colors.tabs.pinned.selected.even.bg = BASE02
# Foreground color of pinned selected even tabs.
c.colors.tabs.pinned.selected.even.fg = BASE05
# Background color of pinned selected odd tabs.
c.colors.tabs.pinned.selected.odd.bg = BASE02
# Foreground color of pinned selected odd tabs.
c.colors.tabs.pinned.selected.odd.fg = BASE05
# Foreground color of selected odd tabs.
c.colors.tabs.selected.odd.fg = BASE05
# Background color of selected odd tabs.
c.colors.tabs.selected.odd.bg = BASE02
# Foreground color of selected even tabs.
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
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment