# ---------------------------------------------------------------------- # file: ~/.screenrc # author: Thayer Williams - http://cinderwick.ca # modified: June 2009 # vim:enc=utf-8:nu:ai:si:et:ts=4:sw=4:fdm=indent:fdn=1:ft=screen: # ---------------------------------------------------------------------- # general -------------------------------------------------------------- startup_message off # disable startup msg altscreen on # restore window contents after a vi session autodetach on # autodetach on disconnect/close nethack on # nethackish status messages defscrollback 2048 # default scrollback buffer defutf8 on # UTF-8 char encoding defflow off # disable flow control defbce on # use current bg color for erased chars msgwait 3 # secs msgs are displayed defshell -bash # dash makes it a login shell vbell off # toggle visual bell vbell_msg "" bell_msg "" activity "" # using backticks will likely screw up mouse scrolling because # mouse events often use backticks in their escape codes #escape `` # replace C- escape sequence #escape `e # double-tap backtick toggles screen windows #escape \\ # use C-backslash instead of C-a # terminal info -------------------------------------------------------- #term screen-256color #terminfo rxvt-unicode ti@:te@: # misc keybinds -------------------------------------------------------- bindkey -k k; quit #F10 to quit screen bindkey "^[Od" prev # change window with ctrl-left bindkey "^[Oc" next # change window with ctrl-right # Window numbering starts at 1 ----------------------------------------- bind c screen 1 bind 0 select 10 # load some apps (last listed will be focused) ------------------------- #screen 10 htop screen 9 rtorrent screen 8 ncmpc screen 1 mutt screen -t bash 3 screen -t bash 2 # statusbar ------------------------------------------------------------ hardstatus alwayslastline '%{= dW}[ %{dg}%H %{dW}][%{dc}%= %?%-Lw%?%{dy}(%{dW}%n*%f %t%?(%u)%?%{dy})%{= dc}%?%+Lw%?%?%= %{dW}][%{dM}%l%{dW}][%{dy} %m/%d %c %{dW}]' #hardstatus alwayslastline '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{=b C}[ %m/%d %c ]%{W}' #hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}' ### from cactus #hardstatus string "%{+b Rk}(%{-b g}$LOGNAME@%H%{+b R}) (%{-b g}%C %a%{+b R}) %{-b g} %n %t %h" ### more examples from the gentoo wiki #hardstatus string '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%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}]' ### yet another example--from Dive Into Mark ## window-list am/pm #caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %1` %m/%d/%y %C:%s%a" #caption always "%{=b dw}%{=b dw}[ %{-b dc}%h%{=b dw} ] [ %= %?%{-b dc}%-Lw%?%{+b dk}(%{+b dw}%n:%t%{+b dk})%?(%u)%?%{-b dw}%?%{-b dc}%+Lw%? %{=b dk}%{=b dw}] [%{-b dw} %1`%{=b dw} ]" #caption always "%{bk}%H%{gk}: screen%{gk} | %{rk}(system load: %l)%{gk} | %-21=%{gk}%D %Y.%m.%d %0c" # hardstatus alwayslastline "%{wr}%n%f %t %{kw} | %?%-Lw%?%{wb}%n*%f %t%?(%u)%?%{kw}%?%+Lw%? %{wk}" #hardstatus alwayslastline "%?%-Lw%?%{wb}%n*%f %t%?(%u)%?%{kw}%?%+Lw%? %{wk}" # tips & tricks -------------------------------------------------------- # bind 'screen -c /dev/null' to open screen without using .screenrc prefs # experimental stuff --------------------------------------------------- #termcapinfo rxvt ti@:te@ # supposed to fix mouse scrolling issues (e.g. vim) #let pgup/pgdn scroll under urxvt (see .Xdefaults) bindkey "^[[5;2~" eval "copy" "stuff ^u" bindkey -m "^[[5;2~" stuff ^u bindkey -m "^[[6;2~" stuff ^d