When a desktop notification is displayed but there is no notification
daemon running, an exception is raised.
This fixes the traceback by adding a logger to the DesktopNotification
class, and logging an error when the exception is caught.
Fixes#453.
Volume changes may occur externally (e.g. through pactl bound to media
keys) or through mouse interaction. The new volume is received
asynchronously but can only be outputted at the next status poll,
causing a small delay.
Introduce Module.send_output() to allow a module to send its output
without delay. Invoke this method in the Pulseaudio sink info callback.
* 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>
* 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>
* 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>
Not updated for various reasons:
clock,
dpms,
gpu_temp,
load,
mail,
mem_bar,
modsde,
net_speed,
pianobar,
pulseaudio,
regex [no named formatters],
runwatch,
shell,
solaar,
temp,
text,
updates,
weather,
whosonlocation,
xkblayout,
zabbix
This might break something: I can't test all these modules. If it does,
file a bug / open a PR / send me a note.
- Remove self for normal callables
- Retain self for methods (of course)
- Add decorator to retrieve self for special callbacks that need it
(Yes, the example is kinda stupid and would be unnecessary with #300)