dotfiles/qutebrowser/.config/qutebrowser/alias.py
Marty Oehme 30e9d09ee4
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
2022-12-09 12:54:51 +01:00

42 lines
1.5 KiB
Python

c.aliases["gem"] = "hint links userscript qute-gemini"
# Use q for quitting a tab (mimicks vim buffer) - qa is used for exiting
c.aliases["q"] = "tab-close"
# if we save sessions with w, load sessions with e (again, mimicks vim)
c.aliases["e"] = "session-load"
# wallabag add current page, either with walla command, or <leader>bw
c.aliases["add-wallabag"] = "spawn --userscript wallabag_add.sh"
# add to (my) shaarli instance
c.aliases["add-shaarli"] = "spawn --userscript shaarli_add.sh"
# re-opens the current page on the web archive overview page
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"
# open sci-hub pdf for doi
c.aliases["send-to-scihub"] = "spawn --userscript doi2scihub"
# translate current page / selection with google translate
c.aliases["translate-page-google"] = "spawn --userscript translate_google.sh"
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"
# add a task of current page to taskwarrior
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"