wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

client_readconfig.c (691B)


      1 /* Copyright ©2009-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include <ixp.h>
      5 #include <stuff/clientutil.h>
      6 #include <stuff/util.h>
      7 #include <stuff/x.h>
      8 #include <stdio.h>
      9 
     10 void
     11 client_readconfig(CTuple *norm, CTuple *focus, Font **font) {
     12 
     13 	if(norm)
     14 		loadcolor(norm, readctl("/ctl", "normcolors "), nil);
     15 	if(focus)
     16 		loadcolor(focus, readctl("/ctl", "focuscolors "), nil);
     17 	*font = loadfont(readctl("/ctl", "font "));
     18 	if(!*font)
     19 		fatal("Can't load font %q", readctl("/ctl", "font "));
     20 	sscanf(readctl("/ctl", "fontpad "), "%d %d %d %d",
     21 	       &(*font)->pad.min.x, &(*font)->pad.max.x,
     22 	       &(*font)->pad.min.x, &(*font)->pad.max.y);
     23 }
     24