* Fix improper usage of time.tzset()
time.tzname is a tuple containing the non-daylight-savings and
daylight-savings timezone abbreviations. However, when the TZ
environment variable is set to just the daylight-savings timezone (as
the clock module was changed to do in e31c58f), time.tzset() will break
time.tzname by setting both elements of the tuple to that timezone,
causing the effective timezone to fallback to UTC:
>>> time.tzname
('CST', 'CDT')
>>> time.localtime().tm_hour
1
>>> os.environ.putenv('TZ', 'CST')
>>> time.tzset()
>>> time.tzname
('CST', 'CST')
>>> # ^^^ This is broken
...
>>> time.localtime().tm_hour
6
>>> os.environ.putenv('TZ', 'CST+06:00CDT')
>>> time.tzset()
>>> time.tzname
('CST', 'CDT')
>>> time.localtime().tm_hour
1
This fixes this incorrect behavior by building a proper TZ environment
variable to set localtime.
* Use time.timezone instead of time.altzone
* Make _get_local_tz a static method
* mod bitcoin: add 'volume_percent'
* mod bitcoin: Fix exception on url opening (#304)
Calling user_open as a 'Python callback' raises an exception because
this function doesn't expects 'self'.
Wrote a wrapper function as a 'Member callback' to filter it out.
* mod bitcoin: add specific exchange support
* mod bitcoin: add request age attribute
* mod bitcoin: refactor
* mod bitcoin: btc volume divisor
* bitcoin: Deal with diffrent locales
* Fixing PEP8
* mod bitcoin: Updated docs
* Catch "Showers" as "Rainy" weather condition
Weather.com has a "Showers in the Vicinity" weather condition that I
just happened to see this morning. This commit assigns this condition as
"Rainy" so it is properly colorized.
* Make "Clear / Windy" map to "Fair" weather condition
Another odd weather condition from the weather.com API
* Reverse icons for Fair and Sunny
"Sunny" should have a filled-in sun icon as it implies a brighter weather
condition than "Fair" does.
* Properly detect "Sunny / Windy" as "Sunny" weather condition
Also, do not check for similarly-named conditions if an exact match is
found.
* Properly detect "Fair / Windy" as "Fair"
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 module allow an user to display the current ping value between
himself and another host. It can be useful for:
* Testing your connection all the time
* Checking if one of your server is alive
Signed-off-by: Mathis FELARDOS <mathis.felardos@gmail.com>
* 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>