Skip to content

Commit

Permalink
add clipboard script for use with urxvt
Browse files Browse the repository at this point in the history
  • Loading branch information
wjackson committed Aug 24, 2011
1 parent d0ba8b5 commit 1e5f012
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Xdefaults
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ URxvt.color7 : #D3D7CF
URxvt.color15 : #EEEEEC

URxvt*font: xft:DejaVuSansMono:pixelsize=13
URxvt.perl-ext-common: default,matcher,clipboard
8 changes: 8 additions & 0 deletions clipboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/perl

sub on_sel_grab {
my $query=quotemeta $_[0]->selection;
$query=~ s/\n/\\n/g;
$query=~ s/\r/\\r/g;
system( "echo -en " . $query . " | xsel -i -b -p --display :0" );
}

0 comments on commit 1e5f012

Please sign in to comment.