🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #63640

Re: [slrn] keeping the header window a constant size

#63640
From: J.B. Nicholson-Owens
Date: Sun, 23 Jul 2000 00:00
45 lines
2223 bytes
Alisdair McDiarmid wrote:
> I'd like it [the header window size] to be a constant 4 lines high (four
> headers visible at all times) -- is this possible? How would I go about
> doing this?

There's more than one way to do it, here is one way:

Save the following two hook definitions in a file ('my_hooks.sl' in your
home directory is a good place if you don't already have a place):

#v+
  public define resize_screen_hook ()
  {
     !if (is_group_mode ()) set_article_window_size (SCREEN_HEIGHT - 8);
  }

  public define article_mode_hook ()
  {
     set_article_window_size (SCREEN_HEIGHT - 8);
  }
#v-

Then load that file from your slrnrc:

#v+
  interpret "my_hooks.sl"
#v-

and restart slrn.  You may need to recompile slrn if you have S-Lang macro
capability not compiled in (S-Lang macro support is compiled in by default,
but you could be using some distribution that altered this).

SCREEN_HEIGHT is the height of your screen (or window) in which slrn is
running.  There are 4 lines lost to the three borders and the status line at
the bottom (so SCREEN_HEIGHT - 4 is the height of the header list and/or
article content).  You wanted 4 lines for the article list at all times so
that eats up 4 more lines.  The rest is how high you want the article
content view to be, which you set with set_article_window_size().

Feel free to modify to your liking.  You might make the one-liner in both of
these hooks a separate function called from the two hooks.

Happy newsreading!

Technical Details
Message-ID: <slrn8nkja7.78.jbn@forestfield.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn8nk1hf.cvm.alisdair@piped.wasters>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8nkja7.78.jbn@forestfield.org>
Subject: Re: [slrn] keeping the header window a constant size
Date: Sun, 23 Jul 2000 00:00:00 +0000
From: jbn@forestfield.org (J.B. Nicholson-Owens)
References: <slrn8nk1hf.cvm.alisdair@piped.wasters>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 649636928
X-Trace: fu-berlin.de 964316540 4389190 208.216.67.173 (16 [35848])
Organization: Forest Field OmniMedia
User-Agent: slrn/0.9.6.2 (Unix)
Newsgroups: news.software.readers