Commit Graph

21 Commits

Author SHA1 Message Date
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 7c331b130b [Calc] Add min/max operator support to calc()
Fixes: #1172
2020-09-14 20:34:39 +02:00
Dave Davenport 30735791b4 Run indenter. 2020-08-28 16:41:59 +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 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
Kenneth Ho be21fbae5d add pythonic rows selection to -a and -u (#985) 2019-07-02 21:27:46 +02: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 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 54c45f8f5f Fix __cplusplus guard. Move after include 2017-11-21 16:04:59 +01:00
Dave Davenport 35304e705d [Plugin] Add C++ #ifdefs to public header files. 2017-11-20 22:50:58 +01:00
Dave Davenport 9ae62960c1 Indent files. 2017-10-05 17:45:50 +02:00
Dave Davenport ebffe5503d Implement support for specifying negated match
- Prepending - inverts the matching result.
- Fix logic window/drun browser.
- Breaks API as argument token_match callback changed.
- Update tests.

Fixes: #665
2017-09-29 08:40:25 +02:00
Dave Davenport a1ea3e268f Add more configuration options to script mode, getting closer to dmenu.
- urgent
 - active
 - prompt
 - message
2017-09-27 20:00:33 +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 9b0a430fd4 Indent. 2017-09-05 13:52:44 +02:00
Dave Davenport ba296f9210 Add `ch` as size unit. 2017-09-05 13:52:21 +02:00
Dave Davenport 3c52f15140 Move more enums to rofi-types.h 2017-08-18 11:38:54 +02:00
Dave Davenport 9105e5549f Move all property structs/enums into rofi-types 2017-08-17 22:52:17 +02:00
Dave Davenport 686be5856c Move PropertyType into rofi-types header and add check for names pairs. 2017-08-17 19:04:01 +02:00
Dave Davenport 9af191de26 Fix tests by splitting types name into separate file. 2017-06-20 21:02:13 +02:00