Commit Graph

291 Commits

Author SHA1 Message Date
ZyX a962f7eeab Replace u() function with out_u for safer unicode conversion 2014-09-07 20:56:35 +04:00
ZyX 074966aeb6 Replace “package” with “module” in a number of places
Ref #1059
2014-09-06 22:45:25 +04:00
ZyX 68263beec4 Show current buffer, window and tabpage number by default
Fixes #1048
2014-09-05 20:00:21 +04:00
ZyX 667cd4bce5 Assume highlight group is always an iterable
According to the documentation and linter `'highlight_group': 'string'` was not
correct even at the current stage, but it worked. This commit fixes this
situation.
2014-09-05 20:00:20 +04:00
ZyX 54e12b1515 Use new functionality to replace tabbuflister and single_tab segment 2014-09-05 20:00:19 +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 545bd6b52f Fix some style errors reported by syntastic in .segments.plugin.ctrlp 2014-08-31 22:09:09 +04:00
ZyX 849c34ea72 Replace all unicode defaults with defaults from ASCII theme
Closes #1034
2014-08-29 20:47:44 +04:00
Nikolai Aleksandrovich Pavlov 21b10ee7e1 Merge pull request #1005 from ZyX-I/fix-1002
Fix incorrect use of partial
2014-08-25 19:41:56 +04:00
ZyX 69939f351c Add __future__ import 2014-08-24 21:08:20 +04:00
ZyX dc7f8c22e6 Wrap docstring and add dot 2014-08-24 21:07:49 +04:00
ZyX e4565dd3e8 Make attached_clients segment use provided tmux bindings 2014-08-24 21:07:19 +04:00
Matthew M. Keeler 88515ab472 Show Count of Attached Tmux Sessions
- This segment displays the number of attached tmux clients to the
  currently running session.
- The minimum argument is used to specify a threshold for when the
  segment should be visible.

Fixes #661
Closes #662

Conflicts:
	docs/source/index.rst
	powerline/config_files/colorschemes/shell/default.json
	powerline/config_files/colorschemes/shell/solarized.json
	powerline/config_files/colorschemes/tmux/default.json
	powerline/config_files/colorschemes/vim/default.json
	powerline/config_files/colorschemes/vim/solarized.json
	powerline/config_files/colorschemes/wm/default.json
	tests/test_segments.py
2014-08-24 20:56:59 +04:00
ZyX a9c397e5e6 Increase indentation of osascript code in spotify player 2014-08-24 20:19:28 +04:00
ZyX 86c9e998d1 Refactor player_rdio to use the same approach spotify uses 2014-08-24 20:17:47 +04:00
Zero Cho 7f9eef4ce1 Add player support for Rdio Mac app
Conflicts:
	powerline/segments/common.py
2014-08-24 20:13:12 +04:00
ZyX d7a674deaa Add support for shell-specific path shortening
Fixes #502
2014-08-24 19:54:28 +04:00
ZyX 86c3768e4e Move with_docstring function to powerline.segments 2014-08-24 19:50:54 +04:00
ZyX 04c0030fe1 Refactor cwd segment into a class and add shorten_home argument 2014-08-24 19:50:54 +04:00
ZyX 7c07f242bb Merge branch 'clementine-dbus' into develop 2014-08-24 18:08:25 +04:00
ZyX 7c587f5c20 Add clementine media player support
Based on #438 by @printesoi

