Multiscreens - which one is active?

Stuart Lynne sl at van-bc.UUCP
Thu Oct 26 10:31:04 AEST 1989


In article <1472 at crdos1.crd.ge.COM> davidsen at crdos1.UUCP (bill davidsen) writes:
>In article <637 at holston.UUCP>, barton at holston.UUCP (Barton A. Fisk) writes:
>
>|  While were wishing, how about adding a status window or line to the 
>|  console so the console user knows what multiscreen he's on at
>|  a glance?
>
>  I hate to suggest anything so simple, but I have been making the
>screen# part of my prompt. I don't want to give up a line for status.

I've been doing that for years, here's some decripit cshrc script you can
use, it gives you your tty number, history line number and either a '%' or a
'*' depending on whether you are root or not.

E.g.
	01-45 %
	02-10 * 

Additions for .cshrc script

	set tty=`tty`
	set basetty=`basename $tty`
	set basetty=`expr $basetty : '...\(..\)'`
	set idgid=`id`
	if ( $idgid[1] == "uid=0(root)" ) then
	set prompt="$basetty-\! * "
	else
	set prompt="$basetty-\! % "
	endif


-- 
Stuart.Lynne at wimsey.bc.ca ubc-cs!van-bc!sl 604-937-7532(voice) 604-939-4768(fax)



More information about the Comp.unix.xenix mailing list