### -------------------------------------------------------------------------
###
###  Popups (TkDesk Configuration File)
###
###  This file defines the file-specific popup-menus that are accessed
###  by pressing the right mouse button in any of TkDesk's file lists.
###  Also the popup menu of the "Copy" dialog is defined here.
###
###  *** Press F5 to save changes and reload this file into TkDesk, 
###  *** F6 to do the same plus to close this window.
###
### -------------------------------------------------------------------------

### In this file four Tcl lists are defined: One for directories, one for
### executables and one for all other files.  The fourth defines the
### popup menu contained in the "Copy, Move, Link" dialog.

### Definition of Popup-Menus:
### The Popup-Menus are defined by the elements of a Tcl list.
### (In the following I try to explain its structure, although it will
### probably best to just have a look at the example definition below.)
### Each element of the list is again a Tcl list, whose first element
### contains a list of "glob" patterns. If a file matches any of these
### patterns, this entry will be used for its popup menu. The second
### element defines the entries of the popup menu, by a set of (usually)
### 2-element lists. The first element is the entry's label, while the
### second contains a Tcl script to execute when this menu entry is
### invoked. Cascaded menus are currently not possible.
### The first menu entry of each popup menu defines the default action,
### which will be invoked when a matching file is double-clicked.
###
### TkDesk commands that can be used in the list definition:
### (Only the most common ones are listed here. For a complete overview
### and a detailed explanation refer to the User's Guide.)
###
### dsk_exec cmd ...   : Executes shell command cmd in background.
### dsk_path_exec path cmd ... : Execute cmd in path.
### dsk_view cmd ...   : Executes cmd, displays output in Editor window.
### dsk_open_dir path  : Opens a new file list for directory path.
### dsk_open_browser path    : Opens a new file browser for directory path.
### dsk_edit file      : Edits file.
### dsk_print file     : Prints file.
### dsk_cd path        : Changes directory of browser to path.
### dsk_du path        : Displays disk usage of directory path.
### dsk_periodic cmd seconds : Executes cmd every x seconds.
### dsk_confirm text script  : Executes script when confirmation was positive.
### dsk_read_string label script  : Executes script when entered string is
###                      not empty. "label" will be displayed in the dialog.
### dsk_sound id       : Plays sound id (defined in config-file Sounds). 
### dsk_cbhelp file regexp   : Invokes TkDesk's help system on file.
### dsk_ask_exec       : Asks for a command to execute.
### dsk_ask_dir        : Asks for a directory to open.
### dsk_save_config    : Saves window layout, history, bookmarks etc.
### dsk_exit ?ask?     : Quits TkDesk. "ask" may be one 1 or 0.
###
### Abbreviations that will be replaced with file names etc.:
###
### %s : Full pathname of the first selected file.
### %f : Its filename only.
### %b : "Basename": just the filename without extension.
### %d : Its directory only.
### %B : Same as %A, but will be replaced with "" if no files are selected.
### %A : List containing full pathnames of all selected resp. dropped files.
### %D : Directory of last "active" viewer.
### %x : Current X selection.
###
### The very first Button provides access to a few functions of TkDesk,
### like history menus, configuration menu etc. Its labels are mostly
### "internally reserved" keywords.
### The second button is only defined by the magic word "date" which inserts
### TkDesk's date display at that place into the AB.
###

### Definition of Popup-Menus for Directories:
### (You should better not change the first, i.e. default entry...!)

