Thread View: news.software.readers
1 messages
1 total messages
Started by da... John E. Davis
Tue, 16 Jan 1996 00:00
slrn: customization hints
Author: da... John E. Davis
Date: Tue, 16 Jan 1996 00:00
Date: Tue, 16 Jan 1996 00:00
90 lines
2718 bytes
2718 bytes
Hi,
I have had several slrn users request additional customization on a
server by server basis. The purpose of this note is to point out that this
is already possible if your server is selected via an environment variable.
The trick is to use preprocessing lines in your .slrnrc file. slrn
supports the following constructs:
#ifdef a b ... c
#ifndef a b ... c
#if$ENV a b ... c
#ifn$ENV a b ... c
#iftrue
#iffalse
#ifntrue
#ifnfalse
along with:
#else
#elif...
#endif
For the purposes of this article, the most useful one is #if$ENV. Here ENV
represents an environment variable. For example, for the NNTPSERVER
environment variable #if$NNTPSERVER may be used.
Since I suspect that most users only have access to one server, I will
concentrate on the case of multiple terminals. Here the relevant
environment variable is TERM. Let's suppose that you use 3 terminals: a
color xterm, a color vt102, and a vt320. Suppose that the xterm is used at
your work where others share your office and that you only use the others at
home. At work, you may wish to turn off beeps but allow them at home. In
this case, the following lines in your .slrnrc file will suffice:
#if$TERM vt102 vt320
set beep 1
#endif
#if$TERM xterm
set beep 0
#endif
In fact, any of the follow will also work:
#ifn$TERM xterm
set beep 1
#else
set beep 0
#endif
#if$TERM vt102 vt320
set beep 1
#elif$TERM xterm
set beep 0
#else
set beep 1
#endif
Finally note that slrn may be specified with the -D command line option.
This allows one to define additional preprocessing tokens and then use these
in conjunction with #ifdef preprcessing. For example, consider the
following .slrnrc file:
#ifdef NERD
server "my.news.server" ".newsrc-nerd"
organization "Nerds Only"
signature ".nerd-signature"
#else
server "my.news.server" ".newsrc"
organization "State College"
signature ".signature"
#endif
If slrn is started as:
slrn -DNERD
the first set of setting will be used. If started without the -DNERD
command line parameter, the second set will be used.
Enjoy.
--John
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