You are not logged in.

#1 2008-01-19 20:54:43

colbert
Member
Registered: 2007-12-16
Posts: 809

Some general ?'s re: urxvt, copy/paste, etc.

I started using urxvt, and I just checked the manpage and what I believe is the section on keybindings was quite confusing for me. I am used to gnome-terminal's ctrl+alt+c/v for copy/paste, and just want to double check a few things.

1. In urxvt, highlight with either left/right mouse and which kb button/shortcut will copy? And what is the paste command in urxvt (above gnome-terminal combo doesn't work I just realized).
2. Doing it this way, I can only paste with middle mouse button, ctrl+v in FF for example doesn't paste it, and I am confused about why?
3. Can someone give me a fairly basic command/rundown for configuring/viewing keybindings in urxvt? I have checked the manpage like I said and it was a bit baffling.


Thanks folks I really want to learn it, appreciate any help to get me in the right direction with some basics smile

Offline

#2 2008-01-19 22:27:59

Issh
Member
Registered: 2007-12-02
Posts: 58

Re: Some general ?'s re: urxvt, copy/paste, etc.

I think middle mouse pastes iirc

Offline

#3 2008-01-19 22:52:59

ProzacR
Member
Registered: 2007-04-29
Posts: 272

Re: Some general ?'s re: urxvt, copy/paste, etc.

copy on sellect and middleclick paste. I do now know keyboard shotcuts and wonder if they exist at all.

Offline

#4 2008-01-21 00:56:37

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Some general ?'s re: urxvt, copy/paste, etc.

Right, but I can only paste with middle click when copying from urxvt. Why can I not paste with ctrl+v, and is there a way to set it so I can?

Offline

#5 2008-01-21 06:27:58

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: Some general ?'s re: urxvt, copy/paste, etc.

try shift-insert (=middle click)

Some more Information.
http://en.wikipedia.org/wiki/Copypaste#Copy_and_paste

Last edited by Purch (2008-01-21 06:31:31)

Offline

#6 2008-01-21 21:08:09

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Some general ?'s re: urxvt, copy/paste, etc.

Thanks Purch. But shift+ins doesn't work either. It appears I can only paste with middle-click whatever I copy from urxvt, and anything I copy in GUI apps is doable with ctrl+c/v combo. Is it just separate clipboards and that's how it is?

Offline

#7 2008-01-21 21:38:37

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Some general ?'s re: urxvt, copy/paste, etc.

colbert wrote:

Is it just separate clipboards and that's how it is?

Yes. As a matter of fact, clipboard managers such as Glipper allow for collection of copied items based on whether the items come from the Primary selection (highlight & middleclick) or the Clipboard (CTL+C & CTL+V, etc.).

See my post here:

http://bbs.archlinux.org/viewtopic.php? … 26#p279226

(especially the link at the bottom) for more detailed info about the copy and paste implementation in X11.

By the way, I recently began using rxvt-unicode, and two things that I find require some adjustment are the use of the Primary selection for copy / paste (without the option for using the Clipboard) and no drag and drop support.

Because of urxvt's use of the Primary clipboard, I had to enable that feature in Glipper (which I normally have disabled), and it certainly leads to a lot of junk filling up Glipper's copy / paste list. Every time you highlight something whether you intended to copy and paste it or not, the item ends up in the list making it more difficult to cull out the items you really intended to re-use for copy & paste operations.

I guess everything has its pros and cons, and I'm still on the fence about whether the pros of urxvt outweigh the cons. I'm leaning towards keeping it for now.

-----
Edit: grammar

Last edited by MrWeatherbee (2008-01-21 21:42:32)

Offline

#8 2008-12-08 18:21:20

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Some general ?'s re: urxvt, copy/paste, etc.

/me blows some dust of this thread.

Is there no way to be able to use both the primary and secondary clipboard in urxvt?


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#9 2008-12-08 18:28:35

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Some general ?'s re: urxvt, copy/paste, etc.

Glad someone asked. The following code will push anything that gets selected in urxvt to both the primary selection and the clipboard. It requires xsel and perl:

#! /usr/bin/perl

sub on_sel_grab {
    my $query = quotemeta $_[0]->selection;
    $query =~ s/\n/\\n/g;
    $query =~ s/\r/\\r/g;
    system( "echo -en " . $query . " | xsel -ibp" );
}

I called it clipboard, saved it to /usr/lib/urxvt/perl, and enabled in the "urxvt*perl-ext-common:" line in ~/.Xdefaults:

urxvt*perl-ext-common:      default,matcher,clipboard

It only works when copying out of urxvt though.

Last edited by skottish (2008-12-08 18:29:19)

Offline

#10 2008-12-08 18:34:22

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Some general ?'s re: urxvt, copy/paste, etc.

I need the opposite.. To be able to paste from the 2nd clipboard in urxvt.
(Sometimes you have no choice then using the 2nd clipboard.  eg in firefox 'copy link location' puts it only there)

greets,
someone.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#11 2008-12-08 18:37:14

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Some general ?'s re: urxvt, copy/paste, etc.

Dieter@be wrote:

I need the opposite.. To be able to paste from the 2nd clipboard in urxvt.
(Sometimes you have no choice then using the 2nd clipboard.  eg in firefox 'copy link location' puts it only there)

greets,
someone.

Damn! I was hoping to share.

Anyway, xsel will allow you to copy to the secondary also. You may be able to write a script, bind it to some keys, and do it quickly. For instance, to copy the secondary to the primary:

xsel -s | xsel

Last edited by skottish (2008-12-08 18:48:15)

Offline

#12 2008-12-09 02:21:31

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Some general ?'s re: urxvt, copy/paste, etc.

See also xclip

Offline

#13 2009-05-04 22:12:56

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: Some general ?'s re: urxvt, copy/paste, etc.

skottish wrote:

Glad someone asked. The following code will push anything that gets selected in urxvt to both the primary selection and the clipboard. It requires xsel and perl:

#! /usr/bin/perl

sub on_sel_grab {
    my $query = quotemeta $_[0]->selection;
    $query =~ s/\n/\\n/g;
    $query =~ s/\r/\\r/g;
    system( "echo -en " . $query . " | xsel -ibp" );
}

I called it clipboard, saved it to /usr/lib/urxvt/perl, and enabled in the "urxvt*perl-ext-common:" line in ~/.Xdefaults:

urxvt*perl-ext-common:      default,matcher,clipboard

It only works when copying out of urxvt though.

Thanks.  This works great.

Jay

Offline

#14 2009-05-04 22:16:16

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: Some general ?'s re: urxvt, copy/paste, etc.

Dieter@be wrote:

I need the opposite.. To be able to paste from the 2nd clipboard in urxvt.
(Sometimes you have no choice then using the 2nd clipboard.  eg in firefox 'copy link location' puts it only there)

greets,
someone.

You can use autocutsel from [community] to copy from the clipboard to urxvt.  Invoke it as 'autocutsel -selection PRIMARY'.  You can make it an autostart program, of course.

Jay

Offline

#15 2009-05-05 04:14:36

osc~
Member
From: brazil
Registered: 2007-07-06
Posts: 117
Website

Re: Some general ?'s re: urxvt, copy/paste, etc.

did you try:

ctrl + shift + C to copy

ctrl + shift + V to paste

Offline

#16 2009-05-05 18:57:44

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Some general ?'s re: urxvt, copy/paste, etc.

jt512 wrote:
Dieter@be wrote:

I need the opposite.. To be able to paste from the 2nd clipboard in urxvt.
(Sometimes you have no choice then using the 2nd clipboard.  eg in firefox 'copy link location' puts it only there)

greets,
someone.

You can use autocutsel from [community] to copy from the clipboard to urxvt.  Invoke it as 'autocutsel -selection PRIMARY'.  You can make it an autostart program, of course.

Jay

thanks. this seems to work great.

osc~ wrote:

did you try:

ctrl + shift + C to copy

ctrl + shift + V to paste

Now I have. In urxvt it just prints ^V


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#17 2011-11-16 15:02:41

elementai
Member
Registered: 2011-11-16
Posts: 1

Re: Some general ?'s re: urxvt, copy/paste, etc.

Forgive me for blowing the dust from this thread another time, but it's a high ranked page in google's PR.

So, I've just found that meta+middle mouse button pastes from Ctrl+C buffer. Dunno whether it's urxvt native feat or some plugin though.

Offline

#18 2011-11-16 15:23:25

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Some general ?'s re: urxvt, copy/paste, etc.

This is a really old thread. Let's keep it read-only now.

Closing.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB