aboutsummaryrefslogtreecommitdiff
path: root/urxvt/ext/clip
diff options
context:
space:
mode:
Diffstat (limited to 'urxvt/ext/clip')
-rw-r--r--urxvt/ext/clip31
1 files changed, 0 insertions, 31 deletions
diff --git a/urxvt/ext/clip b/urxvt/ext/clip
deleted file mode 100644
index cb2b1a27..00000000
--- a/urxvt/ext/clip
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env perl
-
-# Copy PRIMARY selections to the clipboard too with xsel(1).
-
-use strict;
-use warnings;
-use utf8;
-
-use 5.006;
-
-use Carp;
-
-our $VERSION = 1.0;
-
-sub on_start {
- my ($self) = @_;
- return $self->enable( sel_grab => \&clip );
-}
-
-sub clip {
- my ($self) = @_;
- my $selection = $self->selection();
- utf8::encode($selection);
- open my $clipboard, q{|-}, 'xsel -ib'
- or croak('xsel(1) not available');
- my $written = print {$clipboard} $selection
- or croak('Failed to write to xsel(1) pipe');
- close $clipboard
- or croak('Failed to close xsel(1) pipe');
- return $written;
-}