clipboard: added option autocopy
This commit is contained in:
parent
c05d319ba6
commit
b8cbf4e7ad
12
clipboard
12
clipboard
@ -34,6 +34,10 @@ sub on_start {
|
|||||||
$self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib';
|
$self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib';
|
||||||
$self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob';
|
$self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob';
|
||||||
|
|
||||||
|
if ($self->x_resource('clipboard.autocopy' eq 'true') {
|
||||||
|
$self->enable(sel_grab => \&sel_grab);
|
||||||
|
}
|
||||||
|
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,3 +96,11 @@ sub on_user_command {
|
|||||||
|
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub sel_grab {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
$self->copy;
|
||||||
|
|
||||||
|
()
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user