[dwm] Feedback to ratio

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Fri, 10 Aug 2007 07:51:10 +0200


thanks for the feedback to {V,H}RATIO and NMASTER. Here is the
way things will change:

- VRATIO will be removed
- HRATIO will slightly change
- NMASTER will be removed by default, but it will be possible to
  use it

All inc*() functions will go away, same with all global
variables concerning the layout. Instead I will change struct
Layout as follows:

old: Layout: void arrange(void):
new: Layout: void arrange(const char *arg);

This allows layouts being bound to a shortcut and supplying all
layout-dependend manipulation arguments to the layout function
only. This also allows that tile() will support NMASTER, but
that no specific NMASTER function clutters the codebase.

The HRATIO will define the procentual width of the master area
(0.1 .. 0.9) from the window area width (waw, usually the screen
width, sw).

Each layout function will have to make sure, that it equals with
lt->arrange, otherwise it might work if a different layout has
been choosen, that's the only drawback of the new mechanism.

So the above functions can be achieved as follows in the future:

inchratio("-0.1") -> tile("rsummand=-0.1");
inchratio("0.1") -> tile("rsummand=0.1");
incnmaster("1") -> tile("nmsummand=1");
incnmaster("-1") -> tile("nmsummand=-1");

Well, tile() will be cluttered with parsing the arg, but oh
well, it allows third party layouts to supply such commands as
well. The nmsummand-stuff will only be enabled in
config.default.h, to keep the dwm(1) consistent with it ;)

Expect this change in todays evening hg tip.


 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Fri Aug 10 2007 - 07:51:10 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:48:37 UTC