home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.freefriends.org
/
ftp.freefriends.org.tar
/
ftp.freefriends.org
/
arnold
/
Source
/
gwm-dist.tar.gz
/
gwm-dist.tar
/
README.profile
< prev
Wrap
Text File
|
1993-08-01
|
10KB
|
192 lines
How to customise the gwm profile.
Assuming you have already taken care of installing gwm itself, and installed
the Blit font (if you don't want to do that, you may want to find references
to it in our code and change them), you now need to set up our code which
makes gwm do the somewhat-mux-like environment. That code MUST be customised
for your site before you can use it, but the customisations are limited to
one file and should be easy. This file tells you what to do and assumes
that you can type "gwm" and get gwm to run in your X environment using
the gwm default profile.
First, create the directory "gwm" in your home directory. This will be
searched by gwm automatically; you need do nothing special to get that
to happen. Then, copy all the files from the "home-gwm" directory that
you obtained when you extracted the distribution tar file into $home/gwm.
NOTE: There is one file in there whose name starts with a dot, namely,
".profile.gwm". Make certain you get that one.
The basic operation of the Blit profile should be introduced here.
Windows have three-pixel borders and no other decoration. The outer
one pixel is always black, for contrast. The inner two pixels are
black if the window is the `focus window' (i.e., if it has the `mouse
focus', an artifact of our code, and the X input (keyboard) focus).
Otherwise, they are white. Unlike with other X window management
styles, you can NOT interact with a window with the mouse unless it
is the focus window.
There are no "real-estate" considerations. Moving the mouse cursor
never matters to the window manager unless you press buttons.
The window manager grabs Buttons 1 and 3 except when the mouse is over the
focus window. Clicking Button 1 over a window which is not the focus
window will raise it and make it the focus window. (Over the focus
window, Button 1 is not grabbed and so is passed to the X client.)
Clicking Button 1 over the root window is a no-op.
If the current window becomes unmapped for any reason (say, you
destroy it or iconify it, or its client crashes), the focus will
revert to the window that most recently had the focus before the
current window acquired it.
Pressing Button 3 anywhere outside the focus window will give you the
window manager's "Button 3 menu". (Over the focus window, Button 3 is
not grabbed and so is passed to the X client.) The popup has the
(hopefully useful) feature that it pops up with the same selection
under the mouse as the one you last visited, unless this is impossible
due to screen real-estate considerations. To drop the menu without
doing anything, move the cursor outside the menu as usual before
releasing the button. The selections highlight when you visit them.
(All very standard popup-menu stuff. "sam" users will have no problem.)
Here is a tour through the Button 3 menu. You can cancel any operation
that results in a target cursor by clicking Button 1 or 2, or confirm
it by placing the target over the window to be affected and clicking
or pressing and holding Button 3.
New: Create a new window. Gives a popup of machines. Click outside
the popup to cancel the creation.
Reshape: Unfortunately un-Blit-like. Use the target cursor to shoot
the corner of the window you want to drag, and hold it down
while dragging. Raises the window.
Tromp: Iconify a window or de-iconify an icon. Shortcut this by
clicking Button 2 over an icon. (Button 2 is not grabbed
anywhere except over icons. You can also pick icons up and
drag them around with Button 1. We inherited these latter
from Colas and found them acceptable.)
Move: Like mux. Warps the cursor to the upper left of the window
to be moved; you drag it on Button 3 with the sweep cursor
and release when satisfied with the new location. We
deliberately do not grab the server during this operation,
so if you move the outline across windows that are having
stuff drawn in them, it will leave tracks. (You can
customise this if you wish.) Warps the cursor to the centre
of the moved window when the move is complete. Raises the window.
Top: Raises the window you shoot.
Bottom: Lowers the window you shoot.
Current: Makes the window you shoot the focus window without changing
the stacking order. (So, Button 1 is like a Current and a Top
combined, and Move and Reshape imply Top.)
Push: A different kind of Move. You almost never need this but when
you need it, you need it _badly_. In the Blit world, windows
can't be larger than the screen; in the X world, they certainly
can. All that cursor-warping doesn't help you if you need to
move a window that's larger than the screen, although it's
good for general usability. This gets you a "push cursor"
which is attached to the window you shoot and lets you drag
it around as long as you hold Button 3 down.
Delete: ICCCM-conforming client delete.
This may seem like a lot, but it's very easy to use. Try it out
once you've customised the profile and you'll see it is simple.
The advantage of it is that you don't waste screen real-estate
on all those horrendous decorations, title bars, gadgets, etc.
The window manager also grabs two modified buttons: Alt-Button 1 and
Alt-Button 3. After a short while, you will probably find that
some clients raise fine when you click on them with Button 1 but
they refuse to take the focus: their border doesn't go black, and
you get a beep. This means that either the client is broken and hasn't
set its hints correctly (usually), or (almost never) the client
actually doesn't accept input, even with the mouse, and so it
makes no sense for it to have the focus. Until you fix recalcitrant
clients, you can use Alt-Button 1 (grabbed only if the mouse is
not over the focus window) to force them to take the focus even
though their hints say they don't want it. Alt-Button 3 is grabbed
everywhere and gives a popup of seldom-used and debugging operations
which you can explore for yourself; "End" will exit gwm.
(All this can be customised fairly painlessly if you find that
we've grabbed your application's favourite combination. That's
left as an exercise for the reader.)
Now we proceed to tell you how to localise the files. In $home/gwm,
you need to edit .profile.gwm to reflect your local conditions. This
is fairly easy. You'll get the hang of it as you go along. You can
examine Colas's wool source, especially .gwmrc.gwm, if you want to know
more. (The reference manual is fairly unenlightening unless you
actually intend to write substantial wool yourself.)
":" is an assignment function like "setq", so
(: root-cursor blit-arrow)
sets the root window's cursor to be an arrow like that on the Blit.
You could comment that out if you want to leave the root cursor
unchanged, or you could set it to something else by adding the bitmap
files to your gwm directory where "cursor-make" can find them
(read this while looking at .profile.gwm and it will make sense).
You can uncomment the assignment to "screen-tile" if you want gwm to
tile the root window for you.
Now you need to add machine names. You must edit the assignment to
"local-machines" to reflect the unadorned (domainless) names of the
machines you feel likely to run gwm on. They will all appear in the
menu you get when you select "New" on the Button-3 menu, with "."
at the top always meaning "here", i.e. the machine gwm is running
on. In addition to that, you can add machines which you would like
to spawn xterm on remotely using an "rxterm" command, and machines you
would like to run xterm for locally but spawn either rsh or telnet to
connect to the machine in the new window. You do these with the
assignment that appends to "xterm-list", and the assignments to
"xterm-rsh-list" and "xterm-telnet-list" respectively. You can
supply domains on those names if you wish; they will appear
unadorned in the "New" menu but the domains will work. Note
that those names can just be wool symbols but that the names
in "local-machines" must be wool strings, i.e. each enclosed
in double quotes. "xload-list" is not supported by our profile.
"Tromp" is a coinage meaning "toggle iconification state".
"no-trompall-classes" is a list of strings matching application
classes that should be unaffected by the "All" operations on
the Alt-Button 3 menu. "tty-window-classes" is a list of strings
matching application classes that should automatically receive
the focus on window creation; windows of other classes don't.
"want-kill-session" controls whether you want a "Kill Session"
entry on your Alt-Button 3 menu. (You will need to make that
work for yourself if you want to use it.)
Skipping down the file, the call to "no-legend" lists application
classes that can be relied on to supply their own icons (which
should be displayed unmodified by the window manager). You
can use the "set-icon" and "set-icon-window" stuff to control
icon appearance. (Experiment.)
"(set-placement ... user-positioning)" labels an application class
that you want to place it manually unless there was a user-specified
geometry in the hints. "(set-icon-placement ... self-placement)"
means that the window manager should use the application's
icon geometry hints -- this is for applications that you
typically (a) keep normally iconic; (b) normally run only one
of which lasts your whole session. Say, "xman". Otherwise,
the icon geometry is ignored and the manager places the icon in
a stack; by default, along the right-hand edge of the screen,
growing downwards and to the left if space runs out. (Oh,
the numbers here are good for a 1280 x 1024-pixel screen.)
Good luck, have fun, and experiment. Mail me if you can't
figure it out.
John Mackin <john@civil.su.oz.au>, or <john@physiol.su.oz.au>
2 August 1993