mirror of
https://github.com/alrayyes/server-dotfiles
synced 2023-11-14 15:56:25 +00:00
added urxvt paste support
This commit is contained in:
parent
745f6c73e0
commit
c9565a8771
@ -57,6 +57,12 @@ URxvt.pointerBlank: true
|
||||
#*background: #002b36
|
||||
*shading: 20
|
||||
|
||||
# Enable paste support
|
||||
URxvt.perl-lib: /home/alrayyes/bin/urxvt/perl
|
||||
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
|
||||
URxvt.iso14755: False
|
||||
URxvt.perl-ext-common: default,clipboard
|
||||
|
||||
*foreground: #657b83
|
||||
!!*fading: 40
|
||||
*fadeColor: #002b36
|
||||
|
19
urxvt/bin/urxvt/perl/clipboard
Executable file
19
urxvt/bin/urxvt/perl/clipboard
Executable file
@ -0,0 +1,19 @@
|
||||
#script to copy/paste text in URXVT
|
||||
#! perl
|
||||
sub on_sel_grab {
|
||||
my $query = $_[0]->selection;
|
||||
open (my $pipe,'| /usr/bin/xclip -in -selection clipboard') or die;
|
||||
print $pipe $query;
|
||||
close $pipe;
|
||||
}
|
||||
sub paste {
|
||||
my ($self) = @_;
|
||||
my $content = `/usr/bin/xclip -loop 1 -out -selection clipboard` ;
|
||||
$self->tt_write ($content);
|
||||
}
|
||||
sub on_user_command {
|
||||
my ($self, $cmd) = @_;
|
||||
if ($cmd eq "clipboard:paste") {
|
||||
$self->paste;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user