aboutsummaryrefslogtreecommitdiff
path: root/.config/qutebrowser
diff options
context:
space:
mode:
Diffstat (limited to '.config/qutebrowser')
-rw-r--r--.config/qutebrowser/config.py148
-rw-r--r--.config/qutebrowser/gruvbox.py332
-rw-r--r--.config/qutebrowser/stylesheet.qss1
3 files changed, 481 insertions, 0 deletions
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py
new file mode 100644
index 0000000..db0c2ed
--- /dev/null
+++ b/.config/qutebrowser/config.py
@@ -0,0 +1,148 @@
+# 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
+
+# pylint: disable=C0111
+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={}',
+ 'aw': 'https://wiki.archlinux.org/?search={}',
+ 'goog': 'https://www.google.com/search?q={}',
+ 're': 'https://www.reddit.com/search?q={}',
+ # Go to a given subreddit
+ 'sr': 'https://www.reddit.com/r/{unquoted}',
+ 'gh': 'https://github.com/search?q={}',
+ # Jumpt to github repo or user
+ 'ghr': 'https://github.com/{unquoted}',
+ 'wiki': 'https://en.wikipedia.org/wiki/{}',
+ 'yt': 'https://www.youtube.com/results?search_query={}'}
+
+c.url.default_page = 'https://start.duckduckgo.com'
+
+# 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.
+c.content.cookies.accept = 'all'
+
+# Value to send in the Accept-Language header
+c.content.headers.accept_language = 'en-GB,en,el;q=0.9'
+
+# 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
+
+# Original that I setup but cloudflare gives issues logging into GitLab
+# c.content.headers.user_agent = 'Mozilla/5.0 ({os_info}) QtWebEngine/{qt_version} qutebrowser/{qutebrowser_version} Chromium/{upstream_browser_version}'
+
+# Set Chromium back to 67.0.1 so I can sign in to GitLab due to cloudflare issues
+c.content.headers.user_agent = 'Mozilla/5.0 ({os_info}) QtWebEngine/{qt_version} qutebrowser/{qutebrowser_version} Chromium/67.0.1'
+
+# Load images automatically in web pages.
+# Type: Bool
+c.content.images = True
+
+# Enable JavaScript.
+# Type: Bool
+c.content.javascript.enabled = True
+
+# Allow websites to show notifications.
+# Type: BoolAsk
+# Valid values:
+# - true
+# - false
+# - ask
+c.content.notifications.enabled = 'ask'
+
+# Allow websites to register protocol handlers via
+# `navigator.registerProtocolHandler`.
+# Type: BoolAsk
+# Valid values:
+# - true
+# - false
+# - ask
+c.content.register_protocol_handler = 'ask'
+
+c.editor.command = ['foot', '-e', 'nvim', '{file}', '-c', 'normal {line}G{column0}l']
+
+c.fileselect.multiple_files.command = ['foot', '-e', 'ranger', '--choosefiles={}']
+
+c.fileselect.folder.command = ['foot', '-e', 'ranger', '--choosedir={}']
+
+c.spellcheck.languages = ['en-GB']
+
+c.tabs.padding = {'bottom': 4, 'left': 5, 'right': 5, 'top': 2}
+
+c.tabs.select_on_remove = 'prev'
+
+c.fonts.default_family = 'GoMono Nerd Font'
+c.fonts.default_size = '10pt'
+c.fonts.web.family.standard = 'GoMono Nerd Font'
+c.fonts.web.size.default = 14
+
+# 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 ')
+
+# Custom stylesheet for qt to set tab mouse hover info window font size
+c.qt.args += ['stylesheet=/home/justine/.config/qutebrowser/stylesheet.qss']
+
+c.content.autoplay = False
+config.source('gruvbox.py')
diff --git a/.config/qutebrowser/gruvbox.py b/.config/qutebrowser/gruvbox.py
new file mode 100644
index 0000000..7c96968
--- /dev/null
+++ b/.config/qutebrowser/gruvbox.py
@@ -0,0 +1,332 @@
+# gruvbox dark hard qutebrowser theme by Florian Bruhin <me@the-compiler.org>
+#
+# Originally based on:
+# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
+# Base16 qutebrowser template by theova and Daniel Mulford
+# Gruvbox dark, hard scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
+
+bg0_hard = "#1d2021"
+bg0_soft = '#32302f'
+bg0_normal = '#282828'
+
+bg0 = bg0_normal
+bg1 = "#3c3836"
+bg2 = "#504945"
+bg3 = "#665c54"
+bg4 = "#7c6f64"
+
+fg0 = "#fbf1c7"
+fg1 = "#ebdbb2"
+fg2 = "#d5c4a1"
+fg3 = "#bdae93"
+fg4 = "#a89984"
+
+bright_red = "#fb4934"
+bright_green = "#b8bb26"
+bright_yellow = "#fabd2f"
+bright_blue = "#83a598"
+bright_purple = "#d3869b"
+bright_aqua = "#8ec07c"
+bright_gray = "#928374"
+bright_orange = "#fe8019"
+
+dark_red = "#cc241d"
+dark_green = "#98971a"
+dark_yellow = "#d79921"
+dark_blue = "#458588"
+dark_purple = "#b16286"
+dark_aqua = "#689d6a"
+dark_gray = "#a89984"
+dark_orange = "#d65d0e"
+
+### Completion
+
+# 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 = [fg1, bright_aqua, bright_yellow]
+
+# Background color of the completion widget for odd rows.
+c.colors.completion.odd.bg = bg0
+
+# Background color of the completion widget for even rows.
+c.colors.completion.even.bg = c.colors.completion.odd.bg
+
+# Foreground color of completion widget category headers.
+c.colors.completion.category.fg = bright_blue
+
+# Background color of the completion widget category headers.
+c.colors.completion.category.bg = bg1
+
+# Top border color of the completion widget category headers.
+c.colors.completion.category.border.top = c.colors.completion.category.bg
+
+# Bottom border color of the completion widget category headers.
+c.colors.completion.category.border.bottom = c.colors.completion.category.bg
+
+# Foreground color of the selected completion item.
+c.colors.completion.item.selected.fg = fg0
+
+# Background color of the selected completion item.
+c.colors.completion.item.selected.bg = bg4
+
+# Top border color of the selected completion item.
+c.colors.completion.item.selected.border.top = bg2
+
+# Bottom border color of the selected completion item.
+c.colors.completion.item.selected.border.bottom = c.colors.completion.item.selected.border.top
+
+# Foreground color of the matched text in the selected completion item.
+c.colors.completion.item.selected.match.fg = bright_orange
+
+# Foreground color of the matched text in the completion.
+c.colors.completion.match.fg = c.colors.completion.item.selected.match.fg
+
+# Color of the scrollbar handle in the completion view.
+c.colors.completion.scrollbar.fg = c.colors.completion.item.selected.fg
+
+# Color of the scrollbar in the completion view.
+c.colors.completion.scrollbar.bg = c.colors.completion.category.bg
+
+### Context menu
+
+# Background color of disabled items in the context menu.
+c.colors.contextmenu.disabled.bg = bg3
+
+# Foreground color of disabled items in the context menu.
+c.colors.contextmenu.disabled.fg = fg3
+
+# Background color of the context menu. If set to null, the Qt default is used.
+c.colors.contextmenu.menu.bg = bg0
+
+# Foreground color of the context menu. If set to null, the Qt default is used.
+c.colors.contextmenu.menu.fg = fg2
+
+# Background color of the context menu’s selected item. If set to null, the Qt default is used.
+c.colors.contextmenu.selected.bg = bg2
+
+#Foreground color of the context menu’s selected item. If set to null, the Qt default is used.
+c.colors.contextmenu.selected.fg = c.colors.contextmenu.menu.fg
+
+### Downloads
+
+# Background color for the download bar.
+c.colors.downloads.bar.bg = bg0
+
+# Color gradient start for download text.
+c.colors.downloads.start.fg = bg0
+
+# Color gradient start for download backgrounds.
+c.colors.downloads.start.bg = bright_blue
+
+# Color gradient end for download text.
+c.colors.downloads.stop.fg = c.colors.downloads.start.fg
+
+# Color gradient stop for download backgrounds.
+c.colors.downloads.stop.bg = bright_aqua
+
+# Foreground color for downloads with errors.
+c.colors.downloads.error.fg = bright_red
+
+### Hints
+
+# Font color for hints.
+c.colors.hints.fg = bg0
+
+# Background color for hints.
+c.colors.hints.bg = 'rgba(250, 191, 47, 200)' # bright_yellow
+
+# Font color for the matched part of hints.
+c.colors.hints.match.fg = bg4
+
+### Keyhint widget
+
+# Text color for the keyhint widget.
+c.colors.keyhint.fg = fg4
+
+# Highlight color for keys to complete the current keychain.
+c.colors.keyhint.suffix.fg = fg0
+
+# Background color of the keyhint widget.
+c.colors.keyhint.bg = bg0
+
+### Messages
+
+# Foreground color of an error message.
+c.colors.messages.error.fg = bg0
+
+# Background color of an error message.
+c.colors.messages.error.bg = bright_red
+
+# Border color of an error message.
+c.colors.messages.error.border = c.colors.messages.error.bg
+
+# Foreground color of a warning message.
+c.colors.messages.warning.fg = bg0
+
+# Background color of a warning message.
+c.colors.messages.warning.bg = bright_purple
+
+# Border color of a warning message.
+c.colors.messages.warning.border = c.colors.messages.warning.bg
+
+# Foreground color of an info message.
+c.colors.messages.info.fg = fg2
+
+# Background color of an info message.
+c.colors.messages.info.bg = bg0
+
+# Border color of an info message.
+c.colors.messages.info.border = c.colors.messages.info.bg
+
+### Prompts
+
+# Foreground color for prompts.
+c.colors.prompts.fg = fg2
+
+# Border used around UI elements in prompts.
+c.colors.prompts.border = f'1px solid {bg1}'
+
+# Background color for prompts.
+c.colors.prompts.bg = bg3
+
+# Background color for the selected item in filename prompts.
+c.colors.prompts.selected.bg = bg2
+
+### Statusbar
+
+# Foreground color of the statusbar.
+c.colors.statusbar.normal.fg = fg2
+
+# Background color of the statusbar.
+c.colors.statusbar.normal.bg = bg0
+
+# Foreground color of the statusbar in insert mode.
+c.colors.statusbar.insert.fg = bg0
+
+# Background color of the statusbar in insert mode.
+c.colors.statusbar.insert.bg = dark_aqua
+
+# Foreground color of the statusbar in passthrough mode.
+c.colors.statusbar.passthrough.fg = bg0
+
+# Background color of the statusbar in passthrough mode.
+c.colors.statusbar.passthrough.bg = dark_blue
+
+# Foreground color of the statusbar in private browsing mode.
+c.colors.statusbar.private.fg = bright_purple
+
+# Background color of the statusbar in private browsing mode.
+c.colors.statusbar.private.bg = bg0
+
+# Foreground color of the statusbar in command mode.
+c.colors.statusbar.command.fg = fg3
+
+# Background color of the statusbar in command mode.
+c.colors.statusbar.command.bg = bg1
+
+# Foreground color of the statusbar in private browsing + command mode.
+c.colors.statusbar.command.private.fg = c.colors.statusbar.private.fg
+
+# Background color of the statusbar in private browsing + command mode.
+c.colors.statusbar.command.private.bg = c.colors.statusbar.command.bg
+
+# Foreground color of the statusbar in caret mode.
+c.colors.statusbar.caret.fg = bg0
+
+# Background color of the statusbar in caret mode.
+c.colors.statusbar.caret.bg = dark_purple
+
+# Foreground color of the statusbar in caret mode with a selection.
+c.colors.statusbar.caret.selection.fg = c.colors.statusbar.caret.fg
+
+# Background color of the statusbar in caret mode with a selection.
+c.colors.statusbar.caret.selection.bg = bright_purple
+
+# Background color of the progress bar.
+c.colors.statusbar.progress.bg = bright_blue
+
+# Default foreground color of the URL in the statusbar.
+c.colors.statusbar.url.fg = fg4
+
+# Foreground color of the URL in the statusbar on error.
+c.colors.statusbar.url.error.fg = dark_red
+
+# Foreground color of the URL in the statusbar for hovered links.
+c.colors.statusbar.url.hover.fg = bright_orange
+
+# Foreground color of the URL in the statusbar on successful load
+# (http).
+c.colors.statusbar.url.success.http.fg = bright_red
+
+# Foreground color of the URL in the statusbar on successful load
+# (https).
+c.colors.statusbar.url.success.https.fg = fg0
+
+# Foreground color of the URL in the statusbar when there's a warning.
+c.colors.statusbar.url.warn.fg = bright_purple
+
+### tabs
+
+# Background color of the tab bar.
+c.colors.tabs.bar.bg = bg0
+
+# Color gradient start for the tab indicator.
+c.colors.tabs.indicator.start = bright_blue
+
+# Color gradient end for the tab indicator.
+c.colors.tabs.indicator.stop = bright_aqua
+
+# Color for the tab indicator on errors.
+c.colors.tabs.indicator.error = bright_red
+
+# Foreground color of unselected odd tabs.
+c.colors.tabs.odd.fg = fg2
+
+# Background color of unselected odd tabs.
+c.colors.tabs.odd.bg = bg2
+
+# Foreground color of unselected even tabs.
+c.colors.tabs.even.fg = c.colors.tabs.odd.fg
+
+# Background color of unselected even tabs.
+c.colors.tabs.even.bg = bg3
+
+# Foreground color of selected odd tabs.
+c.colors.tabs.selected.odd.fg = fg2
+
+# Background color of selected odd tabs.
+c.colors.tabs.selected.odd.bg = bg0
+
+# Foreground color of selected even tabs.
+c.colors.tabs.selected.even.fg = c.colors.tabs.selected.odd.fg
+
+# Background color of selected even tabs.
+c.colors.tabs.selected.even.bg = bg0
+
+# Background color of pinned unselected even tabs.
+c.colors.tabs.pinned.even.bg = bright_green
+
+# Foreground color of pinned unselected even tabs.
+c.colors.tabs.pinned.even.fg = bg2
+
+# Background color of pinned unselected odd tabs.
+c.colors.tabs.pinned.odd.bg = bright_green
+
+# Foreground color of pinned unselected odd tabs.
+c.colors.tabs.pinned.odd.fg = c.colors.tabs.pinned.even.fg
+
+# Background color of pinned selected even tabs.
+c.colors.tabs.pinned.selected.even.bg = bg0
+
+# Foreground color of pinned selected even tabs.
+c.colors.tabs.pinned.selected.even.fg = c.colors.tabs.selected.odd.fg
+
+# Background color of pinned selected odd tabs.
+c.colors.tabs.pinned.selected.odd.bg = c.colors.tabs.pinned.selected.even.bg
+
+# Foreground color of pinned selected odd tabs.
+c.colors.tabs.pinned.selected.odd.fg = c.colors.tabs.selected.odd.fg
+
+# Background color for webpages if unset (or empty to use the theme's
+# color).
+# c.colors.webpage.bg = bg4
diff --git a/.config/qutebrowser/stylesheet.qss b/.config/qutebrowser/stylesheet.qss
new file mode 100644
index 0000000..0266bac
--- /dev/null
+++ b/.config/qutebrowser/stylesheet.qss
@@ -0,0 +1 @@
+* { font-family "GoMono Nerd Font"; font-size: 11pt }