Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!snorkelwacker.mit.edu!stanford.edu!SUMEX-AIM.STANFORD.EDU!lane From: lane@SUMEX-AIM.STANFORD.EDU (Christopher Lane) Newsgroups: comp.sys.next Subject: Directory Direcoration Message-ID: Date: 14 Mar 91 21:47:17 GMT Sender: Christopher Lane Organization: Internet-USENET Gateway at Stanford University Lines: 58 The csh script below gives icons (.dir.tiff files) to several directories that contain application (or vendor) specific files. Just as the browser icon for the /NeXT/Library/Literature/Shakespeare directory is a picture of Shakespeare instead of a generic folder, the /NextLibrary/Bookshelves directory will show up with the same 'bshlf' icon as the *.bshlf files it contains and /NextLibrary itself will show up with a NeXT icon. The icons are extracted via segedit from various applications already on the NeXT. You'll need to be 'root' to run the script--customize as you will. I'd be interested in hearing about other appropriate 'mappings'. - Christopher #! /bin/csh set table = ( \ \ /NextApps/Librarian.app/Librarian bshlf /NextLibrary/Bookshelves \ /NextApps/FaxReader fax /NextLibrary/Fax \ \ /usr/lib/NextStep/Workspace.app/Workspace snd /NextLibrary/Sounds \ /usr/lib/NextStep/Workspace.app/Workspace font /NextLibrary/Fonts \ \ /usr/lib/NextStep/Workspace.app/Workspace app /NextAdmin \ /usr/lib/NextStep/Workspace.app/Workspace app /NextApps \ /usr/lib/NextStep/Workspace.app/Workspace app /NextLibrary \ /usr/lib/NextStep/Workspace.app/Workspace app /NextDeveloper \ \ /NextDeveloper/Demos/Ensemble midi /NextLibrary/Music/Midi \ /NextDeveloper/Demos/Ensemble ens /NextLibrary/Music/Ensemble \ /NextDeveloper/Demos/ScorePlayer score /NextLibrary/Music/Scores \ /NextDeveloper/Demos/Keyboard .keymapping /NextLibrary/Keyboards \ /NextDeveloper/Demos/Scene movie /NextLibrary/Images/Scene_movies \ \ ) set tiff = '.dir.tiff' set source = 1; set icon = 2; set target = 3 while($#table != 0) if ( -r $table[$source] ) then if ( -d $table[$target] || -w $table[$target] ) then segedit $table[$source] -extract __ICON $table[$icon] $table[$target]/$tiff if ( $status != 0 ) echo "${0}: Cannot extract $table[$icon]" else echo "${0}: Cannot write into directory $table[$target]" endif else echo "${0}: Cannot read file $table[$source]" endif shift table; shift table; shift table end -------