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

2011-07-29 Thread mauro tonon
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 */
+ #define FLOATING_AS_DEFAULT 1

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.



Re: [dev] dwm 5.9 small patch for non xinerama users

2011-07-26 Thread mauro tonon
2011/7/25 Thomas Dahms thmsd...@googlemail.com:
 Hi,

 2011/7/22 mauro tonon tono...@gmail.com:
 I noted that if i disable Xinerama, i don't use also the following
 functions: dirtomon, focusmon, tagmon.
 So, i think it is possible to hold all these functions between #ifdef
 XINERAMA ... #endif.
 The difference in the final binary file size is very little but...
 A possible patch is attached...

 What about prefixing these functions with something like xinerama_?
 They would then be all after another and a single ifdef would suffice
 instead of three.

 --
 Thomas Dahms



Right.
I think there will be no difference in the final binary file, but the
code would be simpler to read...
I propose these substitutions in the name of the functions:

dirtomon  - xr_dirtotom
focusmon  - xr_focusmon
tagmon  - xr_tagmon
isuniqegeom  - xr_isuniquegeom

and so it's possible to enclose all them between a single #ifdef ... #endif.

By the way, where is the declaration of the isuniquegeom boolean function?



[dev] dwm 5.9 small patch for non xinerama users

2011-07-22 Thread mauro tonon
Hi.

I noted that if i disable Xinerama, i don't use also the following
functions: dirtomon, focusmon, tagmon.
So, i think it is possible to hold all these functions between #ifdef
XINERAMA ... #endif.
The difference in the final binary file size is very little but...
A possible patch is attached...

Bye,
 Mauro.


dwm-5.9-patch_xine.diff
Description: Binary data