aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h14
-rw-r--r--dmenu.c21
2 files changed, 15 insertions, 20 deletions
diff --git a/config.h b/config.h
index 43d3a53..5af4304 100644
--- a/config.h
+++ b/config.h
@@ -1,14 +1,14 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2 2
3/* appearance */ 3/* appearance */
4#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*" 4static const char *font = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
5#define NORMBGCOLOR "#cccccc" 5static const char *normbgcolor = "#cccccc";
6#define NORMFGCOLOR "#000000" 6static const char *normfgcolor = "#000000";
7#define SELBGCOLOR "#0066ff" 7static const char *selbgcolor = "#0066ff";
8#define SELFGCOLOR "#ffffff" 8static const char *selfgcolor = "#ffffff";
9 9
10static uint spaceitem = 30; /* px between menu items */ 10static uint spaceitem = 30; /* px between menu items */
11 11
12#ifdef XINERAMA 12#ifdef XINERAMA
13static uint xidx = 0; /* Xinerama screen index to use */ 13static uint xidx = 0; /* Xinerama screen index to use */
14#endif 14#endif
diff --git a/dmenu.c b/dmenu.c
index a37471a..2afcc48 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -68,13 +68,8 @@ static int textw(const char *text);
68#include "config.h" 68#include "config.h"
69 69
70/* variables */ 70/* variables */
71static char *font = FONT;
72static char *maxname = NULL; 71static char *maxname = NULL;
73static char *normbg = NORMBGCOLOR;
74static char *normfg = NORMFGCOLOR;
75static char *prompt = NULL; 72static char *prompt = NULL;
76static char *selbg = SELBGCOLOR;
77static char *selfg = SELFGCOLOR;
78static char text[4096]; 73static char text[4096];
79static int cmdw = 0; 74static int cmdw = 0;
80static int promptw = 0; 75static int promptw = 0;
@@ -618,10 +613,10 @@ setup(Bool topbar) {
618 XFreeModifiermap(modmap); 613 XFreeModifiermap(modmap);
619 614
620 /* style */ 615 /* style */
621 dc.norm[ColBG] = getcolor(normbg); 616 dc.norm[ColBG] = getcolor(normbgcolor);
622 dc.norm[ColFG] = getcolor(normfg); 617 dc.norm[ColFG] = getcolor(normfgcolor);
623 dc.sel[ColBG] = getcolor(selbg); 618 dc.sel[ColBG] = getcolor(selbgcolor);
624 dc.sel[ColFG] = getcolor(selfg); 619 dc.sel[ColFG] = getcolor(selfgcolor);
625 initfont(font); 620 initfont(font);
626 621
627 /* menu window */ 622 /* menu window */
@@ -704,19 +699,19 @@ main(int argc, char *argv[]) {
704 if(++i < argc) font = argv[i]; 699 if(++i < argc) font = argv[i];
705 } 700 }
706 else if(!strcmp(argv[i], "-nb")) { 701 else if(!strcmp(argv[i], "-nb")) {
707 if(++i < argc) normbg = argv[i]; 702 if(++i < argc) normbgcolor = argv[i];
708 } 703 }
709 else if(!strcmp(argv[i], "-nf")) { 704 else if(!strcmp(argv[i], "-nf")) {
710 if(++i < argc) normfg = argv[i]; 705 if(++i < argc) normfgcolor = argv[i];
711 } 706 }
712 else if(!strcmp(argv[i], "-p")) { 707 else if(!strcmp(argv[i], "-p")) {
713 if(++i < argc) prompt = argv[i]; 708 if(++i < argc) prompt = argv[i];
714 } 709 }
715 else if(!strcmp(argv[i], "-sb")) { 710 else if(!strcmp(argv[i], "-sb")) {
716 if(++i < argc) selbg = argv[i]; 711 if(++i < argc) selbgcolor = argv[i];
717 } 712 }
718 else if(!strcmp(argv[i], "-sf")) { 713 else if(!strcmp(argv[i], "-sf")) {
719 if(++i < argc) selfg = argv[i]; 714 if(++i < argc) selfgcolor = argv[i];
720 } 715 }
721 else if(!strcmp(argv[i], "-v")) 716 else if(!strcmp(argv[i], "-v"))
722 eprint("dmenu-"VERSION", © 2006-2008 dmenu engineers, see LICENSE for details\n"); 717 eprint("dmenu-"VERSION", © 2006-2008 dmenu engineers, see LICENSE for details\n");