pastebin - collaborative debugging tool
kpaste.net RSS


xsel
Posted by Anonymous on Thu 20th Aug 2015 09:23
raw | new post

  1. #! /usr/bin/perl
  2. # Source - https://wiki.archlinux.org/index.php/Rxvt-unicode#Automatic_script_management
  3.  
  4. sub on_sel_grab {
  5.     my $query=quotemeta $_[0]->selection;
  6.     $query=~ s/\n/\\n/g;
  7.     $query=~ s/\r/\\r/g;
  8.     system( "echo -en " . $query . " | xsel -i -b -p" );
  9. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at