Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue 271: add keybindings to zoom all terminals at once #314

Merged
merged 1 commit into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions terminatorlib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
'zoom_in' : '<Control>plus',
'zoom_out' : '<Control>minus',
'zoom_normal' : '<Control>0',
'zoom_in_all' : '',
'zoom_out_all' : '',
'zoom_normal_all' : '',
'new_tab' : '<Shift><Control>t',
'cycle_next' : '<Control>Tab',
'cycle_prev' : '<Shift><Control>Tab',
Expand Down
3 changes: 3 additions & 0 deletions terminatorlib/prefseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class PrefsEditor:
keybindingnames = { 'zoom_in' : _('Increase font size'),
'zoom_out' : _('Decrease font size'),
'zoom_normal' : _('Restore original font size'),
'zoom_in_all' : _('Increase font size on all terminals'),
'zoom_out_all' : _('Decrease font size on all terminals'),
'zoom_normal_all' : _('Restore original font size on all terminals'),
'new_tab' : _('Create a new tab'),
'cycle_next' : _('Focus the next terminal'),
'cycle_prev' : _('Focus the previous terminal'),
Expand Down
9 changes: 9 additions & 0 deletions terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,15 @@ def key_search(self):
# a function of Terminator. It would be cleaner if TerminatorTerm
# has absolutely no reference to Terminator.
# N (next) - P (previous) - O (horizontal) - E (vertical) - W (close)
def key_zoom_in_all(self):
self.terminator.zoom_in_all()

def key_zoom_out_all(self):
self.terminator.zoom_out_all()

def key_zoom_normal_all(self):
self.terminator.zoom_orig_all()

def key_cycle_next(self):
self.key_go_next()

Expand Down
11 changes: 11 additions & 0 deletions terminatorlib/terminator.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,4 +633,15 @@ def describe_layout(self):

return(layout)

def zoom_in_all(self):
for term in self.terminals:
term.zoom_in()

def zoom_out_all(self):
for term in self.terminals:
term.zoom_out()

def zoom_orig_all(self):
for term in self.terminals:
term.zoom_orig()
# vim: set expandtab ts=4 sw=4: