diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index 27084299..34077b3a 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1420,12 +1420,23 @@ It supports the following keys as constraint: .IP \(bu 2 \fB\fCmin\-aspect\-ratio\fR load when aspect ratio is over value. .IP \(bu 2 -\fB\fCmax\-aspect\_ratio\fR: load when aspect ratio is under value. +\fB\fCmax\-aspect\-ratio\fR: load when aspect ratio is under value. .IP \(bu 2 \fB\fCmonitor\-id\fR: The monitor id, see rofi \-help for id's. .PP -@media takes an integer number or a fraction. +@media takes an integer number or a fraction, for integer number \fB\fCpx\fR can be added. + +.PP +.RS + +.nf +@media ( min\-width: 120 px ) { + +} + +.fi +.RE .SH Multiple file handling .PP diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 7b7d73db..2817545a 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -997,12 +997,18 @@ It supports the following keys as constraint: * `min-height`: load when height is bigger then value. * `max-height`: load when height is smaller then value. * `min-aspect-ratio` load when aspect ratio is over value. - * `max-aspect_ratio`: load when aspect ratio is under value. + * `max-aspect-ratio`: load when aspect ratio is under value. * `monitor-id`: The monitor id, see rofi -help for id's. -@media takes an integer number or a fraction. +@media takes an integer number or a fraction, for integer number `px` can be added. +``` +@media ( min-width: 120 px ) { + +} +``` + ## Multiple file handling The rasi file format offers two methods of including other files. diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 6542df86..8fb5840c 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -167,6 +167,7 @@ UANYN {ASCN}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} WHITESPACE [[:blank:]] WSO [[:blank:]]* WORD [[:alnum:]-]+ +MEDIA_NAME [[:alpha:]-]+ COLOR_NAME [[:alpha:]]+ STRING \"{UANYN}*\" CHAR \'({ASCN}|\\\\|\\\'|\\0)\' @@ -648,7 +649,7 @@ if ( queue == NULL ){ BEGIN(MEDIA_CONTENT); return T_PARENT_LEFT; } -{WORD} { +{MEDIA_NAME} { yylval->sval = g_strdup(yytext); return T_STRING; }