FIX ALL CLIPBOAD !!!
This commit is contained in:
@@ -5,11 +5,12 @@ URxvt*cursorColor: #65adc7
|
||||
URxvt*scrollBar: false
|
||||
URxvt*internalBorder: 6
|
||||
|
||||
URxvt.perl-ext-common: default,matcherclipboard
|
||||
URxvt.perl-ext-common: default,clipboard
|
||||
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
|
||||
URxvt.keysym.Mod4-c: perl:clipboard:copy
|
||||
URxvt.keysym.Mod4-v: perl:clipboard:paste
|
||||
URxvt.keysym.C-v: perl:clipboard:paste
|
||||
URxvt.clipboard.autocopy: true
|
||||
URxvt.clipboard.autocopy: false
|
||||
URxvt.clipboard.copycmd: sh -c 'xsel -i -b'
|
||||
URxvt.clipboard.pastecmd: sh -c 'xsel -o -b'
|
||||
|
||||
|
||||
@@ -65,6 +65,12 @@ sub paste {
|
||||
my $str = `$self->{paste_cmd}`;
|
||||
if ($? == 0) {
|
||||
$self->tt_write($str);
|
||||
if (open(CLIPBOARD, "| $self->{copy_cmd}")) {
|
||||
print CLIPBOARD $str;
|
||||
close(CLIPBOARD);
|
||||
} else {
|
||||
print STDERR "error running '$self->{copy_cmd}': $!\n";
|
||||
}
|
||||
} else {
|
||||
print STDERR "error running '$self->{paste_cmd}': $!\n";
|
||||
}
|
||||
@@ -79,6 +85,12 @@ sub paste_escaped {
|
||||
if ($? == 0) {
|
||||
$str =~ s/([!#\$%&\*\(\) ='"\\\|\[\]`~,<>\?])/\\\1/g;
|
||||
$self->tt_write($str);
|
||||
if (open(CLIPBOARD, "| $self->{copy_cmd}")) {
|
||||
print CLIPBOARD $str;
|
||||
close(CLIPBOARD);
|
||||
} else {
|
||||
print STDERR "error running '$self->{copy_cmd}': $!\n";
|
||||
}
|
||||
} else {
|
||||
print STDERR "error running '$self->{paste_cmd}': $!\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user