# =============================================================== # File: $HOME/.screenrc # Purpose: Setup file for program "(GNU) screen" # written by: Sven Guckes # Latest update: Sat Feb 16 06:00:00 MET 2002 # Latest user version: screen-3.9.11 [020215] # Latest beta version: screen-3.9.11beta6 [020206] # Length and size: 450 lines and about 15 kilobytes # =============================================================== # # =============================================================== # SEE ALSO: # =============================================================== # SCREEN Pages: # http://www.math.fu-berlin.de/~guckes/screen/ # # Commands List (from the manual to screen-3.7.6): # http://www.math.fu-berlin.de/~guckes/screen/commands.txt # # MailingList: # http://www.yahoogroups.com/group/gnu-screen/ # # =============================================================== # ESCAPE - the COMMAND CHARACTER # =============================================================== # escape ^aa # default # escape ^pp # suggested binding for emacs users # # =============================================================== # STARTUP of programs in an extra window: # =============================================================== # Uncomment one/some following lines to automatically let # SCREEN start some programs in the given window numbers: # screen -t irssi 0 irssi # screen -t mutt 1 mutt # screen -t EDIT 2 vim # screen -t GOOGLE 3 links http://www.google.com # screen -t NEWS 4 slrn # screen -t WWW 5 links http://www.math.fu-berlin.de/~guckes/ # # =============================================================== # VARIABLES - Boolean values (on/off) # =============================================================== autodetach on # default: on crlf off # default: off deflogin off # default: on # defsilence off # default: off hardcopy_append on # default: off # nethack on # default: off startup_message off # default: on # termcap xterm 'AF=\E[3%dm:AB=\E[4%dm' # terminfo xterm 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' # Matthias Kopfermann [020222]: termcapinfo linux "ve=\E[?25h\E[?17;0;64c" # red vbell off # default: ??? # # =============================================================== # VARIABLES - Number values # =============================================================== defscrollback 3000 # default: 100 # msgminwait 3 # default: 1 silencewait 15 # default: 30 # # =============================================================== # VARIABLES - Paths and Files (esp. programs) # =============================================================== # bufferfile: The file to use for commands # "readbuf" ('<') and "writebuf" ('>'): # bufferfile $HOME/.screen_exchange # # hardcopydir: The directory which contains all hardcopies. # hardcopydir ~/.hardcopy # hardcopydir ~/.screen # # shell: Default process started in screen's windows. # Makes it possible to use a different shell inside screen # than is set as the default login shell. Halleluja! :-) # shell zsh shell bash # shell ksh # # =============================================================== # VARIABLES - Strings # =============================================================== # some notes on COLOR before explaining its use in # the commands caption, hardstatus, and sorendition. # # COLOR: colors codes are combinations of # [attribute modifier] [color description] # the manual talks of "attribute/color modifiers". # see the manual, section "STRING ESCAPES". # # Color table: # 0 Black . leave color unchanged # 1 Red b blue # 2 Green c cyan # 3 Brown / yellow d default color # 4 Blue g green b bold # 5 Purple k blacK B blinking # 6 Cyan m magenta d dim # 7 White r red r reverse # 8 unused/illegal w white s standout # 9 transparent y yellow u underline # # note: "dim" is not mentioned in the manual. # # =========================================== # CAPTION - shows a "caption" for the window. # =========================================== # a "caption" is another line which can show information - # in addition to the hardstatus line. # # use caption to show window list: caption always "%{= kw}%?%-Lw%?%{+b kw}%n*%t%f %?(%u)%?%{= kw}%?%+Lw%?" # caption always '%{= wb}%50=%n%f %t%{= wb}' # this basically just shows the current window number and title # on its own; the "%50=" displays it in the middle of the line. # # caption always "%>%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?%<" # caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" # caption always "%?%F%{.RW}%?%3n %t%? [%h]%?" # caption always "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?" # # caption always "%{kG}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kG}%?%+Lw%?" # # "push right border: current time with seconds and current date" # caption always "%=%c:%s %Y-%m-%d" # # Prints the window names and highlight the current window in yellow. # On the right there is the time in green and the date in yellow. # #caption always "%?%{+b kw}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y" # # =============================================================== # # =============================== # Hardstatus Line and sorendition # =============================== # # Prints the window names and highlight the current window in yellow. # On the right there is the time in green and the date in yellow. # #hardstatus alwayslastline "%?%{wk}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y" hardstatus alwayslastline "%{+b kr}[ %H ] %{ky} Load: %l %-=%{kb} %c %d.%m.%Y" #hardstatus alwayslastline "%{+b kr}[ %H ] %{kw} Load: %l %-=% %{kb} %c:%s %d.%m.%Y " # Colorize the "messages" and "text marking": # Example: Blue bg, white fg sorendition gK # # ============================ # Password # ============================ # password SZnBqiqMtfa6k # Do NOT remove the comment if # you don't know what this does! # (TODO describe the effect - obviously) # # =============================================================== # Messages # =============================================================== # There are two kinds of messages: "activity" and "bell" # They are also the names of the commands that set the # respective messages. In every message there can be "meta # strings" which are replaced by values. A meta string starts # with a percent sign and is then followed by one of the # following letters: aAdDmMnstwWyY The meta strings refer to # the current date and time or to a window title or number: # %t - title # %n - number (a single % still works) # %d - day # %D - weekday name # %m - month # %M - month name # %y - year (2 digit) # %Y - year (4 digit) # %w - hour:minutes (24h format) # %W - hour:minutes (12h format) # %s - seconds # %a - am/pm # %A - AM/PM # Older versions of screen used a single '%' character # for window titles - but since version 3.7 this is # obsoleted by '%n' and will vanish in future releases! # So please update your screenrc to meet this convention! # # =============================================================== # "~" stands for the "bell" character # # activity: This message *includes* a "beep" with '~'. activity "activity in %n (%t) [%w:%s]~" # # bell: This message *includes* a "beep" with '~'. bell "bell in %n (%t) [%w:%s]~" # # pow_detach_msg: Message shown when session # gets power detached. pow_detach_msg "BYE" # # vbell_msg: Message shown when the # "virtual bell" rings. vbell_msg " *beep* " # # ============================================================== # BIND bind - defaults # ============================================================== # The "bind" command assign keys to (internal) commands # SCREEN checks all the keys you type; you type the key # which is known as the "command character" then SCREEN # eats this key, too, and checks whether this key is # "bound" to a command. If so then SCREEN will execute it. # # The command "bind" allows you to chose which keys # will be assigned to the commands. # # Some commands are bound to several keys - # usually to both some letter and its corresponding # control key combination, eg the command # "(create) screen" is bound to both 'c' and '^C'. # # The following list shows the default bindings: # # break ^B b # clear C # colon : # copy ^[ [ # detach ^D d # digraph ^V # displays * # dumptermcap . # fit F # flow ^F f # focus ^I # hardcopy h # help ? # history { } # info i # kill K k # lastmsg ^M m # license , # log H # login L # meta x # monitor M # next ^@ ^N sp n # number N # only Q # other ^X # pow_break B # pow_detach D # prev ^H ^P p ^? # quit \ # readbuf < # redisplay ^L l # remove X # removebuf = # reset Z # screen ^C c # select " ' # silence _ # split S # suspend ^Z z # time ^T t # title A # vbell ^G # version v # width W # windows ^W w # wrap ^R r # writebuf > # xoff ^S s # xon ^Q q # ^] paste . # - select - # 0 select 0 # 1 select 1 # 2 select 2 # 3 select 3 # 4 select 4 # 5 select 5 # 6 select 6 # 7 select 7 # 8 select 8 # 9 select 9 # I login on # O login off # ] paste . # # FAQ: So many keys are bound to some command already - # which keys are unbound yet? Which are free for binding? # A: SCREEN does not have a command to show you # a table of currently unbound keys - sorry! # You simply have to read this setup file. ;-) # # Summary: Here is a table of the keys # which are not bound by default: # unbound: -B--E-G--J-L---P-R-TUV--Y- # bound: A-CD-F-HI-K-MNO-Q-S---WX-Z # # And here are the default bind commands if you need them: # # bind A title # bind C clear # bind D pow_detach # bind F fit # bind H log # bind I login on # bind K kill # bind L login # bind M monitor # bind N number # bind O login off # bind Q only # bind S split # bind W width # bind X remove # bind Z reset # # I suggest that you don't change the bidnings for # 'H' ("log") and 'M' ("monitor") as they are really # useful and you might want to use them a lot; # in this case it is recommended to use # the defaults to avoid confusion. # personally, I use 'A' ("title") quite often, too. # # If you are using "split windows" already # (this is not available in the latest user release yet) # then you will also use the command # associated with the keys FQSX a lot, too - # so don't change their bindings! # # Anyway, I have bound the unbound uppercase letters # to start programs in windows directly, ie without # starting a new window with a shell within first. # This simply saves shells and thus saves RAM - # and also avoids that the title of a windows is # the name of your shell. Also, you need not "exit" # from a shell when you are done with some program: # # ============================================================== # BIND and the Services: # ============================================================== # I am using the uppercase letters to start programs/services: # bind A title # default! # # BUUG - Berlin Unix User Group - read some news about Unix # bind B screen -t 'buug' 4 links www.buug.de # # CHEM - LinuxTag event in Chemnitz -- 2002-03-09 + 2002-03-10 # bind C screen -t 'CHEM' 9 links www.tu-chemnitz.de/linux/tag/ # NOTE: This overrides the default binding for the "clear" command. # # DICT - Dictionary English<->German # bind D pow_detach ! # bind D screen -t 'DICT' 4 links dict.tu-chemnitz.de # Note: this overrides the default binding for the # command "pow_detach". I hardly ever use that one. # # MUTT - Email User Agent # bind E screen -t 'mail' 0 mutt # I use email quite a lot - so window #0 is reserved for that. # see also: http://www.math.fu-berlin.de/~guckes/mutt/ # # FTP - File Transfer "Program" # bind F fit # default! # bind F screen -t 'ftp' 9 ncftp # see also: http://www.math.fu-berlin.de/~guckes/ncftp/ # # GOOGLE - Web Search Engine bind ^g screen -t 'Google' links www.google.com # # HEISE - IT NewsTicker # bind H log # default! # bind H screen -t HeiseTicker links www.heise.de # NOTE: This overrides the default binding of the "hardcopy" command! # # IRC - International Relay Chat # bind I screen -t 'irc' 5 irc # bind I screen -t 'icq' 9 micq # see also: http://www.math.fu-berlin.de/~guckes/irc/ # # Feb 2002: Use it to search the Internet Movie DataBase (IMDB): # bind I screen -t 'IMDB' 9 links http://www.imdb.com/ # bind I screen -t 'IMDB' 9 links http://us.imdb.com/search/ # see also: http://www.math.fu-berlin.de/~guckes/berlinale/ # bind K kill # default! # bind K # This *removes* the binding for 'K' # thus requireing you to enter the # command via the command line, ie ":kill". # This prevent accidental killing of your windows. # Old versions of SCREEN do not prompt for # confirmation on "killing a window", you see.. # # LYNX - web browser # bind L screen -t 'lynx' 4 lynx http://www.math.fu-berlin.de/~guckes/ # see also: http://www.math.fu-berlin.de/~guckes/lynx/ # # see also: http://www.math.fu-berlin.de/~guckes/links/ # bind L screen -t 'WWW' 4 links http://www.math.fu-berlin.de/~guckes/ # # bind L screen -t 'WWW' 4 links http://www.lug-camp-2002.de/programm.html # bind L screen -t 'WWW' 4 links http://www.mdlug.de/index.php/linuxtag2002/vortraege/v12.inc?menu=0|4| # bind L screen -t 'WWW' 4 links http://www.mdlug.de/index.php/linuxtag2002/programm.inc?menu=0|4|&nomfc=1 # bind M monitor # default! # # NN - newsreader # bind N screen -t 'nn' 3 nn # see also: http://www.math.fu-berlin.de/~guckes/nn/ # Get some news about the weather... (dont ask ;-) # bind N screen -t 'Nepal' links http://www.wunderground.com/global/stations/44454.html # bind N screen -t 'Nepal' links http://www.wunderground.com/global/stations/10382.html # # Paste - use 'P' instead of ']': bind P paste . # The character ']' is hard to type on german keyboards, # as it requires the use of a yet another meta character "AltGR". # I prefer to use 'P' for "paste" because it is a letter # which is available at the same position both with the # US keyboards and keyboards with "Kraut layout" - # which I call" Krautboards", by the way. ;-) # bind ] paste . # default! # # Register page at NetMind's Service: # bind R screen links http://www.netmind.com/URL-minder/new/register.html # # # SLRN - newsreader # bind S screen -t 'slrn' 3 slrn -n -C -k0 # see also: http://www.slrn.org http://slrn.sourceforge.net # and http://www.math.fu-berlin.de/~guckes/slrn/ # # VIM - editor bind V screen -t 'vim' 0 vim # Editing comes with email quite naturally - # so I have reserved window #1 for this. # http://www.math.fu-berlin.de/~guckes/vim/ # http://www.vim.org/ (which is just a mirror) # # X - a fast way to lock the current screen. # bind X lockscreen # # bind Y exec !!! echo -n http://www.math.fu-berlin.de/~guckes/ # bind Y stuff http://www.math.fu-berlin.de/~guckes/ # This pastes the address of my homepage to the process # in the current window. very nice - saves some typing. # and you don't have to have the functionality of # "abbreviating" in the processes themselves. :-) # # my binds # # bind ^w screen -t 'watch' $HOME/.screen/scripts/tetherwatch # bind ^c screen -t 'capture' $HOME/.screen/scripts/tethercapture # bind ^r screen -t 'output' $HOME/.screen/scripts/tetherout # bind ^o screen -t 'output-short' $HOME/.screen/scripts/tetherout.short # bind ^t screen -t 'sysinfo' top #bind ^N screen -t 'news' links www.debian.de/News/weekly/index.de.html #bind ^M screen -t w3m cm.adrenalin.de #bind ^L screen -t watch -n 5 tail -45 /var/log/sysloc bind ^Y screen -t log watch -n 5 rail -40 /var/log/syslog # # # =============================================================== # BIND Examples: # =============================================================== # You can also paste the values of # SCREEN's environment variables: # bind E stuff $EMAIL # bind U stuff $URL # bind I stuff $ICQ # # =============================================================== # BINDKEY: # =============================================================== # [TODO briefly explain the difference between BIND and BINDKEY] # # Use the function keys F7 and F8 # to cycle backwards/forwards in # the list of existing windows: # bindkey -k k7 prev # bindkey -k k8 next # # make the "kb" send a backspace (CTRL-H:) # bindkey -d kb stuff ^H # WARNING: this does not work as advertised. # it eats the "kb" when typing "dankbar" for example. :-( # # # =============================================================== # Key bindings (TODO) # =============================================================== # Remove some default key bindings by binding # them to "nothing" (empty right-hand-side): # # bind . dumptermcap # default bind . # bind ^\ quit # default bind ^\ # bind \\ quit # default bind \\ # bind h hardcopy # default # bind h # bind ^h ??? # default # bind ^h # bind } history # default # bind } # # # =============================================================== # At the very end... show the current version and say hello :-) # =============================================================== # Briefly show the version number of this starting # screen session - but only for *one* second: msgwait 1 version # change back to showing messages # for duration of two seconds: msgwait 2 # # Welcome the user: echo "welcome :-)" # # Ths DISPLAY variable keeps getting in my way. # usually I do not want to start programs which # need a DISPLAY. Text Tools rule! :-) # setenv DISPLAY '' # # Tell Vim to use a "tabstop" of '8', # ie expands TABs to the next column # whose number is a multiple of eight. # EOF vim: ts=8