diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index c21d342e2..6d59c18df 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -951,6 +951,7 @@ KEY_DATA = collections.OrderedDict([ ('forward', ['L']), ('forward -t', ['tl']), ('forward -w', ['wl']), + ('fullscreen', ['']), ('hint', ['f']), ('hint all tab', ['F']), ('hint all window', ['wf']), diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 379f7b80f..a3c3fa0e4 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -305,6 +305,14 @@ class MainWindow(QWidget): """ super().close() + @cmdutils.register(instance='main-window', scope='window') + def fullscreen(self): + """Toggle fullscreen mode.""" + if self.isFullScreen(): + self.showNormal() + else: + self.showFullScreen() + def resizeEvent(self, e): """Extend resizewindow's resizeEvent to adjust completion.