This module tries to use as much of the same variable naming conventions
that the ``weather`` module uses as possible, to make transitioning
easier in the future in case we decide to make a base class for all
modules which provide weather data.
An API key is required to use this module, information on obtaining one
can be found in the docstring.
* This commit fix#259
* Change 'unhandled' callback by 'other'
* Add the an optional parameter 'button_id' for all callbacks
Signed-off-by: Mathis FELARDOS <mathis.felardos@gmail.com>
If ``statusline`` is not set in ``~/.config/i3/config``, it defaults to
``#ffffff`` (white). Therefore, the default behavior of the updates
module in this case is to show white for both ``color_no_updates``
(system is up-to-date) and ``color_working`` (update check in progress).
However, if one sets ``statusline`` in their ``~/.config/i3/config``,
then the color will be white when the system is up-to-date, forcing the
user to manually set ``color_no_updates`` if they would prefer it match
their default i3bar color.
This commit changes the default value of ``color_no_updates`` to
``None`` so that it matches the default i3bar unless overridden.
* This commit fix#259
* Support of middle click button
* Add an unhandled click events for all button that will not be handled
* Remove the return type of on_click: it became useless now
* Fix the unique call of on_click in CommandEndpoint
Signed-off-by: Mathis FELARDOS <mathis.felardos@gmail.com>
Make sink a property which checks which sink is currently active.
Use pactl to control volumes which gets standard insalled with libpulse
which is already a requirement.
* Fix inspect.getargspec issue for non functions callbacks by creating
an empty ArgSpec. There for we ignore all kwargs parameters.
Signed-off-by: Mathis FELARDOS <mathis.felardos@gmail.com>
* command_endpoint: get the position from the mouse when the click
occured. Parameters names are set here: pos_x pos_y.
Positions are passed to on_click through keyword arguments.
* Module:
- change __log_button_event, __button_callback_handler and on_click
methods for handling keyword arguments.
- "Member", "Method" and "Python" callbacks are handled by detecting
if they have pos_x or pos_y as parameters, or if they have a
keyword arguments. The special case of wrapped callbacks (made with
get_module decorator for example) is handled in a similar way.
- "External command" is handled by considering the position as a
format dictionary. Actually no distinctions are made of how
self.data and the new keyword argument are treated on this.
- the parameter kwargs as been added to the doc string of on_click.
* MultiClickHandler: now handle keyword arguments.
Signed-off-by: Mathis FELARDOS <mathis.felardos@gmail.com>
When a backend-specific formatter (i.e. ``{Pacman}``, ``{Cower}``, etc.)
is used, and the initial "working" status is set, the loop in which the
update totals is compiled has not yet run, leading to a KeyError.
This commit fixes the traceback by setting initial values of "?" for
these formatters before the initial "working" status is set.
This last.fm module will report to the status bar the current track that
is being played. Last.fm requires an API key for access to their APIs,
so the user must provide their own API key which can be easily obtained
for free from http://www.last.fm/api/.
Add unittest for the plexstatus module. Currently verifies that if
there is no stream, the output is null, and if there is a stream, it is
properly getting parsed out of the xml.