[qutebrowser] Add search engines, javascript toggle
Toggle Javascript on/off with <leader>js. Reload the configuration file with <leader>VV. The search engines include reddit, github, wikipedia, archlinux, aur, gopackages and more.
This commit is contained in:
parent
4825466d2a
commit
b83a679d1d
3 changed files with 293 additions and 11 deletions
|
@ -11,17 +11,29 @@ import os
|
||||||
# Uncomment this to still load settings configured via autoconfig.yml
|
# Uncomment this to still load settings configured via autoconfig.yml
|
||||||
config.load_autoconfig()
|
config.load_autoconfig()
|
||||||
|
|
||||||
# Enable JavaScript.
|
c.completion.web_history.max_items = 1000
|
||||||
# Type: Bool
|
c.hints.uppercase = True
|
||||||
config.set('content.javascript.enabled', True, 'file://*')
|
|
||||||
|
|
||||||
# Enable JavaScript.
|
c.content.pdfjs = True
|
||||||
# Type: Bool
|
c.content.javascript.enabled = False
|
||||||
config.set('content.javascript.enabled', True, 'chrome://*/*')
|
js_whitelist = [
|
||||||
|
"*://*.youtube.com/*",
|
||||||
# Enable JavaScript.
|
"*://127.0.0.1/*",
|
||||||
# Type: Bool
|
"*://darksky.net/*"
|
||||||
config.set('content.javascript.enabled', True, 'qute://*/*')
|
"*://deepl.com/*",
|
||||||
|
"*://duckduckgo.com/*",
|
||||||
|
"*://github.com/*",
|
||||||
|
"*://localhost/*",
|
||||||
|
"*://news.ycombinator.com/*",
|
||||||
|
"*://reddit.com/*",
|
||||||
|
"*://translate.google.com/*",
|
||||||
|
"file://*",
|
||||||
|
"chrome://*/*",
|
||||||
|
"qute://*/*",
|
||||||
|
]
|
||||||
|
for page in js_whitelist:
|
||||||
|
with config.pattern(page) as p:
|
||||||
|
p.content.javascript.enabled = True
|
||||||
|
|
||||||
c.editor.command = ["alacritty", "-e", "nvim", "-f", "{file}"]
|
c.editor.command = ["alacritty", "-e", "nvim", "-f", "{file}"]
|
||||||
|
|
||||||
|
@ -30,11 +42,13 @@ c.editor.command = ["alacritty", "-e", "nvim", "-f", "{file}"]
|
||||||
|
|
||||||
# Tab-Bar
|
# Tab-Bar
|
||||||
# have tab bar on the right, not on the top
|
# have tab bar on the right, not on the top
|
||||||
|
c.tabs.background = True
|
||||||
|
c.tabs.title.format = '{perc}{current_title}'
|
||||||
c.tabs.position = "right"
|
c.tabs.position = "right"
|
||||||
c.tabs.width = "15%"
|
c.tabs.width = "15%"
|
||||||
|
|
||||||
# give the browser nice nord theme colors
|
# give the browser nice nord theme colors
|
||||||
config.source('nordtheme.py')
|
config.source('themes/nordtheme.py')
|
||||||
|
|
||||||
# Status bar
|
# Status bar
|
||||||
# should be visible to prevent 'jumping' bug, see https://github.com/qutebrowser/qutebrowser/issues/2236
|
# should be visible to prevent 'jumping' bug, see https://github.com/qutebrowser/qutebrowser/issues/2236
|
||||||
|
@ -91,3 +105,23 @@ config.bind(leader + 'ss', 'set content.user_stylesheets ""')
|
||||||
config.bind(leader + 'sd', 'set content.user_stylesheets ' + str(css[0]) )
|
config.bind(leader + 'sd', 'set content.user_stylesheets ' + str(css[0]) )
|
||||||
# leader - sl for light mode solarized
|
# leader - sl for light mode solarized
|
||||||
config.bind(leader + 'sl', 'set content.user_stylesheets ' + str(css[1]) )
|
config.bind(leader + 'sl', 'set content.user_stylesheets ' + str(css[1]) )
|
||||||
|
|
||||||
|
# Enable and disable javascript
|
||||||
|
config.bind(leader + "js", "config-cycle content.javascript.enabled true false")
|
||||||
|
|
||||||
|
# Reload this config
|
||||||
|
config.bind(leader + "VV", "config-source")
|
||||||
|
|
||||||
|
c.url.searchengines = {
|
||||||
|
"DEFAULT": "https://duckduckgo.com/?q={}",
|
||||||
|
"g": "https://www.google.com/search?q={}",
|
||||||
|
"r": "https://old.reddit.com/r/{}",
|
||||||
|
"w": "https://en.wikipedia.org/w/index.php?search={}",
|
||||||
|
"gt": "https://translate.google.com/#auto/de/{}",
|
||||||
|
"gh": "https://github.com/search?q={}",
|
||||||
|
"al": "https://wiki.archlinux.org/index.php/{}",
|
||||||
|
"aur": "https://aur.archlinux.org/packages/?K={}",
|
||||||
|
"yt": "https://www.youtube.com/results?search_query={}",
|
||||||
|
"maps": "https://www.google.fr/maps?q={}",
|
||||||
|
"gol": "https://golang.org/pkg/{}/",
|
||||||
|
}
|
||||||
|
|
248
.config/qutebrowser/themes/base16.py
Normal file
248
.config/qutebrowser/themes/base16.py
Normal file
|
@ -0,0 +1,248 @@
|
||||||
|
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
|
||||||
|
# Base16 qutebrowser template by theova
|
||||||
|
# Solarized Dark scheme by Ethan Schoonover (modified by aramisgithub)
|
||||||
|
|
||||||
|
base00 = "#002b36"
|
||||||
|
base01 = "#073642"
|
||||||
|
base02 = "#586e75"
|
||||||
|
base03 = "#657b83"
|
||||||
|
base04 = "#839496"
|
||||||
|
base05 = "#93a1a1"
|
||||||
|
base06 = "#eee8d5"
|
||||||
|
base07 = "#fdf6e3"
|
||||||
|
base08 = "#dc322f"
|
||||||
|
base09 = "#cb4b16"
|
||||||
|
base0A = "#b58900"
|
||||||
|
base0B = "#859900"
|
||||||
|
base0C = "#2aa198"
|
||||||
|
base0D = "#268bd2"
|
||||||
|
base0E = "#6c71c4"
|
||||||
|
base0F = "#d33682"
|
||||||
|
|
||||||
|
# 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 = base00
|
||||||
|
|
||||||
|
# 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 = base01
|
||||||
|
|
||||||
|
# Background color of the selected completion item.
|
||||||
|
c.colors.completion.item.selected.bg = base0A
|
||||||
|
|
||||||
|
# Top border color of the completion widget category headers.
|
||||||
|
c.colors.completion.item.selected.border.top = base0A
|
||||||
|
|
||||||
|
# Bottom border color of the selected completion item.
|
||||||
|
c.colors.completion.item.selected.border.bottom = base0A
|
||||||
|
|
||||||
|
# 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 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 = base0A
|
||||||
|
|
||||||
|
# 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 = base03
|
||||||
|
|
||||||
|
# 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 = base0D
|
||||||
|
|
||||||
|
# Color gradient end for the tab indicator.
|
||||||
|
c.colors.tabs.indicator.stop = base0C
|
||||||
|
|
||||||
|
# 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 = base00
|
||||||
|
|
||||||
|
# Foreground color of unselected even tabs.
|
||||||
|
c.colors.tabs.even.fg = base05
|
||||||
|
|
||||||
|
# Background color of unselected even tabs.
|
||||||
|
c.colors.tabs.even.bg = base00
|
||||||
|
|
||||||
|
# Foreground color of selected odd tabs.
|
||||||
|
c.colors.tabs.selected.odd.fg = base00
|
||||||
|
|
||||||
|
# Background color of selected odd tabs.
|
||||||
|
c.colors.tabs.selected.odd.bg = base05
|
||||||
|
|
||||||
|
# Foreground color of selected even tabs.
|
||||||
|
c.colors.tabs.selected.even.fg = base00
|
||||||
|
|
||||||
|
# Background color of selected even tabs.
|
||||||
|
c.colors.tabs.selected.even.bg = base05
|
Loading…
Reference in a new issue