.dotfiles/.config/qutebrowser/keybindings.py

46 lines
1.8 KiB
Python
Raw Normal View History

def init(c):
c.bind(',v', 'spawn --userscript view_in_mpv {url}')
c.bind(',V', 'hint links spawn --userscript view_in_mpv {hint-url}')
2021-05-13 12:26:52 +00:00
# ungoogled-chromium
c.bind(',b', 'spawn chromium {url}')
c.bind(',B', 'hint links spawn chromium {hint-url}')
2023-10-18 21:51:45 +00:00
# firefox
c.bind(',f', 'spawn firefox {url}')
c.bind(',F', 'hint links spawn firefox {hint-url}')
2022-04-05 21:05:00 +00:00
c.bind(',j', 'spawn --userscript format_json dracula')
c.bind(',g', 'open {url:scheme}://github1s.com{url:path}{url:query}')
2022-06-30 12:24:33 +00:00
c.bind(',rr', 'open {url:scheme}://unddit.com{url:path}{url:query}')
2022-11-15 23:17:08 +00:00
c.bind(',rt', 'open {url:scheme}://teddit.net{url:path}{url:query}')
2022-01-30 20:28:50 +00:00
c.bind(',s', 'spawn xdg-open steam://openurl/{url}')
2021-12-21 11:13:11 +00:00
gpg_key = '723B78C0BF8D8C721D2C4EEF41E544A54E2533B2'
c.bind(',p', 'spawn --userscript qute-keepassxc --key ' + gpg_key, mode='normal')
2022-01-10 13:25:26 +00:00
c.bind(',Pu', 'spawn --userscript qute-keepassxc --only-username --key ' + gpg_key, mode='normal')
c.bind(',Pi', 'spawn --userscript qute-keepassxc --only-password --key ' + gpg_key, mode='normal')
c.bind(',Po', 'spawn --userscript qute-keepassxc --only-otp --key ' + gpg_key, mode='normal')
2022-11-13 22:22:21 +00:00
c.bind(',Pp', 'spawn --userscript qute-keepassxc --autotype --key ' + gpg_key, mode='normal')
c.bind(',q', 'spawn --userscript qr {url}')
c.bind(',Q', 'hint links spawn --userscript qr {hint-url}')
2022-08-30 21:03:21 +00:00
# cookies
c.bind(',cd', 'jseval document.cookie = "XDEBUG_SESSION=phpstorm; expires=Fri, 01 Jan 9999 00:00:00 GMT; path=/"')
c.bind('<Alt-9>', 'tab-focus 9')
c.bind('<Ctrl-Tab>', 'tab-next')
c.bind('<Ctrl-Shift-Tab>', 'tab-prev')
2022-01-13 18:23:21 +00:00
try:
import unalix
c.unbind('yy')
c.unbind('yY')
c.bind('yy', 'spawn --userscript qute-clear-url', mode='normal')
c.bind('yY', 'spawn --userscript qute-clear-url -s', mode='normal')
except:
pass