[dev] dwm 5.9 small patch for non xinerama users
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
Re: [dev] dwm 5.9 small patch for non xinerama users
2011/7/25 Thomas Dahms : > Hi, > > 2011/7/22 mauro tonon : >> 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?
Re: [dev] dwm 5.9 small patch for non xinerama users
Sorry, i didn't mean the declaration but the pre-declaration or the prototype or how it is called... well, the equivalent of this: #ifdef XINERAMA static Bool isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info); #endif /*XINERAMA */ 2011/7/26 Jacob Todd : > Grep is your friend. > > On Jul 26, 2011 9:10 AM, "mauro tonon" wrote: >> 2011/7/25 Thomas Dahms : >>> Hi, >>> >>> 2011/7/22 mauro tonon : >>>> 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] applications in floating layout mode by default
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] Re: [9base][awk] printf and utf-8
2013/1/22 Peter A. Shevtsov : > On 22/01/13 at 02:32pm, Peter A. Shevtsov wrote: > >> It seems that it counts every cyrillic letter as two, i. e. it ain't count >> letters >> (or runes) but bytes. > > Indeed, > > echo latin кириллица | /usr/local/plan9/bin/awk '{printf("%d %d\n", > length($1), > length($2))}' > > 5 18 > Also, awk can't know beforehand if the input string is UTF-8 encoded or not, so the only thing it can do is to count bytes