Commit Graph

125 Commits

Author SHA1 Message Date
Phil Thomas 41a50fe5b2 Use different query to retrieve weather
Also switches geoip service.

Credit for fix to @gsusrafael

Fixes #1571
2016-05-15 13:42:53 +03:00
XZS f4cbeaff9b test Vim variant of stash segment 2016-04-27 16:54:36 +02:00
XZS 802791e979 test stash segment 2016-04-27 16:54:35 +02:00
Iblis Lin e3369f200f Add `short` param for system_load segment
Testing included
2016-04-09 03:52:34 +08:00
s-ol eec80dfb6c Add test for segments.i3wm.scratchpad 2016-03-20 01:22:10 +01:00
S0lll0s 623c1f85bc Add tests for i3wm listers and workspace segment 2016-02-04 04:43:26 +03:00
S0lll0s db99ad1d90 Refactor i3wm segment and lemonbar binding
Move get_i3_connection and get_xrandr_outputs into bindings.wm
2016-02-04 04:37:30 +03:00
S0lll0s 7b60b941fd Let segment_info overwrite i3wm workspace output 2016-01-08 01:46:23 +01:00
Nikolai Aleksandrovich Pavlov a7dc28fb4d Merge pull request #1472 from ZyX-I/pr-1426
Add hide_domain argument to common.env.user segment
2015-10-20 00:03:41 +03:00
= e0a62f9cf7 Add hide_domain argument to common.env.user segment
If true, this argument hides `@` and the following characters from the user
name.

Fixes #1420
Closes #1426
2015-10-19 23:53:23 +03:00
Nikolai Aleksandrovich Pavlov e041f0e6ac Merge pull request #1451 from QuLogic/virtualenv-conda
Show conda environment in virtualenv segment.
2015-10-19 23:50:05 +03:00
Foo 76be911b81 Skip date test on PyPy3
See https://bitbucket.org/pypy/pypy/issues/2161/pypy3-strftime-does-not-accept-unicode
2015-10-06 01:46:25 +03:00
Håken Lid c6a6041b0d Allow unicode characters in time segment in Python-2 2015-10-06 00:40:54 +03:00
Elliott Sales de Andrade 56aa31a66d Show conda environment in virtualenv segment.
Either conda or virtualenv checks can be disabled using the new
ignore_venv or ignore_conda options to this segment.
2015-09-14 02:36:06 -04:00
Sean Fisk 105cf6666f Detect internal_ip interface from default gateway
Add the option to specify `interface='default_gateway'` to the
`internal_ip` segment, which displays the IP address of the interface
connected to the default gateway.
2015-09-05 18:00:55 -04:00
S0lll0s 918dd957cf Add 'output' option to segments.i3wm.workspaces 2015-08-22 18:53:32 +02:00
Fumihiro Xue f098ed2fe0 Add ac-charging indication for battery segment 2015-07-27 13:48:32 +08:00
Nikolai Aleksandrovich Pavlov 0ea0291fca Merge pull request #1371 from ZyX-I/clickable-tabs
Add support for clicking tabs in Vim
2015-05-29 22:54:22 +03:00
Foo c64570a50c Add unit tests 2015-05-29 22:25:56 +03:00
Nikolai Aleksandrovich Pavlov bf6191d144 Merge pull request #1372 from ZyX-I/pull-1366
Switch the underlying i3-IPC layer and deprecate i3bgbar bindings
2015-05-17 21:20:12 +03:00
Foo dd8868413b Add i3wm segment unit tests 2015-05-17 21:05:59 +03:00
Foo acb7c27a88 Use different highlight group for network_load divider
Fixes #1368
2015-05-17 12:01:11 +03:00
ZyX f74320fba8 Add unit tests for pdb segments 2015-01-31 18:54:13 +03:00
ZyX c6bf5fb512 Add support for Byron Rakitzis’ rc shell reimplementation
Fixes #1238
2015-01-08 03:32:13 +03:00
ZyX 654d4690fc Remove all segments from powerline.segments.common
Ref #1092
2015-01-06 17:01:48 +03:00
ZyX 79f6853f4b Rename `detect` to `auto` special values in network segments
Fixes #1205
2015-01-06 16:08:11 +03:00
ZyX 8d05003849 Rename `highlight_group` key to `highlight_groups`
Ref #1199
2015-01-06 15:57:49 +03:00
ZyX 9e454235b3 Skip testing cpu_load_percent if psutil module is not available 2014-12-08 21:15:39 +03:00
ZyX b845cc25b4 Fix tests on python-2.6
csv module does not appear to work will with multiline strings in csv, 
especially incomplete.
2014-11-10 01:08:37 +03:00
ZyX d392cf3322 Add support for csv files
Equivalent to airline csv Christian Brabandt plugin integration, but uses Python
own facilities.

