… | |
… | |
5 | my $pastebin_url; |
5 | my $pastebin_url; |
6 | |
6 | |
7 | sub on_start { |
7 | sub on_start { |
8 | my ($self) = @_; |
8 | my ($self) = @_; |
9 | $pastebin_cmd = |
9 | $pastebin_cmd = |
10 | $self->x_resource ("selection-pastebin-cmd") |
10 | $self->x_resource ("selection-pastebin.cmd") |
11 | or "scp -p % ruth:/var/www/www.ta-sa.org/files/txt/"; |
11 | or "scp -p % ruth:/var/www/www.ta-sa.org/files/txt/"; |
12 | |
12 | |
13 | $pastebin_url = |
13 | $pastebin_url = |
14 | $self->x_resource ("selection-pastebin-url") |
14 | $self->x_resource ("selection-pastebin.url") |
15 | or "http://www.ta-sa.org/files/txt/"; |
15 | or "http://www.ta-sa.org/files/txt/"; |
16 | |
16 | |
17 | () |
17 | () |
18 | } |
18 | } |
19 | |
19 | |
… | |
… | |
46 | $self->selection ($url); |
46 | $self->selection ($url); |
47 | } else { |
47 | } else { |
48 | $msg = "couldn't upload, '$cmd' failed"; |
48 | $msg = "couldn't upload, '$cmd' failed"; |
49 | } |
49 | } |
50 | |
50 | |
|
|
51 | unlink $tmpfile; |
|
|
52 | |
51 | my $ov = $timers->{ov} = $self->overlay (-1, 0, length ($msg), 1, urxvt::OVERLAY_RSTYLE, 0); |
53 | my $ov = $timers->{ov} = $self->overlay (-1, 0, length ($msg), 1, urxvt::OVERLAY_RSTYLE, 0); |
52 | $ov->set (0, 0, $msg); |
54 | $ov->set (0, 0, $msg); |
53 | |
55 | |
54 | $timers->{t1} = |
56 | $timers->{t1} = |
55 | urxvt::timer |
57 | urxvt::timer |