I've spent some time on my RatPoison configuration. At first I was quite daunted by having nothing in front of me but a blank screen and a few keyboard shortcuts that I had yet to learn. Unfortunately the documentation on the main RatPoison site is pretty sparse, so much of what I learned was from guesswork and dumb luck. The main reason for installing RatPoison on my laptop was because I use my laptop for very little more than irssi and ssh, so obviously the terminal was a big deal. At first I decided to try Eterm, as I have used it a lot in the past and I am quite a big fan. However, I was unable to get it to run borderlessly in RP, so instead I went with rxvt-unicode, which is basically the rxvt terminal with UTF-8 support. After trying it out I was very impressed and it is now my default terminal. The first thing I looked into was setting up my ~/.Xdefaults file so I could have my usual green on black theme (because it makes me feel like I'm in the Matrix):
urxvt.background: blackThat is my ~/.Xdefaults file, the first two lines tell the terminal what background and foreground colours to use, the third line gets rid of the scrollbar, because having a scrollbar in my overall RP look would totally harsh my vibe, and the fourth line enables buffering (and yes, I did type "buggering" there by accident). The last two lines set the font and size. I am using Terminus at 9px because I have super-human eyesight. Terminus is not my first choice for a monospace font, however it is my first free choice, as my favourite monospace font is Microsoft's Consolas.
urxvt.foreground: green
urxvt.scrollBar: false
urxvt.buffered: true
urxvt.font: xft:Terminus:pixelsize=9:antialias=false
urxvt.boldfont: xft:Terminus:bold:pixelsize=9:antialias=false
(Edit: There is now an open-source version of Consolas called "Inconsolata", which is absolutely brilliant. Check it out here)
Once I had my terminal looking how I wanted it to, I moved on to my /etc/ratpoisonrc file so that I could set up some keybindings as well as my default terminal:
alias term exec urxvtAs you can see, I set urxvt as my default terminal, and I also set some padding and border options. I also set the background and foreground colours to black and green respectively so as to match my terminal theme. The last line sets the RatPoison "infobar" to display on the bottom left corner.
escape C-f
warp off
startup_message off
set winname class
defborder 0
set padding 0 0 0 0
defbarpadding 0 0
exec xsetroot -solid \006060 -cursor_name left_ptr
bind semicolon colon
set bgcolor black
set fgcolor green
set font -xos4-terminus-*-*-*-*-16-*-*-*-*-*-iso8859-15
set bargravity sw
As for my key bindings, I changed the default escape key from ctrl-t to ctrl-f, this is because I swapped my ctrl and capslock keybindings in my xorg.conf so that I would save myself some carpal tunnel syndrome. Obviously, on a qwerty keyboard, typing ctrl-f is more economical than ctrl-t when your capslock key is actually your ctrl key. I also set up some other key bindings for other programs I might use regularly:
bind f exec firefoxWhen it comes to using the bindings in RatPoison, one must first press the escape sequence, in this case ctrl-f, thus if I wanted to open Firefox, I would type ctrl-f followed by the letter f. Other keybindings worth mention are alpine; the application I use to read my email, irsii; my IRC client of choice and urxvt; my terminal. I have also set up a keybinding on d, which will pop up the date and time in the "infobox" mentioned earlier.
bind m exec urxvt -e alpine
bind u exec urxvt -e irssi -n Kasyx
bind r restart
bind Delete exec sudo /sbin/shutdown -h now
bind c exec urxvt
bind l exec xlock -mode blank
bind d exec ratpoison -c "echo `date`"
bind q remove
bind p exec urxvt -e elinks
The finished product:
The image is blurred there because I don't want you reading my email subject lines. In this screencap, you can see that I have split my screen into 3 sections; 2 on the bottom horizontal split, and 1 on the top. The top frame currently has an instance of alpine running, however that frame is used for various other things such as Firefox, work in the terminal and so on. The bottom left frame is for irssi where I am currently berating Calvin over his love of Emacs. The bottom right frame is a permanent terminal session wherein I am usually ssh'd into my firewall - cerberus (as you can see by the sexy log in message).
I will leave it at that for this article as it is already running a bit on the long side, so in my next article I will discuss the configuration of my ~/.bashrc file.