ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/remote-clipboard
(Generate patch)

Comparing rxvt-unicode/src/perl/remote-clipboard (file contents):
Revision 1.8 by root, Sun Jun 10 13:58:06 2012 UTC vs.
Revision 1.11 by sf-exg, Mon Jun 11 05:03:46 2012 UTC

1#! perl 1#! perl
2 2
3#:META:X_RESOURCE:%.store:string:the command used to store the selection 3#:META:X_RESOURCE:%.store:string:the command used to store the selection
4#:META:X_RESOURCE:%.fetch:string:the command used to fetch the selection 4#:META:X_RESOURCE:%.fetch:string:the command used to fetch the selection
5
6=head1 NAME
7
8 remote-clipboard - manage a shared and possibly remote clipboard
9
10=head1 DESCRIPTION
11
12Somewhat of a misnomer, this extension adds two menu entries to the
13selection popup that allows one to run external commands to store the
14selection somewhere and fetch it again.
15
16We use it to implement a "distributed selection mechanism", which just
17means that one command uploads the file to a remote server, and another
18reads it.
19
20The commands can be set using the C<URxvt.remote-selection.store> and
21C<URxvt.remote-selection.fetch> resources. The first should read the
22selection to store from STDIN (always in UTF-8), the second should provide
23the selection data on STDOUT (also in UTF-8).
24
25The defaults (which are likely useless to you) use rsh and cat:
26
27 URxvt.remote-selection.store: rsh ruth 'cat >/tmp/distributed-selection'
28 URxvt.remote-selection.fetch: rsh ruth 'cat /tmp/distributed-selection'
29
30=cut
5 31
6use Fcntl (); 32use Fcntl ();
7 33
8sub msg { 34sub msg {
9 my ($self, $msg) = @_; 35 my ($self, $msg) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines