aboutsummaryrefslogtreecommitdiff
path: root/rxvt/.urxvt/ext/selection-to-clipboard
blob: 0431694d7db8faaa441597fd6bf93f6ba622e78c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! perl -w

=head1 NAME

selection-to-clipboard - copy the selection to the clipboard each time a selection is made

=head1 SYNOPSIS

   urxvt -pe selection-to-clipboard

=head1 DESCRIPTION

This very simple extension copies the selection to the clipboard every
time a selection is made. This, in effect, synchronises the clipboard with
the selection for selections done by rxvt-unicode.

=cut

sub on_sel_grab {
   my ($self, $time) = @_;

   $self->selection ($self->selection, 1);
   $self->selection_grab ($time, 1);

   ()
}