[Top][All Lists]

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

Hardstatus-fu: truncating/padding

From: Jeremie Le Hen
Subject: Hardstatus-fu: truncating/padding
Date: Tue, 1 Dec 2009 23:00:55 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hi list,

I've been using screen for a couple of years with a hardstatus string
stolen on the web and tinkled a bit afterward.  But now I'd like to
improve it.

Format escape sequences are fairly easy to understand (reading them is
another thing ;p) except the truncation/padding stuff.  I've tried to
read and re-read the paragraphs regarding %=, %< and %= multiples times
successively, and that multiple times over the last months.  But
honestly, I can't grasp the way it works.

By browsing the web, it seems humans capable of mastering screen's
string escapes exist but they didn't bother explaining those thoroughly.

So my first question is: has a book (or more seriously an article or a
detailed post) ever been written on the subject?  Is yes, I'd be glad to
be pointed it out.

As a matter of fact, I'm trying to have a hardstatus string ressembling
this (I've left out the attributes/color modifiers):
    [%H] %-w (%n-%t) %+n [%d/%m %c]

But I'd like [%H] to be against the left side and [%d/%m %c] the be
against the right one.  I've fumbled to get this and finally found a
solution at work by picking ideas here and there on the web, but I can't
even remember it because I don't get the logic.  The icing on the cake
would be to have the "%-w (%n-%t) %+n" centered around the current
window and not eating the outer parts when the space in the middle is
not large enough.  But this I've never managed to make this up.

Thanks in advance for your help!
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >

reply via email to

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