

Hi Folks!

This is a desktop JUST FOR FUN AND WITHOUT ANY PURPOSE!
I didn't try to copy something that you can buy at other
sources (Apple,Microsoft...) and I have no aim to
produce another XY-Windows clone. It was just the problem
that I wanted to do with only a few mouseclicks:

  - get a combined display of selected files like
    "work*.[ch] inc*.[ch]", that
    displays all sources and header files that begin with
    "work" and "inc"
  - delete "rubbish"
  - view dvi-files
  - edit, compile and test programs
  - start my own user interface generator (xbw) and let it build
    user interfaces directly from the standard X11-Shell
  - create symlinks a bit easier and see that it works
  - sort files and directories apart from each other like the
    GEM desktop that I've got used to in the old DOS-days
  - decompress *.Z files directly
  - tar and extar directory trees directly with complete paths
    (sort of backup)
 
Advanced features:
  - create your standard working directory and have
    a lot of symlinks there (esp. directories!).
    So your standard workplaces are just a mouseclick
    away (!).
  - easy and fast configuration; only addition of new
    icons requires editing a configuration file
    (.xdesktop); all other options can be set up
    "on the fly"

Twobutton operation:
  - left mouse button will start the standard action
  - right mouse button will display a standard menu
    with a few entries; skip action by pressing <ESC>
  - (middle button) (future expansion: will show
    another menu of user-dependent functions)
 
Some tasks run in PARALLEL, so don't worry if the desktop
continues to work after a program start. The directory
contents are correct ONLY DIRECTLY AFTER DISPLAY;
no checks are made if directory contents have
changed. But to be right in most cases, xdesktop does
redraw its contents every time when
  - it gets an expose event
  - its window is being entered (watch the clock cursor
    appear and disappear)

If the redrawing function is being called more than
once in every two seconds, it will NOT clear the window
pane before redrawing (to smoothe out the apperance
of xdesktop); so if the number of files
changes too rapidly, it is possible that the
last icons in the display will not be removed. To
be on the right side in most cases, xdesktop blanks
out the space after the last icon; so deleting
a single file will always cause a correct display.
The only times when the display is completely redrawn are:
  - last update is older than 2 seconds
  - you have pressed a mouse key; that will ALWAYS
    redraw the window, becaus I assume that you
    are WORKING with files. Commands that delete or
    create a lot of files should not be run in parallel
    (as already preprogrammed for "delete")

A lot of operations on different filetypes can be
configured; here are some examples:

Filetype        |  Files                       | Action after mouseclick
===========================================================================
 F_TYPE_UNKNOWN |                              | show start of file
 F_TYPE_C       | *.c                          | start origami and edit
 F_TYPE_H       | *.h                          | start origami and edit
 F_TYPE_MTA     | *.mta                        | start XSh (my own shell)
 F_TYPE_TEX     | *.tex                        | start LaTeX
 F_TYPE_LJ      | *.lj                         | copy to /dev/lp1
 F_TYPE_O       | *.o,*.aux,*.lof,*.log,*.toc  | erase; w/without question
 F_TYPE_XBM     | *.xbm                        | use pbmplus and xpaint to edit
 F_TYPE_BAK     | *~,*.bak                     | erase; w/without question
 F_TYPE_WRK     | Makefile,Imakefile           | start make
 F_TYPE_INF     | READ*                        | start joe and edit
 F_TYPE_EXE     | <Executables>                | execute
 F_TYPE_PRJ     | *.prj                        | start XSh
 F_TYPE_Z       | *.Z                          | uncompress
 F_TYPE_DOS     | *.com,*.exe,*.bat,*.sys      | <none>
 F_TYPE_DVI     | *.dvi                        | start xdvi
 F_TYPE_MFX     | *.mfx                        | start origami and edit
 F_TYPE_PROJ    | project                      | start origami and edit
 F_TYPE_FIG     | *.fig                        | start xfig and edit
 F_TYPE_GIF     | *.gif                        | start xloadimage and view
 F_TYPE_XBLD    | build.mta (XSh Makefile)     | start my XSh and MAKE a User Interface
 F_TYPE_TAZ     | *.taz                        | exec "tar zxvf name.taz"

