diff options
author | okan <okan> | 2012-12-19 15:21:34 +0000 |
---|---|---|
committer | okan <okan> | 2012-12-19 15:21:34 +0000 |
commit | f77166194f4586cb19abcb7951ca05e356ac74e1 (patch) | |
tree | 304227f75a0b05af3f544be74a6ce47b3fae676e /parse.y | |
parent | 878eb6bf050c6b55104e12c17b9644c2625bace0 (diff) | |
parent | dc1e3a88438dc732349154bca610dbe813d2fc04 (diff) | |
download | cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.gz cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.xz cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.zip |
cvsimport
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/parse.y b/parse.y index 006d1b8..aae8f3c 100644 --- a/parse.y +++ b/parse.y @@ -75,7 +75,8 @@ typedef struct { %token COLOR SNAPDIST %token ACTIVEBORDER INACTIVEBORDER %token GROUPBORDER UNGROUPBORDER -%token MENUBG MENUFG FONTCOLOR +%token MENUBG MENUFG +%token FONTCOLOR FONTSELCOLOR %token ERROR %token <v.string> STRING %token <v.number> NUMBER @@ -127,7 +128,7 @@ main : FONTNAME STRING { conf->snapdist = $2; } | COMMAND STRING string { - conf_cmd_add(conf, $3, $2, 0); + conf_cmd_add(conf, $3, $2); free($2); free($3); } @@ -188,16 +189,20 @@ colors : ACTIVEBORDER STRING { conf->color[CWM_COLOR_BORDER_UNGROUP].name = $2; } | MENUBG STRING { - free(conf->color[CWM_COLOR_BG_MENU].name); - conf->color[CWM_COLOR_BG_MENU].name = $2; + free(conf->menucolor[CWM_COLOR_MENU_BG]); + conf->menucolor[CWM_COLOR_MENU_BG] = $2; } | MENUFG STRING { - free(conf->color[CWM_COLOR_FG_MENU].name); - conf->color[CWM_COLOR_FG_MENU].name = $2; + free(conf->menucolor[CWM_COLOR_MENU_FG]); + conf->menucolor[CWM_COLOR_MENU_FG] = $2; } | FONTCOLOR STRING { - free(conf->color[CWM_COLOR_FONT].name); - conf->color[CWM_COLOR_FONT].name = $2; + free(conf->menucolor[CWM_COLOR_MENU_FONT]); + conf->menucolor[CWM_COLOR_MENU_FONT] = $2; + } + | FONTSELCOLOR STRING { + free(conf->menucolor[CWM_COLOR_MENU_FONT_SEL]); + conf->menucolor[CWM_COLOR_MENU_FONT_SEL] = $2; } ; %% @@ -249,6 +254,7 @@ lookup(char *s) { "mousebind", MOUSEBIND}, { "moveamount", MOVEAMOUNT}, { "no", NO}, + { "selfont", FONTSELCOLOR}, { "snapdist", SNAPDIST}, { "sticky", STICKY}, { "ungroupborder", UNGROUPBORDER}, @@ -577,6 +583,9 @@ parse_config(const char *filename, struct conf *xconf) for (i = 0; i < CWM_COLOR_MAX; i++) xconf->color[i].name = conf->color[i].name; + for (i = 0; i < CWM_COLOR_MENU_MAX; i++) + xconf->menucolor[i] = conf->menucolor[i]; + xconf->font = conf->font; } |