diff --git a/include/default-theme.h b/include/default-theme.h index c815032b..ce77e43a 100644 --- a/include/default-theme.h +++ b/include/default-theme.h @@ -7,6 +7,7 @@ const char *default_theme = " background: #FFFDF6E3;" " foreground: #FF002B36;" " bordercolor: @foreground;" + " separatorcolor: @foreground;" " red: #FFDC322F;" " blue: #FF268BD2;" " lightbg: #FFEEE8D5;" @@ -33,10 +34,11 @@ const char *default_theme = "#window {" " border: 1;" " foreground: @foreground;" + " background: #00000000;" " padding: 5;" - " background: @background;" "}" "#window.box {" + " background: @background;" " foreground: @bordercolor;" "}" "#window.mainbox {" @@ -46,6 +48,7 @@ const char *default_theme = "#window.mainbox.message.box {" " border: 1px dash 0px 0px ;" " padding: 2px 0px 0px ;" + " foreground: @separatorcolor;" "}" "#window.mainbox.message.normal {" " foreground: @foreground;" @@ -106,9 +109,10 @@ const char *default_theme = " spacing: 0;" "}" "#window.mainbox.inputbar.box {" + " border: 0px 0px 0px 0px;" + " " "}" "#window.mainbox.inputbar.normal {" " foreground: @foreground;" - " background: @background;" "}"; #endif diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 4a58587c..b5ff4dd8 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -392,6 +392,15 @@ if ( queue == NULL ){ yylval->colorval.blue = val.b/255.0; return T_COLOR; } +#{HEX}{3} { + union { uint16_t val; struct { unsigned char b:4,g:4,r:4,a :4;};} val; + val.val = (uint16_t )g_ascii_strtoull ( &yytext[1], NULL, 16); + yylval->colorval.alpha = 1.0; + yylval->colorval.red = val.r/16.0; + yylval->colorval.green = val.g/16.0; + yylval->colorval.blue = val.b/16.0; + return T_COLOR; +} rgba\({NUMBER}{1,3},{NUMBER}{1,3},{NUMBER}{1,3},[01](\.{NUMBER}+)?\) { char *endptr = &yytext[5]; yylval->colorval.red = g_ascii_strtoull ( endptr, &endptr, 10);