Enable Copy-paste Clipboard In URxvt Terminal Emulator
Maybe your like
In my current Arch Linux installation, I decided to use a window manager called i3. It's really awesome and it comes with a really lightweight terminal emulator called urxvt. It's very minimal and I lked it but when I tried to copy-paste text from one terminal to another, I wasn't able to.
However, thanks to the internet, I did some research and figured a way out.
1. Install xClip
First, you need to ensure that you have installed the xclip package, which will be used to copy-paste text in the emulator.
Type the following command to install the package:
pacman-Sxclip2. Activate Clipboard using Perl
Now, you have to paste these custom commands into your clipboard file, which is found in /usr/lib/urxvt/perl directory:
# paste selection from clipboard subpaste{ my($self)=@_; my$content=`/usr/bin/xclip -loop 1 -out -selection clipboard`; $self->tt_write($content); } # copy text to clipbard on selection subon_sel_grab{ my$query=$_[0]->selection; open(my$pipe,'| /usr/bin/xclip -in -selection clipboard')ordie; print$pipe$query; close$pipe; }3. Modify your .Xresources
Add these keybindings to your .Xresources file:
URxvt.keysym.Shift-Control-V:perl:clipboard:paste URxvt.iso14755:False URxvt.perl-ext-common:default,clipboardAfter adding it, refresh your .Xresources settings:
xrdb-merge.XresourcesReboot your terminal and try selecting some text from your terminal using your mouse and paste it using Ctrl+Shift+V and it should work!
That's it! Enjoy 😃
June 20th, 2020- Linux
Hello, I'm Abdush Shakoor! 👋
I'm a programmer & designer based in Dubai, United Arab Emirates. I love tinkering with code and writing about what I learn.
Like this article? Please share it with your friends and colleagues or else, send me a private message about your feedback.
- 👈 Check out more articles!
Tag » Arch I3 Copy Paste
-
How To Copy Paste From Browser To Terminal? - I3 FAQ
-
How To Copy Paste From Browser To Terminal In Arch Linux? - Reddit
-
Copy & Paste Between Terminal(s) And Application Windows In I3
-
Copying Text From A Terminal - ArchWiki
-
Clipboard - ArchWiki
-
Copy / Paste Problems In In Kitty On Arch/i3 - Unix Stack Exchange
-
Save Clipboard To File Using Xclip - ARCH LINUX
-
I3 In Vmware Doesn't Share Clipboard With Host Windows-machine
-
How To Copy And Paste In I3 On Debian - YouTube
-
Configuring The I3 Window Manager - Jason Eckert
-
AntenehDev/Arch-i3 - GitHub
-
Fresh Arch Install In I3-wm: Can't Unmute Audio
-
How Can I Get Clipboard Copy Events From Mac OS X To Carry Over ...