From 965b4e39886b577d2034ef46cf26c6055705a4d8 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Jan 2006 17:01:54 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ MANIFEST | 2 +- src/perl/selection-pastebin | 4 ++-- src/urxvt.pm | 26 ++++++++++++++++++-------- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Changes b/Changes index 277129f3..ad0121c0 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,8 @@ WISH: just for fun, do shade and tint with XRender. WISH: support tex fonts 9.0 +TODO: remove ||1 in main.C +TODO: on_seelction_popup hook or so. - new script: perl/selection-pastebin - improved security of setuid/setgid operation, which is now encouraged, by moving privileged operations into a separate diff --git a/MANIFEST b/MANIFEST index 4281d31b..5518d5bb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -164,8 +164,8 @@ src/perl/urxvt-popup src/perl/selection src/perl/option-popup src/perl/selection-popup -src/perl/selection-pastebin src/perl/selection-autotransform +src/perl/selection-pastebin src/perl/searchable-scrollback src/perl/mark-urls src/perl/example-refresh-hooks diff --git a/src/perl/selection-pastebin b/src/perl/selection-pastebin index ac208acb..bfdeb8ae 100644 --- a/src/perl/selection-pastebin +++ b/src/perl/selection-pastebin @@ -7,11 +7,11 @@ my $pastebin_url; sub on_start { my ($self) = @_; $pastebin_cmd = - $self->x_resource ("selection-pastebin-cmd") + $self->x_resource ("selection-pastebin.cmd") or "scp -p % ruth:/var/www/www.ta-sa.org/files/txt/"; $pastebin_url = - $self->x_resource ("selection-pastebin-url") + $self->x_resource ("selection-pastebin.url") or "http://www.ta-sa.org/files/txt/"; () diff --git a/src/urxvt.pm b/src/urxvt.pm index b565adf7..ce1a7ed4 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -166,20 +166,30 @@ overlays or changes. =item selection-pastebin -Uploads the selection as textfile to a remote site. +This is a little rarely useful extension that Uploads the selection as +textfile to a remote site (or does other things). + +It listens to the C keyboard command, +i.e. URxvt.keysym.C-M-e: perl:selection-pastebin:remote-pastebin -To set the command to upload the file set this resource: +Pressing this combination runs a command with C<%> replaced by the name of +the textfile. This command can be set via a resource: + + URxvt.selection-pastebin.cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/. + +And the default is likely not useful to anybody but the few people around +here :) - URxvt.selection-pastebin-cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/. +The name of the textfile is the hex encoded md5 sum of the selection, so +the same content should lead to the same filename. -The % is the placeholder for the textfile. The name of the textfile is the hex encoded -md5 sum of the selection. -After an successful upload the selection will be replaced by the following url -(the % is the placeholder for the filename): +After a successful upload the selection will be replaced by the text given +in the C resource (again, the % is the placeholder +for the filename): - URxvt.selection-pastebin-url: http://www.ta-sa.org/files/txt/% + URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/% =back -- 2.34.1