Toybox 1.3 - and icon-manager with colour pixmaps.
Requires Motif, the Xpm-library and a C++ compiler to build.
Works under [v]twm (see below), ol[v]wm and mwm.
Changes from 1.2 to 1.3:
Works with [v]twm, ol[v]wm and mwm :
To make it work with [v]twm, include "IconifyByUnmapping",
"NoIconManagers" in your .[v]twmrc file to make [v]twm
not produce an icon when a window is iconified - toybox will
handle it. Also if you're using Doors and their names are
(say) door1, door2 etc. then insert the following lines
into your .Xdefaults:
toybox*door1: DONT_SHOW
toybox*door2: DONT_SHOW
! in general, use : toybox*<door-name>: DONT_SHOW
The lines above tells toybox not to produce an icon for
the doors that you use. You may also want to get rid of
the icon-manager that comes with [v]twm. See the man-page
of twm for details.
To make toybox work with ol[v]wm, you may want to get rid of
the flashing lines ol[v]wm draws when windows are iconified.
To do this, add these lines to your .Xdefaults:
olwm*IconFlashCount: 0
olwm*IconFlashOnTime: 0
! use "olvwm" instead of "olwm" if you use olvwm.
See the man page for ol[v]wm for details.
You might also like to set toybox*overrideRedirect: True or,
if you're using [v]twm, include "toybox" in the list of windows
specified in the "NailedDown" list in your .vtwmrc file.
This is so that the window-manager doesn't wait for you to
place the window and toybox will persist across all parts of your
virtual-desktop in [v]twm. You also might like setting:
toybox.x: 0
toybox.y: 0
! to make toybox appear at the origin .
Toybox now supports transparent windows - getting rid of that
needless opaque window the icons were sitting in. Define
HAVE_SHAPE_EXTENSION when building. See instructions below
on how to check if your version of X supports the SHAPE
extension.
You are advised to use the SHAPE extension if you have it.
New resources:
toybox*floatOnRoot: YES
or:
toybox*floatOnRoot: NO
enables or disables transparent windows. Effective only when
toybox is built with HAVE_SHAPE_EXTENSION defined.
toybox*layoutPolicy: top_left
or bottom_right or right_top or left_bottom etc.
but *not* top_bottom, left_right, bottom_bottom etc.
Changes from 1.1 to 1.2:
New resources:
toybox*window-title-15chars-max: DONT_SHOW
tells toybox not to produce an icon for that window.
The semantics when windows change names is still undefined.
ie I still haven't made up my mind!
Clicking the right-mouse-button raises the corresp. window,
mapping it first, if necessary.
Shift and Button3 on an icon will delete it - you can't get it back!
Deleting all icons with Shift+Button3 will make toybox restore
(as best it can) mwm's original icons and then exit.
Note: Toybox is provided "as-is", without any express or implied
warranty. In no event will the author be held liable for any damage
arising from the use of this software.
If you would like include some of your own enhancements/changes,
please email me at thc2@doc.ic.ac.uk and we could work something
out.
To build toybox,
1. build Xpm-library(get this from export.lcs.mit.edu:/contrib
if you need to. It builds pretty easily ).
Take note of where the library called libXpm.a is built, along
with xpm.h and xpmP.h.
2. Check to see if your version of X has the SHAPE extension:
Look into /usr/include/X11/extensions/ for a file called
shape.h. If it's there, add "-DHAVE_SHAPE_EXTENSION" on the
command-line when building. If you're not sure whether or not
you have the SHAPE extension, try running "xeyes" and see if
it has a transparent, non-rectangular window. If it does, then
you have the extension.
Type:
<name-of-your-C++-compiler>
-DHAVE_SHAPE_EXTENSION
-O -o toybox toybox.cc
-I<directory-where-the-XPM-header-file-is>
-L<directory-where-libXpm.a-is>
-lXpm -lXm -lXt -lXext -lX11
Exclude "-DHAVE_SHAPE_EXTENSION" if your version of X
doesn't support the SHAPE extension. You're advised to
use the SHAPE extension if possible.
eg. (a) g++ -O -o toybox toybox.cc -I/usr/include/ -L/usr/lib/
-lXpm -lXm -lXt -lXext -lX11
or:
(b) g++ -O -o toybox -DHAVE_SHAPE_EXTENSION toybox.cc -I/usr/include/
-L/usr/lib -lXpm -lXm -lXt -lXext -lX11
if you have g++ and xpm.h,xpmP.h are in /usr/include and
libXpm.a is in /usr/lib. Use (a) if you don't have the
SHAPE extension, (b) otherwise.
3. Inspect the file called Toybox. It contains sample
X defaults for toybox. The format of some of the defaults
is like this:
toybox*<name-of-the-window>: <full-path-name-of-XPM-file>
The <name-of-the-window> should be replaced with the
string that appears below the image in toybox's window.
To find out the string needed, run toybox first and
then the program with the desired window. Check to see
the name that toybox labels the image with and use that.
The string is 15 chars max. To change this, change the
#define in toybox.cc.
To register the default XPM-file to use, change the right-
hand-side of the line that says
toybox*defaultPixmapFile: <right-hand-side>
to the full pathname of the default XPM-file.
Other defaults:
toybox*<name-of-the-window>: DONT_SHOW
tells toybox not to produce an icon for that window.
toybox*floatOnRoot: YES
or:
toybox*floatOnRoot: NO
enables/ disables transaprent windows.
toybox*layoutPolicy: top_left
or bottom_right or right_top or left_bottom etc.
but *not* top_bottom, left_right, bottom_bottom etc.
Specifying "bottom_right" means that icons will stay
as close to the "bottom" as possible and to the
"right" as far as possible, in that order.
Only meaningful when floatOnRoot is "YES".
Experiment with top_right, right_top to see the
difference.
In the distribution, you will find some sample XPM-files
that can be used with toybox in the pixmaps/ directory.
Some of them are referred to in the X-defaults file, Toybox.
Change the pathnames as appropriate.
Once you have modified the file "Toybox", append it to
your .Xdefaults and use xrdb to register these resources.
eg. xrdb -load ~/.Xdefaults
4. Toybox is ready to run! Type "toybox".
Note: To make your own XPM-files to use with toybox,
build "grabber" :
Change the #include for xpm.h in grabber.cc to
the appropiate path-name of xpm.h
Type: g++ -O -o grabber grabber.cc
-I<directory-where-XPM-header-file-is>
-L<directory-where-libXpm.a-is>
-lXpm -lX11
To run grabber, just type "grabber name-of-file"
and draw a rubber-band rectangle over the region of
the screen you want to save by pressing the
left-mouse-button at the top-left-hand corner of the
region and dragging the mouse until the rectangle drawn
covers the area you want to grab.
Let the mouse-button go and the
area covered in the rectangle will be saved in
<name-of-file>.
Email any suggestions/bug-fixes/kludge-zappers to:
thc2@doc.ic.ac.uk
There will be the odd bus-error or two. If you think you have
found a memory-leak/bug in toybox, please feel free to email me.
No flames, please.
Tse Huong Choo
Dept of Computing, Imperial College,
180 Queens Gate, South Kensington,
London SW7 2BZ, London, UK.
[ Thanks to: Kenneth "N." Flaxman <kenlaw!knf@uunet.UU.NET> for
some bug-fixes ... keep 'em coming! ]
|