[Top][All Lists]

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

Re: how to change the title bar?

From: Benno Schulenberg
Subject: Re: how to change the title bar?
Date: Fri, 8 Oct 2021 19:21:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Op 08-10-2021 om 15:07 schreef Tom Beers:
> Hello, I'm looking to change the titlebar, namely where it says "GNU nano 
> 5.4",
> I'd prefer to see [current-line / max-line current-column / max-column], and 
> I'd
> probably then swap the left and right columns.

If you upgrade to nano-5.9 (or at least version 5.5), you get the new option
--minibar.  Maybe that does something similar to what you want?  Try it with:

  nano --minibar --constantshow --nohelp.

> I don't see this ability in the configuration settings, but does anyone know 
> of a
> patch where someone has done something similar? I've looked at the code a 
> little
> and it seems to be around line 2000 of winio.c where this stuff is being set.
> Does anyone have any pointers as to how to make these changes?

Instead of modifying titlebar(), it is probably easier to modify minibar()
(the next function).  Maybe you are not interested in the hexadecimal code
of the character under the cursor and you can replace it with totallines and
totalcolumns.  The latter value you would have to construct yourself somehow
-- nano does not keep track of the total columns in the current line nor of
the maximum number of columns in any line of the buffer.

If a bar at the bottom is not to your liking, and you want it at the top,
you can apply the attached patch, and take it from there.  When you have
something close to what you want, please post it here, then I can check
that it doesn't break anything.


Attachment: move-minibar-to-top.patch
Description: Text Data

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

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