screenrc – easy way to improve screen usability

I’ve used a custom ~/.screenrc file for at least a year now. I find that this snippet helps improve the usability for me.

#Custom Stuff
caption always "%{= wb}$USER @ %H >> %-Lw%{= r}%50>%n* %t%{-}%+Lw%< %-=<< (%c.%s)"

activity "%c activity -> %n%f %t"
bell "%c bell -> %n%f %t^G"
vbell_msg " *beep* "

startup_message off

defscrollback 500

multiuser off
# Always start screen with utf8 enabled. (screen -U)
defutf8 on

Output (caption at bottom):

  1. Screen is good, but tmux is better! :)

    • Screen is good, but tmux is better! :)

      Wow, you can say that again! I can FINALLY detach and reattach without losing my window splits (not to mention the splitting behavior is much better) and the keybindings can be easily set to match screen….GENIUS!


  2. Here’s mine. I bind some F-keys to open/switch/rename windows, that makes screen even more user friendly in my opinion.

    # skip the startup message
    startup_message off

    # Automatically detach on hangup.
    autodetach on

    # If a screen dies, don’t freeze the whole screen waiting for it.
    nonblock on

    # UTF-8 is necessary.
    defutf8 on

    # Change default scrollback value for new windows
    defscrollback 10000
    # scrollback 10000

    # start with visual bell as default
    vbell off
    vbell_msg “Bell on %t (%n)”

    # look and feel
    # caption always “%3n %t%? @%u%?%? [%h]%?%=%c”
    # termcapinfo xterm ‘hs:ts=\E]2;:fs=07:ds=\E]2;screen07′
    hardstatus alwaysignore
    # hardstatus alwayslastline ‘%{g}%-w%{b}%n %t%{-}%+w %<%{kk}'
    hardstatus alwayslastline '%{bk}%-w%<%{gk}%n %t%{-}%+w %<%{kk}'

    activity "Activity in %t (%n)"

    bindkey -k k7 prev
    bindkey -k k8 next
    bindkey -k k9 title
    bindkey -k k5 screen

  3. What coincidence – tonight I uninstalled screen and replaced it with tmux on all my systems.

Leave a Reply