static char text[BUFSIZ];
static size_t cursor = 0;
+static const char *font = NULL;
static const char *prompt = NULL;
static const char *normbgcolor = "#cccccc";
static const char *normfgcolor = "#000000";
int i;
progname = "dmenu";
- dc = initdraw();
-
for(i = 1; i < argc; i++)
/* single flags */
if(!strcmp(argv[i], "-v")) {
else if(!strcmp(argv[i], "-p"))
prompt = argv[++i];
else if(!strcmp(argv[i], "-fn"))
- initfont(dc, argv[++i]);
+ font = argv[++i];
else if(!strcmp(argv[i], "-nb"))
normbgcolor = argv[++i];
else if(!strcmp(argv[i], "-nf"))
else
usage();
+ dc = initdraw();
+ initfont(dc, font);
readstdin();
setup();
run();