qutebrowser: Make use of dotter for dir structure

Since we now use dotter we can simplify the dir structure for
qutebrowser a lot. Everything dot-filed earlier can now reside
in simple directories called config (for ~/.config/qutebrowser),
data (for ~/.local/share/qutebrowser), and scripts
(for ~/.local/bin) files.
This commit is contained in:
Marty Oehme 2023-10-03 13:43:00 +02:00
parent dcde027a67
commit 8681d34946
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
49 changed files with 9 additions and 5 deletions

View file

@ -54,7 +54,9 @@ office = "~"
pass = "~"
[qutebrowser.files]
qutebrowser = "~"
"qutebrowser/config" = "~/.config/qutebrowser"
"qutebrowser/scripts" = "~/.local/bin"
"qutebrowser/data" = "~/.local/share/qutebrowser"
[scripts.files]
"scripts/README.md" = { target = "~/README.md", type = "symbolic", if = "false" }

View file

@ -1 +0,0 @@
../../../bin/qutedmenu

View file

@ -1 +0,0 @@
../../../bin/recently-downloaded

View file

@ -17,7 +17,7 @@ def fixScribePath(url: QUrl):
# unquoted = parse.unquote(
# url.path(options=QUrl.ComponentFormattingOption.FullyEncoded)
# )
path = parse.unquote(f"{url.path()}{url.query()}", encoding='ascii')
path = parse.unquote(f"{url.path()}{url.query()}", encoding="ascii")
url.setQuery(None)
new_path = re.sub(r"m/global-identity-2redirectUrl=", "", path)
url.setPath(
@ -194,8 +194,10 @@ redirects = {
},
}
def rewrite(request: interceptor.Request) -> None:
# if config.get(name="content.oss_redirects") is False:
# return
def rewrite(request: interceptor.Request):
if (
request.resource_type != interceptor.ResourceType.main_frame
or request.request_url.scheme() in {"data", "blob"}

View file

@ -0,0 +1 @@
../../scripts/qutedmenu

View file

@ -0,0 +1 @@
../../scripts/recently-downloaded