# qutemacs - a simple, preconfigured Emacs binding set for qutebrowser # # The aim of this binding set is not to provide bindings for absolutely # everything, but to provide a stable launching point for people to make their # own bindings. # # Installation: # # 1. Copy this file or add this repo as a submodule to your dotfiles. # 2. Add this line to your config.py, and point the path to this file: # config.source('qutemacs/qutemacs.py') config = config # type: ConfigAPI # noqa: F821 pylint: disable=E0602,C0103 c = c # type: ConfigContainer # noqa: F821 pylint: disable=E0602,C0103 # c.input.insert_mode.auto_enter = False # c.input.insert_mode.auto_leave = False c.input.insert_mode.plugins = True c.input.insert_mode.auto_load = True # Forward unbound keys c.input.forward_unbound_keys = "all" ESC_BIND = "clear-keychain ;; search ;; fullscreen --leave" c.bindings.default["normal"] = {} # Bindings c.bindings.commands["normal"] = { # Navigation "": "scroll-page 0 0.9", "": "scroll-page 0 -0.9", "": "scroll-page 0 -0.9", # '': 'scroll-page 0 0.9', "": "scroll-to-perc 0", # Commands "": "set-cmd-text :", "": "quit", # searching "": "set-cmd-text /", "": "set-cmd-text ?", # hinting "": "hint all", "": "hint all hover", "": "hint all tab-bg", "": "hint all tab-fg", "": "hint all yank-primary", "": "yank url", "": "yank all download", # history "": "forward", "": "back", "": "forward", "": "back", "shift-h>": "history", # bookmarks "m": "bookmark-add", "M": "open qute://bookmarks", # tabs "": "tab-next", "": "tab-prev", "": "tab-next", "": "tab-move +", "": "tab-prev", "": "tab-move -", "": "set-cmd-text -s :buffer", "": "tab-close", "

": "tab-pin", "": "tab-mute", "<0>": "tab-close", "<1>": "tab-only", "": "tab-focus 1", "": "tab-focus 2", "": "tab-focus 3", "": "tab-focus 4", "": "tab-focus 5", "": "tab-focus 6", "": "tab-focus 7", "": "tab-focus 8", "": "tab-focus -1", # frames "<5><0>": "close", "<5><1>": "window-only", "<5><2>": "set-cmd-text -s :open -w", "<5><2>": "set-cmd-text -s :open -p", # open links "": "set-cmd-text -s :open", "": "set-cmd-text -s :open -t", # editing "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "insert-text {primary}", # Numbers # https://github.com/qutebrowser/qutebrowser/issues/4213 "1": "fake-key 1", "2": "fake-key 2", "3": "fake-key 3", "4": "fake-key 4", "5": "fake-key 5", "6": "fake-key 6", "7": "fake-key 7", "8": "fake-key 8", "9": "fake-key 9", "0": "fake-key 0", # misc "": "spawn --userscript ~/.bin/open_in_mpv.sh", # Help "": "open qute://bindings", "": "set-cmd-text -s :help", # escape hatch "": ESC_BIND, } c.bindings.commands["command"] = { "": "search-next", "": "search-prev", "": "completion-item-focus prev", "": "completion-item-focus next", "": "command-history-prev", "": "command-history-next", # escape hatch "": "leave-mode", } c.bindings.commands["hint"] = { # escape hatch "": "leave-mode", } c.bindings.commands["caret"] = { # escape hatch "": "leave-mode", } c.bindings.commands["insert"] = { # editing "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "fake-key ", "": "insert-text {primary}", "": "leave-mode", }