1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | #:META:X_RESOURCE:%.store: 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: the command used to fetch the selection |
4 | #:META:X_RESOURCE:%.fetch:string:the command used to fetch the selection |
5 | |
5 | |
6 | use Fcntl (); |
6 | use Fcntl (); |
7 | |
7 | |
8 | sub msg { |
8 | sub msg { |
9 | my ($self, $msg) = @_; |
9 | my ($self, $msg) = @_; |
… | |
… | |
85 | } |
85 | } |
86 | |
86 | |
87 | sub on_start { |
87 | sub on_start { |
88 | my ($self) = @_; |
88 | my ($self) = @_; |
89 | |
89 | |
90 | $self->{store_cmd} = $self->x_resource ("remote-selection.store") |
90 | $self->{store_cmd} = $self->x_resource ("%.store") |
91 | || "rsh ruth 'cat >/tmp/distributed-selection'"; |
91 | || "rsh ruth 'cat >/tmp/distributed-selection'"; |
92 | |
92 | |
93 | $self->{fetch_cmd} = $self->x_resource ("remote-selection.fetch") |
93 | $self->{fetch_cmd} = $self->x_resource ("%.fetch") |
94 | || "rsh ruth 'cat /tmp/distributed-selection'"; |
94 | || "rsh ruth 'cat /tmp/distributed-selection'"; |
95 | |
95 | |
96 | push @{ $self->{term}{selection_popup_hook} }, sub { |
96 | push @{ $self->{term}{selection_popup_hook} }, sub { |
97 | ("selection => remote" => sub { $self->store }) |
97 | ("selection => remote" => sub { $self->store }) |
98 | }; |
98 | }; |