set tkdesk(popup,directories) {
	{{cdrom} {
		{ {dsk_cd %s}}
		{Ф {dsk_exec eject /dev/cdrom }}
		{ڤΥ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme umount %s}}
		{ޥ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme mount /dev/cdrom %s}}
	}}
	{{RCS} {
		{{Check Out...} {jdb_rcs_co %d}}
		{{Open} {dsk_cd %s}}
		{{New Window} {dsk_open_dir %s}}
		{{New Browser} {dsk_open_browser %s}}
		-
		{{Disk Usage} {dsk_du %s}}
		{{Start XTerm here} {cd %s;exec $tkdesk(cmd,xterm) &}}
		{{Make tar.gz} {dsk_exec tar cf - -C %d %f | gzip >%s.tar.gz}}
	}}
	{{*} {
		{{} {dsk_cd %s}}
		{{ե򳫤} {dsk_open_dir %s}}
		{{ɥ򳫤} {dsk_open_browser %s}}
		{{DOSե} {dsk_exec mfm}}
		{FTPե {dsk_exec gftp}}
		-
		{{...} {dsk_find_files -path %s}}
		{{ץѥƥ} {dsk_du %s}}
		{{ξü¹} {cd %s;exec $tkdesk(cmd,xterm) &}}
		-
		{CD᡼ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme mkisofs -a -d -D -l -L -N -R -V %b -o %s.iso %s}}
		-
		{{tar.gzֺ} {dsk_exec tar cf - -C %d %f | gzip >%s.tar.gz}}
		{{zip} {dsk_exec zip -r %s.zip %f}}
		{{lhaֺ} {dsk_exec lha a %s.lzh %f}}
		{{Which rpm} {dsk_view rpm -qfli %s}}
	}}
}

set tkdesk(popup,executables) {
	{{*.class} {
		{{Execute in Xterm} {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme java %b}}
		{{Execute} {dsk_exec java %b}}
		{{View Output} {dsk_view java %b}}
	}}
	{{*.tk} {
		{{¹} {dsk_exec %s}}
		{{üǼ¹} {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme %s}}
		{{Ϸ̤ɽ} {dsk_view %s}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{*.tcl} {
		{üǼ¹ {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme %s}}
		{¹ {dsk_exec %s}}
		{ɽ {dsk_view %s}}
		-
		{Խ {dsk_view %s}}
		{ߥ塼 {dsk_exec %s}}
	}}
	{{configure} {
		{/usr˹ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme %s --prefix=/usr}}
		{/usr˹... {dsk_read_string {configure Option:} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme %s --prefix=/usr $dsk_read_string}}}
		{{gettextб/usrǹ} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T "configure --prefix=/usr --with-included-gettext" -e pauseme %s --prefix=/usr --with-included-gettext}}
		{gettextб/usrǹ... {dsk_read_string {configure Option:} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme %s --prefix=/usr --with-included-gettext $dsk_read_string}}}
		{{} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T "configure" -e pauseme %s}}
		{... {dsk_read_string {configure Option:} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme %s $dsk_read_string}}}
		-
		{إ {dsk_view %s --help}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{*} {
		{{¹} {dsk_exec %s}}
		{{üǼ¹} {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme %s}}
		{{¹Է̤ɽ} {dsk_view %s}}
		{{ץդǼ¹...} {dsk_read_string {configure Option:} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T "%f $dsk_read_string" -e pauseme %s $dsk_read_string}}}
		-
		{{ޥ˥奢} {dsk_view man %f | col -b}}
		-
		{{Խ} {dsk_edit %s}}
		{{饤֥} {dsk_view ldd %s}}
	}}
}

