Commit Graph

35 Commits

Author SHA1 Message Date
7dc42f543f fix(builder): Respect label-ellipsis option
This slightly changes the existing behavior of maxlen. Before with a
maxlen of 4 'abcde' used to yield 'abcd...' now it yields 'a...'
2018-07-22 14:02:15 -07:00
4b83468eb9 refactor(builder): Add failing test for ellipsis
Adds failing tests for the bug described in #1194
2018-07-22 14:02:15 -07:00
3408db3475 fix(builder): Don't truncate colors with same channels
The builder would convert bg and fg colors like #00000000 to #000 which
would make it loose its alpha channel.

Fixes #1183
2018-05-07 00:12:29 +02:00
095d68fad0 fix: Stop using ato* for string to num conversion
atoi, atof and so on have undefined behavior if anything goes wrong. We
now use strto*, but without error checking. In most places overflows and
the like *should* not happen. String to number conversions are only used
when reading data from other applications or from the config, if another
application gives unparsable strings or too large numbers, then most
likely there is something wrong with that application. If the error
comes from the user config, then the user has to live with values
provided by strto* on error (which are very reasonable)

Fixes #1201
2018-05-03 11:07:37 -07:00
5c86842083 fix(renderer): Do not escape parsed action cmds #444 2017-03-21 16:21:53 +01:00
bd8e748399 fix(builder): use unicode-aware truncation for label-maxlen 2017-02-16 09:19:26 +01:00
8b9461e63e wip(refactor): Cairo drawing 2017-01-24 07:41:46 +01:00
452afcdc68 refactor: Integral types 2017-01-24 07:11:14 +01:00
22140f7db9 refactor(builder): Action wrapped labels 2017-01-13 13:01:46 +01:00
30f516dd7d fix(formatting): Make formats parse specs as-is
This removes the spacing tinkering when parsing format specs.
The following example uses the old behavoir:

    format-test = <label-foo>  <label-bar>
    format-breaks = <label-foo><label-bar>/<bar-test>

`format-test` would replace all occurences of ' ' with the
a space string with defined `spacing` as its width. `format-breaks` would
not validate as the tags where split with ' ' as delimiter.

All that nonsense has been removed and each tag is extracted as is.
The `spacing` parameter can still be used to apply N extra whitespaces
between the tags, but it is now 0 by default.
2017-01-11 02:43:37 +01:00
e3a51b235a refactor(clang-tidy): Apply fixes 2016-12-31 04:32:11 +01:00
dffdc6a20b fix(builder): Sub-string check
Fixes #282
2016-12-30 20:34:23 +01:00
db7aa7c490 fix(format): Ignore empty contents 2016-12-27 04:03:46 +01:00
7b780a3201 refactor(builder): Cleanup 2016-12-26 17:06:28 +01:00
b9f9092bbe refactor: Cleanup 2016-12-26 10:37:14 +01:00
11aabac227 refactor(connection: Use custom base 2016-12-26 09:46:48 +01:00
08be86fbe1 wip(refactor): Improve signal and event handling 2016-12-14 11:01:44 +01:00
3854515521 fix: Wrap format pre/suffix within cmd 2016-12-05 05:32:10 +01:00
d561b9cb2d fix(builder): Remove surrounding quotes for raw strings
Ref #221
2016-12-05 04:15:21 +01:00
d93bd635b4 fix(label): Remove surrounding quotes
Fixes #221
2016-12-04 17:28:58 +01:00
d888f1b331 feat: Add left and right padding and margins (#219)
* feat: Add left and right padding and margins

* fix: use side_values and change precedence

* fix: cast to uint16_t
2016-12-04 11:57:33 +01:00
44da14755d refactor(clang-tidy): Apply fixes 2016-12-04 04:11:47 +01:00
e9db3fab3a fix: Only escape delimiter within action blocks
Ref #197
2016-12-01 14:30:47 +01:00
d34263d850 fix(progressbar): Generate less data
Build the format sub-strings (%fill%, %indicator%, %empty%)
before adding it to the builder to avoid having it generate
alot of duplicate content (tags, etc)
2016-11-30 22:17:55 +01:00
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
9fdc22843b refactor: Cleanup rendering 2016-11-25 04:42:27 +01:00
84d58e7619 refactor: Cleanup handling of syntax tags 2016-11-25 04:34:24 +01:00
48c709eb58 fix(builder): Always close open tags on flush
Ref #186
2016-11-23 21:59:05 +01:00
0983167510 fix(builder): Erase full tag
Ref #180
2016-11-22 21:33:27 +01:00
ebf1bd1129 feat: Support different under-/overline
Make it possible to set different size
and color values for the two properties.

`overline-size = 2`
`overline-color = #f00`
`underline-size = 5`
`underline-size = #00f`
2016-11-21 16:16:06 +01:00
25e33b6aab refactor: Separate render component 2016-11-21 16:16:02 +01:00
88c8bbd940 refactor: Fwd declare drawtypes
Ref #164
2016-11-19 15:49:06 +01:00
bf23086687 fix(builder): Always close raw syntax tags
The lazy closing doesn't work well with raw
syntax tags so ignore it when closing tags.
2016-11-19 08:11:18 +01:00
fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00