Commit Graph

1341 Commits

Author SHA1 Message Date
ZyX fc8ad831d4 Update tmux data even when prompt is disabled
Fixes #467
2014-06-25 20:40:24 +04:00
ZyX-I 1dd5f42b9d Merge pull request #896 from ZyX-I/fix-vim-environment
Fix typo in VimRenderer.render

Ref jmcantrell/vim-virtualenv#26.
2014-06-25 20:15:04 +04:00
ZyX 6f6c1fb90c Add tests 2014-06-25 20:05:24 +04:00
ZyX 46d58d39fa Fix typo in VimRenderer.render
segment_info should have been initialized with self.segment_info, not updated: 
new values must have priority. Refactored the result so that static values are 
defined in VimRenderer.segment_info.
2014-06-25 19:27:21 +04:00
ZyX-I 35522b1511 Merge pull request #893 from ZyX-I/multiline-prompt
Multiline prompt support

Fixes #462
2014-06-24 23:50:03 +04:00
ZyX 515df615bf Add some basic tests 2014-06-24 23:36:50 +04:00
ZyX f02807ffa4 Rename test_configuration to test_provided_config_files 2014-06-24 21:38:07 +04:00
ZyX 9a4e1edfbc Update documentation 2014-06-24 21:38:07 +04:00
ZyX f718719a3b Update lint checker 2014-06-24 21:38:07 +04:00
ZyX 8849f9d3d6 Support multiline prompt in fish
Note: fish does not accept prompt strings that have width identical to the
terminal width: it makes prompt be reduced to just `>`.
2014-06-24 21:38:07 +04:00
ZyX 5df7b36c3a Support multiline prompt in tcsh
Notes:

- I had to launch script twice because tcsh does not actually support multiline
  prompt: it squashes everything into one line.
- Thus I had to add POWERLINE_TCSH_NO_ABOVE_PROMPT: running python twice is not
  nice for performance.
- Due to 1) tcsh shifting rprompt by 1 and 2) tcsh not accepting %{%}-escaped
  color section at the very end of rprompt (actually it is accepting it, just
  makes user input colored as that section) I had to reduce computed width by 2.
- As running powerline command in precmd modifies status code I had to use
  POWERLINE_STATUS variable to save status.
- As tcsh does not accept names that start with underscore non-API powerline
  variables do not start with underscore.
2014-06-24 21:38:07 +04:00
ZyX 3b4a2b3520 Support multiline prompt in zsh
Notes:

- Unlike fish zsh outputs right prompt shifted by one to the left. Which means
  I have to subtract 1 from computed width.
- PS2 and PS3 produce too lengthy prompts when fed with real width. Thus they
  are fed with PS1 prompt width like in ipython (out prompts).
