dotfiles/.config/qutebrowser/config.py

138 lines
5.2 KiB
Python
Raw Permalink Normal View History

2023-11-15 18:27:45 +01:00
config, c = config, c # pyright: ignore
2019-09-25 20:07:56 +02:00
2021-02-07 18:28:14 +01:00
# Background color for webpages if unset.
c.colors.webpage.bg = ''
# Force prefers-color-scheme: dark colors for websites.
2021-09-16 09:26:36 +02:00
c.colors.webpage.preferred_color_scheme = 'dark'
2021-02-07 18:28:14 +01:00
# Require a confirmation before quitting the application.
c.confirm_quit = ['downloads']
2021-02-22 17:41:12 +01:00
# List of URLs to ABP-style adblocking rulesets. {{{1
c.content.blocking.adblock.lists = [
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt', # noqa
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt', # noqa
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt', # noqa
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt', # noqa
'https://raw.githubusercontent.com/kargig/greek-adblockplus-filter/master/void-gr-filters.txt', # noqa
'https://raw.githubusercontent.com/ryanbr/fanboy-adblock/master/fanboy-antifacebook.txt', # noqa
'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/nocoin.txt', # noqa
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt', # noqa
]
# }}}
2019-05-28 17:44:30 +02:00
# Default encoding to use for websites.
c.content.default_encoding = 'utf-8'
# Value to send in the Accept-Language header.
2021-02-22 17:41:12 +01:00
c.content.headers.accept_language = 'en-GB,en,el;q=0.9'
2019-05-28 17:44:30 +02:00
# User agent to send.
2019-10-21 09:51:06 +02:00
c.content.headers.user_agent = ' '.join((
2019-05-28 17:44:30 +02:00
'Mozilla/5.0',
'(X11; Linux x86_64)',
2023-11-15 18:27:45 +01:00
'QtWebEngine/5.15.14',
2021-09-16 09:26:36 +02:00
'Chromium/87.0.4280.144',
2023-11-15 18:27:45 +01:00
'qutebrowser/3.0.0'
2019-10-21 09:51:06 +02:00
))
2019-05-28 17:44:30 +02:00
# Allow JavaScript to read from or write to the clipboard.
2023-11-15 18:27:45 +01:00
c.content.javascript.clipboard = 'access-paste'
2019-05-28 17:44:30 +02:00
# Allow pdf.js to view PDF files in the browser.
c.content.pdfjs = True
# Enable WebGL.
c.content.webgl = False
# Editor (and arguments) to use
2021-02-07 18:28:14 +01:00
# for the edit-text command.
2019-05-28 17:44:30 +02:00
c.editor.command = [
'konsole', '-e',
'nvim', '{file}',
'-c', 'normal {line}G{column0}l'
]
2021-02-07 18:28:14 +01:00
# Command (and arguments) to use for selecting files in forms.
c.fileselect.single_file.command = \
c.fileselect.multiple_files.command = \
['konsole', '-e', 'vifm', '--choose-files', '{}']
2019-05-28 17:44:30 +02:00
# Default monospace fonts.
2021-02-07 18:28:14 +01:00
c.fonts.web.family.fixed = 'Hack, Fira Code, Fantasque Sans Mono'
2019-05-28 17:44:30 +02:00
# Which Chromium process model to use.
2022-10-29 00:27:38 +02:00
c.qt.chromium.process_model = 'process-per-site'
2019-05-28 17:44:30 +02:00
# Languages to use for spell checking.
2019-11-24 15:50:07 +01:00
c.spellcheck.languages = ['en-GB', 'en-US', 'el-GR']
2019-05-28 17:44:30 +02:00
2021-02-07 18:28:14 +01:00
# When to show the statusbar.
c.statusbar.show = 'never'
2019-05-28 17:44:30 +02:00
# List of widgets displayed in the statusbar.
2019-11-24 15:50:07 +01:00
c.statusbar.widgets = ['keypress', 'url', 'history', 'tabs', 'progress']
2019-05-28 17:44:30 +02:00
2021-02-07 18:28:14 +01:00
# When to show the tab bar.
c.tabs.show = 'multiple'
# What search to start when something else than a URL is entered.
c.url.auto_search = 'never'
# Page to open if :open -t/-b/-w is used without URL. {{{1
c.url.default_page = """https://search.disroot.org/?preferences=
2023-11-15 18:27:45 +01:00
eJx1V02P4zYM_TXNxdgA2z0UPeTSAu1xC3TvAi0xNseS6NVHHM-vLxXbsTyZHsYY
kRJFPoqPjIaEHQfCeOnQ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oe0k9DR6Qn_s
bY_jlny-N8XTrZ7DnW71ay-6lXCrMMh3H9evfj6kBwcfkgXOCtY2Geq6KvF4I6k-
qbK6T7B0w9D0uV093RvHoR2l2bGXsKrMiJZyxVCyTgWZBSOZCqDdF_sF3Uq1u_GV
ul8CXeWHUFfZS7Cr_BNeIS-biHO9u5Jt3kts3e2QDT-6jWxBehVuvaKwKEg7K-04
okxc1WWbTmhU-iGsbX3Xj6ZUSbXuhd38xs8jBRkeW5grfs6tlNLhyDxSTc-1ywtf
vwC5iF8wkxAMpRcSlecuY9OxuQg564GFBa6Wp-1NxyG32ae8kXseMeT4xEkmTjLS
8mUMSlXHeRDyMakGyMr7KmhV7t3IIdc0QUPZAWWGeJIB26XJjH01ujhhECezRpMC
-GgF03qS4mA8DZUgpXCmimGkY62deB9dR5ulvuOl8MP9vK7OPcck7IkyX0vfWdrY
YYOEr3SPenjRSHRKkj_gHJ8c8j-XlIa2LF6sWKHCtPJ4LWdQy9g_BdG_qFdmFLj1
8mtlluHeyoD2yU57lSn_yq-hBSjUoWTylXtceRwnadcydlz-A1zR6ss=&q=%s
""".replace('\n', '')
2021-02-07 18:28:14 +01:00
# }}}
# Page(s) to open at the start.
c.url.start_pages = ['about:blank']
2019-05-28 17:44:30 +02:00
# Search engines which can be used via the address bar.
c.url.searchengines = {
2021-02-07 18:28:14 +01:00
'DEFAULT': c.url.default_page + '&q={}',
2020-04-25 21:12:40 +02:00
'G': 'https://google.com/search?q={}',
2019-09-25 20:07:56 +02:00
'Q': 'https://qwant.com/?q={}'
2019-05-28 17:44:30 +02:00
}
# Keybindings {{{0
config.bind(';m', 'spawn mpv {url}')
config.bind(';M', 'hint links spawn mpv {hint-url}')
2021-02-07 18:28:14 +01:00
config.bind(';T', 'config-cycle -t tabs.show always multiple')
config.bind(';S', 'config-cycle -t statusbar.show always never')
config.bind('<F5>', 'reload -f')
config.bind('<Ctrl-Shift-I>', 'devtools window')
2019-05-28 17:44:30 +02:00
# }}}
2021-02-07 18:28:14 +01:00
# Disable autoconfig
config.load_autoconfig(False)
2019-05-28 17:44:30 +02:00
2019-09-25 20:07:56 +02:00
# vim:fdm=marker:fdl=0: