diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 67ed5dd75..c4062ac62 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1979,7 +1979,7 @@ bindings.default: : hint all tab-bg : leave-mode passthrough: - : leave-mode + : leave-mode command: # FIXME:conf what to do about up/down? : command-history-prev diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index 2a0c38a75..555aee57c 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -263,7 +263,17 @@ class StatusBar(QWidget): def _set_mode_text(self, mode): """Set the mode text.""" - text = "-- {} MODE --".format(mode.upper()) + if mode == 'passthrough': + key_instance = config.key_instance + all_bindings = key_instance.get_reverse_bindings_for('passthrough') + bindings = all_bindings.get('leave-mode') + if bindings: + suffix = ' ({} to leave)'.format(bindings[0]) + else: + suffix = '' + else: + suffix = '' + text = "-- {} MODE --{}".format(mode.upper(), suffix) self.txt.set_text(self.txt.Text.normal, text) def _show_cmd_widget(self):