URXVT - Terminal for Geeks

Posted by Abdullah on September 18, 2019 · 9 mins read

What’s URxvt?

As a linux user, I spend most of my time in terminal emulators. There are alot of emulators available today but none can beat rxvt-unicode.

The biggest problem most new linux users face is how to configure it. Today I’ll explain how you can use it to your needs.

Most distributions package it with less features enabled. I always compile it from source. So let’s start and in the end you’ll end up with a perfect terminal emulator.

Get the source and compile it.

$ wget http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-9.22.tar.bz2
$ tar xvf rxvt-unicode-9.22.tar.bz2
$ cd rxvt-unicode-9.22
$ ./configure --enable-everything --enable-256-color
$ make
# make install

–enable-everything will compile all things for us except 256 color support. So keep that in mind.

So now rxvt-unicode is installed, just execute it. You won’t like it out of the box. We have to configure it.

Configuration

rxvt-unicode reads the configuration from two files, ~/.Xresources or ~/.Xdefaults. So here I’m gonna put my ~/.Xdefaults, just copy it to your home directory as ~/.Xdefaults. You can always get the latest one here.

$ cat ~/.Xresources


!  ▓▓▓▓▓▓▓▓▓▓ 
! ░▓ Author ▓ Abdullah <https://abdullah.today/>
! ░▓▓▓▓▓▓▓▓▓▓ 
! ░░░░░░░░░░ 


! Colors

*.foreground  : #fffaf4
*.background  : #0e1019
*.cursorColor : #ff0018
*.color0      : #232323
*.color8      : #444444
*.color1      : #ff000f
*.color9      : #ff2740
*.color2      : #8ce10b
*.color10     : #abe15b
*.color3      : #ffb900
*.color11     : #ffd242
*.color4      : #008df8
*.color12     : #0092ff
*.color5      : #6d43a6
*.color13     : #9a5feb
*.color6      : #00d8eb
*.color14     : #67fff0
*.color7      : #ffffff
*.color15     : #ffffff
*.colorBD     : #9e9c9a

! Fonts

!URxvt*font:             -misc-tamsyn-bold-r-normal--20-145-100-100-c-100-iso8859-1,\
!                        -misc-tamzen-medium-r-normal--20-145-100-100-c-100-iso8859-1,\
!                        xft:DejaVu Sans Mono for Powerline-10,\
!                        xft:'Terminus (TTF) for Powerline':MediumForPowerline:size=13:antialias=true,\
!                        xft:Inconsolata\ For\ Powerline:size=13:antialias=true,\
!                        xft:Consolas:size=13,\
!                        xft:Inconsolata\ for\ Powerline,\
!                        xft:Terminess\ Powerline:size=12,\
!                        -misc-tamzenforpowerline-medium-r-normal--20-145-100-100-c-100-iso10646-1,\
!                        xterm: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1,\
!                        xft:PowerlineSymbols,\
!                        xft:FontAwesome:size=28:minspace=False,\
!                        xft:DejaVu Sans:pixelsize=18
!URxvt*boldFont:         -misc-tamzenforpowerline-bold-r-normal--20-145-100-100-c-100-iso8859-1,\
!                        xft:Inconsolata:bold:size=16:antialias=true,\
!                        xft:DejaVu Sans:bold:size=16:antialias=true,\
!                        xft:FontAwesome
URxvt*font: xft:source code pro for powerline:italic:pixelsize=18,\
            xft:DejaVu Sans Mono for Powerline-10,\
            xft:'Terminus (TTF) for Powerline':MediumForPowerline:size=13:antialias=true,\
            xft:Inconsolata\ For\ Powerline:size=13:antialias=true,\
            xft:Consolas:size=13,\
            xft:Inconsolata\ for\ Powerline,\
            xft:Terminess\ Powerline:size=12,\
            -misc-tamzenforpowerline-medium-r-normal--20-145-100-100-c-100-iso10646-1,\
            xterm: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1,\
            xft:PowerlineSymbols,\
            xft:FontAwesome:size=28:minspace=False,\
            xft:DejaVu Sans:pixelsize=18