Fixes #422
Closes #438
2014-08-24 18:07:07 +04:00
ZyX 2d4897d5dd Catch errors from tree_status
Fixes #341
2014-08-24 17:46:11 +04:00
ZyX 173c4d6e76 Add internal_ip segment
Closes #857
2014-08-24 01:20:25 +04:00
ZyX 5c4d75f952 Make tab_modified_indicator work in old Vims
Closes #996
2014-08-22 08:59:52 +04:00
ZyX 9cab9d6fff Use tab_modified_indicator highlight group 2014-08-22 08:59:51 +04:00
ZyX 58b7e6c800 Use spaces for alignment 2014-08-22 08:59:51 +04:00
ZyX 80c4856bcb Remove useless TODO 2014-08-22 08:59:51 +04:00
Jan Losinski 96e297cc6e Add tab_modified_indicator to the vim segments
This indicates in the tabline that any of the open buffers in a tab
page has unsaved modifications (like the default tabline do).

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2014-08-22 08:59:51 +04:00
ZyX abaac3f0a0 Fix indentation error reported by syntastic 2014-08-22 00:32:17 +04:00
ZyX a50b488042 Fix incorrect use of partial
Fixes #1002
2014-08-22 00:30:29 +04:00
ZyX 642ced97bc Move listers to powerline.listers.vim module 2014-08-16 12:39:27 +04:00
ZyX ae92d83eae Fix powerline style
Specifically I searched for all lines that are more then one tab off compared to 
the previous line with

    BufGrep /\(^\t\+\)\S.*\n\1\t\t\+/

and replaced them with something more appropriate. Most of time this resulted in 
a few more newlines, but there are cases when I used mixed tabs/spaces 
indentation+alignment.
2014-08-15 20:58:19 +04:00
ZyX c316ef8e76 Fix some style problems 2014-08-15 20:02:28 +04:00
ZyX 86ddb38bf4 Add information about writing segments
Fixes #629
Ref #287
2014-08-15 19:17:50 +04:00
ZyX 63a376e91d Alter plugin layout: move *.plugin to *.{ext}.plugin
I do not see why vim plugins should receive such a generic name as
`powerline.segments.plugin.gundo`: taking a name that clearly indicates that
`gundo` is a *vim* plugin is better.
2014-08-15 19:17:50 +04:00
Nikolai Aleksandrovich Pavlov b8c61c1d78 Merge pull request #978 from ZyX-I/other-shell-local-themes
Add support for PS2 and PS3 prompts outside of zsh
2014-08-12 08:26:13 +04:00
ZyX 9e37648acf Remove unneeded keyword argument to player function
Fixes #977
2014-08-12 08:11:15 +04:00
ZyX 89afac44bb Add support for PS2 and PS3 prompts outside of zsh 2014-08-12 08:04:35 +04:00
Mike Reinhardt 91826e4483 Fix NowPlaying segment when comma in artist/title 2014-08-08 09:12:46 -07:00
Nikolai Aleksandrovich Pavlov faceb59876 Merge pull request #902 from ZyX-I/battery
Improve battery support
2014-08-06 13:10:55 +04:00
Nikolai Aleksandrovich Pavlov 22fdc10534 Merge pull request #958 from ZyX-I/theme-hierarchy
Implement theme hierarchy
2014-08-06 13:04:50 +04:00
ZyX 1a87006310 Refactor powerline.lint.inspect: do not special-case *ThreadedSegment
Fixes now_playing segment handling in python-3.4
2014-08-06 12:52:52 +04:00
Aleksandrs Ļedovskis 75d2c62f62 Fix weather segment display
Most likely a change on GitHub/Yahoo servers made it crash, when
non-robot ready result page started to appear inside YQL processor.
Using "raw.githubusercontent.com" URL helps and weather icon is again visible.

Closes: Lokaltog/powerline#949

Signed-off-by: Aleksandrs Ļedovskis <aleksandrs@ledovskis.lv>
2014-08-06 00:07:53 +03:00
ZyX 759b42a823 Make now_playing segment accept state symbols from arguments 2014-08-06 00:05:05 +04:00
ZyX f4b5c6a63f Add fix for old Vims where getpos does not return list of integers 2014-08-05 23:03:59 +04:00
ZyX 702f43858b Do not use “rows” and “cols” in text
Reason: string “1 rows” is incorrect and I do not want to implement proper 
number handling (*proper* handling is *not* limited to plural/singular form like
in English).
2014-08-05 22:44:29 +04:00
ZyX 97978eaf77 Improve visual_range segment 2014-08-05 22:27:05 +04:00
ZyX 50703f1cef Fix unicode/bytes handling for python-3 2014-08-04 00:07:30 +04:00
ZyX 74a3c9a0ca Add file_scheme segment
Fixes #207
2014-08-03 23:58:34 +04:00