qutebrowser: non-finicky dark mode toggle

thanks mr qutebrowser maintainer and the qtwebengine folks
This commit is contained in:
dogeystamp 2024-06-08 14:27:26 -04:00
parent a91d0fb323
commit 2d712167a0
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 8 additions and 5 deletions

View File

@ -43,7 +43,8 @@ c.fonts.web.family.sans_serif = "Inter"
c.fonts.web.family.standard = "Inter"
c.fonts.web.family.fixed = "JetBrains Mono"
config.bind("td", "config-cycle colors.webpage.darkmode.enabled true false;; restart")
# for QtWebEngine < 6.7, a :restart is needed following this
config.bind("td", "config-cycle colors.webpage.darkmode.enabled true false")
# General settings
@ -164,11 +165,11 @@ c.fileselect.single_file.command = [
# (thank you very much dima https://github.com/qutebrowser/qutebrowser/issues/6281)
config.bind(
"<Ctrl-d>",
"jseval -q window.scrollBy({top: window.innerHeight/2, left: 0, behavior: 'smooth'});",
"jseval -q window.scrollBy({top: window.innerHeight/1.5, left: 0, behavior: 'smooth'});",
)
config.bind(
"<Ctrl-u>",
"jseval -q window.scrollBy({top: -window.innerHeight/2, left: 0, behavior: 'smooth'});",
"jseval -q window.scrollBy({top: -window.innerHeight/1.5, left: 0, behavior: 'smooth'});",
)
config.bind(
"G",

View File

@ -1,3 +1,5 @@
body {
background: #000000;
@media (prefers-color-scheme: dark) {
body {
background: #000000;
}
}