URxvt*imFont: xft:source code pro for powerline:italic:pixelsize=18
URxvt*boldFont: xft:source code pro for powerline:semibold:pixelsize=18
URxvt*italicFont: xft:source code pro for powerline:italic:pixelsize=18
URxvt*boldItalicFont: xft:source code pro for powerline:semibold:italic:pixelsize=18
URxvt*letterSpace: 0

URxvt*termName             : rxvt-unicode-256color
URxvt*geometry             : 96x30
!URxvt*chdir               : /home/ak
URxvt*reverseVideo         : 0
URxvt*loginShell           : 1
!URxvt*multiClickTime      : 0.1
URxvt*jumpScroll           : 1
URxvt*skipScroll           : 1
URxvt*pastableTabs         : 1
URxvt*scrollstyle          : plain
URxvt*scrollBar            : 0
URxvt*scrollBar_right      : 0
URxvt*scrollBar_floating   : 0
URxvt*scrollBar_align      : centre
URxvt*thickness            : 0
URxvt*scrollTtyOutput      : 0
URxvt*scrollTtyKeypress    : 1
URxvt*scrollWithBuffer     : 1
URxvt*inheritPixmap        : 0
URxvt*transparent          : 0
URxvt*tintColor            : #ffffff
URxvt*shading              : 145
URxvt*blurRadius           : 1x65
URxvt*fading               : 25
URxvt*fadeColor            : #008B8B
URxvt*utmpInhibit          : 1
URxvt*urgentOnBell         : 1
URxvt*visualBell           : 0
URxvt*mapAlert             : 0
URxvt*meta8                : 0
URxvt*mouseWheelScrollPage : 0
URxvt*tripleclickwords     : 0
URxvt*insecure             : 0
URxvt*cursorUnderline      : 1
URxvt*cursorBlink          : 0
URxvt*pointerBlank         : 1
!URxvt*colorBD             : color
!URxvt*colorIT             : color
!URxvt*colorUL             : color
!URxvt*colorRV             : color
!URxvt*underlineColor      : color
!URxvt*scrollColor         : color
!URxvt*troughColor         : color
!URxvt*highlightColor      : color
!URxvt*highlightTextColor  : color
!URxvt*cursorColor         : color
!URxvt*cursorColor2        : color
!URxvt*pointerColor        : color
!URxvt*pointerColor2       : color
!URxvt*borderColor         : color
URxvt*path                 : /home/ak/pix
!URxvt*backgroundPixmap    : /home/ak/pix/bg.jpg;op=keep-aspect
URxvt*iconFile             : /usr/share/pixmaps/urxvt.xpm
URxvt*pointerShape         : ul_angle
!URxvt*italicFont          : fontname
!URxvt*boldItalicFont      : fontname
URxvt*intensityStyles      : 1
!URxvt*inputMethod         : ibus
!URxvt*preeditType         : xim
!URxvt*imLocale            : ja_JP.EUC-JP
!URxvt*imFont              : xft                                                    : Fura Code for Powerline : 17
!URxvt*title               : rxvt
!URxvt*iconName            : rxvt
URxvt*saveLines            : 9999
URxvt*buffered             : 1
URxvt*depth                : 32
URxvt*visual               : 0x20
!URxvt*transient-for       :
URxvt*override-redirect    : 0
!URxvt*hold                : 1
URxvt*externalBorder       : 15
URxvt*internalBorder       : 15
URxvt*borderLess           : 0
URxvt*lineSpace            : 0
!URxvt*letterSpace          : 0
URxvt*skipBuiltinGlyphs    : 0
URxvt*pointerBlankDelay    : 1
!URxvt*backspacekey        :
!URxvt*deletekey           :
URxvt*print-pipe           : cat >  /tmp/$(echo urxvt.dump.$(date +'%Y%M%d%H%m%S'))
URxvt*modifier             :
URxvt*cutchars             : BACKSLASH " " '"'&()*,;<=>?@[]^{|}\"()*,<>[]{}|''"\

