qutebrowser: add copy title bind
This commit is contained in:
parent
eb181d461a
commit
395f9417fe
@ -103,6 +103,15 @@ c.hints.selectors["code"] = [
|
||||
]
|
||||
config.bind("cc", "hint code userscript code_select.py")
|
||||
|
||||
# copy the title
|
||||
c.hints.selectors["title"] = [
|
||||
"h1",
|
||||
"h2",
|
||||
"h3",
|
||||
"h4",
|
||||
]
|
||||
config.bind("ct", "hint title userscript code_select.py")
|
||||
|
||||
# use libre redirects
|
||||
config.bind(",fl", "hint links userscript fixlink.sh")
|
||||
config.bind(",fL", "hint links userscript fixlink-tab.sh")
|
||||
|
@ -40,7 +40,8 @@ def main():
|
||||
pyperclip.copy(code_text)
|
||||
send_command_to_qute(
|
||||
"message-info 'copied to clipboard: {info}{suffix}'".format(
|
||||
info=code_text.splitlines()[0],
|
||||
# message-info doesn't support escape codes for ' so we replace them
|
||||
info=code_text.splitlines()[0].replace("'", "\""),
|
||||
suffix="..." if len(code_text.splitlines()) > 1 else ""
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user