edeca.net logo
  • rss
  • Home
  • Graphics
  • Computing
    • ROT Util
    • MOTD maker
    • GNU screen config
    • VB6 reverse DNS
    • VB6 RichTextBox control
  • About

GNU screen config

Over the last few years using screen I have stolen bits and pieces from other screen configuration files. Recently, I found the one below, which is very useful and works well.

The configuration below should be put in your ~/.screenrc file. The bindkey lines will set Alt , and Alt . (the same keys as < and > on a QWERTY keyboard) to move between windows left and right.

# Look and feel
caption always "%{= bb}%{+b w}Screen: %n | %h %=%t %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<

# Our warning of activity
activity "Activity in %t(%n)"

# Left Right meta key mods
#ALT-,. and ALT-<>
bindkey "^[<" eval number !echo $WINDOW-1|bc
bindkey "^[>" eval number !echo $WINDOW+1|bc
bindkey "^[," prev
bindkey "^[." next

To activate the caption output, the following should added to your ~/.bashrc file also:

# Change the window title of X terminals
case $TERM in
screen)
    PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac

With the above activated in your ~/.bashrc (don’t forget to restart screen!), you should notice directory and process information appear just above the window tabs.

Example

GNU screen example

Comments rss
Comments rss
Trackback
Trackback

Leave a Reply

Click here to cancel reply.

Categories

  • Computing
  • Electronics
  • General

Archives

  • February 2010
  • January 2010
  • November 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009

Links

  • My photo gallery
  • Pookey's site

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox