home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume13 / xdtm / part11 < prev    next >
Internet Message Format  |  1991-05-18  |  21KB

  1. Path: uunet!lll-winken!sun-barr!newstop!exodus!cogs.sussex.ac.uk
  2. From: eddyg@cogs.sussex.ac.uk (EdwardJ. Groenendaal)
  3. Newsgroups: comp.sources.x
  4. Subject: v13i016: xdtm - X Desktop Manager for the X Window System, Part11/11
  5. Message-ID: <13580@exodus.Eng.Sun.COM>
  6. Date: 19 May 91 00:04:07 GMT
  7. References: <csx-13i006:xdtm@uunet.UU.NET>
  8. Sender: news@exodus.Eng.Sun.COM
  9. Lines: 727
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: Edward "J." Groenendaal <eddyg@cogs.sussex.ac.uk>
  13. Posting-number: Volume 13, Issue 16
  14. Archive-name: xdtm/part11
  15.  
  16. Pheww.. last one!
  17.  
  18. Submitted-by: eddyg@cste
  19. Archive-name: xdtm/part11
  20.  
  21. ---- Cut Here and feed the following to sh ----
  22. #!/bin/sh
  23. # This is part 11 of xdtm
  24. # ============= xdtm/patchlevel.h ==============
  25. if test ! -d 'xdtm'; then
  26.     echo 'x - creating directory xdtm'
  27.     mkdir 'xdtm'
  28. fi
  29. if test -f 'xdtm/patchlevel.h' -a X"$1" != X"-c"; then
  30.     echo 'x - skipping xdtm/patchlevel.h (File already exists)'
  31. else
  32. echo 'x - extracting xdtm/patchlevel.h (Text)'
  33. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/patchlevel.h' &&
  34. X/* This file contains the current patch level. Not all patch levels are
  35. X * released, I also use this number to keep track of my changes to xdtm,
  36. X * so don't be suprised by jumps in this number.
  37. X */
  38. X#define PATCHLEVEL 5
  39. SHAR_EOF
  40. chmod 0644 xdtm/patchlevel.h ||
  41. echo 'restore of xdtm/patchlevel.h failed'
  42. Wc_c="`wc -c < 'xdtm/patchlevel.h'`"
  43. test 219 -eq "$Wc_c" ||
  44.     echo 'xdtm/patchlevel.h: original size 219, current size' "$Wc_c"
  45. fi
  46. # ============= xdtm/quit.c ==============
  47. if test -f 'xdtm/quit.c' -a X"$1" != X"-c"; then
  48.     echo 'x - skipping xdtm/quit.c (File already exists)'
  49. else
  50. echo 'x - extracting xdtm/quit.c (Text)'
  51. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/quit.c' &&
  52. X/****************************************************************************
  53. X ** File          : quit.c                                                 **
  54. X ** Purpose       : Initialise and Realise quit dialogs                    **
  55. X ** Author        : Edward Groenendaal                                     **
  56. X ** Date          : April 1991                                             **
  57. X ** Documentation : Xdtm Design Folder                                     **
  58. X ** Related Files :                                                        **
  59. X ****************************************************************************/
  60. X
  61. X#include "xdtm.h"
  62. X#include <X11/Shell.h>
  63. X#include <X11/Xaw/Label.h>
  64. X#include <X11/Xaw/Command.h>
  65. X#include "Xedw/XedwForm.h"
  66. X
  67. Xextern void realize_dialog(Widget);
  68. X
  69. X/* Widgets */
  70. Xprivate Widget quitpopup;    /* For Quit Message */
  71. Xprivate Widget quitform;        /* The form */
  72. Xprivate Widget quitlabel;      /* Label at top of dialog */
  73. Xprivate Widget quitquit;           /* yes button */
  74. Xprivate Widget quitcancel;        /* no button */ 
  75. X
  76. X/*****************************************************************************
  77. X *                              init_quit                                    *
  78. X *****************************************************************************/
  79. Xpublic void init_quit(Widget top)
  80. X{
  81. X  /* Initialise the quit dialog widgets */
  82. X
  83. X  extern void quitQueryResult(Widget, Boolean, caddr_t);
  84. X
  85. X  Arg arglist[5];
  86. X  Cardinal i;
  87. X
  88. X  private String QuitLabel          = "Really quit?";
  89. X  private String QuitButtonLabel    = "Quit";
  90. X  private String CancelButtonLabel  = "Cancel";
  91. X
  92. X  quitpopup    =   XtCreatePopupShell("quitpopup",
  93. X                      transientShellWidgetClass,
  94. X                      top,
  95. X                      NULL, 0);
  96. X
  97. X  quitform      =   XtCreateManagedWidget("quitform",
  98. X                      xedwFormWidgetClass,
  99. X                      quitpopup,
  100. X                      NULL, 0);
  101. X
  102. X  i = 0;
  103. X  XtSetArg(arglist[i], XtNlabel,         QuitLabel);  i++;
  104. X  XtSetArg(arglist[i], XtNborderWidth,           0);  i++;
  105. X  XtSetArg(arglist[i], XtNjustify, XtJustifyCenter);  i++;
  106. X  XtSetArg(arglist[i], XtNfullWidth,          True);  i++;
  107. X  quitlabel    =   XtCreateManagedWidget("quitlabel",
  108. X                      labelWidgetClass,
  109. X                      quitform,
  110. X                      arglist, i);
  111. X
  112. X  i = 0;
  113. X  XtSetArg(arglist[i], XtNlabel, CancelButtonLabel);  i++;
  114. X  XtSetArg(arglist[i], XtNfromVert,      quitlabel);  i++;
  115. X  XtSetArg(arglist[i], XtNjustify, XtJustifyCenter);  i++;
  116. X  quitcancel  =   XtCreateManagedWidget("quitcancel",
  117. X                    commandWidgetClass,
  118. X                    quitform,
  119. X                    arglist, i);
  120. X
  121. X  i = 1;
  122. X  XtSetArg(arglist[i], XtNlabel,   QuitButtonLabel);  i++;
  123. X  XtSetArg(arglist[i], XtNfromVert,     quitlabel);  i++;
  124. X  XtSetArg(arglist[i], XtNwidthLinked, quitcancel);  i++;
  125. X  XtSetArg(arglist[i], XtNfromHoriz,   quitcancel);  i++;
  126. X  quitquit    =   XtCreateManagedWidget("quitquit",
  127. X                    commandWidgetClass,
  128. X                    quitform,
  129. X                    arglist, i);
  130. X
  131. X  XtAddCallback(quitcancel, XtNcallback, quitQueryResult, False);
  132. X  XtAddCallback(quitquit,   XtNcallback, quitQueryResult, True);
  133. X}
  134. X
  135. X/*****************************************************************************
  136. X *                                quit_dialog                                *
  137. X *****************************************************************************/
  138. Xpublic void quit_dialog(void)
  139. X{
  140. X  /* This procedure pops the quit dialog up on screen */
  141. X
  142. X  realize_dialog(quitpopup);
  143. X}
  144. X
  145. X/*****************************************************************************
  146. X *                                                                           *
  147. X *****************************************************************************/
  148. Xpublic void destroy_quit_dialog(void)
  149. X{
  150. X  /* This procedure pop's the quit dialog down */
  151. X
  152. X  XtPopdown(quitpopup);
  153. X}
  154. SHAR_EOF
  155. chmod 0644 xdtm/quit.c ||
  156. echo 'restore of xdtm/quit.c failed'
  157. Wc_c="`wc -c < 'xdtm/quit.c'`"
  158. test 3727 -eq "$Wc_c" ||
  159.     echo 'xdtm/quit.c: original size 3727, current size' "$Wc_c"
  160. fi
  161. # ============= xdtm/scroll_hack.c ==============
  162. if test -f 'xdtm/scroll_hack.c' -a X"$1" != X"-c"; then
  163.     echo 'x - skipping xdtm/scroll_hack.c (File already exists)'
  164. else
  165. echo 'x - extracting xdtm/scroll_hack.c (Text)'
  166. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/scroll_hack.c' &&
  167. X/*****************************************************************************
  168. X ** File          : scroll_hack.c                                           **
  169. X ** Purpose       : Reset the scrollbar in a viewport widget to the top     **
  170. X ** Author        : Edward Groenendaal                                      **
  171. X ** Date          : April 1991                                              **
  172. X ** Documentation : Xdtm Design Folder                                      **
  173. X ** Related Files :                                                         **
  174. X *****************************************************************************/
  175. X
  176. X#include "xdtm.h"
  177. X#include <X11/IntrinsicP.h>
  178. X#include <X11/StringDefs.h>
  179. X#include <X11/Xaw/XawInit.h>
  180. X#include <X11/Xaw/Viewport.h>
  181. X#include <X11/Xaw/ViewportP.h>
  182. X#include <X11/Xaw/Scrollbar.h>
  183. X#include <X11/Xaw/ScrollbarP.h>
  184. X
  185. X/*****************************************************************************
  186. X *                               setscroll                                   *
  187. X *****************************************************************************/
  188. Xpublic void setscroll(Widget w, float pos)
  189. X{
  190. X  /* This procedure takes a viewpoet widget, find's it's vertical scrollbar
  191. X   * sets the value of this to the position supplied, then calls the 
  192. X   * callbacks on that scrollbar to inform the viewport of the change.
  193. X   *
  194. X   * This is a *bit* of a hack, but I couldn't think of another way around
  195. X   * it without sub-classing the viewport widget.
  196. X   */
  197. X
  198. X  ViewportWidget  vw = (ViewportWidget) w;
  199. X  ScrollbarWidget sw = (ScrollbarWidget) vw->viewport.vert_bar;
  200. X  Arg arglist[1];
  201. X
  202. X
  203. X  XtSetArg(arglist[0], XtNtopOfThumb, pos);
  204. X  XtSetValues(sw, arglist, 1);
  205. X  XtCallCallbacks(sw, XtNthumbProc, sw->scrollbar.top);
  206. X  XtCallCallbacks(sw, XtNjumpProc, &sw->scrollbar.top);
  207. X
  208. X}
  209. SHAR_EOF
  210. chmod 0644 xdtm/scroll_hack.c ||
  211. echo 'restore of xdtm/scroll_hack.c failed'
  212. Wc_c="`wc -c < 'xdtm/scroll_hack.c'`"
  213. test 1816 -eq "$Wc_c" ||
  214.     echo 'xdtm/scroll_hack.c: original size 1816, current size' "$Wc_c"
  215. fi
  216. # ============= xdtm/xdtm.h ==============
  217. if test -f 'xdtm/xdtm.h' -a X"$1" != X"-c"; then
  218.     echo 'x - skipping xdtm/xdtm.h (File already exists)'
  219. else
  220. echo 'x - extracting xdtm/xdtm.h (Text)'
  221. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/xdtm.h' &&
  222. X/*****************************************************************************
  223. X ** File          : xdtm.h                                                  **
  224. X ** Purpose       :                                                         **
  225. X ** Author        : Edward Groenendaal                                      **
  226. X ** Date          : 18th Feb 1991                                           **
  227. X ** Documentation : Xdtm Design Folder                                      **
  228. X ** Related Files : menus.c                                                 **
  229. X *****************************************************************************/
  230. X
  231. X#ifndef _xdtm_h
  232. X#define _xdtm_h
  233. X
  234. X/* Current release of xdtm */
  235. X#define RELEASE       1
  236. X
  237. X/* Change SYSTEM_HELP to the path of your help file */
  238. X#define SYSTEM_HELP   "/usr/local/X11R4/lib/X11/xdtm/help"
  239. X
  240. X/* Change SYSTEM_XDTMRC to the path of your system config. file */
  241. X#define SYSTEM_XDTMRC "/usr/local/X11R4/lib/X11/xdtm/xdtmrc"
  242. X
  243. X/* You shouldn't need to change anything below here */
  244. X
  245. X#define DUMMY ~0
  246. X
  247. X#ifdef TRUE_SYSV
  248. X#ifndef USE_CWD
  249. X#define USE_CWD  /* True SYSV machines use getcwd NOT getwd */
  250. X#endif
  251. X#endif
  252. X
  253. X#include "patchlevel.h"
  254. X
  255. X/* UNIX include files */
  256. X#include <stdio.h>
  257. X#include <errno.h>
  258. X#include <string.h>
  259. X
  260. X/* Standard X11 include files */
  261. X#include <X11/Intrinsic.h>
  262. X#include <X11/StringDefs.h>
  263. X
  264. X#define private         static
  265. X#define public          /* global */
  266. X
  267. Xextern Arg chain_position[];
  268. Xextern Cardinal chain_size;
  269. X
  270. Xtypedef enum {NormalMode, CopyMode, MoveMode} Mode;
  271. X
  272. Xtypedef struct {
  273. X  int view_width;
  274. X  int view_height;
  275. X  XFontStruct *view_font;
  276. X  int delay;
  277. X  Boolean dironexit;
  278. X  String mode;
  279. X  String cffile;
  280. X  XFontStruct *dm_font;
  281. X} AppData, *AppDataPtr;
  282. X
  283. Xextern AppData app_data;
  284. X
  285. X/* Application Resources */
  286. X
  287. X#define XtNviewWidth "viewWidth"
  288. X#define XtNviewHeight "viewHeight"
  289. X#define XtNviewFont "viewFont"
  290. X#define XtNmode "mode"
  291. X#define XtNdirOnExit "dirOnExit"
  292. X#define XtNconfigFile "configFile"
  293. X#define XtNdmFont "dmFont"
  294. X#define XtNdelay "delay"
  295. X
  296. X#define XtCConfigFile "ConfigFile"
  297. X#define XtCViewWidth "ViewWidth"
  298. X#define XtCViewHeight "ViewHeight"
  299. X#define XtCMode "Mode"
  300. X#define XtCDirOnExit "DirOnExit"
  301. X#define XtCDelay "Delay"
  302. X
  303. X#endif /* _xdtm_h */
  304. SHAR_EOF
  305. chmod 0644 xdtm/xdtm.h ||
  306. echo 'restore of xdtm/xdtm.h failed'
  307. Wc_c="`wc -c < 'xdtm/xdtm.h'`"
  308. test 2222 -eq "$Wc_c" ||
  309.     echo 'xdtm/xdtm.h: original size 2222, current size' "$Wc_c"
  310. fi
  311. # ============= xdtm/xdtm.man ==============
  312. if test -f 'xdtm/xdtm.man' -a X"$1" != X"-c"; then
  313.     echo 'x - skipping xdtm/xdtm.man (File already exists)'
  314. else
  315. echo 'x - extracting xdtm/xdtm.man (Text)'
  316. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/xdtm.man' &&
  317. X.TH xdtm 1 "Version 1.4" "X Desktop Manager" 
  318. X.SH NAME
  319. Xxdtm \- graphical shell for X
  320. X.SH SYNOPSIS
  321. Xxdtm [ \f2\-cf\f1 configuration_file ] [ \f2\-delay\f1 time ] [ \f2\-dmfont\f1 font_name ] [ standard X options ]
  322. X.SH DESCRIPTION
  323. X.PP
  324. XThe X Desktop Manager is a graphical shell for the X Window System.
  325. XIt provides facilities to list directories graphically, view files,
  326. Xcopy, move, and delete files, and to launch programs.
  327. X.PP
  328. XIt comes with comprehensive help available from within the program, 
  329. Xthis should be consulted for instructions on how to use the program.
  330. X.PP
  331. XThe \f2\-cf\f1 option tells xdtm to use the following file as the 
  332. Xconfiguration file. If this file is not found xdtm will try the users
  333. Xhome directory for the file .xdtmrc, if that fails the system xdtmrc
  334. Xwill be used.
  335. X.PP
  336. XThe \f2\-delay\f1 option is used on systems with NFS mounted directories.
  337. XIt specifies the time in seconds to delay between updating a directories
  338. Xcontents and updating the directory listing within xdtm. A value of 1 second
  339. Xis usually enough unless the network is very heavily loaded. The valid range
  340. Xis between 1 and 5 seconds.
  341. X.PP
  342. XThe \f2\-dmfont\f1 option is used to specify the font to be used to list
  343. Xthe filenames in the directory list. Because this font is used in the 
  344. Xlong listing mode within which spaces are used to align the columns of data a
  345. Xfixed width font should be specified.
  346. X.PP
  347. XAny standard X Toolkit command line options may be used in addition to the
  348. Xones already listed above.
  349. X.SH DOCUMENTATION
  350. X.PP
  351. XFurther documentation may be found in the X Desktop Manual User's Guide, this
  352. Xis provided along with the version 1.4 sources in a format suitable for use
  353. Xwith an Apple Macintosh with Word 4.0.
  354. X.PP
  355. XExtensive online help is also available from within xdtm via the help menu
  356. Xoption. This help file may also be viewed from outside xdtm with a standard
  357. Xpager.
  358. X.SH DIAGNOSTICS
  359. XXdtm will display any standard error output from the commands it executes. 
  360. XIt will also complain about any errors in accessing files.
  361. X.SH FILES
  362. X.nf
  363. X~/.xdtmrc - User's configuration file
  364. X/usr/lib/X11/xdtm/icons - Directory containing xdtm icon bitmaps
  365. X/usr/lib/X11/xdtm/help - Help file
  366. X/usr/lib/X11/xdtm/xdtmrc - System configuration file
  367. X
  368. XNote: The files in /usr/lib/X11/xdtm may be in another directory, see
  369. Xyour system administrator to find out which.
  370. X.fi
  371. X.SH AUTHOR
  372. X.nf
  373. XEdward Groenendaal
  374. X
  375. XSchool of Cognitive and Computing Sciences,
  376. XUniversity of Sussex,
  377. XBrighton,
  378. XEngland.
  379. X
  380. XEmail: eddyg@cogs.sussex.ac.uk
  381. X.fi
  382. X.PP
  383. SHAR_EOF
  384. chmod 0644 xdtm/xdtm.man ||
  385. echo 'restore of xdtm/xdtm.man failed'
  386. Wc_c="`wc -c < 'xdtm/xdtm.man'`"
  387. test 2504 -eq "$Wc_c" ||
  388.     echo 'xdtm/xdtm.man: original size 2504, current size' "$Wc_c"
  389. fi
  390. # ============= xdtm/xdtmrc ==============
  391. if test -f 'xdtm/xdtmrc' -a X"$1" != X"-c"; then
  392.     echo 'x - skipping xdtm/xdtmrc (File already exists)'
  393. else
  394. echo 'x - extracting xdtm/xdtmrc (Text)'
  395. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/xdtmrc' &&
  396. X# -*- Mode: C -*-
  397. X# This is a sample .xdtmrc file.
  398. X#
  399. X# Edward Groenendaal.
  400. X# (additions by Henry Thomas)
  401. X#
  402. X
  403. X# Change this path to include the icon directories 
  404. Xset path = "/usr/local/lib/xdtm/icons";
  405. X
  406. X# Check the whole path or just filenames when doing RE matches.
  407. X# checking for just filename is a LOT quicker that on the whole path
  408. Xset checkpath=False;
  409. X
  410. X# Default icon in case all rules fail
  411. Xset deficon="file.icon";
  412. X
  413. Xif (type==dir) {
  414. X  set deficon="folder.icon";
  415. X  #if (name=="^\.$") {
  416. X  #  set icon="dot.icon";
  417. X  #}
  418. X  if (name=="^\.\.$") {
  419. X    set icon="dotdot.icon";
  420. X  }
  421. X  if (name=="^\.$") {
  422. X    set icon="folder.icon";
  423. X  }
  424. X  if (name=="^\..*") {
  425. X    set ignore;
  426. X  }
  427. X  if (name=="^X11$") {
  428. X    set icon="x.icon";
  429. X  }
  430. X}
  431. X
  432. Xif (type==block) {
  433. X  set icon = "block.icon";
  434. X}
  435. X
  436. Xif (type==character) {
  437. X  set deficon = "character.icon";
  438. X  if (name=="^tty.*") {
  439. X    set icon="tty.icon";
  440. X  }
  441. X}
  442. X
  443. Xif (type==slink) {
  444. X  set deficon = "slink.icon";
  445. X  # We are now checking the destination of the link 
  446. X  if (type==dir) {
  447. X    set icon="folder.icon";
  448. X  }  
  449. X}
  450. X
  451. Xif (type==socket) {
  452. X  set icon = "socket.icon";
  453. X}
  454. X
  455. X
  456. Xif (type==file) {
  457. X  set deficon="file.icon";
  458. X  if (name=="^\..*") {
  459. X    set ignore;
  460. X  }
  461. X  if (name=="^%.*") {
  462. X    set ignore;
  463. X  }
  464. X  if (name=="^#.*#$") {
  465. X    set ignore;
  466. X  }
  467. X  if (type==exe) { 
  468. X    set deficon="prog.icon";
  469. X    if (name=="^\..*") {
  470. X      set ignore;
  471. X    }
  472. X    if (name=="^%.*") {
  473. X      set ignore;
  474. X    }
  475. X    if (name=="^#.*#$") {
  476. X      set ignore;
  477. X    }
  478. X    if (name=="^xdtm$") {
  479. X      set icon="xdtm.icon";
  480. X    }
  481. X  }
  482. X  
  483. X# c source files
  484. X  if (name==".*\.c[~]*$") {
  485. X    set icon="ccode.icon";
  486. X  }
  487. X
  488. X# object files
  489. X  if (name==".*\.o[~]*$") {
  490. X    set icon="ocode.icon";
  491. X  }
  492. X
  493. X# c header files
  494. X  if (name==".*\.h[~]*$") {
  495. X    set icon="hcode.icon";
  496. X  }
  497. X
  498. X# yacc source files
  499. X  if (name==".*\.y[~]*$") {
  500. X    set icon="ycode.icon";
  501. X  }
  502. X
  503. X# lex source files
  504. X  if (name==".*\.l[~]*$") {
  505. X    set icon="lcode.icon";
  506. X  }
  507. X
  508. X# emacs lisp files
  509. X  if (name==".*\.el[~]*$") {
  510. X    set icon="elisp.icon";
  511. X  }
  512. X  if (name=="^.emacs$") {
  513. X    set icon="elisp.icon";
  514. X  }
  515. X  if (name==".*\.elc$") {
  516. X    set icon="elispc.icon";
  517. X  }
  518. X
  519. X# libraries
  520. X  if (name==".*\.a$") {
  521. X    set icon="lib.icon";
  522. X  }
  523. X
  524. X# manual pages
  525. X  set checkpath = True;
  526. X  if (name==".*/man[1-8l]/.*") {
  527. X    set deficon = "manpage.icon";
  528. X  }
  529. X  set checkpath = False;
  530. X
  531. X# compressed files
  532. X  if (name==".*\.[ZF]$") {
  533. X    set icon="z.icon";
  534. X  }
  535. X
  536. X# text source files
  537. X  if (name==".*\.txt[~]*$") {
  538. X    set icon="text.icon";
  539. X  }
  540. X  if (name==".*\.tex[~]*$") {
  541. X    set icon="text.icon";
  542. X  }
  543. X
  544. X# zoo, arc, zip files
  545. X  if (name==".zoo$") {
  546. X    set icon="lib.icon";
  547. X  }
  548. X  if (name==".zip$") {
  549. X    set icon="lib.icon";
  550. X  }
  551. X  if (name==".arc$") {
  552. X    set icon="lib.icon";
  553. X  }
  554. X
  555. X# sit, tar, shar files
  556. X  if (name==".shar$") {
  557. X    set icon="lib.icon";
  558. X  }
  559. X  if (name==".tar$") {
  560. X    set icon="lib.icon";
  561. X  }
  562. X  if (name==".sit$") {
  563. X    set icon="lib.icon";
  564. X  }
  565. X
  566. X# image files
  567. X  if (name==".p[pgmn]m$") {
  568. X    set icon="flower.icon";
  569. X  }
  570. X  if (name==".gif$") {
  571. X    set icon="flower.icon";
  572. X  }
  573. X  if (name==".ras*$") {
  574. X    set icon="flower.icon";
  575. X  }
  576. X
  577. X# sound files
  578. X  if (name==".au$") {
  579. X    set icon="mermaid.icon";
  580. X  }
  581. X
  582. X# Misc icons
  583. X  if (name=="^[Mm]ake[fF]ile[~]*$") {
  584. X      set icon="makefile.icon";
  585. X  }
  586. X  if (name=="^[iI][Mm]ake[Ff]ile[~]*$") {
  587. X      set icon="makefile.icon";
  588. X  }
  589. X  if (name==".*\.icon[~]*$") {
  590. X    set icon="icon.icon";
  591. X  }
  592. X  if (name=="^core$") {
  593. X    set icon="core.icon";
  594. X  }
  595. X
  596. X# application icons
  597. X  if (name=="^xdtm$") {
  598. X    set icon="xdtm.icon";
  599. X  }
  600. X}
  601. X
  602. X# application manager defaults
  603. X
  604. Xdefine "programming" = {
  605. X  { name = "emacs";
  606. X    icon = "emacs.icon";
  607. X    prog = "emacs !@";  # doesn't catch filenames in current dir
  608. X    options = MSEL;     # emacs's fault not mine...
  609. X  }
  610. X  {
  611. X    name = "C Debugger";
  612. X    icon = "prog.icon";
  613. X    prog = "xterm -T 'Gnu C Debugger' -e gdb !@";
  614. X    options = OSEL;
  615. X  }
  616. X  {
  617. X    name = "Make All";
  618. X    icon = "make.icon";
  619. X    prog = "xterm -e sh -c 'make | less'";
  620. X    options = NSEL;
  621. X  }
  622. X  {
  623. X    name = "Make etags";
  624. X    icon = "make.icon";
  625. X    prog = "make etags";
  626. X    options = NSEL;
  627. X  }
  628. X  {
  629. X    name = "Make Clean";
  630. X    icon = "make.icon";
  631. X    prog = "make clean";
  632. X    options = NSEL;
  633. X  }
  634. X  { 
  635. X    name = "Make Makefile";
  636. X    icon = "make.icon";
  637. X    prog = "xmkmf";
  638. X    options = NSEL;
  639. X  }
  640. X}
  641. Xdefine "misc" = {
  642. X  { 
  643. X    name = "X Clock";
  644. X    icon = "clock.icon";
  645. X    prog = "xclock";
  646. X    options = NSEL;
  647. X  }
  648. X  {
  649. X    name = "X Bitmap";
  650. X    icon = "piccy.icon";
  651. X    prog = "bitmap -nodashed !@";
  652. X    options = OSEL;
  653. X  }
  654. X}
  655. X
  656. Xdefine "games" = {
  657. X  {
  658. X    name = "Nethack";
  659. X    icon = "ghost.icon";
  660. X    prog = "xterm -T 'Nethack' -e nethack";
  661. X    options = NSEL;
  662. X  }
  663. X}
  664. X
  665. Xdefine "editing" = {
  666. X  {
  667. X    name = "X Terminal";
  668. X    icon = "prog.icon";
  669. X    prog = "xterm -T 'X Terminal'";
  670. X    options = NSEL;
  671. X  }
  672. X  {
  673. X    name = "Spell Check";
  674. X    icon = "prog.icon";
  675. X    prog = "xterm -T 'Spell Check' -e ispell !@";
  676. X    options = MSEL;
  677. X  }
  678. X  {
  679. X    name = "Edit : vi";
  680. X    icon = "dragon.icon";
  681. X    prog = "xterm -T 'Vi' -e vi !@";
  682. X    options = OSEL;
  683. X  }
  684. X  {
  685. X    name = "Edit : Emacs";
  686. X    icon = "emacs.icon";
  687. X    prog = "xterm -T 'Emacs' -e emacs !@";
  688. X    options = MSEL;
  689. X  }
  690. X  {
  691. X    name = "Edit : Ved";
  692. X    icon = "alien.icon";
  693. X    prog = "xterm -T 'Poplog Ved' -e ved !@";
  694. X    options = OSEL;
  695. X  }
  696. X  {
  697. X    name = "Word Count";
  698. X    icon = "wordc.icon";
  699. X    prog = "xterm -T 'Word Count' -e sh -c 'wc !@ | less'";
  700. X    options = MSEL;
  701. X  }
  702. X}
  703. X
  704. Xdefine "rlogins" = {
  705. X  {
  706. X    name = "TSUNA";
  707. X    icon = "fish.icon";
  708. X    prog = "xterm -e rlogin tsuna";
  709. X    options = NSEL;
  710. X  }
  711. X  {
  712. X    name = "CSTE";
  713. X    icon = "snail.icon";
  714. X    prog = "xterm -e rlogin cste";
  715. X    options = NSEL;
  716. X  }
  717. X  {
  718. X    name = "LUCRETIA";
  719. X    icon = "mermaid.icon";
  720. X    prog = "xterm -e rlogin lucretia";
  721. X    options = NSEL;
  722. X  }
  723. X}
  724. SHAR_EOF
  725. chmod 0644 xdtm/xdtmrc ||
  726. echo 'restore of xdtm/xdtmrc failed'
  727. Wc_c="`wc -c < 'xdtm/xdtmrc'`"
  728. test 5773 -eq "$Wc_c" ||
  729.     echo 'xdtm/xdtmrc: original size 5773, current size' "$Wc_c"
  730. fi
  731. exit 0
  732.  
  733. --
  734. Dan Heller
  735. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  736. Senior Writer                President          comp-sources-x@uunet.uu.net
  737. argv@ora.com                 argv@zipcode.com
  738.