Screen divider / border width and color

6,207

Solution 1

@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

Solution 2

You can easily change statusline (the horizontal one) colors, by changing your caption string, in your ~/.screenrc. Given your screenshot, it looks like you 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 on 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 lot 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 these 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 matches 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 you are using dies miserably on my system with a screen caught signal 11 ...

Solution 3

For horizontal line I have used,

caption string "%{03} "

and vertical lines I have used

rendition so =00

The result looks like this.

enter image description here

Share:
6,207

Related videos on Youtube

aaren
Author by

aaren

Updated on September 18, 2022

Comments

  • aaren
    aaren over 1 year

    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'.

    • aaren
      aaren over 11 years
      :rendition so kb changes the colours to black and blue.
    • aaren
      aaren almost 11 years
      My solution was to use tmux instead.
  • mpy
    mpy almost 11 years
    Btw. Q10 sound as if designed for you -- but it's Windows only :(.
  • mpy
    mpy almost 11 years
    @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
    mpy almost 11 years
    @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?!
  • evilsoup
    evilsoup almost 11 years
    I'm using version 4.00.03jw4, which is dated 2-May-06, so it probably is an outdated version (which is odd as the Ubuntu repos aren't normally that out-of-date). The manpages contain no mention of 'rendition so', and when I tried that in my .screenrc it threw up an error and just gave me the default white columns. Could you maybe make a note of this in your answer? 'Older versions of screen may require the syntax sorendition "=" instead' or something like that.
  • mpy
    mpy almost 11 years
    @evilsoup: I added a note about that, but this is really weird, my version is Screen version 4.01.00devel (GNU) 2-May-06, which is as old as yours. So perhaps the devel does matter?! (Btw. even today's git version identifies as Screen version 4.01.00devel (GNUc2cd059) 2-May-06...)