1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-09 22:32:29 +00:00
dotfiles/not_dots/clipboard

10 lines
239 B
Plaintext
Raw Normal View History

#! /usr/bin/perl
# /usr/lib/urxvt/perl/clipboard
sub on_sel_grab {
my $query=quotemeta $_[0]->selection;
$query=~ s/\n/\\n/g;
$query=~ s/\r/\\r/g;
system( "echo " . $query . " | xsel -i -b -p" );
}