None is now a choice for lower_limit and upper_limit as well, so that
the graph can scale as before.
For cpu_usage_graph and network, rather than exposing lower_limit
in the interface, 0.0 is used as a default, since it is already
used implicitly when choosing colors.
added 'braille-peak' and 'braille-snake'. 'braille-peak'
renders only the top point, and 'braille-snake' fills some in.
I should have stressed earlier that I only got the braille drawing ideas
after coming across drawille ( https://github.com/asciimoo/drawille ).
rather than appending the upper limit, use it as the maximum.
In the process fixes a display bug when extent == 0,
and simplifies the addition of other drawing styles (which need
not also work around this values logic).
- Added custom format and color, when no player is running.
- Make a difference between DBus error and no players found.
- Exdended try-cath for DBus errors.
- Changed player method calls according to docs [1] since my player did not recognize them.
[1] http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html#interfaces-and-methods
This commit removes and replaces all the old methods 'on_*' by settings
with the same name. The old methods were renamed into more explicit names that can be used for the callbacks like "next_song","mute" etc...
For instance, you can test with:
status.register("clock",
format=[
("Format 0",'Europe/London'),
("%a %-d Format 1",'Europe/Dublin'),
"%a %-d %b %X format 2",
("%a %-d %b %X format 3", 'Europe/Paris'),
],
on_leftclick= ["urxvtc"] , # launch urxvtc on left click
on_rightclick= ["scroll_format", 2] , # update format by steps of 2
log_level=logging.DEBUG,
)
This way much code could be removed from other modules, though I did it only for the clock module here.
a backwards compatible way. Settings 'on_lclick','on_rclick',
'on_scrollup','on_scrolldown' are inherited by all modules.
These parameters should be a string. Then when a matching action is
detected (ie mouseclick, scrolling), the module check if this string
corresponds to a:
1/ python callable
2/ module method,
In cases 1 and 2, it calls the python function with the module as the
first parameter. Otherwise it considers the string is an external command and launches it via run_through_shell