2014-06-24 21:37:59 +04:00
ZyX eb014efddb Support multiline prompt in bash 2014-06-24 21:33:33 +04:00
ZyX 61006d8fe1 Add support for above lines as described in #462
Support is not mirrored in shell bindings yet
2014-06-24 21:33:21 +04:00
ZyX e3a27e0c8a Merge branch 'readd-zpython' into develop 2014-06-23 21:09:27 +04:00
ZyX 90afccb219 Add note about lags to troubleshooting-common.rst 2014-06-23 21:09:15 +04:00
ZyX-I a65ea01d38 Merge pull request #890 from ZyX-I/fix-zpython-bindings
Fix zpython bindings
2014-06-15 11:16:16 +04:00
ZyX 62601ad641 Fix pipestatus segment in case of zsh+zpython 2014-06-15 11:09:09 +04:00
ZyX 641b0e08a1 Junk double _POWERLINE_JOBNUM set
_POWERLINE_JOBNUM was already set in precmd, no need to do this again.
2014-06-15 11:08:25 +04:00
ZyX edbcb5a1f1 Merge branch 'new-zpython-name' into develop 2014-06-13 03:51:09 +04:00
ZyX 2c210bb649 Zpython got renamed to libzpython
Not that I wanted this: cmake cannot be told I do not want `lib` prefix. `zsh/` 
prefix in any case should have been removed: zpython is not pretending it is 
a part of zsh now. Keeping old name for those who are still using zpython branch 
(i.e. nearly everybody since zpython got moved less then an hour ago).
2014-06-13 03:49:42 +04:00
ZyX-I b145b7064f Merge pull request #888 from ZyX-I/run_cmd-unicode
Decode stdout in shell.run_cmd
2014-06-01 21:51:28 +04:00
ZyX 17d1202792 Decode stdout in shell.run_cmd
Closes #885
2014-06-01 20:00:36 +04:00
ZyX 7ac2717083 Merge branch 'fix-883' into develop 2014-05-27 05:44:08 +04:00
ZyX 7c65ee9703 Catch NotImplementedError when importing module
Fixes #883
2014-05-27 05:43:55 +04:00
ZyX-I e3bebcc5b5 Merge pull request #882 from Determinant/develop
[tmux] Make battery segment use BAT1 if BAT0 was not found
2014-05-26 20:54:37 +04:00
Teddy 8840028568 [tmux] Make battery segment use BAT1 if BAT0 was not found 2014-05-25 23:20:27 +08:00
ZyX 490398675f Update documentation
Closes #872
2014-05-24 13:59:20 +04:00
ZyX c08340e088 Use POWERLINE_CONFIG_COMMAND environment variable 2014-05-24 13:59:04 +04:00
ZyX 7b1d7bbb9e Use scripts/powerline-config to source tmux configuration
Ref #872
2014-05-24 13:45:21 +04:00
ZyX-I 316609ffd7 Merge pull request #873 from frewsxcv/patch-1
Enable testing on Python 3.4
2014-05-12 08:28:52 +04:00
Corey Farwell 43941e4d21 Enable testing on Python 3.4 2014-05-11 20:22:48 -07:00
Austin Beam f39b1dcf20 tmux: Enhance version checking for tmux
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.
2014-05-06 00:12:10 -05:00
ZyX 9e7c6cf0be Merge branch 'ipython-in-out-same-width' into develop 2014-05-04 17:50:24 +04:00
ZyX 413edbc4f0 Add space after `In` string in ipython
Thus `In ` and `Out` have the same width
2014-05-04 17:50:00 +04:00
ZyX a7d92a65f4 Merge branch 'allow-disabling-prompt-support' into develop 2014-05-04 13:31:06 +04:00
ZyX 032a363b81 Allow disabling prompt and/or tmux support in shells
Fixes #849
2014-05-04 13:30:43 +04:00
ZyX-I 850d6c2e0a Merge pull request #871 from ZyX-I/fix-853
Add support for omitting VALUE
2014-05-04 13:07:59 +04:00
ZyX be2fe98a21 Add support for omitting VALUE
This will remove error reported in #853, but not its cause
2014-05-04 13:01:29 +04:00
ZyX 5d03fdebe1 Merge branch 'add-editorconfig' into develop 2014-05-04 12:12:39 +04:00
ZyX 34b928091a Move some settings from .local.vimrc to .editorconfig
Closes #865 as WONTFIX. It is better to have one .editorconfig then a number of 
editor-specific files.
2014-05-04 12:10:32 +04:00
ZyX-I f6cdb4467c Merge pull request #870 from austinbeam/feature/869-tmux-version-checking
tmux version checking (Issue #869)
2014-05-04 11:52:32 +04:00
Austin Beam 20d326fd45 tmux: Check version for last window indication
Last active window indication feature introduced by pull request #864
causes undesired behavior on older versions of tmux. Add version
checking to determine which method for feature implementation to use,
dropping the feature entirely for tmux versions less that v1.8. For tmux
v1.9, use the newer 'window-status-last-style' option rather than the
deprecated (starting with v1.9) 'window-status-last-fg' option. Ideally,
the other `foo-{attr,fg,bg}` options used in the `tmux` powerline config
file should also be version checked and replaced with the corresponding
`foo-style` option as well.
2014-05-03 19:29:12 -05:00
Austin Beam 478e49773b tmux: Check version for prefix active colorization
Prefix active colorization feature introduced by pull request #863
causes undesired behavior on older versions of tmux. Add version
checking and revert to old powerline configuration if the tmux version
is less than v1.8. tmux v1.8 was the first version to support the
client_prefix format variable.
2014-05-03 19:29:12 -05:00
Austin Beam 7937ab9866 tmux: Shell variable definition for tmux version
Add variables for tmux major and minor version numbers. These can
subsequently be used to test for tmux version compatibility.
2014-05-03 19:29:12 -05:00
ZyX-I 9d4100af61 Merge pull request #863 from austinbeam/feature/tmux-indicate-prefix
tmux: Change session block color if prefix pressed
2014-05-03 13:10:49 +04:00
ZyX-I 06c2f00cde Merge pull request #864 from austinbeam/feature/tmux-colorize-last-window
tmux: Colorize the last active window FG
2014-05-03 13:10:21 +04:00
ZyX-I 7e637d257b Merge pull request #867 from ZyX-I/fix-shutdown
Fix shutdown function being always None
2014-05-03 13:06:21 +04:00
ZyX d759a0a806 Undo renaming args to kwargs 2014-05-03 13:03:57 +04:00
ZyX e9852fec37 Fix shutdown function being always None
Problem reported by @IvanMalison
2014-05-03 12:44:00 +04:00