Commit Graph

771 Commits

Author SHA1 Message Date
ZyX 584755765b Start adding tests
Tests are temporary disabled on all branches except tests (does not really work
though, needs travis.yml in all branches).
2013-03-03 21:03:19 +01:00
ZyX 2a39ed83d8 Use mode(1)
Otherwise all that fancy double-symbol modes are just not visible.
2013-03-03 21:03:19 +01:00
ZyX 47cfde0ecc Add support for python-2.6 2013-03-03 21:03:17 +01:00
ZyX 9fd63021f0 Add support for python-3.2 2013-03-03 21:03:08 +01:00
ZyX de33eb8140 Add _external_ip for use in weather segment 2013-03-03 21:03:08 +01:00
ZyX 307dfd7212 Improve documentation 2013-03-03 21:03:05 +01:00
ZyX 2f17510db8 Also use hl_iter in exception message
Ref #270
2013-02-28 14:06:05 +01:00
ZyX f495c49aa1 Remove obsolete highlight_group keys from configuration
They are no no-op for function segments, so don’t confuse users
2013-02-27 01:18:16 +04:00
ZyX 16a5b7897a Use exit_fail hl group for last_status segment
Fixes #270
2013-02-27 01:06:11 +04:00
ZyX-I f3462768de Fix minimal python versions
s/3\.2/3.3
2013-02-26 21:27:59 +01:00
ZyX c2cf679c6f Do not throw away python stack trace
Errors when loading powerline fails are almost never giving any useful
information for debugging.
2013-02-26 21:26:33 +01:00
ZyX a8ccfd4350 Add ambiwidth problems information to troubleshooting section 2013-02-26 21:17:25 +01:00
ZyX 83f4236a2c Replace unicode() with u() in theme.py
Fixes #271
2013-02-27 00:14:24 +04:00
Kim Silkebækken a4b7c31bc3 Move divider hl group to return dicts in weather segment
Fixes #264
2013-02-25 16:11:12 +01:00
Trey Hunner 9a7b5f212b Use oldlace for visual mode foreground in vim
Fixes gh-261.
2013-02-24 23:07:24 -08:00
Kim Silkebækken 0dcd23f5bf Fix syntax error in default tmux theme
Ref #150
2013-02-24 23:15:16 +01:00
Otto Modinos af020d9329 Make vim visual block selection orange
Fixes #147
2013-02-24 22:26:31 +01:00
Foo 43d9639534 Fix zsh/zpython issue 2013-02-24 22:23:43 +01:00
ZyX dfaf381040 Fix various segment issues
- Fixed user segment (windows): there is no os.geteuid() here
- Fixed dir_limit_depth in cwd segment (it was not really accepting None
  value)
- Made paste_indicator not use getbufvar for global option
- Made file_size use buffer name for cache key
- Made a number of segments coerce returned integer values to strings
- Fixed modified_buffers (getbufvar() returns empty string for deleted buffers,
  but int() does not accept empty string)
- Fixed file_directory and file_name segments: they were not working in
  python-3.3 because str() object has no attribute decode()
- Made powerline.lib.vcs.git.Repository.status() always return 3-characters
  string
- Made it always check both for dirty index and dirty wt for all files
- Fixed binary prefix handling, renamed it to si_prefix

  Previously there was the following when binary_prefix was False:
      div = 1024
      unit = kB
  (unit is inconsistent with div).
  Now it is the following when si_prefix is False:
      div = 1024
      unit = KiB
  (according to https://en.wikipedia.org/wiki/Binary_prefix IEC prefix kibi is
  abbreviated as Ki, not ki (note the case)). This means that in segments prefixes
  has changed, but not displayed values.
2013-02-24 22:23:04 +01:00
ZyX 168f4854c1 Fix various flake8 errors 2013-02-24 22:23:02 +01:00
ZyX c8c713321d Use smoother gradient for true color 2013-02-24 22:23:02 +01:00
ZyX f319ddc33b Ignore highlight definitions for function segments
Also removed divider_highlight_group from configuration: it is actually used
only in function segments.

Fixes #215
2013-02-24 22:22:48 +01:00
ZyX 045d60fbc4 Optimize cterm_to_hex
Dictionary is an overkill here. Tuple is faster. Also now the whole tuple can be
seen on the 1/4 of my screen (32x119 characters) and colors are easier to find
(useful only when seeking for normal color names).

Again, it would be goot to ignore flake8 in this case. Without comments it
complains about it is not easy to find requested color by hand
2013-02-24 22:22:45 +01:00
ZyX d0fafe7679 Replace non-color names with a bit more descriptive names 2013-02-24 22:22:40 +01:00
ZyX 01b34a7893 Split colorschemes and add better gradient support
- Splitted colorschemes into colors definitions file (TODO: remove non-colors
  definitions like weather_condition_hot and base00) and actual colorscheme.
