From 343eaea6ef4e72f951ac5c4e478fae478cf5087c Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 Jan 2006 15:11:31 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 3 ++- MANIFEST | 1 + src/perl/remote-selection | 4 +++- src/urxvt.pm | 28 ++++++++++++++++++++++++---- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 85d18417..f9db3e5d 100644 --- a/Changes +++ b/Changes @@ -8,7 +8,6 @@ TODO: after requesting the selection and getting a timeout, no further requests TODO: "slow" rendering mode for bidi and scripts TODO: read property sequence is broken with respect to utf-8 etc. TODO: rxvt -name urxvt-girly /// leave pixel droppings -TODO: distributed clipboard example WISH: anyevent mouse notification / manage MotionMask better. WISH: OnTheSpot editing, or maybe switch to miiiiiiif. or maybe use perl and an overlay... WISH: just for fun, do shade and tint with XRender. @@ -21,6 +20,8 @@ DUMB: support tex fonts - moved Shift-Button2 paste combination to Meta-Button2. - the cutchars resource will now be respected and used by the selection extension. + - added the "remote-selection" extension which just runs external + commands to fetch and store the selection data. - removed (unused) arabic presentation form composing sequences. - be more strict when deciding that a core font glyph is too wide and needs the careful rendering mode. diff --git a/MANIFEST b/MANIFEST index 2f328940..e24748db 100644 --- a/MANIFEST +++ b/MANIFEST @@ -171,6 +171,7 @@ src/perl/mark-urls src/perl/tabbed src/perl/xim-onthespot src/perl/readline +src/perl/remote-selection src/perl/example-refresh-hooks src/perl/block-graphics-to-ascii src/perl/digital-clock diff --git a/src/perl/remote-selection b/src/perl/remote-selection index 3e006709..c73b7231 100644 --- a/src/perl/remote-selection +++ b/src/perl/remote-selection @@ -75,7 +75,9 @@ sub fetch { $self->selection_clear; $self->selection ($txt); $self->selection_grab (urxvt::CurrentTime); - $self->wait_pipe ($fh, $pid, "selection fetched"); + close $fh; + my $status = $? >> 8; + $self->msg ("selection fetched (status $status)"); } }); } diff --git a/src/urxvt.pm b/src/urxvt.pm index 8f4f29ed..39287bee 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -244,11 +244,25 @@ similar-looking ascii character. Displays a digital clock using the built-in overlay. -=item example-refresh-hooks +=item remote-selection -Displays a very simple digital clock in the upper right corner of the -window. Illustrates overwriting the refresh callbacks to create your own -overlays or changes. +Somewhat of a misnomer, this extension adds two menu entries to the +selection popup that allows one ti run external commands to store the +selection somewhere and fetch it again. + +We use it to implement a "distributed selection mechanism", which just +means that one command uploads the file to a remote server, and another +reads it. + +The commands can be set using the C and +C resources. The first should read the +selection to store from STDIN (always in UTF-8), the second should provide +the selection data on STDOUT (also in UTF-8). + +The defaults (which are likely useless to you) use rsh and cat: + + URxvt.remote-selection.store: rsh ruth 'cat >/tmp/distributed-selection' + URxvt.remote-selection.fetch: rsh ruth 'cat /tmp/distributed-selection' =item selection-pastebin @@ -279,6 +293,12 @@ for the filename): URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/% +=item example-refresh-hooks + +Displays a very simple digital clock in the upper right corner of the +window. Illustrates overwriting the refresh callbacks to create your own +overlays or changes. + =back =head1 API DOCUMENTATION -- 2.34.1