Basically like some of my own that I've posted below. I'm looking for added functionality to the programme 'screen'. At the very least have a look at the last line for a fantastic 'menu bar' at the bottom of a screen session.
## gyaresu's .screenrc 2008-03-25
# http://delicious.com/search?p=screenrc
# Don't display the copyright page
startup_message off
# tab-completion flash in heading bar
vbell off
# keep scrollback n lines
defscrollback 1000
# Doesn't fix scrollback problem on xterm because if you scroll back
# all you see is the other terminals history.
# termcapinfo xterm|xterms|xs|rxvt ti@:te@
# These will let you use
bind -c selectHighs 0 select 10 #these three commands are
bind -c selectHighs 1 select 11 #added to the command-class
bind -c selectHighs 2 select 12 #selectHighs
bind -c selectHighs 3 select 13
bind -c selectHighs 4 select 14
bind -c selectHighs 5 select 15
bind - command -c selectHighs #bind the hyphen to
#command-class selectHighs
screen -t rtorrent 0 rtorrent
#screen -t tunes 1 ncmpc --host=192.168.1.4 --port=6600 #was for connecting to MPD music server.
screen -t stuff 1
screen -t irssi 2 irssi
screen -t dancing 4
screen -t python 5 python
screen -t giantfriend 6 these_are_ssh_to_server_scripts.sh
screen -t computerrescue 7 these_are_ssh_to_server_scripts.sh
screen -t BMon 8 bmon -p eth0
screen -t htop 9 htop
screen -t hellanzb 10 hellanzb
screen -t watching 3
#screen -t interactive.fiction 8
#screen -t hellahella 8 paster serve --daemon /home/gyaresu/downloads/hellahella/hella.ini
shelltitle "$ |bash"
# THIS IS THE PRETTY BIT
#change the hardstatus settings to give an window list at the bottom of the
##screen, with the time and date and with the current window highlighted
hardstatus alwayslastline
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
For those wanting a less cryptic way of getting a nice screen set up, I can heartily recommend byobu (formerly called screen profiles). It gives you a nice default set of stuff at the bottom of the screen - the bottom line contains various handy status information, and the second from bottom line contains a list of your screen windows. All this can be configured in a nice easy ncurses menu by pressing F9.
The function keys are mapped to common operations:
See this article for a tutorial and screenshots.
Byobu is in the ubuntu repositories from karmic (9.10) onwards. In jaunty it was called screen-profiles. Before that it can be installed from this ppa of from this download page. It's widely packaged for other up-to-date distros aswell.
It does depend on python, but once you have byobu set up as you like it, you can have it generate a tar ball containing all you need to recreate your screen on another computer using byobu-export.
I also use a fairly involved caption/hardstatus line combination, to simulate the effect of dropdown tabs (the caption line is solid grey and the current tab in the hardstatus is the same color).
I also have my shell tell screen what the current process name is and what directory I'm in, so my tab names stay up to date with what I'm doing in each tab. This is critical to remembering what I'm doing where without having to flick through all my open tabs.
So here's my zshrc settings to tell screen about what I'm doing in each tab.
The most useful screen customization, IMHO, is to change the modifier key to something other than C-a. That is just too important of a key to have eaten (go to the beginning of the line at all readline prompts, and in emacs). I use C-z, since I need to suspend applications a lot less often than I need to edit something at the beginning of the line.
The magic word is:
I often have more than 10 windows running and wanted a way to select them. I found out how to configure C-a Shift+0 through 9 to select windows 10 through 19.
Note the escapes on # and ^.
Sick of full-screen programs like vim remaining in the scrollback buffer after you've closed them? Wouldn't it be great if they'd go away completely just like they do when you're not running screen? Try putting this in your ~/.screenrc file...
I'm using Ctrl+Alt+Left and Ctrl+Alt+Right to switch between screen windows. For my IRSSI channel I use Alt+Left and Alt+Right, and for GNOME workspace switching I use Ctrl+Alt+Shift+Left/Right. It seems complicated, but it actually works really well.
The character codes for the GNOME terminal are different from the character codes when connecting through PuTTy, so I had to duplicate the entries. You can use cat > /dev/null to find out the appropriate character codes for you.
The backtick command is pretty groovy. Read about it in man screen. I use it like so:
My cpuusage script for Linux and Mac is:
I also can't live without the menu bar. One thing I do not like putting on the menu which a lot of people have is the time; it prevents PuTTY's scroll back from staying scrolled back (since it's considered a screen update)
I have F11 and F12 set to cycle through windows, makes it quicker to move between windows, especially for windows > 10
If you are using urxvt, the following will allow CTRL+LEFT and CTRL+RIGHT to be used to move to the previous and next tab window:
Reconnecting to a remote screen session that should always be running or immediately created:
Turning flow control off by default allows you to use CTRL+R in rtorrent properly:
If running rtorrent as a daemon with its own user account, this .screenrc can be useful: