--- rxvt-unicode/src/perl/selection-pastebin 2006/01/18 11:05:09 1.8 +++ rxvt-unicode/src/perl/selection-pastebin 2006/01/23 23:13:03 1.13 @@ -13,9 +13,9 @@ my $tmpfile = "/tmp/$filename"; - my $msg = "uploaded $filename"; + my $msg = "uploaded as $filename"; - if (open my $o, ">", $tmpfile) { + if (open my $o, ">:utf-8", $tmpfile) { chmod 0644, $tmpfile; print $o $txt; close $o; @@ -44,18 +44,19 @@ urxvt::timer ->new ->after (5) - ->cb (sub {undef $timer; undef $ov; }); + ->cb (sub { undef $timer; undef $ov; }); } sub on_start { my ($self) = @_; + $pastebin_cmd = $self->x_resource ("selection-pastebin.cmd") || "rcp -p % ruth:/var/www/www.ta-sa.org/files/txt/"; $pastebin_url = $self->x_resource ("selection-pastebin.url") || "http://www.ta-sa.org/files/txt/%"; - push @urxvt::ext::selection_popup::hook, sub { + push @{ $self->{term}{selection_popup_hook} }, sub { ("pastebin upload" => sub { $self->upload_paste }) };