*** empty log message ***
authorroot <root>
Wed, 25 Jan 2006 15:11:31 +0000 (15:11 +0000)
committerroot <root>
Wed, 25 Jan 2006 15:11:31 +0000 (15:11 +0000)
Changes
MANIFEST
src/perl/remote-selection
src/urxvt.pm

diff --git a/Changes b/Changes
index 85d18417b3d6f076da7944cc16f191711538392b..f9db3e5d8da268aba7e67d5e205d63f04f495ad6 100644 (file)
--- 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.
index 2f3289403248223725e44d531f34df75e820df42..e24748dbaaf175bcbbd7c7498a057b8d36bac9ac 100644 (file)
--- 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
index 3e006709ee05ee64ed2fda3eeb0201d2389e2ce0..c73b723110fbdc52fd7201a2089ee05f30d0c0b2 100644 (file)
@@ -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)");
          }
       });
    }
index 8f4f29ed6a4ddd2f80942361e9148029b95328e4..39287bee278d33959fb366876467bdafdee41c07 100644 (file)
@@ -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<URxvt.remote-selection.store> and
+C<URxvt.remote-selection.fetch> 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