44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
|
|
from PyQt5.QtCore import QUrl
|
|
from qutebrowser.api import interceptor
|
|
import dracula.draw
|
|
|
|
# Load existing settings made via :set
|
|
config.load_autoconfig()
|
|
|
|
dracula.draw.blood(c, {
|
|
'spacing': {
|
|
'vertical': 6,
|
|
'horizontal': 8
|
|
}
|
|
})
|
|
|
|
def intercept(info: interceptor.Request):
|
|
if info.request_url.host() == 'youtube.com':
|
|
new_url = QUrl(info.request_url)
|
|
new_url.setHost('vid.puffyan.us')
|
|
try:
|
|
info.redirect(new_url)
|
|
except interceptor.interceptors.RedirectException:
|
|
pass
|
|
|
|
interceptor.register(intercept)
|
|
|
|
c.qt.highdpi = True
|
|
c.fonts.default_size = '15pt'
|
|
c.zoom.default = "150%"
|
|
c.content.javascript.enabled = False
|
|
#c.content.user_stylesheets = [ "stylesheet.css" ]
|
|
c.downloads.location.directory = "~/downloads"
|
|
c.editor.command = [ "alacritty", "-e", "vim", "{}" ]
|
|
c.editor.encoding = "utf-8"
|
|
|
|
c.url.searchengines = {
|
|
"DEFAULT" : "https://search.brave.com/search?q={}",
|
|
}
|
|
|
|
c.url.start_pages = [ "https://search.brave.com" ]
|
|
|
|
config.bind('<Ctrl-Shift-y>', 'hint links spawn --detach mpv --force-window yes {hint-url}')
|