Thread View: news.software.readers
3 messages
3 total messages
Started by Alisdair McDiarmid
Sat, 22 Jul 2000 00:00
[slrn] keeping the header window a constant size
Author: Alisdair McDiarmid
Date: Sat, 22 Jul 2000 00:00
Date: Sat, 22 Jul 2000 00:00
12 lines
1314 bytes
1314 bytes
I'm used to using mutt, rather than slrn, so I've got a heavily customised .slrnrc to make slrn as similar to mutt as possible. Probably the last thing that irritates me now is that the header window's size varies with the xterm/Eterm height. I'd like it to be a constant 4 lines high (four headers visible at all times) -- is this possible? How would I go about doing this? -- Alisdair McDiarmid alisdair@jml.net [ perl -pi -e 'tr/A-Za-z/N-ZA-Mn-za-m/;']
Re: [slrn] keeping the header window a constant size
Author: J.B. Nicholson-Owens
Date: Sun, 23 Jul 2000 00:00
Date: Sun, 23 Jul 2000 00:00
45 lines
2223 bytes
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!
Re: [slrn] keeping the header window a constant size
Author: J.B. Nicholson-Owens
Date: Sun, 23 Jul 2000 00:00
Date: Sun, 23 Jul 2000 00:00
45 lines
2193 bytes
2193 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_hook ()
{
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!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads