[download]

local/src/dmenu/config.h

   1 #include <X11/Xresource.h>
   2 
   3 static int topbar  = 1;
   4 static int lines   = 0;
   5 static int height  = 20;
   6 const char *prompt = NULL;
   7 const char *fonts[] = { "Terminus-9", "Emoji-9", "Nerdfont-9" };
   8 const char worddelimiters[] = " ";
   9 const char *colors[SchemeLast][2] = {
  10     [SchemeNorm] = { "#bbbbbb", "#222222" },
  11     [SchemeSel]  = { "#eeeeee", "#005577" },
  12     [SchemeOut]  = { "#000000", "#00ffff" },
  13 };
  14 
  15 __attribute__((constructor)) void _main(){ // {{{
  16     Display *dpy = XOpenDisplay(NULL);
  17 
  18     if (!dpy) return;
  19 
  20     char *xrm = XResourceManagerString(dpy);
  21     void *xdb = XrmGetStringDatabase(xrm);
  22 
  23     char *type;
  24     XrmValue value;
  25 
  26     if (XrmGetResource(xdb, "Dmenu.height", NULL, &type, &value))
  27         height = atoi(value.addr);
  28 
  29     XrmDestroyDatabase(xdb);
  30     XCloseDisplay(dpy);
  31 } // }}}