# SLS mesh definition file.  Copyright 1994 Softlanding Software
# Fields must be seperated by exactly 1 tab.  
# Field 4 is a flag:  D=Default, S=Silent (no clear screen), 
#      Q=Push onto command line,  X=Multi files per command
#
Menu	Main
Item	Files	List	D	Files
Item	Dirs	List	D	Directories
Item	User	Menu	D	User
Item	Admin	Menu	D	Admin
Item	Setup	Menu	D	Setup
Item	Gzip	List	D	Zip
Item	Exit	Cmd	S	mesh Exit

Menu	Admin
Item	Back	Menu	D	Main
Item	Modules	List	D	Modules
Item	Procs	List	D	Procs
Item	Install	List	D	Install
Item	mOunt	List	D	Mount
Item	Unmount	List	D	Unmount

List	Mount
Item	Back	Menu	D	Admin
Item	FloppyA	Cmd	S	mount -t ext2 /dev/fd0 /a/fd0	
Item	FloppyB	Cmd	S	mount -t ext2 /dev/fd1 /a/fd1	
Item	CDROM	Cmd	S	mount -t iso9660 /dev/cdrom /a/cdrom	

List	Unmount
Item	Back	Menu	D	Admin
Item	FloppyA	Cmd	S	umount /a/fd0
Item	FloppyB	Cmd	S	umount /a/fd1
Item	CDROM	Cmd	S	umount /a/cdrom

List	Install
Item	Back	Menu	D	Admin
Item	List	Cmd	S	cd /install/installed
Item	Remove	Cmd	S	sysinstall -remove %s
Item	Extract	Cmd	S	sysinstall -extract %s

List	Procs
Item	Back	Menu	D	Admin
Item	Procs	Cmd	D	ps -aux | less
Item	Status	Cmd	D	ps -aux; df; w; free; date

List	Modules
Item	Back	Menu	D	Admin
Item	List	Cmd	D	lsmod
Item	Remove	Cmd	D	lsmod
Item	Load	Cmd	D	lsmod

Menu	User
Item	Back	Menu	D	Main
Item	Listing	List	D	Listing
Item	Editors	List	D	Editors
Item	Manuals	List	D	Manuals
Item	Network	List	D	Hosts
Item	Other	List	D	Other
Item	Pkgs	Cmd	D	ls /install/installed

List	Other
Item	Back	Menu	D	User
Item	Cdrom	Cmd	D	A1=%s; if [ "" != "$DISPLAY" ]; then workman $A1; else workbone $A1; fi

List	Hosts
Item	Back	Menu	D	User
Item	Telnet	Cmd	Q	telnet
Item	Ftp	Cmd	Q	ftp
Item	Ping	Cmd	Q	ping
Item	Softland	Cmd	D	telnet softland
Item	Chitin	Cmd	D	telnet chitin
Item	Tsx-11	Cmd	D	ftp tsx-11.mit.edu

List	Editors
Item	Back	Menu	D	User
Item	Vi	Cmd	D	vi %s
Item	Emacs	Cmd	D	emacs %s
Item	Joe	Cmd	D	joe %s
Item	eX	Cmd	D	ex %s

List	Listing
Item	Back	Menu	D	User
Item	Long	Cmd	D	ls -l %s | less
Item	Size	Cmd	D	ls -s %s | less
Item	Type	Cmd	D	file %s 

List	Manuals
Item	Back	Menu	D	User
Item	User	Cmd	S	cd /usr/man/cat1
Item	System	Cmd	S	cd /usr/man/cat2
Item	C	Cmd	S	cd /usr/man/cat3
Item	Files	Cmd	S	cd /usr/man/cat4
Item	fOrmats	Cmd	S	cd /usr/man/cat5
Item	Games	Cmd	S	cd /usr/man/cat6
Item	Macros	Cmd	D	cd /usr/man/cat7
Item	Administrative	Cmd	S	cd /usr/man/cat8
Item	Index	Cmd	D	less /usr/man/whatis

