Dave Davenport
d3cd5b3e43
[Lexer] Fix lexer parsing default theme from resource.
2021-08-24 21:37:57 +02:00
Dave Davenport
de69f5290e
[Parser] Set ordering correctly when loading theme with reset.
2021-08-24 21:07:00 +02:00
Dave Davenport
acb1979f10
[Theme] Undo part of default theme changes, always pick build-in
2021-08-24 18:19:25 +02:00
Dave Davenport
47f26ca2f1
[IconFetcher] Look for images in theme directories.
2021-08-17 11:05:03 +02:00
Dave Davenport
9f777a7a7b
[Themes] Fix inheritance with state set.
...
Update theme.c and included themes.
This should allow you to set `element-text { text-color: inherit;
background-color: inherit;}` to fix old themes.
2021-08-14 13:58:21 +02:00
a1346054
c62137f8ab
Simple maintenance improvements ( #1370 )
...
* rofi moved to libera.chat
* unify some theme headers and whitespace
* consistently use the same hashbang for bash
* improve obsolete way of testing equality
see https://github.com/koalaman/shellcheck/wiki/SC2268 for explanation
* use consistent function definitions in bash scripts
* remove duplicated author and fix whitespace
* quote all variables in scripts
fixes many warnings identified through shellcheck
* fix whitespace in scripts
* fix whitespace in non-source files
* fix spelling in non-source files
* fix whitespace and indentation in source files
* fix spelling in source files
2021-08-14 13:03:16 +02:00
Dave Davenport
b7dfb423a1
[Config] Small fix config dump fix.
2021-07-10 00:28:21 +02:00
Dave Davenport
4c1a74e15e
[Widget] Add scaling option to background-image.
2021-06-15 17:18:34 +02:00
Dave Davenport
0f21541327
[Configuration] Add start of more 'theme' based configuration.
...
Nested CSS blocks in configuration {} are parsed into
rofi_configuration.
2021-06-14 19:29:05 +02:00
Dave Davenport
828aaa231a
[Theme] Add angle support to linear-gradient.
2021-06-14 16:04:15 +02:00
Dave Davenport
5c5428bd11
[Theme] Add direction support to linear-gradient.
2021-06-14 15:14:41 +02:00
Dave Davenport
7cf0385681
[Theme] Support multiple stops in linear-gradient
...
* Fix anchor dumping
* Fix image dumping
2021-06-13 22:57:35 +02:00
Dave Davenport
2c325b3f09
[Widget] Add initial support for background-image.
...
* Supports url("path") and linear-gradient(start,stop).
2021-06-13 20:50:25 +02:00
Dave Davenport
eb602b34fa
[DSL] Move theme reset into the grammer parser and out of lexer.
2021-06-09 02:03:29 +02:00
TonCherAmi
dc28a97437
Add cursor property ( #1313 )
...
* Change mouse cursor on widget hover
Currently only listview element and editbox are supported.
* Add cursor property
2021-05-23 00:17:27 +02:00
Dave Davenport
7c9a01ffc7
[Lexer] Fix parsing string in dict not to match " in middle of string.
...
Fixes: 1205
2020-10-02 19:15:19 +02:00
Dave Davenport
7c331b130b
[Calc] Add min/max operator support to calc()
...
Fixes : #1172
2020-09-14 20:34:39 +02:00
Dave Davenport
3499e1dad0
[Theme] First attempt at more cleanups and nested media support.
...
First throw at nested media support.
Issue: #1189
2020-09-13 15:11:12 +02:00
Dave Davenport
1d2453a948
[Parser] Small restructure in parser.
...
Preparing for nested @media.
2020-09-13 14:15:33 +02:00
Dave Davenport
6ba878e44a
[Lexer] Fix media parser.
2020-09-11 18:10:49 +02:00
nick87720z
fb2ba8ada3
Millimeter support for distance ( #1144 )
2020-06-09 22:19:43 +02:00
Jason Kim
a4c5a92199
Support rasi config character type options ( #1131 )
...
* style: remove extra space
* feat: handle xrm_Char in config parser
Handle the `xrm_Char` case in the (rasi theme) config file parser. This
should properly handle configuration like
```
matching-negate-char: "\0";
```
and
```
matching-negate-char: "-";
```
* refactor: don't handle mem in xrm_Char case
`mem` shouldn't ever be set when `XrmOption` is `type` `xrm_Char`.
Therefore, there is no need to check it and free it. Remove that logic.
* refactor: further condense logic
* style: s/Everythin/Everything/
* style: s/parsing an section/parsing a section/
...and missing period.
* feat(lexer): add CHAR token
Add a `CHAR` token that takes things of the form `'<char>'` or some
specific backslash escape sequences like `'\''` and `'\0'`. For now,
save it as a `T_STRING`.
* refactor: define char property type
* feat(parser): add cval and T_CHAR
* refactor: use char property for xrm_Char
Instead of using strings for property elements of type char, use
characters, which were recently added to the grammar.
2020-05-17 14:50:38 +02:00
Dave Davenport
9a3d4b1d2e
[Test] Fix compiler warning, theme test (bug in lexer) and more.
2020-04-26 11:43:14 +02:00
Dave Davenport
151547a99e
[Themes] add calc() support to distance in theme format. ( #1105 )
...
* Initial test to allow math in distances.
Support + and -
Needs spaces around + and -.
* [THEME] Fix printing theme with math in distance.
* [Theme] use calc() syntax.
* [Theme] Add * and / to calc().
* [Theme] Fix the precedense ordering in parsing. Also avoid making copies.
* [Theme] Don't print unneeded ().
* [Theme] Add modulo to calc.
2020-04-24 19:54:08 +02:00
Dave Davenport
7c613f6a4c
Issue893: Add support for @media in the theme format. ( #1015 )
...
* [Lexer] Add support for @media.
Issue: #893
* [Theme] @media limit to px.
* [Theme@Media] add *{} support.
* [Theme@Media] Add support for monitor-id media.
* [Theme@Media] Code cleanup.
* [Theme@Media] Add min/max-aspect-ratio.
* [Theme@Media] Remove some debug output
Fixes : #893
2019-09-20 15:05:36 +02:00
Quentin Glidic
7416f344a3
Use g_list_free_full()
...
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2019-04-19 10:00:58 +02:00
Quentin Glidic
a9dae788d1
Correctly include config.h first
...
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2019-04-19 09:59:53 +02:00
Dave Davenport
e17d63f5ae
[Lexer] Fix nested () in variable default field.
...
- var ( a, rgba(0,0,0,0)) was broke
Fixes : #936
2019-03-21 10:33:50 +01:00
Dave Davenport
40da1b25e2
[Theme3.0] Change reference to use the CSS like var() syntax.
...
Supports defaults var(name, default); var(name);
Where default can be another property.
(https://www.w3schools.com/css/css3_variables.asp )
This deprecates the @name syntax.
Fixes : #876
2019-01-29 17:56:45 +01:00
Dave Davenport
0dfc671bcc
[GrammarParser] Fix memory leak of Property after parsing config entry.
2019-01-29 07:32:07 +01:00
Dave Davenport
0058088962
[Lexer] Remove Ambiguity in parser on empty input.
2018-07-21 18:43:03 +02:00
Dave Davenport
06165f867a
[Lexer] Only allow configuration blocks before theme.
2018-07-15 11:04:47 +02:00
Dave Davenport
09db7d5d3f
[Tests] Fix window test.
2018-07-10 13:53:40 +02:00
Dave Davenport
8e77a7f8c9
[Lexer] Also allow non-capitalized environment variables
2018-07-09 11:57:21 +02:00
Dave Davenport
711d4517b9
[Lexer] Add support for environment variables.
...
You can do ${TEST} to parse the content of TEST. This will be fed into
the lexer again, and should parse all properties.
2018-07-09 11:48:32 +02:00
Dave Davenport
441c511296
Add an generic icon fetcher that can be used by any widget and re-uses the main threadpool.
...
Add an generic icon fetcher that can be used by any widget and re-uses the main threadpool.
* Make threadpool more generic usable.
* Add generic icon fetcher, that caches icons.
* Make DRUN use this fetcher.
* Add icon widget.
#809
2018-06-09 19:13:57 +02:00
Dave Davenport
ef6ace4333
[Lexer] Allow quoted utf8 string in list type.
2018-04-28 15:30:01 +02:00
Dave Davenport
02baaf4df4
[Lexer] Make not finding a configuration option a warning, not an error.
2018-04-28 15:29:17 +02:00
Edward Betts
79adae77d7
Correct spelling mistakes. ( #722 )
2017-11-23 18:41:52 +01:00
Dave Davenport
f992e0e21a
Add the prompt colon to the default theme.
...
- Fix dumping of theme localization of the decimal-point. Force it to
be always a '.'.
2017-11-05 12:56:41 +01:00
Dave Davenport
ad877bb2e6
[ThemeParser] Give a more detailed error when only 7 elements are specified in argb syntax.
2017-10-30 17:07:13 +01:00
Dave Davenport
847d2e82a0
[Lexer/Parser] Make the '#' before element optional.
2017-10-22 12:42:33 +02:00
Dave Davenport
99f2a1a9bf
Add @theme import command, that resets the current theme.
2017-09-18 17:48:13 +02:00
Dave Davenport
ae0323211b
small update to default theme
2017-09-18 07:49:24 +02:00
Dave Davenport
d4bf5ad020
Allow 0 in padding when passing more then 1 argument.
2017-09-07 08:43:00 +02:00
Dave Davenport
2a5cb6f621
Alias 'color' property name to 'text-color'
2017-09-07 08:35:09 +02:00
Dave Davenport
7c1ecb4707
Add support for multiple selectors. #dummy0, dummy1 {}
2017-09-06 23:11:03 +02:00
Dave Davenport
50998b8f04
Flatten hierarchy, don't inherit by default.
...
* add keyword inherit to language parser and theme structure.
2017-09-06 10:03:44 +02:00
Dave Davenport
ba296f9210
Add ch
as size unit.
2017-09-05 13:52:21 +02:00
Dave Davenport
da00848416
Do better error reporting on configuration entries in rasi format.
2017-06-20 18:10:18 +02:00