Implemented fullscreen mode. Fix #385

This commit is contained in:
Joel Torstensson 2014-12-22 21:57:37 +01:00
parent 4363db90c0
commit 19f75984e3
2 changed files with 12 additions and 0 deletions

View File

@ -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):

View File

@ -946,6 +946,7 @@ KEY_DATA = collections.OrderedDict([
('forward', ['L']),
('forward -t', ['tl']),
('forward -w', ['wl']),
('fullscreen', ['<F11>']),
('hint', ['f']),
('hint all tab', ['F']),
('hint all window', ['wf']),