|
|
1.1 root 1: #! /bin/sh
2: #
3: # mw - initiate a research-style mux window on the 630
4: #
5: # mw [-c] [-f fontname]
6:
7: font=
8: fontname=
9:
10: while :
11: do
12: case $# in
13: 0) break;;
14: esac
15:
16: case "$1" in
17: -f) font=$1; shift;
18: case $# in
19: 0) echo "$0: fontname missing"; exit 1;;
20: *) fontname=$1; shift
21: esac;;
22: *) echo "usage: $0 [-c] [-f fontname]"; exit 1;;
23: esac
24: done
25:
26:
27: # hack to extract some interesting stty modes. This is V9-dependent.
28: # first, extract current `nl' and `echo' settings...
29:
30: resettty=`stty | sed -n 4p | cut -f3,4 -d" "`
31:
32: # now, some characters of interest to the mux window (this is
33: # a _real_ kludge: mw.m doesn't know if we change it after
34: # this because it is not a terminal driver.)
35:
36: chars=` stty |
37: tr ';' '\012' |
38: sed -e "/ = /!d
39: s/[ ]*\([a-z]*\) = \(.*\)/\1 \2/"`
40:
41: case $font in
42: -f) if [ -r /usr/630/termfonts/$fontname ]
43: then
44: loadfont -c $fontname
45: else
46: (cd /usr/jerq/font; loadfont -c $fontname)
47: fi;;
48: esac
49:
50:
51: trap 'stty $resettty' 0 3 13 15
52: stty nl -echo
53: exec sh
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.