List	Files
Item	Back	Menu	D	Main
Item	Copy	Cmd	SX	cp -fa %s %s
Item	Delete	Cmd	SX	rm -f %s
Item	Link	Cmd	S	ln %s %s
Item	Move	Cmd	SX	mv -f %s %s
Item	Rename	Cmd	Q	mv %s 
Item	Softlink	Cmd	S	(A1=%s; A2=%s; A3=%s; ln -s $A3/$A1 $A2/)
Item	diFf	Cmd	D	A1=%s; diff $A1 %s/$A1
Item	comPare	Cmd	D	A1=%s; cmp $A1 %s/$A1
Item	sorT	Cmd	D	A1=%s; sort -o %s/$A1 $A1
Item	Unique	Cmd	D	A1=%s; uniq $A1 %s/$A1
Item	Print	Cmd	D	cat %s > /dev/lp
Item	prIntps	Cmd	D	cat %s | gs -sDEVICE=ljetplus -q -dNOPAUSE -sOutputFile=- - > /dev/lp

List	Directories
Item	Back	Menu	D	Main
Item	Copy	Cmd	SX	cp -a %s %s
Item	Delete	Cmd	SX	rmdir %s
Item	New	Cmd	SQ	mkdir 
Item	Move	Cmd	SX	mv -f %s %s
Item	Rename	Cmd	Q	mv %s 
Item	Softlink	Cmd	S	(A1=%s; A2=%s; A3=%s; ln -s $A3/$A1 $A2/)
Item	diff1	Cmd	D	A1=$s; A2=%s; A3=%s; for i in $A3/*; do if [ ! -e $A2/$i ]; then echo $i; fi; done 
Item	diff2	Cmd	D	A1=$s; A2=%s; A3=%s; for i in $A2/*; do if [ ! -e $A3/$i ]; then echo $i; fi; done 

Menu	Setup
Item	Back	Menu	D	Main
Item	Sort	List	D	Sort
Item	Type	List	D	Type
Item	Keys	List	D	Keys
Item	Pattern	Cmd	S	mesh Pattern
Item	saVe	Cmd	S	mesh SaveState
Item	License	Cmd	S	mesh License

List	Type
Item	Back	Menu	D	Setup
Item	Normal	Cmd	S	mesh ViewNormal
Item	Date	Cmd	S	mesh ViewDate
Item	Inode	Cmd	S	mesh ViewInode
Item	Link	Cmd	S	mesh ViewLink
Item	Raw	Cmd	S	mesh ViewRaw
Item	Perms	Cmd	S	mesh ViewPerms
Item	File	Cmd	S	mesh ViewFile

List	Sort
Item	Back	Menu	D	Setup
Item	Perms	Cmd	S	mesh SortPerms
Item	Size	Cmd	S	mesh SortSize
Item	Name	Cmd	S	mesh SortName
Item	Group	Cmd	S	mesh SortGroup
Item	Owner	Cmd	S	mesh SortOwner
Item	Date	Cmd	S	mesh SortDate
Item	Access	Cmd	S	mesh SortAccess
Item	Modify	Cmd	S	mesh SortModified
Item	Extension	Cmd	S	mesh SortExtension
Item	noCase	Cmd	S	mesh SortNoCase
Item	Inode	Cmd	S	mesh SortInode
Item	nOne	Cmd	S	mesh SortNone

List	Keys
Item	Back	Menu	D	Setup
Item	Chdir	Cmd	S	mesh Chdir
Item	Recall	Cmd	S	mesh Recall
Item	Push	Cmd	S	mesh Push
Item	Suffix	Cmd	S	mesh Suffix
Item	OutWin	Cmd	S	mesh OutWin

List	Zip
Item	Back	Menu	D	Main
Item	Tar	Cmd	SX	tar -cpf tmp.tar %s
Item	Untar	Cmd	S	tar -xzpf %s
Item	Zip	Cmd	S	gzip %s
Item	unzIp	Cmd	S	gunzip %s
Item	Tar.z	Cmd	SX	tar -czpf tmp.tar.gz %s
Item	untaR.z	Cmd	S	tar -xzpf %s

# Now define function key short cuts
Key	F1	Cmd	S	.Help
Key	F2	Cmd	S	.Setup.Keys.Chdir
Key	F3	Cmd	S	.Setup.Keys.Recall
Key	F4	Cmd	S	.Setup.Keys.Suffix
Key	F5	Cmd	S	.Setup.Keys.Push
Key	F12	Cmd	S	.Setup.Back

# After the menus have been read in, we can define a few defaults, 
# using the labels of keys for navigation
# Command	.	Cmd	S	.Setup.Sort.nOne
# Command	.	Cmd	S	.Setup.Type.Name
# Command	.	Cmd	S	.Setup.Type.Data
# Command	*.c$	Cmd	SA	.Setup.Pattern
# Command	.	Cmd	S	.Setup.Window.Other
# Command	.	Cmd	S	.Setup.Sort.nOne
# Command	.	Cmd	S	.Setup.Type.Data
# Command	*.tgz$	Cmd	SA	.Setup.Pattern

# Next are the default actions to do based on the extension of the current file.
# When you hit enter the first match is executed.  Typing just the command '1' 
# causes it to skip the first match.  '2' skips the first 2 matches etc.
# Note that control-k is considered a shorthand for '1', or skip 1.
# In all cases, no matches causes the last Suffix command (usually "less")
# to be executed.  The exception is that if the file is executable, it
# can be executed using control-k override.
#
Suffix	.h	Cmd	D	vi %s
Suffix	.h	Cmd	D	emacs %s
Suffix	.c	Cmd	D	vi %s
Suffix	.c	Cmd	D	emacs %s
Suffix	.c	Cmd	D	gcc -c %s
Suffix	.c	Cmd	D	gcc %s
Suffix	.C	Cmd	D	vi %s
Suffix	.C	Cmd	D	emacs %s
Suffix	.C	Cmd	D	g++ -c %s
Suffix	.C	Cmd	D	g++ %s
Suffix	.CPP	Cmd	D	vi %s
Suffix	.CPP	Cmd	D	emacs %s
Suffix	.o	Cmd	D	ldd %s
Suffix	.o	Cmd	D	objdump %s
Suffix	.o	Cmd	D	hexdump %s
Suffix	.tex	Cmd	D	vi %s
Suffix	.tex	Cmd	D	emacs %s
Suffix	.tex	Cmd	D	latex %s
Suffix	.tar	Cmd	D	tar -tvf %s | less
Suffix	.tgz	Cmd	D	tar -tzvf %s | less
Suffix	.tar.z	Cmd	D	tar -tzvf %s | less
Suffix	.tar.Z	Cmd	D	tar -tzvf %s | less
Suffix	.tar.gz	Cmd	D	tar -tzvf %s | less
Suffix	.tar	Cmd	D	tar -xOf %s '*eadme*' '*READ*' 2> /dev/null | less
Suffix	.tgz	Cmd	D	tar -xzOf %s '*eadme*' '*READ*' 2> /dev/null | less
Suffix	.tar.z	Cmd	D	tar -xzOf %s '*eadme*' '*READ*' 2> /dev/null | less
Suffix	.tar.Z	Cmd	D	tar -xzOf %s '*eadme*' '*READ*' 2> /dev/null | less
Suffix	.tar.gz	Cmd	D	tar -xzOf %s '*eadme*' '*READ*' 2> /dev/null | less
Suffix	.tar	Cmd	D	tar -xzvf %s -C %s | less
Suffix	.tgz	Cmd	D	tar -xzvf %s -C %s | less
Suffix	.tar.z	Cmd	D	tar -xzvf %s -C %s | less
Suffix	.tar.Z	Cmd	D	tar -xzvf %s -C %s | less
Suffix	.tar.gz	Cmd	D	tar -xzvf %s -C %s | less
Suffix	.tar	Cmd	D	tar -tf %s | (cd %s && xargs rm -f)
Suffix	.tgz	Cmd	D	tar -tzf %s | (cd %s && xargs rm -f)
Suffix	.tar.z	Cmd	D	tar -tzf %s | (cd %s && xargs rm -f)
Suffix	.tar.Z	Cmd	D	tar -tzf %s | (cd %s && xargs rm -f)
Suffix	.tar.gz	Cmd	D	tar -tzf %s | (cd %s && xargs rm -f)
Suffix	.zip	Cmd	D	unzip -l %s | less
Suffix	.zip	Cmd	D	unzip -v %s | less
Suffix	.zip	Cmd	D	unzip -x %s | less
Suffix	.zip	Cmd	D	unzip -p %s readme* | less
Suffix	.z	Cmd	D	gunzip -c %s | less
Suffix	.Z	Cmd	D	gunzip -c %s | less
Suffix	.gz	Cmd	D	gunzip -c %s | less
Suffix	.zoo	Cmd	D	zoo -list %s | less
Suffix	.lzh	Cmd	D	lharc l %s | less
Suffix	.1	Cmd	D	nroff -man %s | less
Suffix	.2	Cmd	D	nroff -man %s | less
Suffix	.3	Cmd	D	nroff -man %s | less
Suffix	.4	Cmd	D	nroff -man %s | less
Suffix	.5	Cmd	D	nroff -man %s | less
Suffix	.6	Cmd	D	nroff -man %s | less
Suffix	.7	Cmd	D	nroff -man %s | less
Suffix	.8	Cmd	D	nroff -man %s | less
Suffix	.n	Cmd	D	nroff -man %s | less
Suffix	.l	Cmd	D	nroff -man %s | less
Suffix	.man	Cmd	D	nroff -man %s | less
Suffix	.uue	Cmd	D	uudecode %s
Suffix	.ps	Cmd	D	gs %s
Suffix	.ps	Cmd	D	gs -sDEVICE=linux %s
Suffix	.dvi	Cmd	D	dvilj2p %s
Suffix	.dvi	Cmd	D	xdvi %s
Suffix	.lj	Cmd	D	cat %s > /dev/lp
Suffix	.sc	Cmd	D	sc %s
Suffix	.sc	Cmd	D	xspread %s
Suffix	.info	Cmd	D	A1=%s; if [ "" != "$DISPLAY" ]; then xinfo $A1; else info $A1; fi
Suffix	~	Cmd	D	A1=`basename %s \~`; if [ -f $A1 ]; then diff $A1~ $A1; fi
Suffix	~	Cmd	D	A1=`basename %s \~`; A2=%s; if [ -f $A2/$A1 ]; then diff $A1~ $A2/$A1; fi
Suffix	.rel	Cmd	D	vr %s
Suffix	.rpt	Cmd	D	report %s
Suffix	*	Cmd	D	less %s

Help	Main	Help	D	Welcome to SLS Mesh, the Softlanding Menu Shell, a cross \
between a menu system, a file browser and a (somewhat bash-like) shell. \  
Mesh is designed to reduce the number of keystrokes and be easy to learn. \
Any normal unix command can be executed from the mesh command line. \
The current file name can also be referenced by the first %s in the command line. \
The second %s refers to the destination (other) window, and the third %s, the \
current window.  Additionally, \
Mesh displays menu items at the bottom of the screen, which can be selected \
using the Alt-X command, where X is substituted with the first capital letter \
in the menu title string.  Mesh also has popup lists which can be cursored through, \
or shortcutted by just typing the letter that is capitalized in the label.\n\n\
Mesh doesn't actually have any built in menu items.  Rather menus are defined \
in /etc/meshrc, ~/.meshrc, and/or are specified with the -menu argument. \
At any time, you can use Alt-Z to return to the top level menu.  Other behaviour of \
note includes:  When you just hit enter at a file, the default action is executed. \
The default action is based upon the \
file suffix as defined by the Suffix settings in .meshrc.  Note that if no extension \
is matched, the last defined Suffix entry gets used, usually the program "less". \
When you hit enter the first match is executed.  Or, Typing just the command '1'  \
causes it to skip the first match.  '2' skips the first 2 matches etc. \
Note that control-k is considered a shortcut for '1', or skip 1. \
In all cases, failure to match causes the last or default Suffix command \
to be executed.  Additionally, if a file is executable, and it has no extension matching \
default rule, then you can execute it with control-k.  You can see what suffix defaults \
the current file matches using the .Setup.Keys command. \
It is useful to know that function keys have been defined as shortcuts to menu-picks. \
For example: F1-help, F2-ChDir list, F3-recall commands,  F4-Get Suffix command, \
F5-Push (current file name onto command line), F12-Goto top menu. \
Following are some of the standard key bindings in mesh:\n\n\
\tFuncN - Function key N, can be bound to any menu pick.\n\
\tEsc-N - Same as Function key N, but useful for tty logins. \n\
\tAlt-X - Select menu item where X is the first capital letter. \n\
\tEsc-X - Same as Alt-X, but useful for tty logins. \n\
\tEnter - at a directory, change into it, \n\
\tEnter - at a non directory, execute the default action.\n\
\t1     - execute the second default action (skip 1)\n\
\t2     - execute the third default action (skip 2), etc\n\n\
\tAlt-z - Shortcut key to go to back to top level (main) menu.\n\
\tCtl-k - shortcut for the '1' command above.\n\
\tCtl-w - switch to the other file view window.\n\
\tCtl-v - Next file in file window\n\
\tCtl-g - Previous file in window\n\
\tCtl-p - Previous command\n\
\tCtl-n - Next command\n\
\tCtl-o - Execute command and popup next command\n\
\tCtl-r - Incremental search backward for matching command\n\
\tCtl-u - Delete to begin of line\n\
\tCtl-a - Got to begin of line\n\
\tCtl-e - Got to end of line\n\
\tCtl-f - forward 1 char\n\
\tCtl-b - back 1 char\n\
\tCtl-l - Redraw screen\n\
\tTAB   - Do command line completion.\n\n\
Mesh saves previously visited directories and previously executed commands in \
the file $HOME/.meshstate.  These can be recalled with the above commands.
  

Help	Keys	Help	D	Most of the SMS key bindings are similar to emacs.  However, \
since SMS has both a file window and a command-line to move in, there are some \
that are different.  A couple of these cursor movement commands are: Control-v: Next file.  \
Control-g: previous file.  The TAB key also provides command line \
completion.  The following additional functions are also bound to function keys.

Help	Keys	Chdir	D	The Chdir command brings up a list of previously \
visited directories.  Cursor up and down to select one of the the directories \
and hit enter to change the default directory of the current window.   Note that \
when the system state is saved, say when quitting, the current directories of each \
window are the first entiries in the list.  This makes it easy to resume at the last \
session location.

Help	Keys	Recall	D	The Recall command brings up a list of previously \
executed commands.  Cursor up and down to select one of the commands and \
hit enter to have it brought up onto the command line where it can be \
edited and executed.  Note that there are no multiple instances of commands \
since only the latest copy of a command is retained in the list.  Note that \
the control-P and control-N commands do the same type of function.  Likewise, \
the Emacs like control-A (To Begining), control-E (EOL), control-F (Forward) \
and control-B (Back) are all supported.

Help	Keys	Push	D	The Push command takes the currently highlighted file \
name and puts it onto the command line at the current position.  It can then \
be used as part of a command and edited before execution.   Note that a shorthand \
for this is using %s on the command line, just like in the Menu definitions above.

Help	Main	Files	D	File related commands, such as copy, erase, etc.

Help	Main	Setup	D	Contains setable options such as the display format \
and the sort criteria for directories.

Help	Main	User	D	Reserved for user related commands.

Help	Main	Admin	D	Commands reserved for system administration.

Help	Setup	Sort	D	Set the field upon which to sort the view.

Help	Setup	Type	D	Select one of various formats for the display.

Help	Setup	saVe	D	Save the current system state.  \
This happens automatically when you quit, but you might want to use it \
in case of a hang, or because you want to start another copy of mesh on another VT.

Help	Setup	Pattern	D	Allows setting a pattern that limits the files that are displayed. \
Note that patterns match substrings, so a $ sign (ie. *.c$) is needed to see just .c files.

Help	Listing	Long	D	This command simply does \
an ls -l to list all the files and attributes in the current directory \
and clears the screen to show the user full details without interferance.

Help	Listing	Size	D	This command simply does \
an ls -s to list all the files and sizes in the current directory \
and clears the screen to show the user all there is to see.

Help	Files	Help	D	This is the Files Section.  It contains commands to \
manipulate single files.

Help	Files	diFf	D	Show the differences between two text files.

Help	Files	comPare	D	Compare two binary files for differences.

Help	Files	Delete	D	Delete a file.

Help	Files	Unique	D	Remove duplicate lines from a sorted file.

