qutebrowser: Fix visual selection errors, typehints

This commit is contained in:
Marty Oehme 2024-08-12 21:26:14 +02:00
parent 9750e943b9
commit bd29839910
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 18 additions and 8 deletions

View file

@ -1,15 +1,27 @@
import os import os
from typing import cast
# pylint: disable=C0111
from qutebrowser.config.config import ConfigContainer # noqa: F401 from qutebrowser.config.config import ConfigContainer # noqa: F401
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401 from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
config: ConfigAPI = cast(ConfigAPI, config) # noqa: F821 pylint: disable=E0602,C0103
c: ConfigContainer = cast(ConfigContainer, c) # noqa: F821 pylint: disable=E0602,C0103
# Autogenerated config.py # Autogenerated config.py
# Documentation: # Documentation:
# qute://help/configuring.html # qute://help/configuring.html
# qute://help/settings.html # qute://help/settings.html
# load additional settings configured via autoconfig.yml # load additional settings configured via autoconfig.yml
config.load_autoconfig() _ = config.load_autoconfig()
c.content.javascript.log_message.excludes = {
"userscript:_qute_stylesheet": [
"*Refused to apply inline style because it violates the following Content Security Policy directive: *"
],
"userscript:_qute_js": ["*TrustedHTML*"],
}
term = os.getenv("TERMINAL", "xterm") term = os.getenv("TERMINAL", "xterm")
@ -73,7 +85,7 @@ c.hints.selectors["code"] = [
] ]
# give the browser nice theme colors # give the browser nice theme colors
state_dir=os.environ.get('XDG_STATE_HOME', f"{os.environ['HOME']}/.local/state") state_dir = os.environ.get("XDG_STATE_HOME", f"{os.environ['HOME']}/.local/state")
colorscheme = f"{state_dir}/qutebrowser/colorscheme.py" colorscheme = f"{state_dir}/qutebrowser/colorscheme.py"
if os.path.isfile(colorscheme): if os.path.isfile(colorscheme):
config.source(colorscheme) config.source(colorscheme)

View file

@ -48,11 +48,9 @@ config.bind(leader + "tV", "set tabs.position left")
# [M]edia shortcuts - watch, queue, download media # [M]edia shortcuts - watch, queue, download media
# bind mpv to play the current page/links, using a single instance which queues the next link passed # bind mpv to play the current page/links, using a single instance which queues the next link passed
config.bind(lleader + "M", "spawn umpv {url}")
config.bind(lleader + "m", "hint links spawn umpv {hint-url}") config.bind(lleader + "m", "hint links spawn umpv {hint-url}")
config.bind(lleader + "I", "spawn uoeia -v imv {url}")
config.bind(lleader + "i", "hint links spawn uoeia -v imv {hint-url}") config.bind(lleader + "i", "hint links spawn uoeia -v imv {hint-url}")
config.bind(lleader + "<Ctrl-i>", "hint images spawn uoeia -v imv {hint-url}") config.bind(lleader + "I", "hint images spawn uoeia -v imv {hint-url}") # for images directly
# [G]emini shortcuts # [G]emini shortcuts
# the full power of qutebrowser at your fingertips for any gemini page! # the full power of qutebrowser at your fingertips for any gemini page!
@ -73,9 +71,9 @@ config.bind(lleader + "dp", "save-to-pdf", mode="normal")
config.bind("gD", "recent-downloads", mode="normal") config.bind("gD", "recent-downloads", mode="normal")
config.bind('"w', "add-wallabag", mode="normal") # add current page to wallabag config.bind('"w', "add-wallabag", mode="normal") # add current page to wallabag
config.bind(';w', "hint links userscript wallabag_add.sh") # add link to wallabag config.bind(";w", "hint links userscript wallabag_add.sh") # add link to wallabag
config.bind('"s', "add-shaarli", mode="normal") config.bind('"s', "add-shaarli", mode="normal")
config.bind(';s', "hint links userscript shaarli_add.sh") config.bind(";s", "hint links userscript shaarli_add.sh")
config.bind('"a', "send-to-archive", mode="normal") config.bind('"a', "send-to-archive", mode="normal")