Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In GNU screen, using a horizontal / vertical split, how do you set the color and width of the divider between the splits? I want to make them thin and darker so they don't stand out as much.

There is an image of what I mean : enter image description here

I suppose one is a divider and the other is a statusline. I'd like both to go to a more neutral tone.

I'm using the dev version of GNU Screen, configured with --enable-colors256. This has vertical split built in as well as sane behaviour with Vim when :defbce= 'on'.

share|improve this question
2  
:rendition so kb changes the colours to black and blue. –  aaren Nov 15 '12 at 19:43
    
My solution was to use tmux instead. –  aaren Aug 5 '13 at 16:30

2 Answers 2

up vote 2 down vote accepted
+50

@evilsoup: As you want a "distraction-free writing environment", you probably don't want any infos in the windows caption -- nothing but the default beckground color of your terminal, so use

caption string "%{= dd} "

This sets the back- and foreground color to default (d) and displays nothing (" ").

To get rid of the vertical bars, use the option proposed by @aaren:

rendition so "="

but do neither set the fore- nor the background color. This command works with screen 4.01.00devel, but with earlier (even <= 4.00) or non-devel versions you might need to use sorendition "=" instead.

When you add these lines to the screen config files as proposed by Stephane Chazelas on UL you should be fine:

enter image description here

share|improve this answer
    
Btw. Q10 sound as if designed for you -- but it's Windows only :(. –  mpy Aug 4 '13 at 11:37
    
This is so close I can taste it -- this works perfectly with a black background, but I use gnome-terminal with a dark purple background. Is it possible to specify an arbitrary colour? With HTML color codes or something similar. –  evilsoup Aug 4 '13 at 12:16
    
@evilsoup: I don't think you can specify a color by an arbitrary RGB value (even 256 colors are not straightforward. But I improved my answer in that way, that screen doesn't change the color at all, which works fine with a white or black xterm (I cannot test with gnome-terminal), so I hope that is working for you, too. –  mpy Aug 4 '13 at 13:13
    
The only caveat is that I have to use sorendition rather than rendition so (different versions of screen, maybe?) but apart from that it now works perfectly, thank you & here are your 50 reputation points. EDIT: uh, it's not letting me award the bounty yet :/ but in 19 hours time it's yours. –  evilsoup Aug 4 '13 at 13:29
    
@evilsoup: Glad to hear and thanks for the points :) My man page says that sorendition (...) is deprecated. See "rendition so" instead., so perhaps you have some older version?! –  mpy Aug 4 '13 at 13:38

You can easily change statusline (the horizontal one) colors, by changing your caption string, in your ~/.screenrc. Given your screenshot, it looks like your are using the default one, so you may need to add in your ~/.screenrc :

caption always "my caption string"

You can replace always with splitonly, depending whether you want it to always show or only if window is split, and you can customize the caption string using the escape codes listed in screen manual. As an example, putting %{= kw} at the beginning of it will change colors to white text on black background.

You can also find lots of others caption strings over the Internet, there are a lots of .screenrc findable with Google. I can give you the caption string I use, it shows user name, a nice list of screen windows, date, time, and system load, all this on a black background with not too bright colors.

caption always "%{= g}[ %{G}${USER}@%H%{g} ][%= %{= w}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c:%s %{g}][%{Y}%l%{g}]%{=b C}%{W}"

Yes I know, the code is quite horrible, but with the screen documentation you should be able to adapt it or create a caption screen that match your needs.

Concerning the vertical separators : I'm sorry I don't know how they will behave. Maybe they'll take the caption background color. I couldn't find documentation about it and I couldn't try it myself : the version of screen your are using dies miserably on my system with a screen caught signal 11 ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.