!URxvt*
!URxvt*answerbackString:               
URxvt*secondaryScreen            : 1
URxvt*secondaryScroll            : 1
URxvt*perl-lib                   : /home/ak/.urxvt/ext
!URxvt*perl-eval                 :
!URxvt*perl-ext-common           :
!URxvt*perl-ext                  :
URxvt*iso14755                   : 1
URxvt*iso14755_52                : 1
!URxvt*xrm                       :
!URxvt*keysym.sym                :
URxvt*background                 : rgba:0000/0000/0200/c800
!URxvt*background.border         :
!URxvt*background.expr           :
!URxvt*background.interval       :
!URxvt*bell-command              :
!URxvt*kuake.hotkey              :
URxvt*matcher.button             : 2
URxvt*url-launcher               : /usr/bin/google-chrome-stable
URxvt*url-select.underline       : 1
!URxvt*matcher.launcher.*        :
!URxvt*matcher.pattern.*         :
URxvt*matcher.rend.0             : Uline Bold fg5
!URxvt*remote-clipboard.fetch    :
!URxvt*remote-clipboard.store    :
!URxvt*selection-autotransform.* :
!URxvt*selection-pastebin.cmd    :
!URxvt*selection-pastebin.url    :
URxvt*selection.pattern-0        : ([[                           : word                : ]]+)
!URxvt*tab-bg                    :
!URxvt*tab-fg                    :
!URxvt*tabbar-bg                 :
!URxvt*tabbar-fg                 :
URxvt*keysym.M-C-c               : selection                     : rot13
!URxvt*keysym.M-s                : searchable-scrollback         : start
URxvt*perl-ext-common            : vim,default,matcher
!URxvt*clipboar-autocopy         : 1
URxvt*vim-scrollback             : M-s
URxvt*vim-scrollback-paste       : M-p
URxvt*clipboard.copycmd          : xsel -ib


polybar*background             : #24292A
polybar*foreground             : #ccd2be
polybar*fading                 : 15
polybar*fadeColor              : black
polybar*cursorColor            : #16A085
polybar*pointerColorBackground : #2B2C2B
polybar*pointerColorForeground : #16A085

!! black dark/light
polybar*color0                 : #24292A
polybar*color8                 : #3c4140

!! red dark/light
polybar*color1                 : #ff8843
polybar*color9                 : #c48851

!! green dark/light
polybar*color2                 : #7a8d5c
polybar*color10                : #aec199

!! yellow dark/light
polybar*color3                 : #a69658
polybar*color11                : #c4b268

!! blue dark/light
polybar*color4                 : #7b90a9
polybar*color12                : #91aac7

!! magenta dark/light
polybar*color5                 : #aa6161
polybar*color13                : #e78484

!! cyan dark/light
polybar*color6                 : #698885
polybar*color14                : #83a5a1

!! white dark/light
polybar*color7                 : #a8b298
polybar*color15                : #ccd2be

!! XTERM

