Go to file
Erik Johnson 7cb2dcc255 Fix improper usage of time.tzset() (#347)
* 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
2016-04-07 23:21:23 +02:00
docs Add reference to weather module to the formatp documentation 2016-03-29 01:14:56 -05:00
i3pystatus Fix improper usage of time.tzset() (#347) 2016-04-07 23:21:23 +02:00
tests test_lastfm: pep8 compliance 2016-03-17 19:59:02 -07:00
.gitignore Add docs/_build to .gitignore 2016-03-29 01:14:56 -05:00
.travis.yml Update .travis.yml 2015-08-19 20:03:19 +02:00
ci-build.sh Decrease chattiness of ci-build.sh; error reporting is not reduced 2016-02-08 10:10:28 +01:00
CONTRIBUTORS Add myself to CONTRIBUTORS 2016-03-29 01:14:56 -05:00
dev-requirements.txt Enforce pep8 version >= 1.5.7 since 1.5.6 is buggy 2014-12-17 22:09:42 +01:00
MIT-LICENSE Create package i3pystatus 2013-02-12 01:07:26 +01:00
README.rst Update README.rst 2015-09-11 00:05:45 -03:00
setting_util.py Move and ln-s setting_util there 2015-06-17 14:52:37 +02:00
setup.py Add i3pystatus.weather to packages list 2016-03-29 01:14:56 -05:00

i3pystatus
==========

.. image:: http://golem.enkore.de/job/i3pystatus-dev/badge/icon
    :target: http://golem.enkore.de/job/i3pystatus-dev/

.. image:: https://travis-ci.org/enkore/i3pystatus.svg?branch=master
    :target: https://travis-ci.org/enkore/i3pystatus

i3pystatus is a growing collection of python scripts for
status output compatible to i3status / i3bar of the i3 window manager.

Installation
------------

.. note:: Supported Python versions

    i3pystatus requires Python 3.2 or newer and is not compatible with
    Python 2.x. Some modules require additional dependencies
    documented in the docs.

From PyPI package `i3pystatus <https://pypi.python.org/pypi/i3pystatus>`_
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

::

    pip install i3pystatus

Packages for your OS
++++++++++++++++++++

* `Arch Linux <https://aur.archlinux.org/packages/i3pystatus/>`_ (stable
  release)
* `Arch Linux <https://aur.archlinux.org/packages/i3pystatus-git/>`_ (latest
  version)

Documentation
-------------

`All further user documentation has been moved here. <http://docs.enkore.de/i3pystatus>`_

Changelog
---------

`Located here. <http://docs.enkore.de/i3pystatus/changelog.html>`_

Contributors
------------

A list of all contributors can be found in `CONTRIBUTORS <https://github.com/enkore/i3pystatus/blob/master/CONTRIBUTORS>`_.
Particular noteworthy contributors are former maintainer Jan Oliver Oelerich and
current maintainer enkore.

Contribute
----------

To contribute a module, make sure it uses one of the ``Module`` classes. Most modules
use ``IntervalModule``, which just calls a function repeatedly in a specified interval.

The ``output`` attribute should be set to a dictionary which represents your modules output,
the protocol is documented `here <http://i3wm.org/docs/i3bar-protocol.html>`_.

Developer documentation is available in the source code and `here
<http://docs.enkore.de/i3pystatus>`_.

**Patches and pull requests are very welcome :-)**