diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 0a6e280fc..f0d6ec7ae 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -243,6 +243,17 @@ class CommandDispatcher: "'previous'!") return None + @cmdutils.register(instance='command-dispatcher', name='fullscreen', + scope='window') + def full_screen(self): + """Toggle fullscreen mode.""" + main_window = objreg.get('main-window', scope='window', + window=self._win_id) + if main_window.isFullScreen(): + main_window.showNormal() + else: + main_window.showFullScreen() + @cmdutils.register(instance='command-dispatcher', scope='window') def tab_close(self, left=False, right=False, opposite=False, count: {'special': 'count'}=None): diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 8dd8de302..1416e8460 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -946,6 +946,7 @@ KEY_DATA = collections.OrderedDict([ ('forward', ['L']), ('forward -t', ['tl']), ('forward -w', ['wl']), + ('fullscreen', ['']), ('hint', ['f']), ('hint all tab', ['F']), ('hint all window', ['wf']),