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). --- Makefile | 4 ++-- X/Xresources | 1 - urxvt/clip | 22 ---------------------- urxvt/ext/clip | 22 ++++++++++++++++++++++ 4 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 urxvt/clip create mode 100644 urxvt/ext/clip diff --git a/Makefile b/Makefile index b07da88f..ab788dcd 100644 --- a/Makefile +++ b/Makefile @@ -99,8 +99,8 @@ install-tmux : install-urxvt : mkdir -p $(HOME)/.urxvt - rm -f $(HOME)/.urxvt/clip - ln -s $(PWD)/urxvt/clip $(HOME)/.urxvt/clip + rm -fr $(HOME)/.urxvt/clip/ext + ln -s $(PWD)/urxvt/ext $(HOME)/.urxvt/ext install-vim : mkdir -p $(HOME)/.vim diff --git a/X/Xresources b/X/Xresources index cdd6bf40..45266e11 100644 --- a/X/Xresources +++ b/X/Xresources @@ -17,7 +17,6 @@ URxvt.iso14755 : false URxvt.iso14755_52 : false URxvt.perl-ext : clip,selection URxvt.perl-ext-common : clip,selection -URxvt.perl-lib : /home/tom/.urxvt URxvt.pointerBlank : true URxvt.saveLines : 10000 URxvt.scrollBar : false diff --git a/urxvt/clip b/urxvt/clip deleted file mode 100644 index ce698328..00000000 --- a/urxvt/clip +++ /dev/null @@ -1,22 +0,0 @@ -#!/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; -} - 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