Colin Campbell

How I configured urxvt

I spent some time this weekend configuring urxvt. I’ve historically been a gnome-terminal or terminator user. Urxvt is more light weight, but what I was really interested in was urxvt’s ability to render images on the terminal. To cut down on adds and noise, I like getting my news with newsboat and being able to see images without having to leave the terminal was right up my alley. The downside to all of this is that urxvt is less integrated into the desktop and a little trickier to configure overall.

The first thing to do was to install urxvt. Luckily there is a package for it so it was easy to install with apt.

apt install rxvt-unicode 
The urxvt config is read from ~/.Xresources and can be reloaded like this.
xrdb -load ~/.Xresources

The first and the most important thing to configure is the font and the colour theme which I store in a .xrdb directory.

#include ".xrdb/color/nord"
#include ".xrdb/fonts/meslo"

I don’t like seeing the scrollbar so I disable it like this.

URxvt*scrollBar:        false

The next thing I wanted to get right was the copy paste keys. I use macos a lot for work and am very used to how that feels.

URxvt.copyCommand:      xclip -i -selection clipboard
URxvt.pasteCommand:     xclip -o -selection clipboard
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
URxvt.iso14755: false
URxvt.iso14755_52: false

I like a bit of transparency, but don’t care about it too much, so I just use the pseudo transparency configuration.

urxvt*depth: 32
URxvt.background: [95]#2f343f

I like the terminal to be a bit bigger than the defaults so I set the geometry like this.

URxvt*geometry: 156x42

That’s about it. After entering all that I reload the config and I get a comparable setup to what I had with gnome-terminal, but now it will render images on the console!

screenshot

Tags: