clipboard: added option autocopy

This commit is contained in:
Bert Münnich 2012-09-13 21:51:25 +02:00
parent c05d319ba6
commit b8cbf4e7ad

View File

@ -34,6 +34,10 @@ sub on_start {
$self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib';
$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;
()
}