Subject: small wscons.conf enhancement
To: None <tech-userlevel@NetBSD.org>
From: Peter Postma <peter@pointless.nl>
List: tech-userlevel
Date: 12/12/2005 23:32:15
I've made a small enhancement for setting variables in wscons.conf with
"setvar". Right now, you can only set the keyboard variables, with this
change you can also set the display and mouse variables. Works like this:

setvar display contrast=110
setvar mouse resolution=80

The old setvar style is also still available.

I'll commit this soon (including manpage update) if there are no objections.


Index: wscons
===================================================================
RCS file: /cvsroot/src/etc/rc.d/wscons,v
retrieving revision 1.10
diff -u -r1.10 wscons
--- wscons	13 Aug 2004 18:08:03 -0000	1.10
+++ wscons	12 Dec 2005 11:16:03 -0000
@@ -157,7 +157,20 @@
 				;;
 
 			setvar)
-				cmd="$wsctl -w $arg1"
+				case "$arg1" in
+				keyboard)
+					cmd="$wsctl -kw $arg2"
+					;;
+				display)
+					cmd="$wsctl -dw $arg2"
+					;;
+				mouse)
+					cmd="$wsctl -mw $arg2"
+					;;
+				*)
+					cmd="$wsctl -w $arg1"
+					;;
+				esac
 				eval $DOIT $cmd
 				;;
 

-- 
Peter Postma