Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
fcf26a3
)
reusing config.h's color values, note we have to use const char *, instead of const...
author
Anselm R Garbe <
[email protected]
>
Sat, 14 Jun 2008 09:55:13 +0000
(10:55 +0100)
committer
Anselm R Garbe <
[email protected]
>
Sat, 14 Jun 2008 09:55:13 +0000
(10:55 +0100)
config.h
diff
|
blob
|
history
dmenu.c
diff
|
blob
|
history
diff --git
a/config.h
b/config.h
index
43d3a53
..
5af4304
100644
(file)
--- a/
config.h
+++ b/
config.h
@@
-1,14
+1,14
@@
/* See LICENSE file for copyright and license details. */
/* appearance */
/* See LICENSE file for copyright and license details. */
/* appearance */
-#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"
-#define NORMBGCOLOR "#cccccc"
-#define NORMFGCOLOR "#000000"
-#define SELBGCOLOR "#0066ff"
-#define SELFGCOLOR "#ffffff"
+static const char *font = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
+static const char *normbgcolor = "#cccccc";
+static const char *normfgcolor = "#000000";
+static const char *selbgcolor = "#0066ff";
+static const char *selfgcolor = "#ffffff";
-static uint spaceitem = 30; /* px between menu items */
+static uint spaceitem
= 30; /* px between menu items */
#ifdef XINERAMA
#ifdef XINERAMA
-static uint xidx
= 0;
/* Xinerama screen index to use */
+static uint xidx
= 0;
/* Xinerama screen index to use */
#endif
#endif
diff --git
a/dmenu.c
b/dmenu.c
index
a37471a
..
2afcc48
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-68,13
+68,8
@@
static int textw(const char *text);
#include "config.h"
/* variables */
#include "config.h"
/* variables */
-static char *font = FONT;
static char *maxname = NULL;
static char *maxname = NULL;
-static char *normbg = NORMBGCOLOR;
-static char *normfg = NORMFGCOLOR;
static char *prompt = NULL;
static char *prompt = NULL;
-static char *selbg = SELBGCOLOR;
-static char *selfg = SELFGCOLOR;
static char text[4096];
static int cmdw = 0;
static int promptw = 0;
static char text[4096];
static int cmdw = 0;
static int promptw = 0;
@@
-618,10
+613,10
@@
setup(Bool topbar) {
XFreeModifiermap(modmap);
/* style */
XFreeModifiermap(modmap);
/* style */
- dc.norm[ColBG] = getcolor(normbg);
- dc.norm[ColFG] = getcolor(normfg);
- dc.sel[ColBG] = getcolor(selbg);
- dc.sel[ColFG] = getcolor(selfg);
+ dc.norm[ColBG] = getcolor(normbg
color
);
+ dc.norm[ColFG] = getcolor(normfg
color
);
+ dc.sel[ColBG] = getcolor(selbg
color
);
+ dc.sel[ColFG] = getcolor(selfg
color
);
initfont(font);
/* menu window */
initfont(font);
/* menu window */
@@
-704,19
+699,19
@@
main(int argc, char *argv[]) {
if(++i < argc) font = argv[i];
}
else if(!strcmp(argv[i], "-nb")) {
if(++i < argc) font = argv[i];
}
else if(!strcmp(argv[i], "-nb")) {
- if(++i < argc) normbg = argv[i];
+ if(++i < argc) normbg
color
= argv[i];
}
else if(!strcmp(argv[i], "-nf")) {
}
else if(!strcmp(argv[i], "-nf")) {
- if(++i < argc) normfg = argv[i];
+ if(++i < argc) normfg
color
= argv[i];
}
else if(!strcmp(argv[i], "-p")) {
if(++i < argc) prompt = argv[i];
}
else if(!strcmp(argv[i], "-sb")) {
}
else if(!strcmp(argv[i], "-p")) {
if(++i < argc) prompt = argv[i];
}
else if(!strcmp(argv[i], "-sb")) {
- if(++i < argc) selbg = argv[i];
+ if(++i < argc) selbg
color
= argv[i];
}
else if(!strcmp(argv[i], "-sf")) {
}
else if(!strcmp(argv[i], "-sf")) {
- if(++i < argc) selfg = argv[i];
+ if(++i < argc) selfg
color
= argv[i];
}
else if(!strcmp(argv[i], "-v"))
eprint("dmenu-"VERSION", © 2006-2008 dmenu engineers, see LICENSE for details\n");
}
else if(!strcmp(argv[i], "-v"))
eprint("dmenu-"VERSION", © 2006-2008 dmenu engineers, see LICENSE for details\n");