diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 8e20ee89..3831d26e 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -448,7 +448,7 @@ if ( queue == NULL ){ yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]); return T_COLOR; } -argb:{HEX}{8} { +argb:{HEX}{7,8} { yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[7],yytext[8]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[9],yytext[10]); diff --git a/source/rofi.c b/source/rofi.c index 0a6207ec..f6ab39de 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -838,10 +838,6 @@ int main ( int argc, char *argv[] ) TICK_N ( "Setup Modi" ); } - if ( rofi_theme_is_empty ( ) ) { - rofi_theme_convert_old (); - } - if ( rofi_theme_is_empty ( ) ) { if ( rofi_theme_parse_string ( default_theme ) ) { g_warning ( "Failed to parse default theme. Giving up.." ); @@ -856,7 +852,9 @@ int main ( int argc, char *argv[] ) cleanup (); return EXIT_FAILURE; } + rofi_theme_convert_old (); } + /** * Make small commandline changes to the current theme. */