diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index 3633ec12..7cd996d9 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -61,6 +61,10 @@ Defines where tabs are placed. Can be any of: top, left, right, bottom. If this is set to "hidden", the tab bar will not be shown. Note that hiding the tab bar is very confusing and not recommended. Default value: \fBtop\fR .TP +.B broadcast_default +Defines default broadcast behavior. Can be any of: all, group, off. +Default value: \fBgroup\fR +.TP .B close_button_on_tab \fR(boolean) If set to True, tabs will have a close button on them. Default value: \fBTrue\fR diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 4a293097..320bc63f 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -93,6 +93,7 @@ DEFAULTS = { 'window_state' : 'normal', 'borderless' : False, 'tab_position' : 'top', + 'broadcast_default' : 'group', 'close_button_on_tab' : True, 'hide_tabbar' : False, 'scroll_tabbar' : False, diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index fccbf3bb..8c318ef6 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -256,6 +256,23 @@ + + + + + + + + All + + + Group + + + None + + + @@ -530,6 +547,42 @@ GTK_EXPAND + + + True + False + Broadcast default + + + 18 + 19 + + + + + + + True + False + BroadcastDefaultListStore + 0 + + + + + 0 + + + + + 1 + 2 + 18 + 19 + + GTK_EXPAND + + True diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 1d755878..4432e053 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -247,6 +247,16 @@ class PrefsEditor: else: active = 0 widget.set_active(active) + # Broadcast default + option = self.config['broadcast_default'] + widget = guiget('broadcastdefault') + if option == 'all': + active = 0 + elif option == 'off': + active = 2 + else: + active = 1 + widget.set_active(active) # scroll_tabbar widget = guiget('scrolltabbarcheck') widget.set_active(self.config['scroll_tabbar']) @@ -958,6 +968,18 @@ class PrefsEditor: self.config['tab_position'] = value self.config.save() + def on_broadcastdefault_changed(self, widget): + """Broadcast default changed""" + selected = widget.get_active() + if selected == 0: + value = 'all' + elif selected == 2: + value = 'off' + else: + value = 'group' + self.config['broadcast_default'] = value + self.config.save() + def on_winstatecombo_changed(self, widget): """Window state changed""" selected = widget.get_active() diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index fa8e4b46..eeb3859f 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -71,10 +71,10 @@ class Terminator(Borg): self.terminals = [] if not self.groups: self.groups = [] - if self.groupsend == None: - self.groupsend = self.groupsend_type['group'] if not self.config: self.config = Config() + if self.groupsend == None: + self.groupsend = self.groupsend_type[self.config['broadcast_default']] if not self.keybindings: self.keybindings = Keybindings() self.keybindings.configure(self.config['keybindings'])