Commit graph

170 commits

Author SHA1 Message Date
Tobi-wan Kenobi
8bde4845e0 [theme] Add ASCII "icons" 2016-12-11 13:05:19 +01:00
Tobi-wan Kenobi
65ae8c242b [themes] Re-enable themes
see #23
2016-12-11 12:58:03 +01:00
Tobi-wan Kenobi
ef224fdbb6 [themes] Add missing load module icon 2016-12-11 08:13:54 +01:00
Tobi-wan Kenobi
d91294f010 [modules/battery] Fix ac and unknown display
If the computer runs on AC, display that instead of showing "100%" in
the status.

Also, if reading the charging status fails for some reason (except the
computer being on AC), go into critical state and display "n/a".

see #23
2016-12-11 07:28:15 +01:00
Tobi-wan Kenobi
1a3217bb5f [modules/cmus] Add status callback
Inform the theme about the current playback status (start, stop, repeat,
shuffle).

see #23
2016-12-10 08:16:27 +01:00
Tobi-wan Kenobi
4baf63f88c [core/themes] Add state themes
Each widget can now return a state using the method "state()". This
string is then used to look up a theme information which is used instead
of the default or module theme, if found.

see #23
2016-12-09 13:32:22 +01:00
Tobi-wan Kenobi
c1f1e1a939 [core/themes] Add separator customization
Add customized separators:
* The default separators are automatically disabled if custom separators
  are used (to "just" disable the default, use empty custom separators)
* Use previous background color as their background color and the
  current background color as foreground color
* Allow the separator-block-width to be configured

see #23
2016-12-09 12:55:16 +01:00
Tobi-wan Kenobi
527489e0de [core/themes] Add "cycling" support
Allow a theme to define a "cycle" of attributes that are cycled through
on a widget-per-widget basis (e.g. for alternating the widget
background). These cycles take precedence over the default values, but
can be overridden by module-specific theme instructions.

see #23
2016-12-09 12:28:39 +01:00
Tobi-wan Kenobi
c52cb99518 [core/theme] Add support for foreground and background colors
Themes can now define "fg" and "bg" attributes that are used for
foreground (text) color and background color.

see #23
2016-12-09 09:02:19 +01:00
Tobi-wan Kenobi
2fa8d7b778 [core/themes] Add module-specific themes
Allow module-specific theme information to overload "default"
configuration. I.e. it is now possible to have specific prefix or
postfix configurations for different modules. The module name is derived
for each widget from the module (__module__) from which it was
instantiated.

see #23
2016-12-08 12:44:52 +01:00
Tobi-wan Kenobi
562fd85ca2 [core/theme] Add support for icon themes
Allow sub-themes ("iconsets") to be merged into the "main" theme. That
way, effectively, it's possible to define colors and icons in separate
JSON files.

see #23
2016-12-08 12:09:21 +01:00
Tobi-wan Kenobi
2399cf9af1 [core/themes] Add theme loading
Load a theme from a JSON file.
2016-12-08 09:44:05 +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
a8a6c9bba2 [core] Refactor engine
This is going to be a bit more comprehensive than anticipated. In order
to cleanly refactor the core and the engine, basically start from
scratch with the implementation.

Goals:

* Test coverage
* Maintain backwards compatibility with module interface as much as
  possible (but still make modules easier to code)
* Simplicity

see #23
2016-12-03 20:38:54 +01:00
Tobi-wan Kenobi
a93fa4aa5c Merge branch 'master' into icon-themes
* separate color themes from icons
* each theme can now use one or more icon themes
* icons are chosen in a "first match" fashion

fixes #17
2016-12-02 17:18:01 +01:00
Tobi-wan Kenobi
3cc34d36a5 [documentation] Updated all screenshots to be more uniform
Also, added xrandr screenshots
2016-11-26 09:09:11 +01:00
Tobi-wan Kenobi
4ea0cfae1e [modules/xrandr] Add module to show attached displays
This modules shows attached displays and their states (on or off).
Future versions of this module will order the icons by the relative
order of the screens (left-to-right) and will allow switching monitors
on and off.

see #19
2016-11-26 08:28:19 +01:00
Tobi-wan Kenobi
f31c0e492d [modules] Add initial version of a load module
Add a load module that shows 1/5/15 minute load average and allows the
user to set warning and critical thresholds on the 1 minute average.

fixes #9
2016-11-25 21:45:30 +01:00
Tobi-wan Kenobi
209fa83324 [themes] Make it possible to merge themes to get "icon themes"
Add code that allows themes to be merged (i.e. if certain elements are
not present in a theme, another theme can be "overlaid" to add missing
elements).

Effectively, this is used to create the logical concept of an "icon
theme", which is loaded after the main theme. So, the main theme can
define colors, and the icon theme fills in any missing elements
(practically, all the icons in the form of prefixes and suffixes).

Icon sets are defined in a theme using the "icons" directive, which
should be an array.

see #17
2016-11-25 21:06:24 +01:00
Tobi-wan Kenobi
f6db8b0a85 [themes] Move theme folder out of Python folder
fixes #16
2016-11-25 17:57:41 +01:00