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:
parent
dcde027a67
commit
8681d34946
49 changed files with 9 additions and 5 deletions
|
@ -54,7 +54,9 @@ office = "~"
|
||||||
pass = "~"
|
pass = "~"
|
||||||
|
|
||||||
[qutebrowser.files]
|
[qutebrowser.files]
|
||||||
qutebrowser = "~"
|
"qutebrowser/config" = "~/.config/qutebrowser"
|
||||||
|
"qutebrowser/scripts" = "~/.local/bin"
|
||||||
|
"qutebrowser/data" = "~/.local/share/qutebrowser"
|
||||||
|
|
||||||
[scripts.files]
|
[scripts.files]
|
||||||
"scripts/README.md" = { target = "~/README.md", type = "symbolic", if = "false" }
|
"scripts/README.md" = { target = "~/README.md", type = "symbolic", if = "false" }
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../../bin/qutedmenu
|
|
|
@ -1 +0,0 @@
|
||||||
../../../bin/recently-downloaded
|
|
|
@ -17,7 +17,7 @@ def fixScribePath(url: QUrl):
|
||||||
# unquoted = parse.unquote(
|
# unquoted = parse.unquote(
|
||||||
# url.path(options=QUrl.ComponentFormattingOption.FullyEncoded)
|
# 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)
|
url.setQuery(None)
|
||||||
new_path = re.sub(r"m/global-identity-2redirectUrl=", "", path)
|
new_path = re.sub(r"m/global-identity-2redirectUrl=", "", path)
|
||||||
url.setPath(
|
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 (
|
if (
|
||||||
request.resource_type != interceptor.ResourceType.main_frame
|
request.resource_type != interceptor.ResourceType.main_frame
|
||||||
or request.request_url.scheme() in {"data", "blob"}
|
or request.request_url.scheme() in {"data", "blob"}
|
1
qutebrowser/data/userscripts/qutedmenu
Symbolic link
1
qutebrowser/data/userscripts/qutedmenu
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../scripts/qutedmenu
|
1
qutebrowser/data/userscripts/recently-downloaded
Symbolic link
1
qutebrowser/data/userscripts/recently-downloaded
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../scripts/recently-downloaded
|
Loading…
Reference in a new issue