!xterm*font:             -misc-tamzen-medium-r-normal--20-145-100-100-c-100-iso8859-1, xft:DejaVu Sans Mono for Powerline-10, xft:Terminus (TTF) for Powerline:MediumForPowerline:size=13:antialias=true, xft:Inconsolata\ For\ Powerline:size=13:antialias=true
!xterm*font:              -misc-tamzen-medium-r-normal--20-145-100-100-c-100-iso8859-1
xterm*faceName:         -misc-tamzen-medium-r-normal--20-145-100-100-c-100-iso8859-1
!                         xft:Consolas:size=13, \
!                         xft:Inconsolata for Powerline, \
!                         xft:Terminess Powerline:size=12, \
!                        -misc-tamzenforpowerline-medium-r-normal--20-145-100-100-c-100-iso10646-1, \
!                        xterm: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1, \
!                        xft:PowerlineSymbols,\
!                        xft:FontAwesome:size=28:minspace=False,\
!                        xft:DejaVu Sans:pixelsize=18
!xterm*boldFont:          -misc-tamzenforpowerline-bold-r-normal--20-145-100-100-c-100-iso8859-1, xft:Inconsolata:bold:size=16:antialias=true, xft:DejaVu Sans:bold:size=16:antialias=true, xft:FontAwesome
xterm*termName              : xterm-256color
xterm*geometry              : 96x30
!xterm*chdir                : /home/ak
xterm*reverseVideo          : 0
xterm*loginShell            : 1
!xterm*multiClickTime       : 0.1
!xterm*jumpScroll           : 1
!xterm*skipScroll           : 1
!xterm*pastableTabs         : 1
!xterm*scrollstyle          : plain
!xterm*scrollBar            : 0
!xterm*scrollBar_right      : 0
!xterm*scrollBar_floating   : 0
!xterm*scrollBar_align      : centre
!xterm*thickness            : 0
!xterm*scrollTtyOutput      : 0
!xterm*scrollTtyKeypress    : 1
!xterm*scrollWithBuffer     : 1
!xterm*inheritPixmap        : 0
!xterm*transparent          : 0
!xterm*tintColor            : #ffffff
!xterm*shading              : 145
!xterm*blurRadius           : 1x65
!xterm*fading               : 25
!xterm*fadeColor            : #008B8B
!xterm*utmpInhibit          : 1
!xterm*urgentOnBell         : 1
!xterm*visualBell           : 0
!xterm*mapAlert             : 0
!xterm*meta8                : 0
!xterm*mouseWheelScrollPage : 0
!xterm*tripleclickwords     : 0
!xterm*insecure             : 0
!xterm*cursorUnderline      : 1
!xterm*cursorBlink          : 0
!xterm*pointerBlank         : 1
!xterm*colorBD              : color
!xterm*colorIT              : color
!xterm*colorUL              : color
!xterm*colorRV              : color
!xterm*underlineColor       : color
!xterm*scrollColor          : color
!xterm*troughColor          : color
!xterm*highlightColor       : color
!xterm*highlightTextColor   : color
!xterm*cursorColor          : color
!xterm*cursorColor2         : color
!xterm*pointerColor         : color
!xterm*pointerColor2        : color
!xterm*borderColor          : color
!xterm*path                 : /home/ak/pix
!xterm*backgroundPixmap     : /home/ak/pix/bg.jpg;op=keep-aspect
!xterm*iconFile             : /usr/share/pixmaps/terminal-tango.svg
!xterm*pointerShape         : ul_angle
!xterm*italicFont           : fontname
!xterm*boldItalicFont       : fontname
!xterm*intensityStyles      : 1
!xterm*inputMethod          : ibus
!xterm*preeditType          : xim
!xterm*imLocale             : ja_JP.EUC-JP
!xterm*imFont               : xft:Fura Code for Powerline : 17
!xterm*title                : rxvt
!xterm*iconName             : rxvt
!xterm*saveLines            : 9999
!xterm*buffered             : 1
!xterm*depth                : 96
!xterm*visual               : 0x20
!xterm*transient-for        :
!xterm*override-redirect    : 0
!xterm*hold                 : 1
!xterm*externalBorder       : 15
!xterm*internalBorder       : 15
!xterm*borderLess           : 0
!xterm*lineSpace            : 0
!xterm*letterSpace          : 0
!xterm*skipBuiltinGlyphs    : 0
!xterm*pointerBlankDelay    : 1
!xterm*backspacekey         :
!xterm*deletekey            :
!xterm*print-pipe           : cat >  /tmp/$(echo urxvt.dump.$(date +'%Y%M%d%H%m%S'))
!xterm*modifier             :
xterm*cutchars              : \"()*,<>[]{}|''"\
!xterm*cutchars             : BACKSLASH '"'&()*,;<=>?@[]^{|}

!xterm*
!xterm*answerbackString     :
!xterm*secondaryScreen      : 1

After saving the file, we have to load it.

$ xrdb -load ~/.Xdefaults

Now execute it. You may not have the fonts I use so maybe you face some errors. Just install those fonts or change them.

I also have written a post on fonts for easy management of fonts you like.

Still have problems? Just lemme know and I’ll be happy to assist you.

Comments: