diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-04-26 23:18:44 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-04-26 23:18:44 +1200 |
commit | e38108db214727499bd59ec02aa06c5f08668392 (patch) | |
tree | 065c1314aa1debdf4debee60823ed5e57a1307e4 /urxvt/ext | |
parent | Add tmux vertical separator to URxvt.cutchars (diff) | |
download | dotfiles-e38108db214727499bd59ec02aa06c5f08668392.tar.gz dotfiles-e38108db214727499bd59ec02aa06c5f08668392.zip |
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).
Diffstat (limited to 'urxvt/ext')
-rw-r--r-- | urxvt/ext/clip | 22 |
1 files changed, 22 insertions, 0 deletions
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; +} + |