== My _.screenrc_ Recently, [[Wesley David put out a call for people to share their _.screenrc_ files http://thenubbyadmin.com/2014/06/23/your-best-screenrc-files-are-wanted/]], even if they aren't particularly exciting. I am a regular but not heavy user of screen and have been for years now, so I have fixed opinions (and well-worn reflexes) but not very much cleverness. So, here are bits of my _.screenrc_, annotated with comments. .pn prewrap on The most important setting for me is the simplest: > escape ^_a This makes the _screen_ escape character into what I consider something sane and sensible. Here 'sane and sensible' really means 'so uncommon that basically nothing else uses it'. Almost all control characters are heavily used because there's only so many of them, but ``^_'' is just uncommon enough that I only rarely run into collisions. (Back in the days of real terminals there was often somewhat of an adventure in figuring out how to generate a ``^_'' on a new terminal.) Then: > bell_msg "Bell is present in window % (go look at it!)" > msgwait 30 One reason I have things set this is way is [[_xterm_'s ziconbeep feature XtermZiconbeep]]. If I run _screen_ in an xterm, any ^G in any screen will produce a message and thus trigger ziconbeep, drawing my attention to that overall screen session. Then I have some boring settings: > defscrollback 1000 > startup_message off > multiuser off > autodetach on (The latter two settings are theoretically the default, so mentioning them explicitly is paranoia. But I'm a sysadmin. Paranoia runs deep.) If you're running screen in an xterm, screen normally puts its 'hardstatus' line in the xterm's titlebar. Because my xterms don't have title bars, I thus need to disable this, which I do by basically turning off hardstatus in xterms: > termcapinfo xterm* LP:hs@ My taste is to not have individual screen 'windows' be present in 'who' output and so on, for reasons that are pretty much historical at this point. So I have: > deflogin off > bind U login off > bind L login on To be honest I don't think I've used those keybindings for a very long time. I might as well leave them there; after all, someday I may them. There is one keybinding I use all the time: > bind - prev One reason this binding is so useful and efficient for me is that it shares a physical keyboard key with ``^_'', making it very quick to invoke without shifting my fingers (I just lift my left fingers off the control and shift keys). I use 'space' to cycle forwards through screen windows, which is similarly easy to hit rapidly (the spacebar is a big target). These days I run very boring things inside screen so I basically don't auto-start anything much. Most places I start out with one shell just sitting there: > screen 0 (My _.screenrc_ also has comments about most of this, which has been very helpful in remembering enough about why I have these mysterious settings to be able to write this entry.) As a side note on the great _screen_ versus _tmux_ debate: I don't do anything sophisticated or fancy with screen and I already know how to do things with it. Thus I currently see no reason to try to switch. In general I don't dp sophisticated stuff in screen in general; that's what multiple _xterm_ windows are for. Screen is for unusual situations when I need something to persist and one instance for monitoring stuff on my office workstation when I'm at home (and even that is increasingly historical).