wezterm: change default copy/paste behavior on X11

This commit changes mouse-based selection and middle click to use the
PrimarySelection.

CTRL-SHIFT-{C,V} use Clipboard.

{SHIFT,CTRL}-Insert use PrimarySelection.

`CompleteSelection` and `CompleteSelectionOrOpenLinkAtMouseCursor` now
require a parameter to specify the destination clipboard.

Removed the `default_clipboard_XXX` options added in
8dad34fa61 in favor of just explicitly
assigning the key/mouse bindings.

closes: #417
This commit is contained in:
Wez Furlong committed 2021-01-31 09:28:42 -08:00
1 parent 9a610358d1
commit df3387e12c
12 files changed
+121 -98

No files matched your search

@@ -4,4 +4,27 @@ Completes an active text selection process; the selection range is
marked closed and then the selected text is copied as though the
`Copy` action was executed.
*since: nightly*
`CompleteSelection` now requires a destination parameter to specify
which clipboard buffer the selection will populate; the copy action
is now equivalent to [CopyTo](CopyTo.md).
```lua
local wezterm = require 'wezterm';
return {
mouse_bindings = {
-- Change the default click behavior so that it only selects
-- text and doesn't open hyperlinks, and that it populates
-- the Clipboard rather the PrimarySelection which is part
-- of the default assignment for a left mouse click.
{
event={Up={streak=1, button="Left"}},
mods="NONE",
action=wezterm.action{CompleteSelection="Clipboard"},
},
},
}
```
@@ -5,3 +5,25 @@ triggered. Otherwise acts as though `OpenLinkAtMouseCursor` was
triggered.
*since: nightly*
`CompleteSelectionOrOpenLinkAtMouseCursor` now requires a destination parameter to specify
which clipboard buffer the selection will populate. The copy action
is now equivalent to [CopyTo](CopyTo.md).
```lua
local wezterm = require 'wezterm';
return {
mouse_bindings = {
-- Change the default click behavior so that it populates
-- the Clipboard rather the PrimarySelection.
{
event={Up={streak=1, button="Left"}},
mods="NONE",
action=wezterm.action{CompleteSelectionOrOpenLinkAtMouseCursor="Clipboard"},
},
},
}
```
+6 -1
View File
@@ -2,7 +2,12 @@
Copy the selection to the clipboard.
The value of the [default_clipboard_copy_destination](../config/default_clipboard_copy_destination.md) configuration option specifies which clipboard buffer is populated.
*since: nightly*
This action is considered to be deprecated and will be removed in
a future release; please use [CopyTo](CopyTo.md) instead.
## Example
```lua
+5 -4
View File
@@ -2,11 +2,12 @@
Paste the clipboard to the current pane.
On X11 systems that have multiple clipboards, the
[default_clipboard_paste_source](../config/default_clipboard_paste_source.md)
option specifies which source to use.
*since: nightly*
See also [PastePrimarySelection](PastePrimarySelection.md) and [PasteFrom](PasteFrom.md).
This action is considered to be deprecated and will be removed in
a future release; please use [PasteFrom](PasteFrom.md) instead.
## Example
```lua
local wezterm = require 'wezterm';
@@ -5,9 +5,8 @@ On other systems, this behaves identically to [Paste](Paste.md).
*since: nightly*
This action is considered to be deprecated; please consider
using either [PasteFrom](PasteFrom.md) or just [Paste](Paste.md)
and adjusting the new [default_clipboard_paste_source](../config/default_clipboard_paste_source.md) configuration option.
This action is considered to be deprecated and will be removed in
a future release; please use [PasteFrom](PasteFrom.md) instead.
## Example