summaryrefslogtreecommitdiffstats
path: root/lexer/theme-parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'lexer/theme-parser.y')
-rw-r--r--lexer/theme-parser.y14
1 files changed, 14 insertions, 0 deletions
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y
index fd290e85..0ed5391b 100644
--- a/lexer/theme-parser.y
+++ b/lexer/theme-parser.y
@@ -188,6 +188,9 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b)
%token T_ANGLE_RAD "Radians"
%token T_ANGLE_TURN "Turns"
+%token ORIENTATION_HORI "Horizontal"
+%token ORIENTATION_VERT "Vertical"
+
%token T_COL_RGBA "rgb[a] colorscheme"
%token T_COL_HSL "hsl colorscheme"
%token T_COL_HWB "hwb colorscheme"
@@ -236,6 +239,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b)
%type <ival> t_property_highlight_style
%type <ival> t_property_line_style
%type <list> t_property_element_list
+%type <ival> t_property_orientation
%start t_entry_list
%%
@@ -372,6 +376,11 @@ t_property
$$->name = $1;
$$->value.list = $4;
}
+| t_property_name T_PSEP t_property_orientation T_PCLOSE {
+ $$ = rofi_theme_property_create ( P_ORIENTATION );
+ $$->name = $1;
+ $$->value.i = $3;
+}
;
/** List of elements */
@@ -569,6 +578,11 @@ t_property_color_value
| T_INT { $$ = $1; }
;
+t_property_orientation
+: ORIENTATION_HORI { $$ = ORIENTATION_HORIZONTAL; }
+| ORIENTATION_VERT { $$ = ORIENTATION_VERTICAL; }
+;
+
/** Property name */
t_property_name
: T_PROP_NAME { $$ = $1; }