screenrc

Today I decided to rewrite some of my config files. I started with ~/.screenrc. It’s amazing the cool things you can do in that file :)

Here are some of the options I use. One of them is rather useful : replacing the main screen key : instead of ‘ctrl-A’, I changed it to ‘ctrl-O’. That’s because ‘ctrl-A’ is binded in many applications (emacs, *sh, other editors, links…), and it clashes a lot with the badly chosen default screen key ‘ctrl-A’.

The other nifty option sets the caption of the bottom line : it displays all the windows with their number and title, the current one being highlighted in white on blue. And some status information are padded to the right of the screen.


# ~/.screenrc
# use visual bell
vbell on
# replace ctrl-A by ctrl-O
escape ^Oo
# set a big scrolling buffer
defscrollback 5000
# Set the caption on the bottom line
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"

This entry was posted in Gentoo, Personal. Bookmark the permalink.

6 Responses to screenrc

  1. Joshua Nichols says:

    Nice tip. Perhaps you could submit it to the GWN for its tips and tricks section?

  2. Herval says:

    Wow, very useful the caption configuration, thank you.

  3. Kim says:

    @n-s – lördag 30 september – 0:27

    As you can (perhaps) see, my date shows up wrong. It should be ‘L

  4. it’s probably because you have utf8 setup but your terminal doesn’t understand utf8

  5. Kim says:

    Most likely.
    No clues on how I make gnome-terminal run with utf8?

  6. Nathan Collins says:

    I googled for “screenrc”. What I wanted to do is change the escape sequence (although C-o also isn’t good, because it’s open-line in emacs) and increase the size of the scrollback buffer. In addition to those you also have the caption which, although I hadn’t imagined it, sounds like a great idea. You rock :)