tmux configuration has become very fragmented between versions due to a
combination of new features and deprecation of older options. As such,
version checking for tmux became a requirement to allow maximum
functionality along with version-appropriate configuration. However,
wrapping nearly every line with `if-shell` is tedious and becomes
virtually unreadable.
This enhancement to tmux version-checking creates a logical
configuration file structure that reflects the development of tmux. As
additional configurations are added and tmux development continues, this
structure can be leveraged appropriately and extended as needed.
Rather than having multiple `if-shell` checks for the same version, each
version or version group with specific requirements can be checked only
once. This leads to simpler and fewer `if-shell` version checks. It also
reduces the ambiguity introduced by complex `if-shell` commands that
include an 'else' conditional.
A caveat to adding this enhancement is the additional requirement of the
end user to add a tmux variable definition (`POWERLINE_BINDINGS_DIR`) to
his/her `~/.tmux.conf` file. For existing tmux users leveraging
powerline, this may prove to be a slight one-time nuisance immediately
after upgrading. Without this definition, there is no way to determine
the location of the additional tmux powerline config files that have
been added with this enhancement. The docs have also been updated in
this commit to reflect this initial configuration requirement change.
Also added are some additional troubleshooting notes that point to
definition of this variable as a potential issue. Powerline will
continue to work without the definition of `POWERLINE_BINDINGS_DIR`, but
some of the functionality will be reduced and the appearance incomplete
(i.e. colors).
Ultimately, the caveat above is a small price to pay in exchange for a
framework that can be leveraged for proper version-appropriate
configuration of tmux going forward.
If the g:powerline_no_python_error variable is set don't issue an error
message even if vim doesn't have the required Python support. This
allows a common set of configuration files to be used across systems
where some of the copies of vim don't meet the requirements.
This extends priorities in both directions, uses slightly faster `is None`
check, makes it consistent with `interval` special-casing also to `None` and
makes lint able to use one simple `.type()` check in place of `.either()` one.
If weather or system_load segments were moved to the left draw_soft_divider
variant resulted in incorrect renderring. Thus it was replaced by
draw_inner_divider.
Previous variant was bad because
1. draw_divider only applied to soft dividers. Hard dividers were always drawn
2. But there was a hack with width=auto segments: for this segments draw_divider
setting applied always.
Now there are no additional dependencies: draw_*_divider applies no matter what
other properties of the segment are.
Note: to properly view some values in browser you need the browser to use
patched font or fontconfig. Though there is not much difference between some
cryptic escape sequence and singe wrongly displayed character.
- 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.
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
Several of the plugin loading methods have been joined into one plugin
file that will be loaded by updating the runtimepath. More informative
error messages will be displayed if Python support is missing or if the
module import fails.
Note that this commit will break existing plugin loading, the new
method with updating the runtimepath will be required.
Closes#156.
Closes#181.
This commit introduces the following changes to themes and segment
rendering:
- Spacer segments are now regular string/function type segments with
"width": "auto" in the themes.
- The "rjust"/"ljust" properties have been replaced by the "width"
option combined with a new "align" option.
- Renderer._render_segments() is now a generator which renders each
segment separately, and assigns the rendered contents to
"_rendered_hl" and "_rendered_raw" in the segment dict.
- Renderer.render() returns the segments by joining the "_rendered_hl"
values for each segment.
- Spacer segment widths are calculated in the render() method, and
assigned to "_space_left" and "_space_right" in the segment dict.
These spaces are then applied in Renderer._render_segments().
- All space characters are converted to no-break spaces (U+00A0) in the
"_rendered_hl" property.
Refs #113.
Refs #154.
The installation docs have been split into separate guides for OS X and
Linux, with OS-specific troubleshooting as part of the installation
guide.
Terminal emulator support tables have been added to both guides.
Closes#121.
The header levels have been switched to correspond more with the Sphinx
suggested standards and the troubleshooting section has been
restructured to make it easier to find solutions. Minor markup changes
and other changes are also included in this commit.
Reasons:
- prompt.* is a bad name for installing into /usr/share/zsh/site-contrib
- prompt.* does not conform powerline.vim and powerline.conf (vim and tmux)
This requires a couple of minor changes to custom segments. The segment
`highlight` key has been renamed to `highlight_group`, and segment
functions must return a list of segments dicts instead of just a dict.
Closes#88.
Support for unicode literals was reintroduced in Python 3.3 which makes
supporting both Python 2 and Python 3 much easier, so this will be the
minimum supported Python 3 version.
Closes#8.
- Added notes about where common and extension-specific configuration is located
- Added common.paths config.json option description
- Fixed user-defined segments location found in segments section
- Fixed Themes/segments/module reference text
This should resolve the issue with duplicate paths in sys.path by only
updating sys.path if the plugin is loaded using :source instead of
:python. sys.path is now updated in source_plugin.vim, which checks if
the user has Python installed, and updates sys.path before sourcing the
actual plugin file.
Refs #17.
Refs #19.
Refs #21.
There is no need in regenerating font cache in *all* directories.
Make documentation suggest to regenerate just `~/.fonts` cache
which actually changed.