379 lines
12 KiB
Python
379 lines
12 KiB
Python
|
import base16_gruvbox_dark_medium as b16
|
|||
|
from local import GPG_KEY, NOTIF_GRANTS
|
|||
|
|
|||
|
# pylint: disable=C0111
|
|||
|
c = c # noqa: F821 pylint: disable=E0602,C0103
|
|||
|
config = config # noqa: F821 pylint: disable=E0602,C0103
|
|||
|
|
|||
|
########
|
|||
|
# Misc #
|
|||
|
########
|
|||
|
|
|||
|
config.set("auto_save.session", True)
|
|||
|
config.set("colors.webpage.preferred_color_scheme", "dark")
|
|||
|
config.set("content.autoplay", False)
|
|||
|
config.set("content.default_encoding", "utf-8")
|
|||
|
config.set("content.pdfjs", False)
|
|||
|
config.set("content.plugins", False)
|
|||
|
config.set("downloads.location.directory", "~/dl")
|
|||
|
config.set("session.lazy_restore", True)
|
|||
|
config.set("tabs.background", True)
|
|||
|
config.set("tabs.last_close", "close")
|
|||
|
config.set("tabs.mousewheel_switching", False)
|
|||
|
config.set("tabs.new_position.unrelated", "next")
|
|||
|
config.set("tabs.position", "left")
|
|||
|
config.set("tabs.show", "multiple")
|
|||
|
config.set("tabs.width", "10%")
|
|||
|
|
|||
|
##############
|
|||
|
# Privileges #
|
|||
|
##############
|
|||
|
|
|||
|
# Cookies
|
|||
|
config.set("content.cookies.accept", "never", "*://*.medium.com/*")
|
|||
|
|
|||
|
# Media capture
|
|||
|
config.set("content.media.audio_capture", True, "*://discord.com/*")
|
|||
|
config.set("content.media.audio_video_capture", True, "*://discord.com/*")
|
|||
|
config.set("content.media.video_capture", True, "*://discord.com/*")
|
|||
|
|
|||
|
# Notifications
|
|||
|
for pattern in NOTIF_GRANTS:
|
|||
|
config.set("content.notifications.enabled", True, pattern)
|
|||
|
config.set("content.notifications.enabled", True, "*://app.slack.com/*")
|
|||
|
config.set("content.notifications.enabled", True, "*://discord.com/*")
|
|||
|
config.set("content.notifications.enabled", False, "*://*.reddit.com/*")
|
|||
|
|
|||
|
############
|
|||
|
# Bindings #
|
|||
|
############
|
|||
|
|
|||
|
# Hinting
|
|||
|
config.bind("F", "hint all tab-bg")
|
|||
|
config.bind(";v", "hint links spawn playvideo {hint-url}")
|
|||
|
config.bind(";i", "hint images download")
|
|||
|
|
|||
|
config.bind("wi", "devtools window")
|
|||
|
|
|||
|
# Keepass autotype
|
|||
|
config.bind("<Alt-Shift-u>",
|
|||
|
"spawn --userscript qute-keepassxc --key " + GPG_KEY,
|
|||
|
mode="insert")
|
|||
|
config.bind("pw",
|
|||
|
"spawn --userscript qute-keepassxc --key " + GPG_KEY,
|
|||
|
mode="normal")
|
|||
|
|
|||
|
# Toggle socks proxy
|
|||
|
config.bind("gp",
|
|||
|
(
|
|||
|
'config-cycle -t -p content.proxy '
|
|||
|
'"socks://127.0.0.1:8080/" '
|
|||
|
'"system"'
|
|||
|
))
|
|||
|
|
|||
|
# Gruvbox dark theme hotswappable on demand
|
|||
|
config.bind("<Ctrl-R>",
|
|||
|
(
|
|||
|
'config-cycle -t content.user_stylesheets '
|
|||
|
'"~/.config/qutebrowser/css/gruvbox-all-sites.css" '
|
|||
|
'""'
|
|||
|
))
|
|||
|
|
|||
|
##############
|
|||
|
# Adblocking #
|
|||
|
##############
|
|||
|
|
|||
|
config.set("content.blocking.enabled", True)
|
|||
|
config.set("content.blocking.method", "adblock")
|
|||
|
|
|||
|
config.set(
|
|||
|
"content.blocking.adblock.lists",
|
|||
|
[
|
|||
|
str(config.configdir) + "/custom-block.txt",
|
|||
|
"https://easylist.to/easylist/easylist.txt",
|
|||
|
"https://easylist.to/easylist/easyprivacy.txt",
|
|||
|
# "https://easylist.to/easylist/fanboy-annoyance.txt",
|
|||
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt",
|
|||
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt",
|
|||
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt",
|
|||
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt",
|
|||
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt",
|
|||
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt",
|
|||
|
],
|
|||
|
)
|
|||
|
|
|||
|
###############
|
|||
|
# Color theme #
|
|||
|
###############
|
|||
|
|
|||
|
# 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 = b16.base05
|
|||
|
|
|||
|
# Background color of the completion widget for odd rows.
|
|||
|
c.colors.completion.odd.bg = b16.base03
|
|||
|
|
|||
|
# Background color of the completion widget for even rows.
|
|||
|
c.colors.completion.even.bg = b16.base00
|
|||
|
|
|||
|
# Foreground color of completion widget category headers.
|
|||
|
c.colors.completion.category.fg = b16.base0A
|
|||
|
|
|||
|
# Background color of the completion widget category headers.
|
|||
|
c.colors.completion.category.bg = b16.base00
|
|||
|
|
|||
|
# Top border color of the completion widget category headers.
|
|||
|
c.colors.completion.category.border.top = b16.base00
|
|||
|
|
|||
|
# Bottom border color of the completion widget category headers.
|
|||
|
c.colors.completion.category.border.bottom = b16.base00
|
|||
|
|
|||
|
# Foreground color of the selected completion item.
|
|||
|
c.colors.completion.item.selected.fg = b16.base01
|
|||
|
|
|||
|
# Background color of the selected completion item.
|
|||
|
c.colors.completion.item.selected.bg = b16.base0A
|
|||
|
|
|||
|
# Top border color of the selected completion item.
|
|||
|
c.colors.completion.item.selected.border.top = b16.base0A
|
|||
|
|
|||
|
# Bottom border color of the selected completion item.
|
|||
|
c.colors.completion.item.selected.border.bottom = b16.base0A
|
|||
|
|
|||
|
# Foreground color of the matched text in the selected completion item.
|
|||
|
c.colors.completion.item.selected.match.fg = b16.base08
|
|||
|
|
|||
|
# Foreground color of the matched text in the completion.
|
|||
|
c.colors.completion.match.fg = b16.base0B
|
|||
|
|
|||
|
# Color of the scrollbar handle in the completion view.
|
|||
|
c.colors.completion.scrollbar.fg = b16.base05
|
|||
|
|
|||
|
# Color of the scrollbar in the completion view.
|
|||
|
c.colors.completion.scrollbar.bg = b16.base00
|
|||
|
|
|||
|
# Background color of the context menu. If set to null, the Qt default is used.
|
|||
|
c.colors.contextmenu.menu.bg = b16.base00
|
|||
|
|
|||
|
# Foreground color of the context menu. If set to null, the Qt default is used.
|
|||
|
c.colors.contextmenu.menu.fg = b16.base05
|
|||
|
|
|||
|
# Background color of the context menu’s selected item.
|
|||
|
# If set to null, the Qt default is used.
|
|||
|
c.colors.contextmenu.selected.bg = b16.base0A
|
|||
|
|
|||
|
# Foreground color of the context menu’s selected item.
|
|||
|
# If set to null, the Qt default is used.
|
|||
|
c.colors.contextmenu.selected.fg = b16.base01
|
|||
|
|
|||
|
# Background color for the download bar.
|
|||
|
c.colors.downloads.bar.bg = b16.base00
|
|||
|
|
|||
|
# Color gradient start for download text.
|
|||
|
c.colors.downloads.start.fg = b16.base00
|
|||
|
|
|||
|
# Color gradient start for download backgrounds.
|
|||
|
c.colors.downloads.start.bg = b16.base0D
|
|||
|
|
|||
|
# Color gradient end for download text.
|
|||
|
c.colors.downloads.stop.fg = b16.base00
|
|||
|
|
|||
|
# Color gradient stop for download backgrounds.
|
|||
|
c.colors.downloads.stop.bg = b16.base0C
|
|||
|
|
|||
|
# Foreground color for downloads with errors.
|
|||
|
c.colors.downloads.error.fg = b16.base08
|
|||
|
|
|||
|
# Font color for hints.
|
|||
|
c.colors.hints.fg = b16.base00
|
|||
|
|
|||
|
# Background color for hints. Note that you can use a `rgba(...)` value
|
|||
|
# for transparency.
|
|||
|
c.colors.hints.bg = b16.base0A
|
|||
|
|
|||
|
# Font color for the matched part of hints.
|
|||
|
c.colors.hints.match.fg = b16.base05
|
|||
|
|
|||
|
# Text color for the keyhint widget.
|
|||
|
c.colors.keyhint.fg = b16.base05
|
|||
|
|
|||
|
# Highlight color for keys to complete the current keychain.
|
|||
|
c.colors.keyhint.suffix.fg = b16.base05
|
|||
|
|
|||
|
# Background color of the keyhint widget.
|
|||
|
c.colors.keyhint.bg = b16.base00
|
|||
|
|
|||
|
# Foreground color of an error message.
|
|||
|
c.colors.messages.error.fg = b16.base00
|
|||
|
|
|||
|
# Background color of an error message.
|
|||
|
c.colors.messages.error.bg = b16.base08
|
|||
|
|
|||
|
# Border color of an error message.
|
|||
|
c.colors.messages.error.border = b16.base08
|
|||
|
|
|||
|
# Foreground color of a warning message.
|
|||
|
c.colors.messages.warning.fg = b16.base00
|
|||
|
|
|||
|
# Background color of a warning message.
|
|||
|
c.colors.messages.warning.bg = b16.base0E
|
|||
|
|
|||
|
# Border color of a warning message.
|
|||
|
c.colors.messages.warning.border = b16.base0E
|
|||
|
|
|||
|
# Foreground color of an info message.
|
|||
|
c.colors.messages.info.fg = b16.base05
|
|||
|
|
|||
|
# Background color of an info message.
|
|||
|
c.colors.messages.info.bg = b16.base00
|
|||
|
|
|||
|
# Border color of an info message.
|
|||
|
c.colors.messages.info.border = b16.base00
|
|||
|
|
|||
|
# Foreground color for prompts.
|
|||
|
c.colors.prompts.fg = b16.base05
|
|||
|
|
|||
|
# Border used around UI elements in prompts.
|
|||
|
c.colors.prompts.border = b16.base00
|
|||
|
|
|||
|
# Background color for prompts.
|
|||
|
c.colors.prompts.bg = b16.base00
|
|||
|
|
|||
|
# Background color for the selected item in filename prompts.
|
|||
|
c.colors.prompts.selected.bg = b16.base0A
|
|||
|
|
|||
|
# Foreground color of the statusbar.
|
|||
|
c.colors.statusbar.normal.fg = b16.base0B
|
|||
|
|
|||
|
# Background color of the statusbar.
|
|||
|
c.colors.statusbar.normal.bg = b16.base00
|
|||
|
|
|||
|
# Foreground color of the statusbar in insert mode.
|
|||
|
c.colors.statusbar.insert.fg = b16.base00
|
|||
|
|
|||
|
# Background color of the statusbar in insert mode.
|
|||
|
c.colors.statusbar.insert.bg = b16.base0D
|
|||
|
|
|||
|
# Foreground color of the statusbar in passthrough mode.
|
|||
|
c.colors.statusbar.passthrough.fg = b16.base00
|
|||
|
|
|||
|
# Background color of the statusbar in passthrough mode.
|
|||
|
c.colors.statusbar.passthrough.bg = b16.base0C
|
|||
|
|
|||
|
# Foreground color of the statusbar in private browsing mode.
|
|||
|
c.colors.statusbar.private.fg = b16.base00
|
|||
|
|
|||
|
# Background color of the statusbar in private browsing mode.
|
|||
|
c.colors.statusbar.private.bg = b16.base03
|
|||
|
|
|||
|
# Foreground color of the statusbar in command mode.
|
|||
|
c.colors.statusbar.command.fg = b16.base05
|
|||
|
|
|||
|
# Background color of the statusbar in command mode.
|
|||
|
c.colors.statusbar.command.bg = b16.base00
|
|||
|
|
|||
|
# Foreground color of the statusbar in private browsing + command mode.
|
|||
|
c.colors.statusbar.command.private.fg = b16.base05
|
|||
|
|
|||
|
# Background color of the statusbar in private browsing + command mode.
|
|||
|
c.colors.statusbar.command.private.bg = b16.base00
|
|||
|
|
|||
|
# Foreground color of the statusbar in caret mode.
|
|||
|
c.colors.statusbar.caret.fg = b16.base00
|
|||
|
|
|||
|
# Background color of the statusbar in caret mode.
|
|||
|
c.colors.statusbar.caret.bg = b16.base0E
|
|||
|
|
|||
|
# Foreground color of the statusbar in caret mode with a selection.
|
|||
|
c.colors.statusbar.caret.selection.fg = b16.base00
|
|||
|
|
|||
|
# Background color of the statusbar in caret mode with a selection.
|
|||
|
c.colors.statusbar.caret.selection.bg = b16.base0D
|
|||
|
|
|||
|
# Background color of the progress bar.
|
|||
|
c.colors.statusbar.progress.bg = b16.base0D
|
|||
|
|
|||
|
# Default foreground color of the URL in the statusbar.
|
|||
|
c.colors.statusbar.url.fg = b16.base05
|
|||
|
|
|||
|
# Foreground color of the URL in the statusbar on error.
|
|||
|
c.colors.statusbar.url.error.fg = b16.base08
|
|||
|
|
|||
|
# Foreground color of the URL in the statusbar for hovered links.
|
|||
|
c.colors.statusbar.url.hover.fg = b16.base05
|
|||
|
|
|||
|
# Foreground color of the URL in the statusbar on successful load
|
|||
|
# (http).
|
|||
|
c.colors.statusbar.url.success.http.fg = b16.base0C
|
|||
|
|
|||
|
# Foreground color of the URL in the statusbar on successful load
|
|||
|
# (https).
|
|||
|
c.colors.statusbar.url.success.https.fg = b16.base0B
|
|||
|
|
|||
|
# Foreground color of the URL in the statusbar when there's a warning.
|
|||
|
c.colors.statusbar.url.warn.fg = b16.base0E
|
|||
|
|
|||
|
# Background color of the tab bar.
|
|||
|
c.colors.tabs.bar.bg = b16.base00
|
|||
|
|
|||
|
# Color gradient start for the tab indicator.
|
|||
|
c.colors.tabs.indicator.start = b16.base0D
|
|||
|
|
|||
|
# Color gradient end for the tab indicator.
|
|||
|
c.colors.tabs.indicator.stop = b16.base0C
|
|||
|
|
|||
|
# Color for the tab indicator on errors.
|
|||
|
c.colors.tabs.indicator.error = b16.base08
|
|||
|
|
|||
|
# Foreground color of unselected odd tabs.
|
|||
|
c.colors.tabs.odd.fg = b16.base05
|
|||
|
|
|||
|
# Background color of unselected odd tabs.
|
|||
|
c.colors.tabs.odd.bg = b16.base03
|
|||
|
|
|||
|
# Foreground color of unselected even tabs.
|
|||
|
c.colors.tabs.even.fg = b16.base05
|
|||
|
|
|||
|
# Background color of unselected even tabs.
|
|||
|
c.colors.tabs.even.bg = b16.base00
|
|||
|
|
|||
|
# Background color of pinned unselected even tabs.
|
|||
|
c.colors.tabs.pinned.even.bg = b16.base0C
|
|||
|
|
|||
|
# Foreground color of pinned unselected even tabs.
|
|||
|
c.colors.tabs.pinned.even.fg = b16.base07
|
|||
|
|
|||
|
# Background color of pinned unselected odd tabs.
|
|||
|
c.colors.tabs.pinned.odd.bg = b16.base0B
|
|||
|
|
|||
|
# Foreground color of pinned unselected odd tabs.
|
|||
|
c.colors.tabs.pinned.odd.fg = b16.base07
|
|||
|
|
|||
|
# Background color of pinned selected even tabs.
|
|||
|
c.colors.tabs.pinned.selected.even.bg = b16.base05
|
|||
|
|
|||
|
# Foreground color of pinned selected even tabs.
|
|||
|
c.colors.tabs.pinned.selected.even.fg = b16.base00
|
|||
|
|
|||
|
# Background color of pinned selected odd tabs.
|
|||
|
c.colors.tabs.pinned.selected.odd.bg = b16.base05
|
|||
|
|
|||
|
# Foreground color of pinned selected odd tabs.
|
|||
|
c.colors.tabs.pinned.selected.odd.fg = b16.base0E
|
|||
|
|
|||
|
# Foreground color of selected odd tabs.
|
|||
|
c.colors.tabs.selected.odd.fg = b16.base00
|
|||
|
|
|||
|
# Background color of selected odd tabs.
|
|||
|
c.colors.tabs.selected.odd.bg = b16.base05
|
|||
|
|
|||
|
# Foreground color of selected even tabs.
|
|||
|
c.colors.tabs.selected.even.fg = b16.base00
|
|||
|
|
|||
|
# Background color of selected even tabs.
|
|||
|
c.colors.tabs.selected.even.bg = b16.base05
|
|||
|
|
|||
|
# Background color for webpages if unset (or empty to use the theme's
|
|||
|
# color).
|
|||
|
# c.colors.webpage.bg = b16.base00
|