Skip to content

Commit 705322d

Browse files
committed
Add paste_selection keybinding.
Unbound by default, pastes primary selection. Signed-off-by: Rafael Kitover <[email protected]>
1 parent 0b2d917 commit 705322d

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

doc/terminator_config.5

+4
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ Default value: \fB<Ctrl><Shift>C\fR
228228
Paste the current contents of the clipboard.
229229
Default value: \fB<Ctrl><Shift>V\fR
230230
.TP
231+
.B paste_selection
232+
Paste the current contents of the primary selection.
233+
Default value: \fBUnbound\fR
234+
.TP
231235
.B toggle_scrollbar
232236
Show/Hide the scrollbar.
233237
Default value: \fB<Ctrl><Shift>S\fR

terminatorlib/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
'close_term' : '<Shift><Control>w',
143143
'copy' : '<Shift><Control>c',
144144
'paste' : '<Shift><Control>v',
145+
'paste_selection' : '',
145146
'toggle_scrollbar' : '<Shift><Control>s',
146147
'search' : '<Shift><Control>f',
147148
'page_up' : '',

terminatorlib/prefseditor.py

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ class PrefsEditor:
124124
'close_term' : _('Close terminal'),
125125
'copy' : _('Copy selected text'),
126126
'paste' : _('Paste clipboard'),
127+
'paste_selection' : _('Paste primary selection'),
127128
'toggle_scrollbar' : _('Show/Hide the scrollbar'),
128129
'search' : _('Search terminal scrollback'),
129130
'page_up' : _('Scroll upwards one page'),

terminatorlib/terminal.py

+3
Original file line numberDiff line numberDiff line change
@@ -1810,6 +1810,9 @@ def key_copy(self):
18101810
def key_paste(self):
18111811
self.paste_clipboard()
18121812

1813+
def key_paste_selection(self):
1814+
self.paste_clipboard(True)
1815+
18131816
def key_toggle_scrollbar(self):
18141817
self.do_scrollbar_toggle()
18151818

0 commit comments

Comments
 (0)