From 9248259708bd6ade5e334a2cdfb29d2a20acb0dd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 3 Oct 2022 17:15:36 +0200 Subject: ... --- overlays/urxvt/52-osc.pl | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 overlays/urxvt/52-osc.pl (limited to 'overlays/urxvt/52-osc.pl') diff --git a/overlays/urxvt/52-osc.pl b/overlays/urxvt/52-osc.pl deleted file mode 100644 index 3292e8c4..00000000 --- a/overlays/urxvt/52-osc.pl +++ /dev/null @@ -1,41 +0,0 @@ -#! perl - -=head1 NAME - -52-osc - Implement OSC 32 ; Interact with X11 clipboard - -=head1 SYNOPSIS - - urxvt -pe 52-osc - -=head1 DESCRIPTION - -This extension implements OSC 52 for interacting with system clipboard - -Most code stolen from: -http://ailin.tucana.uberspace.de/static/nei/*/Code/urxvt/ - -=cut - -use MIME::Base64; -use Encode; - -sub on_osc_seq { - my ($term, $op, $args) = @_; - return () unless $op eq 52; - - my ($clip, $data) = split ';', $args, 2; - if ($data eq '?') { - # my $data_free = $term->selection(); - # Encode::_utf8_off($data_free); # XXX - # $term->tt_write("\e]52;$clip;".encode_base64($data_free, '')."\a"); - } - else { - my $data_decoded = decode_base64($data); - Encode::_utf8_on($data_decoded); # XXX - $term->selection($data_decoded, $clip =~ /c|^$/); - $term->selection_grab(urxvt::CurrentTime, $clip =~ /c|^$/); - } - - () -} -- cgit v1.2.3