dotfiles/config/qutebrowser/config.py
2021-02-15 08:31:27 +01:00

79 lines
2.7 KiB
Python

import os
# Public static configuration for qutebrowser
# Note that private stuff (permissions, per-site rules)
# are in autoconfig in gdotfiles
# Prompt the user for the download location. If set to false,
# `downloads.location.directory` will be used.
# Type: Bool
c.downloads.location.prompt = False
# 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 = "never"
# Open a new window for every tab.
# Type: Bool
c.tabs.tabs_are_windows = True
# Open base URL of the searchengine if a searchengine shortcut is
# invoked without parameters.
# Type: Bool
c.url.open_base_url = True
# 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 `{`/`}` signs. 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://www.ecosia.org/search?q={}",
"aw": "http://www.amp-what.com/unicode/search/{}",
"ddg": "https://duckduckgo.com/?q={}&ia=web",
"duckduckgo": "https://duckduckgo.com/?q={}&ia=web",
"ecosia": "https://www.ecosia.org/search?q={}",
"github": "https://github.com/search?q={}",
"google": "https://www.google.fr/search?q={}",
"npm": "https://www.npmjs.com/search?q={}",
"q": "https://www.qwant.com/?t=web&q={}",
"qwant": "https://www.qwant.com/?t=web&q={}",
"wolfram": "https://www.wolframalpha.com/input/?i={}",
"youtube": "https://www.youtube.com/results?search_query={}",
}
# Only allow first party cookies
config.set("content.cookies.accept", "no-3rdparty", "chrome://*/*")
# Page(s) to open at the start.
# Type: List of FuzzyUrl, or FuzzyUrl
c.url.start_pages = "https://geoffrey.frogeye.fr/blank.html"
# Bindings for normal mode
config.bind("H", "tab-prev")
config.bind("J", "back")
config.bind("K", "forward")
config.bind("L", "tab-next")
config.unbind("T")
config.bind("af", "spawn --userscript freshrss")
config.bind("as", "spawn --userscript shaarli")
config.bind("u", "undo --window")
dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, "theme.py")
if os.path.exists(filename):
with open(filename) as file:
exec(file.read())
# Uncomment this to still load settings configured via autoconfig.yml
config.load_autoconfig()