From e38108db214727499bd59ec02aa06c5f08668392 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 26 Apr 2014 23:18:44 +1200 Subject: Remove Urxvt.perl-lib definition I didn't read the manpage. It turns out that urxvt will search $HOME/.urxvt/ext by default for its extensions, so I don't need to specify a path here (much less a fixed string rather than a variable). --- urxvt/ext/clip | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 urxvt/ext/clip (limited to 'urxvt/ext') diff --git a/urxvt/ext/clip b/urxvt/ext/clip new file mode 100644 index 00000000..ce698328 --- /dev/null +++ b/urxvt/ext/clip @@ -0,0 +1,22 @@ +#!/usr/bin/env perl + +# Copy PRIMARY selections to the clipboard too with xsel(1). + +use strict; +use warnings; + +sub on_start { + my ($self) = @_; + $self->enable( sel_grab => \&clip ); + return; +} + +sub clip { + my ($self) = @_; + if ( open CLIPBOARD, '| xsel -ib' ) { + print CLIPBOARD $self->selection(); + close CLIPBOARD; + } + return; +} + -- cgit v1.2.3