Commit graph

6 commits

Author SHA1 Message Date
Tobi-wan Kenobi
394ef61760 [core/theme] Add support for default -> prefix/suffix in themes
Themes can now define default prefix and suffix strings.

see #23
2016-12-08 11:52:47 +01:00
Tobi-wan Kenobi
64f5fc100e [core/theme] Add prefix/postfix methods
Add a way to specify prefix and postfix strings to the full text of a
widget's text. Currently, the theme does not fill those yet.

see #23
2016-12-08 11:31:20 +01:00
Tobi-wan Kenobi
f645203579 [core] Widget creation/update overhaul
Until now, widgets were re-created during each iteration. For multiple,
reasons, using static widget objects is much easier, so instead of
creating new widgets continuously, modules now create the widgets during
instantiation and get the list of widgets passed as parameter whenever
an update occurs. During the update, they can still manipulate the
widget list by removing and adding elements as needed.

Advantages:
* Less memory fragmentation (fewer (de)allocations)
* Easier event management (widgets now have static IDs)
* Easier module code (widget contents can simply be the result of a
  callback)

see #23
2016-12-08 08:44:54 +01:00
Tobi-wan Kenobi
60ae92c8e3 [core/themes] Prepare adding of themeing support
* Add framework JSON definition for themes
* Add framework test module
* Add framework module

see #23
2016-12-04 18:10:04 +01:00
Tobi-wan Kenobi
aacc56a4e2 [modules/cpu] Add initial version of CPU utilization module
Re-enable the CPU utilization module as proof-of-concept for the new
core engine.

see #23
2016-12-04 17:45:42 +01:00
Tobi-wan Kenobi
712d958e18 [core/output] Add widget drawing
Add basic drawing of widgets. Each module instance returns a list of
widgets using the widgets() method which is then forwarded to the draw()
method of the configured output.

see #23
2016-12-04 12:53:18 +01:00