home *** CD-ROM | disk | FTP | other *** search
- Path: comp-sources-3b1
- From: bruce%blilly@broadcast.sony.com (Bruce Lilly)
- Subject: v02i031: wuser - Set Window Manager User Line, Part01/01
- Newsgroups: comp.sources.3b1
- Approved: dave@galaxia.network23.com
- X-Checksum-Snefru: 5c7ffc22 5ee39e4d c22f893e c3584a8a
-
- Submitted-by: bruce%blilly@broadcast.sony.com (Bruce Lilly)
- Posting-number: Volume 2, Issue 31
- Archive-name: wuser/part01
-
- >
- >This seems like a good time to go off on a tangent: does anybody out
- >there know how to set the name in the window menu to something other
- >than "Unknown Process"? I've been able to set up different entries in
- >my main Office menu that all make shells, but I can't get them to have
- >different names in the window menu (which is what I really want).
- >Any help would be appreciated (although paging quickly through the
- >windows might be better...)
-
- Easy: (usage is wuser "some string to use", which sets the name
- for the window from which wuser was invoked)
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: makefile wuser.c
- # Wrapped by bruce@blilly on Thu Nov 19 18:24:25 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'makefile'\"
- else
- echo shar: Extracting \"'makefile'\" \(217 characters\)
- sed "s/^X//" >'makefile' <<'END_OF_FILE'
- XCC = gcc -fpcc-struct-return -fstrength-reduce -fcombine-regs -Wall -g
- XCFLAGS = -O
- XLDFLAGS = -s
- XSTARTOFF = /lib/crt0s.o
- XSHAREDLIB = /lib/shlib.ifile
- X
- Xwuser: wuser.o
- X $(LD) $(LDFLAGS) -o $@ $(STARTOFF) $? $(SHAREDLIB)
- END_OF_FILE
- if test 217 -ne `wc -c <'makefile'`; then
- echo shar: \"'makefile'\" unpacked with wrong size!
- fi
- # end of 'makefile'
- fi
- if test -f 'wuser.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'wuser.c'\"
- else
- echo shar: Extracting \"'wuser.c'\" \(526 characters\)
- sed "s/^X//" >'wuser.c' <<'END_OF_FILE'
- X/*
- X @(#)wuser.c 1.2 11/19/92 18:22:43
- X * wuser - revise window's user line (displayed by wmgr)
- X*/
- X
- X#ifndef lint
- X static char sccsid[] = "@(#)wuser.c 1.2";
- X#ifdef __GNUC__
- X static char compiled[] = "@(#)compiled by gcc version "__VERSION__;
- X#endif
- X#endif
- X
- X#include <tam.h>
- X#undef erase
- X#include <fcntl.h>
- X#include <stdio.h>
- X
- Xmain(argc, argv)
- Xint argc;
- Xchar **argv;
- X{
- X if (argc != 2)
- X exit(1);
- X fclose(stdout);
- X if (open("/dev/window", O_RDWR) == -1)
- X perror("open of /dev/window");
- X winit();
- X wuser(0, argv[1]);
- X wexit(0);
- X}
- END_OF_FILE
- if test 526 -ne `wc -c <'wuser.c'`; then
- echo shar: \"'wuser.c'\" unpacked with wrong size!
- fi
- # end of 'wuser.c'
- fi
- echo shar: End of shell archive.
- exit 0
-
- --
- Bruce Lilly blilly!bruce@Broadcast.Sony.COM
- ...uunet!sonyusa!sonyd1!blilly!bruce
-
- --
- David H. Brierley
- Home: dave@galaxia.network23.com; Work: dhb@quahog.ssd.ray.com
- Send comp.sources.3b1 submissions to comp-sources-3b1@galaxia.network23.com
- %% Can I be excused, my brain is full. **
-