general cleanup
This commit is contained in:
parent
ffced8fca4
commit
3ffb35cc2e
25 changed files with 149 additions and 120 deletions
|
@ -1,8 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from qutebrowser.api import interceptor
|
||||
from PyQt5.QtCore import QUrl, QUrlQuery
|
||||
from unalix import clear_url
|
||||
from PyQt6.QtCore import QUrl, QUrlQuery
|
||||
|
||||
config.backend = "webengine"
|
||||
config.load_autoconfig(False)
|
||||
|
@ -48,10 +47,6 @@ c.url.searchengines = { "startpage": "https://startpage.com/do/search?query={}"
|
|||
, "mellowchan": "https://srx.mellowchan.xyz/?q={}"
|
||||
, "DEFAULT": "https://srx.mellowchan.xyz/?q={}"
|
||||
}
|
||||
c.colors.webpage.preferred_color_scheme = "dark"
|
||||
c.colors.webpage.darkmode.enabled = True
|
||||
#c.colors.webpage.darkmode.policy.images = "never"
|
||||
c.colors.webpage.bg = 'black'
|
||||
|
||||
# Privacy
|
||||
c.content.proxy = "socks://localhost:9050"
|
||||
|
@ -159,10 +154,10 @@ config.bind("<Alt+j>", "prompt-item-focus next", mode="prompt")
|
|||
config.bind("<Alt+k>", "prompt-item-focus prev", mode="prompt")
|
||||
config.bind("<Alt+l>", "fake-key -g /", mode="prompt")
|
||||
config.bind("<Alt+h>", "rl-unix-filename-rubout", mode="prompt")
|
||||
config.bind("o", "set-cmd-text -s :open -s ", mode="normal")
|
||||
config.bind("O", "set-cmd-text -s :open -s -t ", mode="normal")
|
||||
config.bind("\\", "set-cmd-text -s :open ", mode="normal")
|
||||
config.bind("|", "set-cmd-text -s :open -t ", mode="normal")
|
||||
config.bind("o", "cmd-set-text -s :open -s ", mode="normal")
|
||||
config.bind("O", "cmd-set-text -s :open -s -t ", mode="normal")
|
||||
config.bind("\\", "cmd-set-text -s :open ", mode="normal")
|
||||
config.bind("|", "cmd-set-text -s :open -t ", mode="normal")
|
||||
config.bind(";t", "hint links spawn --detach tempbrowser {hint-url}", mode="normal")
|
||||
config.bind(";n", "hint links spawn --detach newbrowser {hint-url}", mode="normal")
|
||||
config.bind("gt", "spawn --detach tempbrowser {url}", mode="normal")
|
||||
|
@ -241,7 +236,7 @@ def intercept(info: interceptor.Request) -> None:
|
|||
if not info.request_url.scheme().startswith('http'):
|
||||
return
|
||||
|
||||
new_url = QUrl(clear_url(info.request_url.url()))
|
||||
new_url = QUrl(info.request_url.url())
|
||||
|
||||
if new_host := redirects.get(new_url.host()):
|
||||
new_url.setHost(new_host)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue