dotfiles/config/qutebrowser/config.py

79 lines
2.7 KiB
Python
Raw Normal View History

2020-08-08 11:19:48 +02:00
import os
2018-10-06 13:53:24 +02:00
2020-08-08 11:19:48 +02:00
# Public static configuration for qutebrowser
# Note that private stuff (permissions, per-site rules)
# are in autoconfig in gdotfiles
2018-10-06 13:53:24 +02:00
# 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.
2020-08-08 11:19:48 +02:00
c.tabs.show = "never"
2018-10-06 13:53:24 +02:00
# 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
2020-08-08 11:19:48 +02:00
c.url.searchengines = {
2020-10-17 23:47:48 +02:00
"DEFAULT": "https://www.ecosia.org/search?q={}",
2020-08-08 11:19:48 +02:00
"aw": "http://www.amp-what.com/unicode/search/{}",
"ddg": "https://duckduckgo.com/?q={}&ia=web",
"duckduckgo": "https://duckduckgo.com/?q={}&ia=web",
2020-10-17 23:47:48 +02:00
"ecosia": "https://www.ecosia.org/search?q={}",
2020-08-08 11:19:48 +02:00
"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://*/*")
2018-10-06 13:53:24 +02:00
# Page(s) to open at the start.
# Type: List of FuzzyUrl, or FuzzyUrl
2020-08-08 11:19:48 +02:00
c.url.start_pages = "https://geoffrey.frogeye.fr/blank.html"
2018-10-06 13:53:24 +02:00
# Bindings for normal mode
2020-08-08 11:19:48 +02:00
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")
2021-02-15 08:31:27 +01:00
config.bind("u", "undo --window")
2018-10-06 13:53:24 +02:00
dirname = os.path.dirname(__file__)
2020-08-08 11:19:48 +02:00
filename = os.path.join(dirname, "theme.py")
if os.path.exists(filename):
with open(filename) as file:
exec(file.read())
2018-10-06 13:53:24 +02:00
# Uncomment this to still load settings configured via autoconfig.yml
config.load_autoconfig()