[dev] [dwm] applications in floating layout mode by default

From: mauro tonon <tononmr_AT_gmail.com>
Date: Fri, 29 Jul 2011 14:20:41 +0200

Usually, in dwm, I prefer to have only terminals (xterm, rxvt, etc)
in tiled mode and all other applications in floating mode...
At first, I added many lines to the rules section in config.h
but, now, I solved the problem in this way:

in file config.def.h, before the rules, add:

+ /* Floating default rule for a generic window:
+ 0 if you want (current) tiled layout as default
+ 1 if you want floating layout as default */

with this rule:

+ { "XTerm", NULL, NULL, 0, False, -1 },

and in file dwm.c, in function applyrules:

- c->isfloating = c->tags = 0;
+ c->isfloating = FLOATING_AS_DEFAULT;
+ c->tags = 0;

Note that this is not the same that to set "floating" as default layout mode
(i.e. all applications in floating mode).
With my patch, terminals are tiled, by default, but all others applications not.
Received on Fri Jul 29 2011 - 14:20:41 CEST

This archive was generated by hypermail 2.2.0 : Fri Jul 29 2011 - 14:24:03 CEST