Add copy_on_selection, defaulting to false, which automatically copies selections to the clipboard. Resolves LP #241594.

This commit is contained in:
Thomas Hurst 2008-06-20 16:18:23 +01:00
parent 0a27442e64
commit 3717c8af1f
3 changed files with 56 additions and 48 deletions

View File

@ -5,127 +5,127 @@ ${XDG_CONFIG_HOME}/terminator/config (usually ~/.config/terminator/config)
.SH "DESCRIPTION" .SH "DESCRIPTION"
This manual page documents briefly the This manual page documents briefly the
.B Terminator config file. .B Terminator config file.
.PP .PP
\fBterminator/config\fP is an optional file to configure the terminator terminal emulator. It is used if there is no gconf PROFILE on the system for configuring the options of the terminal(s). \fBterminator/config\fP is an optional file to configure the terminator terminal emulator. It is used if there is no gconf PROFILE on the system for configuring the options of the terminal(s).
.SH "OPTIONS" .SH "OPTIONS"
The options are defined one per line as \fB'OPTION = VALUE'\fR. The options are described below: The options are defined one per line as \fB'OPTION = VALUE'\fR. The options are described below:
.TP .TP
.B allow_bold\fR (boolean) .B allow_bold\fR (boolean)
If true, allow applications in the terminal to make text boldface. If true, allow applications in the terminal to make text boldface.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.TP .TP
.B silent_bell\fR (boolean) .B silent_bell\fR (boolean)
If true, don't make a noise when applications send the escape sequence for the terminal bell. Flash the terminal instead. If true, don't make a noise when applications send the escape sequence for the terminal bell. Flash the terminal instead.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.TP .TP
.B force_no_bell\fR (boolean) .B force_no_bell\fR (boolean)
If true, don't make a noise or flash. All terminal bells will be ignored. If true, don't make a noise or flash. All terminal bells will be ignored.
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B background_color .B background_color
Default colour of terminal background, as a colour specification (can be HTML-style hex digits, or a colour name such as "red"). \fBNote:\fR You may need to set \fBuse_theme_colors=False\fR to force this setting to take effect. Default colour of terminal background, as a colour specification (can be HTML-style hex digits, or a colour name such as "red"). \fBNote:\fR You may need to set \fBuse_theme_colors=False\fR to force this setting to take effect.
Default value: \fB#000000\fR Default value: \fB#000000\fR
.TP .TP
.B background_darkness .B background_darkness
A value between 0.0 and 1.0 indicating how much to darken the background image. 0.0 means no darkness, 1.0 means fully dark. If the terminal is set to transparent, this setting controls how transparent it is. 0.0 means fully transparent, 1.0 means fully opaque. A value between 0.0 and 1.0 indicating how much to darken the background image. 0.0 means no darkness, 1.0 means fully dark. If the terminal is set to transparent, this setting controls how transparent it is. 0.0 means fully transparent, 1.0 means fully opaque.
Default value: \fB0.5\fR Default value: \fB0.5\fR
.TP .TP
.B background_type .B background_type
Type of terminal background. May be "solid" for a solid colour, "image" for an image, or "transparent" for full transparency in compositing window managers, otherwise pseudo transparency. Type of terminal background. May be "solid" for a solid colour, "image" for an image, or "transparent" for full transparency in compositing window managers, otherwise pseudo transparency.
Default value: \fBsolid\fR Default value: \fBsolid\fR
.TP .TP
.B backspace_binding .B backspace_binding
Sets what code the backspace key generates. Possible values are "ascii-del" for the ASCII DEL character, "control-h" for Control-H (AKA the ASCII BS character), "escape-sequence" for the escape sequence typically bound to backspace or delete. "ascii-del" is normally considered the correct setting for the Backspace key. Sets what code the backspace key generates. Possible values are "ascii-del" for the ASCII DEL character, "control-h" for Control-H (AKA the ASCII BS character), "escape-sequence" for the escape sequence typically bound to backspace or delete. "ascii-del" is normally considered the correct setting for the Backspace key.
Default value: \fBascii\-del\fR Default value: \fBascii\-del\fR
.TP .TP
.B delete_binding .B delete_binding
Sets what code the delete key generates. Possible values are "ascii-del" for the ASCII DEL character, "control-h" for Control-H (AKA the ASCII BS character), "escape-sequence" for the escape sequence typically bound to backspace or delete. "escape-sequence" is normally considered the correct setting for the Delete key. Sets what code the delete key generates. Possible values are "ascii-del" for the ASCII DEL character, "control-h" for Control-H (AKA the ASCII BS character), "escape-sequence" for the escape sequence typically bound to backspace or delete. "escape-sequence" is normally considered the correct setting for the Delete key.
Default value: \fBdelete\-sequence\fR Default value: \fBdelete\-sequence\fR
.TP .TP
.B cursor_blink \fR(boolean) .B cursor_blink \fR(boolean)
Controls if the cursor blinks. Controls if the cursor blinks.
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B emulation .B emulation
Sets what type of terminal should be emulated. Sets what type of terminal should be emulated.
Default value: \fBxterm\fR Default value: \fBxterm\fR
.TP .TP
.B font .B font
An Pango font name. Examples are "Sans 12" or "Monospace Bold 14". An Pango font name. Examples are "Sans 12" or "Monospace Bold 14".
Default value: \fBSerif 10\fR Default value: \fBSerif 10\fR
.TP .TP
.B foreground_color .B foreground_color
Default colour of text in the terminal, as a colour specification (can be HTML-style hex digits, or a colour name such as "red"). \fBNote:\fR You may need to set \fBuse_theme_colors=False\fR to force this setting to take effect. Default colour of text in the terminal, as a colour specification (can be HTML-style hex digits, or a colour name such as "red"). \fBNote:\fR You may need to set \fBuse_theme_colors=False\fR to force this setting to take effect.
Default value: \fB#AAAAAA\fR Default value: \fB#AAAAAA\fR
.TP .TP
.B scrollbar_position .B scrollbar_position
Where to put the terminal scrollbar. Possibilities are "left", "right", and "disabled". Where to put the terminal scrollbar. Possibilities are "left", "right", and "disabled".
Default value: \fBright\fR Default value: \fBright\fR
.TP .TP
.B titlebars .B titlebars
If true, a titlebar will be drawn for each terminal which shows the current title of that terminal. If true, a titlebar will be drawn for each terminal which shows the current title of that terminal.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.TP .TP
.B scroll_background \fR(boolean) .B scroll_background \fR(boolean)
If true, scroll the background image with the foreground text; if false, keep the image in a fixed position and scroll the text above it. If true, scroll the background image with the foreground text; if false, keep the image in a fixed position and scroll the text above it.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.TP .TP
.B scroll_on_keystroke \fR(boolean) .B scroll_on_keystroke \fR(boolean)
If true, pressing a key jumps the scrollbar to the bottom. If true, pressing a key jumps the scrollbar to the bottom.
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B scroll_on_output \fR(boolean) .B scroll_on_output \fR(boolean)
If true, whenever there's new output the terminal will scroll to the bottom. If true, whenever there's new output the terminal will scroll to the bottom.
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B scrollback_lines .B scrollback_lines
Number of scrollback lines to keep around. You can scroll back in the terminal by this number of lines; lines that don't fit in the scrollback are discarded. Be careful with this setting; it's the primary factor in determining how much memory the terminal will use. Number of scrollback lines to keep around. You can scroll back in the terminal by this number of lines; lines that don't fit in the scrollback are discarded. Be careful with this setting; it's the primary factor in determining how much memory the terminal will use.
Default value: \fB100\fR Default value: \fB100\fR
.TP .TP
.B focus .B focus
Sets what type of mouse events should determine terminal focus. Can be "sloppy" or "click". "mouse" is also interpreted as "sloppy". Sets what type of mouse events should determine terminal focus. Can be "sloppy" or "click". "mouse" is also interpreted as "sloppy".
Default value: \fBsloppy\fR Default value: \fBsloppy\fR
.TP .TP
.B focus_on_close .B focus_on_close
Sets which terminal should get the focus when another terminal is closed. Sets which terminal should get the focus when another terminal is closed.
Values can be "prev", "next" or "auto". Values can be "prev", "next" or "auto".
Using "auto", if the closed terminal is within a splitted window, the focus will be on the sibling terminal Using "auto", if the closed terminal is within a splitted window, the focus will be on the sibling terminal
rather than another tab. rather than another tab.
Default value: \fBauto\fR Default value: \fBauto\fR
.TP .TP
.B exit_action .B exit_action
Possible values are "close" to close the terminal, and "restart" to restart the command. Possible values are "close" to close the terminal, and "restart" to restart the command.
Default value: \fBclose\fR Default value: \fBclose\fR
.TP .TP
.B palette .B palette
Terminals have a 16-colour palette that applications inside the terminal can use. This is that palette, in the form of a colon-separated list of colour names. Colour names should be in hex format e.g. "#FF00FF". Terminals have a 16-colour palette that applications inside the terminal can use. This is that palette, in the form of a colon-separated list of colour names. Colour names should be in hex format e.g. "#FF00FF".
Default value: \fB#000000000000:#CDCD00000000:#0000CDCD0000:#CDCDCDCD0000:#30BF30BFA38E:#A53C212FA53C:#0000CDCDCDCD:#FAFAEBEBD7D7:#404040404040:#FFFF00000000:#0000FFFF0000:#FFFFFFFF0000:#00000000FFFF:#FFFF0000FFFF:#0000FFFFFFFF:#FFFFFFFFFFFF\fR Default value: \fB#000000000000:#CDCD00000000:#0000CDCD0000:#CDCDCDCD0000:#30BF30BFA38E:#A53C212FA53C:#0000CDCDCDCD:#FAFAEBEBD7D7:#404040404040:#FFFF00000000:#0000FFFF0000:#FFFFFFFF0000:#00000000FFFF:#FFFF0000FFFF:#0000FFFFFFFF:#FFFFFFFFFFFF\fR
.TP .TP
.B word_chars .B word_chars
When selecting text by word, sequences of these characters are considered single words. Ranges can be given as "A-Z". Literal hyphen (not expressing a range) should be the first character given. When selecting text by word, sequences of these characters are considered single words. Ranges can be given as "A-Z". Literal hyphen (not expressing a range) should be the first character given.
Default value: \fB\-A\-Za\-z0\-9,./?%&#:_\fR Default value: \fB\-A\-Za\-z0\-9,./?%&#:_\fR
.TP .TP
.B mouse_autohide \fR(boolean) .B mouse_autohide \fR(boolean)
Controls whether the mouse cursor should be hidden while typing. Controls whether the mouse cursor should be hidden while typing.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.TP .TP
.B fullscreen \fR(boolean) .B fullscreen \fR(boolean)
Controls whether the Terminator window will be started in fullscreen mode Controls whether the Terminator window will be started in fullscreen mode
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B maximise \fR(boolean) .B maximise \fR(boolean)
Controls whether the Terminator window will be started maximised Controls whether the Terminator window will be started maximised
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B borderless \fR(boolean) .B borderless \fR(boolean)
Controls whether the Terminator window will be started without window borders Controls whether the Terminator window will be started without window borders
Default value: \fBFalse\fR Default value: \fBFalse\fR
.TP .TP
.B handle_size .B handle_size
Controls the width of the separator between terminals. Anything outside the range 0-5 (inclusive) will be ignored and use your default theme value. Controls the width of the separator between terminals. Anything outside the range 0-5 (inclusive) will be ignored and use your default theme value.
Default value: \fB-1\fR Default value: \fB-1\fR
.TP .TP
.B f11_modifier .B f11_modifier
If this is set to true, the fullscreen keyboard shortcut changes from F11 (like many GNOME apps) to Ctrl-Shift-F11 (useful if you use terminal applications which expect to receive F11. If this is set to true, the fullscreen keyboard shortcut changes from F11 (like many GNOME apps) to Ctrl-Shift-F11 (useful if you use terminal applications which expect to receive F11.
Default value: \fBFalse\fR Default value: \fBFalse\fR
@ -133,5 +133,8 @@ Default value: \fBFalse\fR
.B cycle_term_tab .B cycle_term_tab
If this is set to true, when switching to the next/previous term, Terminator will cycle within the same tab. Ctrl-PageUp/PageDown can then be used to move from one tab to the other one. If this is set to true, when switching to the next/previous term, Terminator will cycle within the same tab. Ctrl-PageUp/PageDown can then be used to move from one tab to the other one.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.B copy_on_selection
If set to True, text selections will be automatically copied to the clipboard, in addition to being made the Primary selection.
Default value: \fBFalse\fR
.SH "SEE ALSO" .SH "SEE ALSO"
.BR gnome\-terminal(1) .BR gnome\-terminal(1)

View File

@ -166,7 +166,10 @@ class TerminatorTerm (gtk.VBox):
#for testing purpose: drag-motion #for testing purpose: drag-motion
self._vte.connect("drag-motion", self.on_drag_motion, self) self._vte.connect("drag-motion", self.on_drag_motion, self)
self._vte.connect("drag-data-received", self.on_drag_data_received, self) self._vte.connect("drag-data-received", self.on_drag_data_received, self)
if self.conf.copy_on_selection:
self._vte.connect ("selection-changed", lambda widget: self._vte.copy_clipboard ())
self._vte.connect ("composited-changed", self.on_composited_changed) self._vte.connect ("composited-changed", self.on_composited_changed)
self._vte.connect ("window-title-changed", self.on_vte_title_change) self._vte.connect ("window-title-changed", self.on_vte_title_change)
self._vte.connect ("grab-focus", self.on_vte_focus) self._vte.connect ("grab-focus", self.on_vte_focus)
@ -305,7 +308,8 @@ text/plain
data.terminator.remove(widgetsrc) data.terminator.remove(widgetsrc)
data.terminator.add(self, widgetsrc,pos) data.terminator.add(self, widgetsrc,pos)
return return
def get_location(self, vte, x, y): def get_location(self, vte, x, y):
pos = "" pos = ""
#get the diagonales function for the receiving widget #get the diagonales function for the receiving widget

View File

@ -125,6 +125,7 @@ class TerminatorConfValuestore:
'f11_modifier' : False, 'f11_modifier' : False,
'force_no_bell' : False, 'force_no_bell' : False,
'cycle_term_tab' : True, 'cycle_term_tab' : True,
'copy_on_selection' : False,
} }
def __getattr__ (self, keyname): def __getattr__ (self, keyname):