Not all users execute i3pystatus directly, and this can cause issues
when i3bar sends the SIGUSR2 signal. This commit places the keep_alive
feature behind a flag in the Status module to be selectivly enabled by
those that want to use it.
Solves #609.
By default, i3bar sends SIGSTOP to all children when it is not visible (for example, the screen
sleeps or you enter full screen mode), stopping the i3pystatus process and all threads within it.
For some modules, this is not desirable. This commit makes it possible for modules to define the
"keep_alive" flag to indicate that they would like to continue executing regardless of the state of
i3bar.
Whenever the connecting to the remote server fails, query DNS and cache the result. This
should reduce the number of DNS requests the internet predicate
generates without changing the behaviour.
* Reduce overhead of internet predicate.
* Use 8.8.8.8 instead of google-public-dns-a.google.com save a DNS lookup.
* Use time.perf_counter instead of time.time().
Allow user to configure check frequency.
Many packages install something into gi/overrides. If the gobject
package itself is not installed, the import of gi succeeds but
require_version is not contained within, resulting in an AttributeError.
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)