[dwm] The wmii layout and some help bout the mailing list

From: QUINTIN Guillaume <coincoin169g_AT_gmail.com>
Date: Wed, 02 Jul 2008 14:54:41 +0200

Hi

Each time I want to post I start a new thread, how do I do to answer
somebody ?

@Anselm :

Well, adding a void* aux to the Client structure sounds like a good idea
but it is a first step towards adding "official" (or simply more
advanced) support for plugins, I think. I mean that you will have to add
an argument to the function lt->arrange indicating to the layout arrange
function what action was performed on the window. This way no
modification of the file dwm.c is needed, the patch (or plugin) can hold
in a separate .c file with an #include only in the dwm.c. I think that
it is a choice that has to be done. Plus, it won't add many lines (well
to be sure I should try it !). This way no modification of the dwm.c
(just an #include !).

To do with the current version without modifying the dwm.c. It is
"simple". I thought of that before. It suffices to add a "compare"
algorithm which compare the wtable and the clients linked list to see if
some windows were added or deleted or simply moved into another tag, etc
... But such an algorithm is (not complicated to write) long in terms of
line of code and it will take much more memory than hooking into the
dwm.c (That's why I decided not to implement it). In some way the
wlayout function is a beginning of the algorithm. It checks if the
windows tag has changed in the clients linked list and report the
changes to the wtable.

For the lt[sellt]->arrange == wlayout, you damned right, why did I not
think of that ???

The first time I wrote the patch I used a tree instead of a 2D-array. So
the layout could easily look like this :

AAAABBBBCCC
AAAABBBBCCC
AAAABBBBCCC
DDDDBBBBCCC
DDDDGGHICCC
EEFFGGHIJJJ
EEFFGGHIJJJ

But I don't think that users (me included) will use this kind of
structure (or hierarchy or layout). It is too complicated to manage and
the code will grow up quickly in lines of code. A simple 2D-array will
fit the needs of (almost) every user.

I will (when I will have enough time) add a the possibility to mange the
"wmii" layout by rows (at this time it is only by columns) because
sometimes I need this kind of layout and a "simple" inversion of the
height and width of windows should make it with few new lines of code.

Best regards,
QUINTIN Guillaume
Received on Wed Jul 02 2008 - 14:55:15 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:53:02 UTC