diff options
author | Jason Kim <git@jasonk.me> | 2020-05-17 12:50:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-17 14:50:38 +0200 |
commit | a4c5a92199249369f1f312f83f6ac3995c6c64f9 (patch) | |
tree | 026d5f2c3a52a95eaf92d6417a6632a5a31a3a34 /include | |
parent | ec6549748b6ec76cc7c13b8a5b117a3556996cc1 (diff) |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/rofi-types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/rofi-types.h b/include/rofi-types.h index ced7e321..29fdca93 100644 --- a/include/rofi-types.h +++ b/include/rofi-types.h @@ -15,6 +15,8 @@ typedef enum P_DOUBLE, /** String */ P_STRING, + /** Character */ + P_CHAR, /** Boolean */ P_BOOLEAN, /** Color */ @@ -211,6 +213,8 @@ typedef union _PropertyValue double f; /** String */ char *s; + /** Character */ + char c; /** boolean */ gboolean b; /** Color */ |