Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default shortcuts for copy/paste in urxvt?

I'm trying to set up copy/paste actions using ctrl+shift+c/p like it is done in GNOME terminal but for urxvt. I didn't find any simple solution - it seems like it always requires scripts, hacks etc which gets me annoyed when it comes to such a basic things. That's why I'm wondering if it is possible to just change/add some entries in ~/.Xresource to move the default behavior from ctrl+alt+c/p to ctrl+shift+c/p - since the former already works as expected.

Also, there is a lot of notions regarding clipboard itself: X calls them "selections" rather than "clipboards"; there are PRIMARY and CLIPBOARD selections; etc. I don't really understand all these subtleties - so feel free to be verbose!

I use Xorg server with i3 WM if it makes sense and rxvt-unicode v9.22 - released: 2016-01-23

like image 615
Timur Fayzrakhmanov Avatar asked Apr 09 '17 09:04

Timur Fayzrakhmanov


People also ask

How do you make URxvt transparent?

True transparency"ee00" (the alpha value) to make it nicely transparent. Note: To make these settings universal for all forms of URxvt, you may add a wildcard.


1 Answers

Contrary to Thomas' answer, it looks like you can. In the same question he referenced Spencer and Enno both mention that you can bind the native eval extensions in your .Xresources file. This would look like the following:

URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard

To disable the previous keybindings, you'll also need:

URxvt.keysym.Control-Meta-c: builtin-string:
URxvt.keysym.Control-Meta-v: builtin-string:

You can reload the file with:

xrdb -load .Xresources

You'll need to restart rxvt for the changes to take effect.

like image 125
stites Avatar answered Oct 04 '22 09:10

stites