repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 45527ec64b3269c1a9b2731faaecd866a1b54b0d:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 45527ec64b3269c1a9b2731faaecd866a1b54b0d
Author: Emanuele Giaquinta 
Date:   Wed Jul 21 08:58:50 2010 +0000

    Add clipboard-osc script.

diff --git a/src/perl/clipboard-osc b/src/perl/clipboard-osc
new file mode 100644
index 0000000000000000000000000000000000000000..9e080db5f67c50ce747a08f90f8ffee2ff6e4d55
--- /dev/null
+++ b/src/perl/clipboard-osc
@@ -0,0 +1,15 @@
+#! perl
+
+sub on_osc_seq_perl {
+   my ($self, $osc, $resp) = @_;
+
+   return unless $osc =~ s/^clipboard;([^;]+)//;
+
+   if ($1 eq "copy") {
+      my $text = $self->selection ();
+      $self->selection ($text, 1);
+      $self->selection_grab (urxvt::CurrentTime, 1);
+   }
+
+   1
+}

-----END OF PAGE-----