* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps
* Fix minor error
* Added WARN state for cpu module
* Implement WARN state for CPU, Memory modules, working on fs module
* Implement WARN state for fs module
* Simplify WARN state implementation for cpu and memory
* explicitly check percentage in get_by_percentage_with_borders
* Fixed silly error
* implement warn state on battery module, standardize the implementation on other modules
* minor fixes
* fix annoying error
* use more intuitive param name
* Fix percentage with borders bug
* Make requested changes
Hide the effect of warn states when unused
* Backward Compat: use no format instead of fallback label
* Reformat
* Refactor
* Reformat
* Reformat: convert tabs to spaces
* Reformat
ramp-0 is used for everything <= base-temperature and ramp-N is used for everything >= warn-temperature
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps
* Fix minor error
* explicitly check percentage in get_by_percentage_with_borders
* Fixed silly error
* Add label minlen and alignment.
Fix build
* Update src/drawtypes/label.cpp
Co-Authored-By: infokiller <infokiller@users.noreply.github.com>
* Use existing alignment type.
* Remove redundant max_len handling in label::get.
* Fix shadowing.
* Add label alignment tests.
* Handle minlen/maxlen and alignment in same function.
Also add a test for a test case brought up in the PR discussion.
* Format files with clang-format
* Move builder::get_label_text tests into label tests
builder::get_label_text doesn't really do anything anymore
* builder: remove get_label_text
* label: Clean up label::get()
* Fix comment style.
* Set default label alignment to left.
* Update src/drawtypes/label.cpp
Co-Authored-By: Patrick Ziegler <p.ziegler96@gmail.com>
* Update include/drawtypes/label.hpp
Co-Authored-By: Patrick Ziegler <p.ziegler96@gmail.com>
Some people use text modules instead of the `separator` key in the bar
section to better configure the separator (colors, fonts).
Since we disallowed the same module being used multiple times in #1534,
this will now print an error message.
This should help with this a bit.
Ref #1913
The check of the maxlen and ellipsis condition was also moved to the
label creation, this way get_label_text doesn't need to care about the
restrictions placed on maxlen and ellipsis
Added support for fuzzy matching workspace names when assigning icons.
This feature is enabled/disabled through a new option, 'fuzzy-match'.
It is disabled by default.