add scalefactor to cwmrc

This commit is contained in:
2024-12-22 17:02:42 -05:00
parent d7c777b1a5
commit ca083f97bd
4 changed files with 12 additions and 2 deletions

10
parse.y
View File

@@ -73,7 +73,7 @@ typedef struct {
%token BINDKEY UNBINDKEY BINDMOUSE UNBINDMOUSE
%token FONTNAME STICKY GAP
%token AUTOGROUP COMMAND IGNORE WM
%token YES NO BORDERWIDTH MOVEAMOUNT HTILE VTILE
%token YES NO BORDERWIDTH MOVEAMOUNT SCALEFACTOR HTILE VTILE
%token COLOR SNAPDIST
%token ACTIVEBORDER INACTIVEBORDER URGENCYBORDER
%token GROUPBORDER UNGROUPBORDER
@@ -156,6 +156,13 @@ main : FONTNAME STRING {
}
conf->mamount = $2;
}
| SCALEFACTOR NUMBER {
if ($2 < 0 || $2 > INT_MAX) {
yyerror("invalid scalefactor");
YYERROR;
}
conf->scalefactor = $2;
}
| SNAPDIST NUMBER {
if ($2 < 0 || $2 > INT_MAX) {
yyerror("invalid snapdist");
@@ -350,6 +357,7 @@ lookup(char *s)
{ "menufg", MENUFG},
{ "moveamount", MOVEAMOUNT},
{ "no", NO},
{ "scalefactor", SCALEFACTOR},
{ "selfont", FONTSELCOLOR},
{ "snapdist", SNAPDIST},
{ "sticky", STICKY},