- Removed dictionary containing groups definitions for all groups for all modes,
  now colorscheme is queried for this each time.
- Moved determination of colors from theme to renderer.
- Added gradients definitions (actually, only one) to new colors file.
- Made line_percent with gradient=True use new gradients.
2013-02-24 22:22:31 +01:00
ZyX b8b0518e9b Replace 'NONE' with None for guifg/guibg.
No need in having string keys if we are in any case checking this for equality
later instead of embedding them as-is like cterm*
2013-02-24 22:22:24 +01:00
ZyX 41ffd8cf5a Rename colorscheme variable to colorscheme_config 2013-02-24 22:22:20 +01:00
ZyX d9943e3222 Fix various flake8 errors 2013-02-24 22:22:17 +01:00
ZyX 696cd97e12 Replace getfsize with os.stat 2013-02-24 22:22:13 +01:00
ZyX f211bb6c74 Add ability to override configuration options
Related changes:
- Moved all non-ASCII symbols into `segment_data`
- Added --config_path, replaced nargs='*' with better action='append'
- Added g:powerline_config_path vim option
- Added ipython overrides (via additional arguments to setup() or c.Powerline)

TODO: support for non-string scalars in vim overrides.

Fixes #231
2013-02-24 22:22:13 +01:00
ZyX c86b047ed4 Add ability to specify some segment keys once in top theme 2013-02-24 22:22:10 +01:00
ZyX 186ad2d423 Remove useless Segment class
It was used solely for Segment.get (the only place where it was used just saved
its .get() method, throwing away instance itself) and looks more like abusal of
the purpose of the classes
2013-02-24 22:22:07 +01:00
ZyX 2fa64c42d1 Move translation of modes into renderers/vim.py
Fixes #147
2013-02-24 15:29:31 +04:00
ZyX 3c62e060be Don't use UUID for window IDs
This fix uses an incremented number instead.

Fixes #180
2013-02-22 15:31:27 +01:00
ZyX 861f7dc179 Fix &stl reset to global value when new file is loaded
Fixes #241
Ref #240
2013-02-21 12:51:25 +01:00
Kim Silkebækken b347d53b6d Remove obsolete Vundle warning from docs 2013-02-20 14:07:26 +01:00
Kim Silkebækken 282cb43eef Fix various minor formatting issues
Closes #242.
2013-02-20 13:47:54 +01:00
Martin Preisler ee51b8b76c Handle non-existant CWDs gracefully 2013-02-20 07:37:02 +01:00
ZyX e14f5e4208 Fix problem with wrong window ID/winnr after some window operations
Removed autocommands as well. Powerline() function is now responsible both for
displaying powerline and for updating statuslines. No cmdwin events not
triggered workaround nonsense anymore.

Fixes #237
Fixes #236
Fixes #222
Fixes #232
2013-02-20 07:34:36 +01:00
Kim Silkebækken ea56f4c26b Split optional dependencies to python packages and other apps
Closes #227.
2013-02-18 19:40:32 +01:00
ZyX baaf6cde1d Switch from `status` + `ls-files` to `status --ignored` 2013-02-18 09:07:51 +01:00
ZyX b8b7cfbbea Fix icon_names for unknown weather code 2013-02-18 08:57:03 +01:00
ZyX 2a3911dbe6 Make spaces around the divider configurable
Fixes #225
2013-02-18 08:56:57 +01:00
ZyX 6fc7d6acc9 Purge cache on BufWrite
Instead of much simpler solution define an API that may be used for anybody
willing to add cache purging on events with a few keystrokes
2013-02-18 08:56:57 +01:00
ZyX c45747a3b8 Ease E858/E860 errors debugging
E858: Eval did not return a valid python object
E860: Eval did not return a valid python 3 object
2013-02-15 21:06:08 +04:00
ZyX df7d0f2041 Remove 'before' key from file_vcs_status segment
Fixes #219
2013-02-15 13:05:34 +01:00
ZyX 0fddb24b9b Rework memoize class
- Removed *args: segments are not receiveing any non-keyword arguments so no
  need to bother with *args at all.
- Replaced additional_cache_key with cache_key: all functions that formerly used
  additional_cache_key appear not to need initial arguments as cache keys. It
  also simplifies the code.
- Made _cache be defined in __init__, it is much easier to implement cache
  purging this way.

Ref #205
Fixes #208
2013-02-15 13:05:30 +01:00
Kim Silkebækken 5202807269 Make Spotify segment more error-proof 2013-02-15 12:49:53 +01:00
ZyX ca4466cd83 Rework weather segment
Allows more precise icon selection and purges out unicode characters from
configuration.

Note: windy icon needs reworking, I used a trigram for it.

Fixes #203.
2013-02-13 08:12:31 +01:00
Kim Silkebækken 9aee288c18 Use requires_segment_info decorator on shell segments 2013-02-12 10:52:17 +01:00