diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index a0bd3c3e..f27eb428 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -34,7 +34,7 @@ These are the options Terminator currently supports in the global_config section .TP .B dbus Control whether or not Terminator will load its DBus server. When this server is loaded, running Terminator multiple times will cause the first Terminator process to open additional windows. If this configuration item is set to False, or the python dbus module is unavailable, running Terminator multiple times will run a separate Terminator process for each invocation. -Default value: \fBFalse\fR +Default value: \fBTrue\fR .TP .B focus Control how focus is given to terminals. 'click' means the focus only moves to a terminal after you click in it. 'sloppy' means the focus will follow the mouse pointer. 'system' means the focus will match that used by a GNOME window manager. @@ -46,7 +46,7 @@ Default value: \fB-1\fR .TP .B geometry_hinting If True the window will resize in step with font sizes, if False it will follow pixels -Default value: \fBTrue\fR +Default value: \fBFalse\fR .TP .B window_state When set to 'normal' the Terminator window opens normally. 'maximise' opens the window in a maximised state, 'fullscreen' in a fullscreen state and 'hidden' will make it not shown by default. @@ -140,6 +140,10 @@ Default value: \fBFalse\fR If set to True, right-click will paste the Primary selection, middle-click will popup the context menu. Default value: \fBFalse\fR .TP +.B smart_copy \fR(boolean) +If set to True, and there is no selection, the shortcut is allowed to pass through. This is useful for overloading Ctrl-C to copy a selection, or send the SIGINT to the current process if there is no selection. If False the shortcut does not pass through at all, and the SIGINT does not get sent. +Default value: \fBTrue\fR +.TP .B enabled_plugins A list of plugins which should be loaded by default. All other plugin classes will be ignored. The default value includes two plugins related to Launchpad, which are enabled by default to provide continuity with earlier releases where these were the diff --git a/terminatorlib/config.py b/terminatorlib/config.py index d930e11f..b77d3feb 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -124,6 +124,7 @@ DEFAULTS = { 'title_use_system_font' : True, 'title_font' : 'Sans 9', 'putty_paste_style' : False, + 'smart_copy' : True, }, 'keybindings': { 'zoom_in' : 'plus', diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index d40b4b84..3c668829 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -434,7 +434,7 @@ True False - 6 + 7 2 12 6 @@ -565,6 +565,25 @@ + + + DBus server + True + True + False + False + True + True + + + + 2 + 6 + 7 + GTK_FILL + + + True @@ -665,6 +684,22 @@ 3 + + + Smart copy + True + True + False + False + True + + + + 2 + 3 + 4 + + Re-use profiles for new terminals @@ -678,8 +713,8 @@ 2 - 3 - 4 + 4 + 5 GTK_FILL @@ -696,8 +731,8 @@ 2 - 4 - 5 + 5 + 6 GTK_FILL @@ -746,25 +781,6 @@ - - 2 - 5 - 6 - GTK_FILL - - - - - - DBus server - True - True - False - False - True - True - - 2 6 diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 0a623471..832fe8d7 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -289,6 +289,12 @@ class PrefsEditor: #Always split with profile widget = guiget('always_split_with_profile') widget.set_active(self.config['always_split_with_profile']) + # Putty paste style + widget = guiget('putty_paste_style') + widget.set_active(self.config['putty_paste_style']) + # Smart copy + widget = guiget('smart_copy') + widget.set_active(self.config['smart_copy']) #Titlebar font selector # Use system font widget = guiget('title_system_font_checkbutton') @@ -421,9 +427,6 @@ class PrefsEditor: # Copy on selection widget = guiget('copy_on_selection') widget.set_active(self.config['copy_on_selection']) - # Putty paste style - widget = guiget('putty_paste_style') - widget.set_active(self.config['putty_paste_style']) # Rewrap on resize widget = guiget('rewrap_on_resize_checkbutton') widget.set_active(self.config['rewrap_on_resize']) @@ -718,6 +721,11 @@ class PrefsEditor: self.config['putty_paste_style'] = widget.get_active() self.config.save() + def on_smart_copy_toggled(self, widget): + """Putty paste style setting changed""" + self.config['smart_copy'] = widget.get_active() + self.config.save() + def on_cursor_blink_toggled(self, widget): """Cursor blink setting changed""" self.config['cursor_blink'] = widget.get_active() diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 851eb805..6f445405 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -895,6 +895,8 @@ class Terminal(Gtk.VBox): if self.vte.get_has_selection (): getattr(self, "key_" + mapping)() return(True) + elif not self.config['smart_copy']: + return(True) else: getattr(self, "key_" + mapping)() return(True)