Note: filetype detection is out of the scope of the powerline responsibilities.
      CSV is supported by powerline, but only as long as filetype detection is
      done by Vim correctly. By default CSV files are neither detected nor
      highlighted.

Some known differences between powerline code and @chrisbra plugin with
corresponding airline integration:

1. Detection work differently. I cannot say which is better because I have not
   tested it much, but it is definitely different.
2. My variant is able to detect whether there is (no) header. (Of course,
   relying on Python code.) Airline is using a setting. (Both do not allow
   manual per-filetype setting.) Of course, user can force either variant (no
   headers at all or headers always).
3. My variant makes it possible to configure header output format, including
   truncating it at 15 characters (the default).
4. CSV plugin does not work with multiline CSV items (in some dialects one can
   use code like `abc;"I<CR>am<CR>multiline<CR>string"`). See `:h csv-column` on
   how to fix this if possible (will require also changing `<sid>WColumn`
   function because currently it only works with one line).
5. AFAIK Python does not such a thing as “fixed width CSV”. Thus I do not work
   with this, but CSV plugin does. Not sure whether it is different with
   space-separated CSV files though.
2014-11-09 23:54:49 +03:00
ZyX d1ac624c7f Fix broken tests 2014-10-12 00:36:53 +04:00
ZyX 8b1a502f0d Add ignore_statuses option to branch segments
Closes #1080
2014-09-26 00:34:32 +04:00
ZyX 3f2aabb77b Refactor Vim and common branch segments to share code 2014-09-26 00:20:58 +04:00
ZyX fcf5702b7f Use pwd.getpwuid or getpass.getuser to get current user name 2014-09-21 15:26:27 +04:00
ZyX bb5977c8eb Fix tests with <psutil-2.0 2014-09-21 15:11:01 +04:00
ZyX 26365a9620 Split powerline.segments.common into a number of modules
Note: some modules (i.e wthr and bat) have their names in order to avoid the 
situation when module name matches segment name:

    import powerline.segments.common.weather

will import weather segment because `powerline.segments.common` contains line 
`from powerline.segments.common.weather import weather`.

Fixes #1083
2014-09-21 02:00:37 +04:00
ZyX 48e06cbf9e Refactor weather segment to use KwThreaded segment
Problem: weather segment used to set its state (i.e. user location) once and 
remember it forever.
2014-09-20 13:52:24 +04:00
ZyX e7d0c8368e Add code that will return bytes() from vim functions in Python-3 2014-09-14 17:21:11 +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 c5ca1b23c4 Use class setup/teardown methods to use vim module mock 2014-09-05 20:00:19 +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 849c34ea72 Replace all unicode defaults with defaults from ASCII theme
Closes #1034
2014-08-29 20:47:44 +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 d7a674deaa Add support for shell-specific path shortening
Fixes #502
2014-08-24 19:54:28 +04:00
ZyX 04c0030fe1 Refactor cwd segment into a class and add shorten_home argument 2014-08-24 19:50:54 +04:00
ZyX 173c4d6e76 Add internal_ip segment
Closes #857
2014-08-24 01:20:25 +04:00
ZyX da48e9d84e Add tests 2014-08-22 09:08:58 +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