1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
Ion dock module
Copyright (c) Tom Payne 2003
Copyright (c) Per Olofsson 2003
by Tom Payne <ion@tompayne.org>
based on code by Per Olofsson <pelle@dsv.su.se>
INTRODUCTION
This module provides a dock for the Ion window manager.
Features:
- supports most dockapps
- configurable layout
- configurable dockapp order
- supports shaped dockapps
- uses ion's drawing engine
DEPENDENCIES
ion3
USAGE
1. Copy the configuration files cfg_dock.lua and dock-draw.lua to
your ~/.ion3 directory. Edit cfg_dock.lua and dock-draw.lua to
suit your preferences.
2. Add load_module("mod_dock") to ~/.ion3/cfg_ion.lua.
3. Add include("dock-draw.lua") near the end of ~/.ion3/draw.lua,
before gr_refresh().
4. (Re)start ion3.
CONFIGURATION
See the comments in cfg_dock.lua and dock-draw.lua.
KNOWN BUGS
Not all dockapps dock. This is because dockapps use a variety of methods
to signal that they are dockapps and the dock doesn't yet
recognise all of them. If your favourite dockapp does not work then
please inform the author (email address at top of file).
The following dockapps are known to have problems:
- gkrellm2 can have the wrong shape if it is started after the dock
module is loaded.
- wmxmms needs a winprop{...}. See the example cfg_dock.lua. Ion
complains: Client window "wmxmms" has broken transient_for hint.
("Extended WM hints" multi-parent brain damage?).
IMPLEMENTATION NOTES
If you would like to help improve the dock then the following
notes might be useful.
You should use folding in your editor when you edit/view the source
code. The code follows ion's coding standards, but there are many more
folds. VIM and Emacs both support folding.
Dockapps use a variety of methods to signal to the window manager that
they are a dockapp. Ion automatically detects some (see
manage_clientwin() in ioncore/clientwin.c), and the dock detects
some others (see dock_clientwin_is_dockapp() in dock.c). Adding more
dockapp types will require editing these functions and possibly writing
type-specific management code.
The dock should really implement region_save_to_file()/region_load() to
maintain state over a restart and session management. However, over
restart a new dock will also be created by cfg_dock.lua, meaning that there
will be multiple docks on the same screen. The solution is probably to
automatically create docks as they are required, with cfg_dock.lua
specifying the default configuration of new docks but not actually
creating any docks.
As far as I can tell the gkrellm2 problem is a race condition and the
sequence of events is as follows:
1. gkrellm2 starts and gets added to the dock with is initial geom.
2. gkrellm2 grows as it loads plugins.
3. The dock allocates more space to gkrellm2 and requests
gkrellm2's new shape, but gkrellm2 reports its old shape.
4. Further requests to gkrellm2 return is new (actual) shape, but by
now it's too late...
Any assistance in fixing this bug would be much appreciated.
AUTHORS
Tom Payne <ion@tompayne.org>
Per Olofsson <pelle@dsv.su.se>
LICENSE
This program is licensed under the terms of the Lesser General Public
License (LGPL) version 2.1. See the file COPYING for details.
|