# Key mappings # 'Leader' key binding -- for general personal maps leader = "" # 'LocalLeader' key binding -- intended for 'in-page' personal maps lleader = "," ## CHANGED DEFAULTS # rebind moving tabs to free for download config.bind("gG", "tab-give") # switch binds for scroll-marks and quick-/book-marks config.bind("m", "mode-enter set_mark") config.bind("`", "quickmark-save") config.bind("~", "bookmark-add") config.bind("", "command-history-next", mode="command") config.bind("", "command-history-prev", mode="command") config.bind("", "completion-item-focus prev", mode="command") config.bind("", "completion-item-focus next", mode="command") config.bind('', 'rl-backward-kill-word', mode='command') config.bind('', 'rl-kill-word', mode='command') config.bind('', 'rl-forward-word', mode='command') config.bind('', 'rl-delete-char', mode='command') config.bind('', 'rl-beginning-of-line', mode='command') config.bind('', 'rl-backward-char', mode='command') config.bind('', 'completion-item-yank', mode='command') config.bind('', 'completion-item-del', mode='command') config.bind('', 'rl-end-of-line', mode='command') config.bind('', 'rl-forward-char', mode='command') config.bind('', 'rl-backward-delete-char', mode='command') config.bind('', 'completion-item-focus prev-category', mode='command') config.bind('', 'completion-item-focus next-category', mode='command') config.bind('', 'rl-unix-line-discard', mode='command') config.bind('', 'rl-unix-word-rubout', mode='command') config.bind('', 'rl-yank', mode='command') ## ADDED # toggles ('cycles') between tabs always showing, or only when switching between them config.bind( leader + "tt", "config-cycle -t tabs.show always switching ;; config-cycle -t statusbar.show in-mode always", ) config.bind(leader + "th", "set tabs.position bottom") config.bind(leader + "tH", "set tabs.position top") config.bind(leader + "tv", "set tabs.position right") config.bind(leader + "tV", "set tabs.position left") # [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 config.bind(lleader + "M", "spawn umpv {url}") config.bind(lleader + "m", "hint links spawn umpv {hint-url}") # bind youtube-dl to download the current page/links config.bind(lleader + "dM", "spawn vidl {url}") config.bind( lleader + "dm", "hint --rapid links spawn vidl {hint-url}", ) # Download shortcuts config.bind(lleader + "dd", "download", mode="normal") config.bind(lleader + "dp", "save_to_pdf", mode="normal") # open last download config.bind("gD", "spawn --userscript open_download") config.bind('"w', "add-wallabag", mode="normal") config.bind('"s', "add-shaarli", mode="normal") config.bind('"a', "send-to-archive", mode="normal") config.bind('"o', "send-to-outline", mode="normal") config.bind('"t', "translate-page-google", mode="normal") config.bind('"T', "translate-selection-google", mode="normal") config.bind('"q', "show-qr") config.bind(lleader + "r", "spawn --userscript readability") # set stylesheets for the browser to use config.bind( leader + "s", "config-cycle content.user_stylesheets " + 'stylesheets/stylesheet.css ""', ) config.bind(leader + "a", "set-cmd-text -s :taskadd") # Enable and disable javascript config.bind(leader + "js", "config-cycle content.javascript.enabled true false") # Reload configuration config.bind(leader + "VV", "config-source") # Enable code snippet hinting mode config.bind(";c", "hint code userscript code_select.py") # first looks if it's a gemini link and then fall back to http config.bind(";g", "hint links userscript qute-gemini") config.bind(";G", "hint links userscript qute-gemini-tab")