desktop-playbook/files/config/qutebrowser/config.py

65 lines
2.4 KiB
Python

config.load_autoconfig()
c.qt.args = [
'autoplay-policy=user-gesture-required',
'ignore-gpu-blocklist',
#'enable-gpu-rasterization',
#'use-gl=egl',
'enable-accelerated-video-decode',
'enable-features=VaapiVideoDecoder',
'enable-features=WebRTCPipeWireCapturer',
#'num-raster-threads=8'
]
# Try to reduce memury usage
c.qt.chromium.low_end_device_mode = 'always'
c.qt.chromium.process_model = 'process-per-site'
c.fonts.default_family = "Fura Code Nerd Font"
c.fonts.completion.category = "default_size default_family"
c.tabs.title.format = '{index}:{audio:1} {current_title}'
c.tabs.padding = {'top': 3, 'bottom': 3, 'left': 5, 'right': 5}
c.tabs.select_on_remove = 'last-used'
c.colors.webpage.preferred_color_scheme = "dark"
config.source('theme.base16.py')
# Privacy
# -------
config.set('content.autoplay', True, 'https://*.alienor.net/')
c.content.canvas_reading = True
c.content.headers.do_not_track = True
c.content.cookies.accept = "no-3rdparty"
#c.content.cookies.store = True
c.content.geolocation = False
c.content.headers.referer = "same-domain"
c.content.blocking.enabled = True
c.content.blocking.method = 'both'
c.content.blocking.adblock.lists = [
'https://easylist.to/easylist/easylist.txt',
'https://easylist.to/easylist/easyprivacy.txt',
'https://www.i-dont-care-about-cookies.eu/abp/',
'https://secure.fanboy.co.nz/fanboy-cookiemonster.txt'
]
c.content.plugins = False
#c.content.register_protocol_handler = False
#c.content.webrtc_ip_handling_policy = "disable-non-proxied-udp"
#c.content.xss_auditing = True
c.downloads.location.directory = '~/downloads'
c.completion.open_categories = ["quickmarks", "history"]
c.editor.command = ["/bin/sh", "-c", "exec foot vim {file}"]
config.bind('zl', 'spawn --userscript ~/.config/qutebrowser/userscripts/qute-keepassxc --key BFB6758157CE593805977AA8A08AFE175EF077A4', mode='normal')
config.bind(',M', 'hint links spawn mpv {hint-url} --title="webvideo"')
c.url.searchengines['at'] = 'https://glpi.alienor.net/front/ticket.form.php?id={}'
c.scrolling.bar = 'always'
c.scrolling.smooth = True
# Change audio icon
from qutebrowser.api import message
try:
from qutebrowser.mainwindow import tabwidget
tabwidget.TabWidget.MUTE_STRING = ""
tabwidget.TabWidget.AUDIBLE_STRING = ""
except (ImportError, AttributeError) as err:
message.error(f"Failed to change audible indicators {err}")