All pastes #190739 Raw Edit

Sans nom

public text v1 · immutable
·published 2006-10-04 08:34 UTC
rendered paste body
3. Tips and Tricks
==================
  
Using GNU screen
----------------
  
GNU screen[6] is a very useful program, especially if you are a coder or 
administrator. It has a lot of options, and it's not easy to find your way 
in its huge man page. Below is a small list of some useful options that 
you should put in your ~/.screenrc. 

 6. http://en.wikipedia.org/wiki/GNU_Screen
 
One of the rather useful options aims to replace the main screen key. 
Instead of 'ctrl-A', it changes it to 'ctrl-O'. This is because 'ctrl-A' 
is binded for use in many applications, such as emacs, bash, and links, 
which clashes with the default screen key 'ctrl-A'. 
 
Another nifty option sets a caption on the bottom line. It displays the 
open windows with their number and title, the current one being 
highlighted in white on blue. Some status information is padded to the 
right of the screen. 
 
---------------------------------------------------------------------------
| Code Listing 3.1:                                                       |
|~/.screenrc settings                                                     |
---------------------------------------------------------------------------
|                                                                         |
|# 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" |
|                                                                         |
---------------------------------------------------------------------------
 
Here is a small screenshot of the caption line in action. 
 
Figure 3.1: GNU screen with the caption line enabled
http://www.gentoo.org/images/gwn/20060925_screen.png