User Tools

Site Tools


Configuring mrxvt

The truth is that I hate terminal emulators that force the use of antialiased fonts. Probably such fonts look nice when the font size is large enough but that usually limits too much how many terminals can be fitted to the screen. I like having space for at least four 80x24 terminals on screen with some extra space around them but that has so far caused antialiased fonts to look blurry and in some way out of focus. Tab support is also the other thing I require from a terminal. During the Dapper days I used multi-gnome-terminal since it provided all that, including the ability to hide the tab bar all the time. However, after I upgraded to Hardy I noticed that multi-gnome-terminal wasn't available anymore. Probably due to the fact that it hadn't been updated for a while and also had some minor issues if the window size was adjusted. And so began my quest to find a new terminal emulator to use.

The default terminal that came with Xfce had the antialiasing issues and the tab support was also ugly. I needed something more like xterm but with tab support but not too much more bells and whistles. Then after doing some apt-cache searching I finally found mrxvt. The default configuration looked really ugly so I ended up uninstalling mrxvt only to reinstall it the next day after I couldn't find any other alternatives to start with.

Essentially mrxvt is one of those terminal emulators you configure using a config file instead of some fancy point & click user interface. There is some support for menus but I found the file easier to use. The good thing is that most options are well documented in the man page and a commented example config is also provided. However, I found out that the combination of some options isn't that clear and that's why I ended up writing this example. This screenshot is from XUbuntu 8.04.1 (Xfce) using Clearlooks theme.

This example config below can be saved as ~/.mrxvtrc will provide a simple looking terminal with black background and near white foreground font color.

mrxvt.bottomTabbar:           false
mrxvt.autohideTabbar:         true
mrxvt.minVisibleTabs:         8
mrxvt.hideButtons:            true
mrxvt.syncTabTitle:           true
mrxvt.titleFormat:            %n. %t
mrxvt.highlightTabOnBell:     true
mrxvt.itabBackground:         #101010
mrxvt.tabBackground:          #000000
mrxvt.itabForeground:         #909090
mrxvt.tabForeground:          #9a9a9a

mrxvt.scrollBar:              true
mrxvt.scrollbarRight:         true
mrxvt.scrollbarStyle:         rxvt
mrxvt.saveLines:              2000
mrxvt.scrollTtyOutputInhibit: true
mrxvt.scrollTtyKeypress:      true
mrxvt.scrollColor:            #808080
mrxvt.troughColor:            #909090

mrxvt.cursorBlink:            false
mrxvt.cursorColor:            #d8d8d8
mrxvt.cursorColor2:           #000000

mrxvt.background:             #000000
mrxvt.foreground:             #d8d8d8

mrxvt.color0:                 #000000
mrxvt.color1:                 #aa0000
mrxvt.color2:                 #00bb00
mrxvt.color3:                 #bbbb00
mrxvt.color4:                 #0000bb
mrxvt.color5:                 #bb00bb
mrxvt.color6:                 #00bbbb
mrxvt.color7:                 #d8d8d8
mrxvt.color8:                 #656565
mrxvt.color9:                 #ff5555
mrxvt.color10:                #00ea00
mrxvt.color11:                #eaea00
mrxvt.color12:                #7676cd
mrxvt.color13:                #ea00ea
mrxvt.color14:                #00eaea
mrxvt.color15:                #ffffff

mrxvt.showMenu:               false
mrxvt.internalBorder:         2

mrxvt.pointerBlank:           true
mrxvt.pointerBlankDelay:      10

mrxvt.boldColor:              true
mrxvt.veryBright:             true

Those last two lines enable support for bold fonts if such are requested by some program and that's one thing that isn't clearly told in the mrxvt documentation that only refers to other options for bold fonts.

Selecting the desired font can be done using the mrxvt.font and mxvt.boldFont options followed by the font name in the same syntax for example xfontsel provides:

mrxvt.font: -adobe-courier-medium-r-normal--12-*-*-*-*-*-iso8859-1
mrxvt.boldFont: -adobe-courier-bold-r-normal--12-*-*-*-*-*-iso8859-1

Note that I use ISO8859-1 in terminal instead of UTF-8. Remember also that mrxvt will default to some system font if the font given in the configuration isn't installed. Here are few other alternative font options that have less serif the Courier:

# Misc Fixed
mrxvt.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-iso8859-1
mrxvt.boldFont: -misc-fixed-bold-r-semicondensed--13-*-*-*-*-*-iso8859-1

# Terminus (doesn't have bold versions for 12 point size)
mrxvt.font: -xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-iso8859-1
mrxvt.boldFont: -xos4-terminus-bold-r-normal-*-12-*-*-*-*-*-iso8859-1

Using keyboard shortcuts to move between tabs is by default mapped to alt+number combinations. However, since I already use that mapping in irssi to change channels, I had to get that changed. Shortcut configuration can be found from /etc/mrxvt/mrxvt that can be edited as root or reconfigured in the user config. For mapping tabs to ctrl+number instead of alt+number, locate from the config

Mrxvt.macro.Alt+1:        GotoTab 1

and all other GotoTab lines and replace those with

Mrxvt.macro.Ctrl+1:        GotoTab 1

The shortcut ctrl+shift+t can be used for opening new tabs.

tips/configuring-mrxvt.txt · Last modified: 28.08.2011 22:23 by vergo