set tkdesk(popup,regulars) {
	{{{*-HOWTO} {*-HOWTO.gz}} {
		{{ɽ(cbhelp)} {dsk_cbhelp %s howto}}
		{{Խ} {dsk_edit %s}}
		{ߥ塼 {dsk_exec mule %s }}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
	}}
	{{{Makefile} {Gmakefile} {makefile}} {
		{ץʤǥ᡼ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme make -f %s}}
		{󥹥ȡ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme make -f %s install}}
		{ꥢ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme make -f %s clean}}
		{᡼... {dsk_read_string {Make Target:} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme make -f %s $dsk_read_string}}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
		-
		{{å... (RCS)} {jdb_rcs_ci %s}}
		{{} {dsk_print %s}}
	}}
	{{Imakefile} {
		{{᡼ե} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T "generate Makefile" -e pauseme xmkmf -a}}
		{{ΥեΤߥ᡼ե} {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T "generate Makefile" -e pauseme xmkmf}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
		-
		{{å... (RCS)} {jdb_rcs_ci %s}}
		{{...} {dsk_print %s}}
	}}
	{{{*.a} {*.o} {*.sl}} {
		{{ܥΥꥹ} {dsk_view nm %s}}
		{{ѥȹΥꥹ...} {dsk_read_string {List Symbols Matching (RegExp):} {dsk_view nm %s | grep $dsk_read_string}}}
	}}
	{{{*.h} {*.cpp} {*.tcl}} {
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
		-
		{{å... (RCS)} {jdb_rcs_ci %s}}
		{{} {dsk_print %s}}
	}}
	{{*.c} {
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
		{ѥ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme gcc -o %b %f}}
		-
		{{å... (RCS)} {jdb_rcs_ci %s}}
		{{...} {dsk_print %s}}
	}}
	{{*.class} {
		{{Execute in Xterm} {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme java %b}}
		{{Execute} {dsk_exec java %b}}
		{{View Output} {dsk_view java %b}}
	}}
	{{core} {
		{{إåʸ...} {dsk_view head %s | od -s -A x}}
	}}
	{{*.deb} {
		{{} {dsk_view dpkg --info %s}}
		-
		{{󥹥ȡ} {dsk_exec $tkdesk(cmd,xterm) -ls -sl 256 -caption "dpkg -i %f" -e pauseme "dpkg -i %s"}}
		{{ꥹ} {dsk_view dpkg-deb -c %s}}
		{{Ÿ} {dsk_exec dpkg-deb -x %s ./}}
	}}
	{{{*.diff} {*.patch}} {
		{-p1ǥѥåƤ {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme sh -c "patch -p1 < %s"}}
		{{ѥåƤ} {dsk_exec $tkdesk(cmd,xterm) -sb -T "patch < %S" -n patch -e pauseme sh -c "patch < %s"}}
		{{Խ/ɽ} {dsk_edit %s}}
		{{} {dsk_print %s}}
	}}
	{{{*.diff.gz} {*.patch.gz}} {
		{ѥåƤ(-p1) {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme sh -c {gzip -cd %s | patch -p1}}}
		{ѥåƤ {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e pauseme sh -c {gzip -cd %s | patch}}}
		{{Խ/ɽ} {dsk_edit %s}}
	}}
	{{*.obj} {
		{{tgif} {dsk_exec tgif %s}}
		{{Խ} {dsk_edit %s}}
	}}
	{{*.mgp} {
		{{ץ쥼ơ} {dsk_exec mgp %s}}
		{JISѴ {dsk_exec sh -c "nkf -j < %s > %b.jis.mgp"}}
		{{Խ} {dsk_edit %s}}
	}}
	{{*.tex} {
		{{TeX¹} {dsk_exec jlatex %s}}
		{{TeXüǼ¹} {dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme jlatex %s}}
		{{TeXμ¹Է̤ɽ} {dsk_view jlatex %s}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
	}}
	{{*.dvi} {
		{{ɽ} {dsk_exec xdvi -paper a4 -s 3 %s}}
	}}
	{{{*.gif} {*.jpg} {*.jpeg} {*.bmp} {*.pcx} {*.p?m} {*.rle} {*.tif} {*.tga} {*.png}} {
		{imagemagicɽ {dsk_exec display %s }}
		{{xvɽ} {dsk_exec xv %s}}
		{ڥ {dsk_exec xpaint %s}}
		-
		{{ɻ()} {dsk_exec xv -root -quit %s}}
		{{ɻ()} {dsk_exec xv -root -max -smooth -quit %s}}
	}}
	{{{*.html} {*.htm}} {
		{{ͥåȥ(ɥ)} {dsk_netscape file %s window}}
		{{ͥåȥ(ߤΥɥ)} {dsk_netscape file %s}}
		{{Lynx} {dsk_exec $tkdesk(cmd,xterm) -e lynx %s}}
		-
		{{Խ} {dsk_edit %s}}
	}}
	{{*.java} {
		{{Edit} {dsk_edit %s}}
		{{Compile} {dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T "javac %f" -e pauseme javac %s}}
		-
		{{Print} {dsk_exec groff -Tps -mandoc %s | $tkdesk(cmd,print)}}
	}}
	{{{*.man} {*.[1-8n]}} {
		{{ɽ} {dsk_view groff -Tascii -mandoc %s | col -b}}
		{{Խ} {dsk_edit %s}}
		{{(PS)} {dsk_exec groff -Tps -mandoc %s | $tkdesk(cmd,print)}}
	}}
	{{{*.mov} {*.avi}} {
		{{ɽ} {dsk_exec xanim %s}}
	}}
	{{{*.mpg} {*.mpeg}} {
		{{ɽ} {dsk_exec mpeg_play %s 2>/dev/null}}
		{{ɽ(礭)} {dsk_exec mpeg_play -dither 2x2 %s 2>/dev/null}}
		{{ɽ()} {dsk_exec mpeg_play -dither gray %s 2>/dev/null}}
	}}
	{{{*.ps} {*.eps}} {
		{{ɽ(ghostview)} {dsk_exec ghostview -a4 -magstep 1 %s}}
		{{ɽ(gv)} {dsk_exec gv %s}}
		{{} {dsk_print %s}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		-
		{{ϩCAD} {dsk_exec xcircuit %s}}
	}}
	{{*.pdf} {
		{{ɽ(acroread)} {dsk_exec acroread %s}}
		{{ɽ(xpdf)} {dsk_exec xpdf %s}}
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{*.obj} {
		{{Tgif} {dsk_exec tgif %s}}
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{*.sch} {
		{{ϩ} {dsk_exec gschem %s}}
		{{spice} {dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T spice -e pauseme gnetlist -o %b.spice -g spice %s}}
		{{Verilog} {dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T spice -e pauseme gnetlist -o %b.verilog -g verilog %s}}
		{{VHDL} {dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T spice -e pauseme gnetlist -o %b.vhdl -g vhdl %s}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{*.sym} {
		{{ϩ} {dsk_exec gschem %s}}
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{*.spice} {
		{{spice3¹} {dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme spice3 %s}}
		{{Ng-spice¹} {dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme ngspice %s}}
		-
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
	}}
	{{{*.ps.gz} {*.ps.Z}} {
		{{ɽ(ghostview)} {	     dsk_exec gzip -cd %s | ghostview -a4 -magstep 1 -	}}
		{{} {dsk_exec gzip -cd %s | $tkdesk(cmd,print)}}
		-
		{{} {dsk_exec gzip -d %s}}
	}}
	{{*.rpm} {
		{ {dsk_view rpm -qip %s}}
		{ {dsk_view rpm -qlp %s}}
		{ٰܺ {dsk_view rpm -qiRlp %s}}
		{󥹥ȡ {dsk_view rpm -U %s}}
		-
		{tgzѴ {dsk_exec alien -t %s}}
		-
		{ƥ {dsk_view rpm -i --test %s 2>&1 && echo 'Test Successful'}}
	}}
	{{*.tar} {
		{{ܺ٤ɽ} {dsk_view tar tvf %s}}
		{{ɽ} {dsk_view tar tf %s}}
		-
		{{Ÿ} {dsk_exec tar xf %s}}
		{{/Ÿ} {dsk_exec tar xf %s -C /}}
		{{/usr/tmpŸ} {dsk_exec tar xf %s -C /usr/tmp}}
	}}
	{{{*.tar.bz2} {*_tar.bz2} {*.tb2}} {
		{{ܺ٤ɽ} {dsk_view bzip2 -cd %s | tar tvf -}}
		{{ɽ} {dsk_view bzip2 -cd %s | tar tf -}}
		{{Ÿ줿礭} {dsk_view bzip2 -l %s}}
		-
		{{Ÿ} {dsk_exec bzip2 -cd %s | tar xf -}}
		{{/Ÿ} {dsk_exec bzip2 -cd %s | tar xf - -C /}}
		{{/usr/tmpŸ} {dsk_exec bzip2 -cd %s | tar xf - -C /usr/tmp}}
	}}
	{{{*.tar.z} {*.tar.Z} {*.taz} {*.t.Z}} {
		{{ܺ٤ɽ} {dsk_view gzip -cd %s | tar tvf -}}
		{{ɽ} {dsk_view gzip -cd %s | tar tf -}}
		-
		{{Ÿ} {dsk_exec gzip -cd %s | tar xf -}}
		{{/Ÿ} {dsk_exec gzip -cd %s | tar xf - -C /}}
		{{/usr/tmpŸ} {dsk_exec gzip -cd %s | tar xf - -C /usr/tmp}}
	}}
	{{*.tar.gz} {
		{{ܺ٤ɽ} {dsk_view gzip -cd %s | tar tvf -}}
		{{ɽ} {dsk_view gzip -cd %s | tar tf -}}
		{{Ÿ礭} {dsk_view gzip -l %s}}
		-
		{{Ÿ} {dsk_exec gzip -cd %s | tar xf -}}
		{{/Ÿ} {dsk_exec gzip -cd %s | tar xf - -C /}}
		{{/usr/tmpŸ} {dsk_exec gzip -cd %s | tar xf - -C /usr/tmp}}
	}}
	{{*.tgz} {
		{{󥹥ȡ} {dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e installpkg %s}}
		{󥤥󥹥ȡ {dsk_exec $tkdesk(cmd,xterm) -T %f -n %f -e removepkg %b}}
		{{ܺ٤ɽ} {dsk_view gzip -cd %s | tar tvf -}}
		{{ɽ} {dsk_view gzip -cd %s | tar tf -}}
		{{Ÿ礭} {dsk_view gzip -l %s}}
		-
		{{Ÿ} {dsk_exec gzip -cd %s | tar xf -}}
		{{/Ÿ} {dsk_exec gzip -cd %s | tar xf - -C /}}
		{{/usr/tmpŸ} {dsk_exec gzip -cd %s | tar xf - -C /usr/tmp}}
	}}
	{{*.lzh} {
		{{ɽ} {dsk_view lha %s}}
		{{Ÿ} {dsk_exec lha x %s}}
	}}
	{{*.url} {
		{{Netscape (new window)} {dsk_netscape url [exec cat %s] window}}
		{{Netscape (reuse window)} {dsk_netscape url [exec cat %s]}}
		{{Lynx} {dsk_exec $tkdesk(cmd,xterm) -e lynx [string trimleft [exec cat %s] file:]}}
		-
		{{Edit} {dsk_edit %s}}
	}}
	{{{*.voc} {*.wav} {*.au}} {
		{{Play } {	    if {[info exists tkdesk(soundcmd)]} {		if {$tkdesk(soundcmd) != ""} {		    eval exec [format $tkdesk(soundcmd) %s]		}	    } else {		cb_alert {Don't know how to play a sound. Edit the "Sounds" config file to tell me how.}	    }	}}
	}}
	{{*.xbm} {
		{{ɽ(xv)} {dsk_exec xv %s}}
		{{ɽ(bitmap)} {dsk_exec bitmap %s}}
		{{ASCIIԽ} {dsk_edit %s}}
	}}
	{{*.xpm} {
		{{ɽ(sxpm)} {dsk_exec sxpm %s}}
		{{ɽ(xv)} {dsk_exec xv %s}}
		{{Խ(pixmap)} {dsk_exec pixmap -filename %s}}
		{{ASCIIԽ} {dsk_edit %s}}
	}}
	{{{*.z} {*.Z}} {
		{{Խ} {dsk_edit %s}}
		{{} {dsk_exec gzip -d %s}}
	}}
	{{*.gz} {
		{{Խ} {dsk_edit %s}}
		{{व줿礭} {dsk_view gzip -l %s}}
		-
		{{} {dsk_exec gzip -d %s}}
	}}
	{{*.bz2} {
		{{Խ} {dsk_edit %s}}
		{{व줿礭} {dsk_view bzip2 -l %s}}
		-
		{{} {dsk_exec bzip2 -d %s}}
	}}
	{{{*.zip}} {
		{{Ƥɽ} {dsk_view unzip -l %s}}
		-
		{{} {dsk_exec unzip %s}}
		{{/ǲ} {dsk_exec unzip %s -d /}}
		{{/usr/tmpǲ} {dsk_exec unzip %s -d /usr/tmp}}
	}}
	{{*.spec} {
		{Хʥ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme rpm -bb %s}}
		{Хʥ/ {dsk_exec $tkdesk(cmd,xterm) -geom 80x15 -T %f -n %f -e pauseme rpm -ba %s}}
		-
		{Խ {dsk_edit %s }}
	}}
	{{*} {
		{{Խ} {dsk_edit %s}}
		{{ߥ塼} {dsk_exec mule %s}}
		{{¾Υɥ} {dsk_exec mule %s other}}
		{{¾Υե졼} {dsk_exec mule %s frame}}
		-
		{{ǥ쥯ȥ򳫤} {dsk_open_dir %d}}
		{{...} {dsk_print %s}}
		{{᡼...} {dsk_mailer_file {} {} %s}}
		-
		{{xvɽ} {dsk_exec xv %s}}
		{{ץȴCAD} {dsk_exec pcb %s}}
	}}
}

set tkdesk(fileops,popup) {
    {{ܥå} {
	dsk_exec $tkdesk(cmd,symln) [file tail %S] %T
    }}
    {{ϡɥ} {
    	dsk_exec $tkdesk(cmd,ln) %S %T
    }}
    {{tar} {
	dsk_bgexec {gzip -cd %S | tar xf - -C %T} {Untaring %f...}
    }}
    {{ʬ} {
	dsk_exec diff -Pcr [file tail %S] [file tail %T] >[file tail %S].diff
    }}
    {{ѥå} {
	dsk_path_exec %T $tkdesk(cmd,xterm) -sb -T "patch <%S" -n patch -e pauseme patch -p1 <%S
    }}
    {{ɲ} {
	dsk_exec cat %S >%T
    }}
}

# ---------------------------------------------------------------------------
# xemacs_load what ?where?
# An improved proc provided by Erez Strauss (erez@newplaces.com) to
# communicate with a running XEmacs.  For this to work you need to put the
# lines:
# (gnuserv-start)
# (require 'ange-ftp)
# into your ~/.emacs.  The second line allows for FTP through XEmacs.
# $what is the file that is to be loaded, $where may be: same, other, frame.

proc xemacs_load {what {where same}} {

    catch {auto_reset}        
    if ![dsk_auto_execok "gnudoit"] {
        dsk_errbell
        cb_error "Couldn't find gnudoit.  Maybe you don't have XEmacs installed?"
        return
    }
    
    switch $where {
        "same" {
            set func find-file
            # exec gnudoit -q (find-file \"$what\")
        }
        "other" {
            set func find-file-other-window
            # exec gnudoit -q (find-file-other-window \"$what\")
        }
        "frame" {
            set func find-file-other-frame
            # exec gnudoit -q (find-file-other-frame \"$what\")
        }
        "scratch" {
            set func switch-to-buffer-other-frame
            set what {*scratch*}
            # exec gnudoit -q (switch-to-buffer-other-frame \"*scratch*\")
        }
    }
    set err [catch { exec gnudoit -q ($func \"$what\") }]
    if $err {
        if {[cb_yesno "XEmacs is not yet running on your display. Start it now
	?"] == 0} {
            # start new xemacs
            eval dsk_exec xemacs $what
        }
    }
}

