Commit Graph

9 Commits

Author SHA1 Message Date
ZyX ea9eae676f Always write UTF-8 string 2015-01-25 17:17:24 +03:00
ZyX 917dfed842 Take overrides from environment variables
Ref #1201
2015-01-07 01:09:53 +03:00
ZyX fadd1eec17 Move all parser definitions to powerline.commands.*.get_argparser()
Reasoning: they will be easier to reach there. It will also be possible to use
specific ArgumentParser class that will just collect data for sphinx.
2014-10-25 22:03:33 +04:00
ZyX 849fef9b5a Use powerline.lib.encoding* in place of sys.get*encoding/locale.get*
Fixes #1078
2014-09-17 00:05:10 +04:00
ZyX 8d00ba781c Remove unneeded # NOQA comments
It appears that something has changed and it no longer complains about double
declaration in else or except blocks.
2014-09-01 00:25:24 +04:00
ZyX 06211cbe63 Unify imports
Now imports follow the following structure:

1. __future__ line: exactly one line allowed:

        from __future__ import (unicode_literals, division, absolute_import, print_function)

   (powerline.shell is the only exception due to problems with argparse).
2. Standard python library imports in a form `import X`.
3. Standard python library imports in a form `from X import Y`.
4. and 5. 2. and 3. for third-party (non-python and non-powerline imports).
6. 3. for powerline non-test imports.
7. and 8. 2. and 3. for powerline testing module imports.

Each list entry is separated by exactly one newline from another import. If
there is module docstring it goes between `# vim:` comment and `__future__`
import. So the structure containing all items is the following:

    #!/usr/bin/env python
    # vim:fileencoding=utf-8:noet

    '''Powerline super module'''

    import sys

    from argparse import ArgumentParser

    import psutil

    from colormath.color_diff import delta_e_cie2000

    from powerline.lib.unicode import u

    import tests.vim as vim_module

    from tests import TestCase

.
2014-09-01 00:25:24 +04:00
ZyX 7e7803f680 Make powerline-render respect user locale as well
Closes #1023
2014-08-27 22:38:52 +04:00
ZyX 9290c2a23b Make daemon work with aboveleft shell key 2014-08-02 21:31:01 +04:00
Kim Silkebækken a122e73b9b Add files from @kovidgoyal's powerline-daemon repo
Minor changes have been applied:

- Removed copyright info and GPL 3 license since Powerline is MIT (needs
  confirmation from kovidgoyal before merge)
- The `powerline-client` script is renamed to `powerline`, and calls the
  daemon or `powerline-render` (the previous `powerline`) to render
  a statusline
- Minor coding style corrections to match the rest of the project
- Python 3 support is removed for now due to setuptools failing with
  binary scripts

Todo:

- Automatically attempt to launch powerline-daemon the first time
  powerline is run if the daemon isn't already running?
- pip install -e fails with binary files (it appears that pip recodes
  the powerline binary to ASCII, the compiled powerline script must be
  copied manually to ~/.local/bin after pip install -e has been run)
2014-08-02 18:45:18 +04:00