summaryrefslogtreecommitdiffstats
path: root/src/perl
diff options
context:
space:
mode:
authorsf-exg <sf-exg>2014-04-13 19:29:54 +0000
committersf-exg <sf-exg>2014-04-13 19:29:54 +0000
commit99666617112eaa376149d7a928ed441275f9c12f (patch)
tree6a4f68bfa43c9e702e6f99af0f463759d10a9db2 /src/perl
parent24135e4c8b6c7a2e0314b92c1020f07f3ac58efe (diff)
Fix typos.
Diffstat (limited to 'src/perl')
-rw-r--r--src/perl/selection-to-clipboard27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/perl/selection-to-clipboard b/src/perl/selection-to-clipboard
new file mode 100644
index 0000000..0431694
--- /dev/null
+++ b/src/perl/selection-to-clipboard
@@ -0,0 +1,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);
+
+ ()
+}
+