Subject: re: IMPORTANT: wscons virtual screen configuration
To: matthew green <mrg@eterna.com.au>
From: David Brownlee <abs@anim.dreamworks.com>
List: current-users
Date: 03/14/1999 16:54:51
	It does seem a touch odd to have three programs to configure
	a wscons display (wsconsctl,wsconscfg,wsfontload). In particular
	wsfontload does not really do very much, and we now have to have
	a fourth program (the wsconfig script) in order to implement a -C.

	Would it make more sense to merge wsfontload into wsconscfg?


		David/absolute

     		  -=-  "cold nights, dark days..."  -=-

On Mon, 15 Mar 1999, matthew green wrote:

> 
> 
> actually, looking a little closer i notice that the fonts are
> handled by wsfontload and the screens by wsconscfg, which are
> separate programs.  it seems silly to have wsconscfg to both,
> as i previously proposed.
> 
> so, perhaps a shell script front end that calls the right
> commands, using the same configuration file *is* the best idea.
> 
> 
> ok, here they are (sans man page).  i have not greatly tested
> this, but it passed a few small runs i made.
> 
> 
> --- cut here --- wscons.conf starts --- cut here ---
> #	$NetBSD$
> #
> # workstation console configuration
> 
> # fonts to load
> #	name	width	height	enc	file
> #font	ibm	-	8	ibm	/usr/share/pcvt/fonts/vt220l.808
> #font	pcvt	-	-	pcvt	/usr/share/pcvt/fonts/vt220h.816
> #font	pcvt	-	8	pcvt	/usr/share/pcvt/fonts/vt220h.808
> 
> # screens to create
> #	idx	screen	emul
> screen	0	-	vt100
> screen	1	-	vt100
> screen	2	-	vt100
> screen	3	-	vt100
> screen	4	-	-
> #screen	4	80x25bf	vt100
> #screen	5	80x50	vt100
> --- cut here --- wscons.conf ends --- cut here ---
> 
> 
> --- cut here --- wsconfig starts --- cut here ---
> # $NetBSD: rc.wscons,v 1.1 1999/03/13 14:54:22 drochner Exp $
> 
> wscfg=/usr/sbin/wsconscfg
> wsfld=/usr/sbin/wsfontload
> config=/etc/wscons.conf
> usage="Usage: wsconfig [-n] [-f configfile] [-font fontpgm] [-screen screenpgm]"
> DOIT=
> 
> while [ $# -gt 1 ]; do
> 	case $1 in
> 		-n)
> 			DOIT=echo
> 			;;
> 		-f)
> 			config=$2
> 			shift
> 			;;
> 		-font)
> 			wsfld=$2
> 			shift
> 			;;
> 		-screen)
> 			wscfg=$2
> 			shift
> 			;;
> 		*)
> 			echo $usage
> 			exit 1
> 			;;
> 	esac
> 	shift
> done
> 
> 
> # args mean:
> #	screen idx scr emul
> #	font   name width height enc file
> ( while read type arg1 arg2 arg3 arg4 arg5; do
> 	case "$type" in
> 		\#*|"")
> 			continue
> 			;;
> 		font)
> 			name=$arg1
> 			width=$arg2
> 			height=$arg3
> 			enc=$arg4
> 			file=$arg5
> 			cmd=$wsfld
> 
> 			case $width in
> 				-)
> 					;;
> 				*)
> 					cmd="$cmd -w $width"
> 					;;
> 			esac
> 			case $height in
> 				-)
> 					;;
> 				*)
> 					cmd="$cmd -h $height"
> 					;;
> 			esac
> 			case $enc in
> 				-)
> 					;;
> 				*)
> 					cmd="$cmd -e $enc"
> 					;;
> 			esac
> 			cmd="$cmd -N $name $file"
> 			eval $DOIT $cmd
> 			;;
> 		screen)
> 			idx=$arg1
> 			scr=$arg2
> 			emul=$arg3
> 			cmd=$wscfg
> 
> 			case $scr in
> 				-)
> 					;;
> 				*)
> 					cmd="$cmd -t $scr"
> 					;;
> 			esac
> 			case $emul in
> 				-)
> 					;;
> 				*)
> 					cmd="$cmd -e $emul"
> 					;;
> 			esac
> 			cmd="$cmd $idx"
> 			eval $DOIT $cmd
> 			;;
> 	esac
> done ) < $config
> --- cut here --- wsconfig ends --- cut here ---
>