To use this desktop effectively, you will need ORIGAMI,
a folding editor. It makes your complete project
available by editing the "project" file
(thanks to Borland for this idea).
If you don't own that editor, create a symbolic
link to your own ;-(. But that will most probably
cost the loss of a simple and effective way of
managing large projects.
 
###############################################################
Recommended path setting for source code:
 
/src/unix/xdesktop
###############################################################

If you like to have the xdesktop sources somewhere else, you
could have to change a few #includes.

just do
  # cd /src/unix/xdesktop
  # make
 
and see if it's worth waiting for the desktop that will
appear on screen if the Makefile works out correct.

Make then sure that "trm" and "execw" are accessible (put
them into /etc/ and /bin/).
 
trm:    creates a standard xterm
execw:  executes anything and waits for a <CR>

 
Short but complete documentation for the buttons on top of the window
=====================================================================

xterm      - starts up a new xterm; uses the trm script
cd /work   - this is my idea of a standard directory for
             all actual working subdirectories; these
             are symlinked into the work directory, so
             that backup can be organized in another way
             than your work (skip scratchfiles etc);
             also, it's a lot faster to find your
             actual working directory, if you have to
             handle large projects
command    - enter a single commandline; it will be
             executed while xdesktop waits for
             completion
no icons   - turn icon display on/off
  /icons
small      - shrink/expand window display
  /big
task       - start a parallel running (X11-) task
Config     - set xdesktop into config mode; see below; toggle

Click on the directory path, and you may enter one ore more
file specs to include in the display (default is "*")
 
The following buttons will change color after successful operation:
-------------------------------------------------------------------
DOS /a/    - execute "mount /dev/fd0 /a/ -t msdos"
"UMOUNT"   - execute "umount /dev/fd0"
Ask:Del?   - prompt/don't prompt before killing your files; 
             if "DELETE!" active, the
             "(if'...' '..')" (see below) command will be treated as if 
             you said "YES"; that extends to ANY if command, so
             be careful...
+Rubbish   - show/hide scratch files
+Unknown   - show/hide files with unknown type
+Backups   - show/hide backup files

Leave xdesktop:
---------------
exit       - asks if true and then exits/resumes program
 

REMARK
======
You will almost absolutely surely fail to get the
idea of the sourcecode if your'e not using
ORIGAMI. That thing is recommended.

REMARKS
=======
 
Sorry for that absolutely unreadable sourcecode.
But
  - it took only 30 hours to do that job
  - source contains all important functions
      for such a job. Max be it's a toolkit
      for somebody else's better implementation
  - I didn't use X Toolkit Intrinsics; that made
      it fast to do (but unreadable)

REMARK
======
Most of the sample documents are empty; don't wonder if
nothing happens when clicking them.

REMARK
======
If you selectet "Ask:Del?",
xdesktop will NOT ask any questions when operating (esp. DELETING)
files; this means that the (if...) command
will be ignored (see below).

DONT FORGET:
xdesktop deletes directory TREEEEES, not only empty directories!
So you'd better be careful when deleting /usr....
Only Eksperds always say "YES".

 
Sorry for the bunch of german words in the listing; I should have used a
dictionary before creating variable names... Another effective way
could have been to learn a LANGUAGE...


FUTURE EXPANSION
================
COULD anybody add a scrollbar to view more than these files? The necessary
counter is actually somewhere in the context; but I didn't have the time
to create a nice looking scrollbar...


SO LONG
=======

Don't bother too much about XSh; in the future you
may see that thing; it's still in development.

I hope you get xdesktop running without severe problems.
(Deleting the complete file system COULD be a severe
problem...)


ADDITIONS
=========

Configuring xdesktop
1. Create //.xdesktop by copyind /.../xdesktop/.xdesktop
2. Edit the lines labeled "StandardIcon" and enter your
   filenames (190 chars max)
3. a) if you have entered relative pathnames: start xdesktop
      from a directory where the icon bitmaps can be found
   b) if you have entered absolute pathnames:
      start xdesktop from where you like
