#******************************************************************************* # Filename: $HOME/.screenrc # Purpose: configuration file for GNU screen # Authors: John Magolske, including elements from the grml version & elswhere # License: GPL v3 # Revision: 2007/09/07 Fri 23:44 PDT #******************************************************************************* backtick 1 0 60 /usr/bin/ip-screen backtick 2 0 5 awk '{if ($1=="MemTotal:") mt = $2; if ($1=="MemFree:") mm = $2; if ($1=="Buffers:") mb = $2; if ($1=="Cached:") mc = $2} END {printf " %.2f MB", (mt-(mm+mb+mc))/1000}' /proc/meminfo backtick 3 0 60 cpu-screen_x40 backtick 4 0 60 cpu-temp-screen_x40 backtick 5 30 60 screen_batt #backtick 4 0 0 awk 'BEGIN {file = "/proc/stat";while (a==a) {getline < file;u=$2-up;s=$3-sp;n=$4-np;i=$5-ip;printf (" %2.1f\n"),(u+s)/(u+s+n+i)*100;up=$2;sp=$3;np=$4;ip=$5;close(file);system("sleep 1")}}' backtick 6 60 60 luna caption always "%{ck} net: %1` %{m}|%{-}%2` %{m}|%{-} %3` %{r}%4` %{m}| %{ck}%l %{m}|%{ck} %5` %-34=%6` %{w}%C%a %{-} %D %d %M`%y" #hardstatus alwayslastline "%{ky} %?%-Lw%?%{gk}%n*%f %t%?(%u)%?%{ky}%?%+Lw%? %{wk}" hardstatus alwayslastline "%{ky} %?%-Lw%?%{B k}%{+b w}%n*%f %t%{-}%{-}%?(%u)%?%{ky}%?%+Lw%?" # Toggle hardstatus line (showing the list of windows) off & on bind l hardstatus ignore bind L hardstatus alwayslastline "%{ky} %?%-Lw%?%{B k}%{+b w}%n*%f %t%{-}%{-}%?(%u)%?%{ky}%?%+Lw%? " # hardstatus alwayslastline "%{bw}%1`%= " # detach on hangup autodetach on # default: on crlf off # default: off deflogin off # default: on # defsilence off # default: off # hardcopy_append on # default: off hardcopy_append off # default: off nethack on # default: off # don't display the copyright page startup_message off # default: on vbell off defscrollback 1000 # default: 100 # msgminwait 3 # default: 1 silencewait 15 # default: 30 hardcopydir $HOME/.hardcopy # fix the "screen.linux" terminal problem (see Debian BTS #238355 + #239776) # term linux shell zsh # shelltitle '% |zsh' # "sorendition": set the colors for the "messages" and "text marking" # (ie text you mark in copy mode): sorendition 10 99 # default! # use %n to display the window number and %t for its title: activity "activity in %n (%t) [%w:%s]~" # pass on the "beep" (CTRL-G) by adding a '~': bell "bell in %n (%t) [%w:%s]~" # pow_detach_msg: Message shown when session # gets power detached. pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." # vbell_msg: Message shown when the # "virtual bell" rings. vbell_msg " *beep* " # Replace the C-a escape sequence with the Meta key re-mapped # to "mu" in kmap file. Makes µ handier too. # escape `` bindkey "\033[2~" command # Key bindings # Remove some default key bindings by binding # them to "nothing" (empty right-hand-side): # bind . dumptermcap # default bind k bind ^k bind . bind ^\ bind \\ bind ^h bind bind S # make them better # bind 'K' kill # bind 'I' login on # bind 'O' login off # bind '}' history bind windowlist -b bind h hardcopy # Start & stop ethernet connection (and thus the internet connection) bind + screen -t 'start ethernet' sudo ifup eth0 bind _ screen -t 'stop ethernet' sudo ifdown eth0 # Start & stop wireless connections in /etc/network/interfaces and # ~/.wpa_supplicant.conf with wrapper scripts ifup_eth1 & ifdown_eth1 ) bind ) screen -t 'start wifi' ifup_eth1 bind ( screen -t 'stop wifi' ifdown_eth1 # call 'slashtime', a perl script that lists time in global time zones. #bind t screen -t 'global time' slashtime_read #bind t screen -t 'clockywok' $HOME/bin/clockywock # Run some useful programs... bind t screen -t 'htop' htop-ovt bind w screen -t 'wcalc' wcalc bind u screen -t 'units' units bind W screen -t 'wpTui' wikol # my custom shell script that calls ccal(1) bind C screen -t 'calendar' call -p bind m screen -t 'mixer' nmixer bind M screen -t 'm a t r i x' mtrx bind e screen -t 'mssh' mssh # bind * screen -t 'scratchpad' vim --cmd startinsert $HOME/scratchpad.txt # Go to some websites with the w3m browser bind G screen -t 'google' w3m www.google.com bind H screen -t HeiseTicker w3m www.heise.de/newsticker/pda/data/paket4.html # reload the .screenrc file bind S source $HOME/.screenrc # keybindings bind : colon bind ; colon bind q kill # bind s split # bind o only bind x remove bind X lockscreen bind k help #show key bindings # bind l caption splitonly "%3n %t" # bind L caption always "%{yk} load: %l |%{rk} %1` | %{Gk}net: %2` %-23=%{wk}%C%a %D %d %M`%y" # Paste - use 'P' instead of ']': # bind P # unbound by default bind P paste . # 040126 To be able to select windows with n > 9 -> # press "C-a #" instead of just "C-a #" bind  command -c select_1n bind -c select_1n 0 select 10 bind -c select_1n 1 select 11 bind -c select_1n 2 select 12 bind -c select_1n 3 select 13 bind -c select_1n 4 select 14 bind -c select_1n 5 select 15 bind -c select_1n 6 select 16 bind -c select_1n 7 select 17 bind -c select_1n 8 select 18 bind -c select_1n 9 select 19 bind -c select_1n  command -c select_2n bind -c select_2n 0 select 20 bind -c select_2n 1 select 21 bind -c select_2n 2 select 22 bind -c select_2n 3 select 23 bind -c select_2n 4 select 24 bind -c select_2n 5 select 25 bind -c select_2n 6 select 26 bind -c select_2n 7 select 27 bind -c select_2n 8 select 28 bind -c select_2n 9 select 29 bind -c select_2n - select - # Use the function keys F11 and F12 to cycle backwards/forwards in # the list of existing windows: bindkey -k F3 prev bindkey -k F4 next # reverse the default way space & backspace keys cycle through windows bind ' ' prev bind  next # change width of columns bind < width -w 69 bind > width -w 128 # Yet another hack: # Prepend/append register [/] to the paste if ^a^] is pressed. # This lets me have autoindent mode in vi. register [ "\033:se noai\015a" register ] "\033:se ai\015a" bind ^] paste [.] # 030511 Workaround for stupid machines without xmodmap ;-) bindkey -t °a stuff "ä" bindkey -t °A stuff "Ä" bindkey -t °o stuff "ö" bindkey -t °O stuff "Ö" bindkey -t °u stuff "ü" bindkey -t °U stuff "Ü" bindkey -t °s stuff "ß" msgwait 2 version # change back to showing messages # for duration of two seconds: # msgwait 2 # # Welcome the user: echo "gnu screen, at your service!"