2

I know things similar to this have been asked many times.

I've recently made the switch from Gnome to Awesome. My current terminal is urxvt. Using the copy buffer is fine, I know I can insert into the terminal from this using [CTRL]+[Ins] (or middle mouse click) and do so very frequently.

The issue lies when something is in the clipboard. I use pass as my password manager and when I issue the command pass -c this copies the password to the clipboard then wipes it after a short period of time, which I do not have a problem with.

The issue is when I am prompted for one of these passwords in the terminal. If it was in the copy buffer I could just [CTRL]+[Ins] when prompted. So the main question really becomes how do I set a keyboard combination to paste from the clipboard for urxvt/xterm?

Ideal scenario (using mysql as example):

$ pass -c mysql-root
Copied mysql-root to clipboard. Will clear in 45 seconds
$ mysql -uroot -p
Enter password: <keyboard combination>
root@localhost>
Alasdair
  • 566
  • 1
  • 4
  • 16

2 Answers2

2

There are perl rxvt extensions to work with the clipboard. Add this to your .Xresources file and "xrdb -merge .Xresources" before starting awesomewm

URxvt.perl-ext-common: default,clipboard

On my awesome-wm setup on FreeBSD the default is shift-ins to insert both primary and clipboard buffers. But this might be different on your os/distro.

Arch linux wiki has a detailed guide on how to set up rxvt, https://wiki.archlinux.org/index.php/rxvt-unicode#Cut_and_paste. The instructions can be applied on any linux distro with minor tweaks.

1

Turns out the correct combination for the clipboard in my environment is [CTRL] + [ALT] + V.

The buffer is still [CTRL] + [Ins].

Alasdair
  • 566
  • 1
  • 4
  • 16