4. Click "Config"; this will change xdesktop in
   configuration mode
5. Click at any file or directory you like; use left or
   right button; xdesktop will prompt for your
   configuration entries (i.e. mostly the label, icon file
   name and required action);
   REM: trm is a batch that opens up a standard xterm;
        this will be needed for ASCII-oriented
        operations
   REMREM:
        "Local Setup" reads & writes ".desktop"
        "Global Setup" reads & writes "//.desktop"
   REMREMREM:
        If xdesktop finds a ".xdesktop" file after
        directory change, it will prompt for opening
        it; if you choose "Global", xdesktop
        will read "/.xdesktop" instead.
   REMREMREMREM:
        For just copying files etc., you should
        consider using "xfm" instead; xdesktop
        is especially useful in TeX-oriented
        environments.
   REMREMREM...REM:
        Imagine clicking at file "filename.ext" in directory
        "thepath"; shown are sample actions for the file
        "filename.ext":
 
        * * * X11-Programs * * *
        xpaint (tf)            - execs "xpaint filename.ext"
        xpaint (lf)            - execs "xpaint /thepath/filename.ext"
        xpaint (tn)            - execs "xpaint filename"
 
        * * * ASCII-Oriented Programs * * *
        trm -exec "joe (tf)" & - opens up an xterm with joe editing
                                 your file
 
        * * * MISC Commands * * *
        (if'You want to kill (tf)?' 'Please answer') rm (lf)"
          - execs Ask if you want...
            If Yes, exec "rm /thepath/filename.ext"
            REMEMBER: if "DELETE!" button is active, (if...)
                      will be treated always as if you
                      said "YES"!! be careful!
        mkdir (qf'Create new directory' 'Please enter name')
          - execs Ask for a name
            exec "mkdir name"
 
        You may use if and qf together; answering "No" stops the
        whole execution of that command line;
 
        BEWARE:
        Thanks to my ingeniously programmed interpreter, you must
        be careful with placing the "'", "(" and ")" characters;
        no additional spaces or changes in their positons
        are allowed (yes, I COULD do a better job...).
        SO, always say  (if'saywhatyouwant' 'saywhatyouwant')
                   and  (qf'saywhatyouwant' 'saywhatyouwant')
        DON'T:
            (if 'saywhatyouwant' 'saywhatyouwant')
            (qf'saywhatyouwant''saywhatyouwant')
            (if'saywhatyouwant' saywhatyouwant')
            (qf'saywhatyouwant' 'saywhatyouwant)
            etc...                                   (I've told you)
 
        The ampersand will let you contine working with xdesktop
        while joe edits your file; if you like to open an xdesktop
        every time you click on an icon, you can skip the
        ampersand... ;=)

ADDITIONAL GREAT BENEFITS OF xdesktop:
        stripl, an executable that strips off the ^M of MSDOS ASCII files
        umlaut, an exec that changes DOS German chars to TeX german
                chars

Lotsofunandsolong, Hendrik
 



Changes in Version 2.1:
        - Changed configuration file name from ".xdesktop" to "Xdesktop.res";
          clicking the icon will cause xdesktop to load that setup

        - You may specify a file name as command line parameter;
          that file contains setup parameters for xdesktop ("Xdesktop.res");
          these parameters will be loaded at program start time

        - Because the global config is in "//Xdesktop.res", i've changed
          xdesktop so that it will not always ask for loading this config
          when stepping through the root directory (occurs quite often)
     
        - Don_t forget to "mv Xdesktop.res //Xdesktop.res" (symlink will be ok)

	- Just in case someone wanty to play with the Xdesktop.res files,
          I added the commands "(LoadSetup)" and "(SaveSetup)";
          Example:
              (LoadSetup) (tf)       - Load setup from clicked file 
	      (LoadSetup) (tn).DEF   - The clicked file gives only the NAME;
				       EXT will generally be .DEF

Andasialreadysaidlotsofunandsolong, Hendrik




