screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping right aligned text in caption always visible


From: Brian Kroth
Subject: Re: Keeping right aligned text in caption always visible
Date: Sun, 31 May 2009 17:44:51 -0500
User-agent: Mutt/1.5.16 (2007-06-09)

Alex Jurkiewicz <address@hidden> 2009-05-30 23:11:
> Hi all,
> 
> I'm playing with my screen caption. Currently my caption looks like this:
> caption always "%{= Kw} [%0c]%{= Kw} %-Lw%{= KW}[%50>%n%f* %t]%{=
> Kw}%+Lw%=| %l | ${FULLHOST}"
> 
> The output normally looks like this:
>  [23:06] 0$ tail:~  1-$ vi:~  [2$* top:~]                           |
> 0.36 0.60 0.36 | abraxo.bluebottle.net.au
> 
> But if there are too many windows open it the right hand info gets truncated:
>  [23:07] 0$ tail:~  1$ vi:~  2$ top:~  3$ ~  4$ ~  5$ ~  6$ ~  7-$ ~
> [8$* ~] | 0.20 0.53 0.34 | abraxo.bluebot
> 
> How can I tell screen to always keep the full right hand segment on screen?
> 
> Thanks,
> Alex Jurkiewicz

I spent a lot of time experimenting with my caption to get something
like that going, though now that I have it (and haven't touched it in a
while) I don't remember exactly what the trick was.  I think I guessed
that the right section would always be about 48 characters and that's
what the "%-48=" bit is about.

Here's the .screenrc section:

# This adds a statusbar:
# - windows and their flags before the active one are listed in white and 
truncated with ...
# - the active window and it's flags are in bold cyan and aligned slightly to 
the left 
# - the rest of the windows are printed and truncated so that
# - a string describing the current machine, load, and date/time are right 
aligned
caption always "%{= .w}%-Lw%20L>%{=b .c}%n%f %t%{-}%+Lw %-048= @%H - %l - %D %d 
%M - %c"

Here's what it looks like on a small terminal window:

...~ #   2$ ~ $  3$ address@hidden:~ # zl  4$ b... @rolo - 0.00 0.00 0.00 - Sun 
31 May - 17:39

Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]