- /* test definition */
- ConfigDefEntry *def;
-
- def = config_def_new("test", Config_String);
- config_def_set(def);
-
- def = config_def_new("test", Config_String);
- config_def_set(def);
-
- def = config_def_new("testlist", Config_String);
- config_def_add_value(def, "one");
- config_def_add_value(def, "two");
- config_def_set(def);
-
- g_datalist_foreach(&config_def, print_config, NULL);
+ if (!g_ascii_strcasecmp(name, "focusnew")) {
+ if (value->type != TOKEN_BOOL)
+ yyerror("invalid value");
+ else {
+ config_focus_new = value->data.bool;
+ }
+ } else if (!g_ascii_strcasecmp(name, "followmouse")) {
+ if (value->type != TOKEN_BOOL)
+ yyerror("invalid value");
+ else {
+ config_focus_follow = value->data.bool;
+ }
+ } else if (!g_ascii_strcasecmp(name, "focuslast")) {
+ if (value->type != TOKEN_BOOL)
+ yyerror("invalid value");
+ else {
+ config_focus_last = value->data.bool;
+ }
+ } else if (!g_ascii_strcasecmp(name, "focuslastondesktop")) {
+ if (value->type != TOKEN_BOOL)
+ yyerror("invalid value");
+ else {
+ config_focus_last_on_desktop = value->data.bool;
+ }
+ } else
+ yyerror("invalid option");
+ parse_free_token(value);