qutebrowser: Restructure commands and shortcuts

There was not much structure to the shortcuts versus commands so far.
This turns most userscripts into invokable commands, which in turn are
invoked by the respective shortcut mappings. Mappings themselves have
not changed.

New commands are:

- `readable` to invoke readability script
- `save-to-pdf` (from `save_to_pdf`) to save current page as pdf
- `recent-downloads` to show list of recently downloaded files
This commit is contained in:
Marty Oehme 2022-12-09 12:54:51 +01:00
parent 7e2da571e7
commit 30e9d09ee4
Signed by: Marty
GPG Key ID: 73BA40D5AFAF49C9
2 changed files with 12 additions and 5 deletions

View File

@ -15,7 +15,7 @@ c.aliases["add-shaarli"] = "spawn --userscript shaarli_add.sh"
c.aliases["send-to-archive"] = "open https://web.archive.org/web/{url}"
# save current page to pdf file
c.aliases["save_to_pdf"] = "spawn --userscript pagetopdf.sh"
c.aliases["save-to-pdf"] = "spawn --userscript pagetopdf.sh"
# open sci-hub pdf for doi
c.aliases["send-to-scihub"] = "spawn --userscript doi2scihub"
@ -25,6 +25,9 @@ c.aliases[
"translate-selection-google"
] = "spawn --userscript translate_google.sh --text"
# open the current page in more readable version
c.aliases["readable"] = "spawn --userscript readability"
# print picture of current url as qr code
c.aliases["show-qr"] = "spawn --userscript qr"
@ -33,3 +36,6 @@ c.aliases["taskadd"] = "spawn --userscript taskadd"
# try to remove the cookie banner from a website
c.aliases["cookie-block"] = "spawn --userscript qute-cookie-block"
# open last downloads in dmenu-like
c.aliases["recent-downloads"] = "spawn --userscript open_download"

View File

@ -60,13 +60,13 @@ config.bind(
)
# Download shortcuts
config.bind(lleader + "dd", "download", mode="normal")
config.bind(lleader + "dp", "save_to_pdf", mode="normal")
config.bind(lleader + "dp", "save-to-pdf", mode="normal")
# open last download
config.bind("gD", "spawn --userscript open_download")
config.bind("gD", "recent-downloads", mode="normal")
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 run add-wallabag") # add link to wallabag
config.bind('"s', "add-shaarli", mode="normal")
config.bind('"a', "send-to-archive", mode="normal")
@ -76,10 +76,11 @@ config.bind('"T', "translate-selection-google", mode="normal")
config.bind('"q', "show-qr")
config.bind(lleader + "r", "spawn --userscript readability")
config.bind('"p', "send-to-scihub", mode="normal") # view current page doi on scihub
config.bind(";p", "hint links run send-to-scihub") # view linked doi on scihub
config.bind(lleader + "r", "readable", mode="normal")
# set stylesheets for the browser to use
config.bind(
leader + "s",