Commit Graph

366 Commits

Author SHA1 Message Date
ZyX 28547930cc Add screen_escape option
Refs #199.
2013-02-11 07:15:51 +01:00
ZyX d12299c18c Add a way to specify renderer options on command-line, added tmux_escape
Note: tmux escaping does not fix things, on my system it produces
![Gap between ... and directory name](http://img-fotki.yandex.ru/get/6439/9151298.2/0_93b4c_5d9a317f_orig.png)
Fixes #199
2013-02-11 07:15:46 +01:00
ZyX 52635d05ae Add support for italic and underline attributes in shell renderer 2013-02-11 07:15:19 +01:00
ZyX e18665c5fe Purge out constants from classes, lowercase TERM_24_BIT
Remove recursive import as well
2013-02-11 07:43:13 +04:00
Kim Silkebækken 21b59149bf Move docs to readthedocs.org 2013-02-10 14:04:07 +01:00
ZyX 2d9dd21a70 Add auto_rewrite method to pre_0_11
It raises error without this.
2013-02-10 13:55:35 +01:00
ZyX d414a7e491 Add more USE flags to gentoo ebuild 2013-02-10 13:55:32 +01:00
ZyX da5ac61062 Fix location of powerline.vim file
rm is uncommented because there is no “source_plugin” now.
2013-02-10 13:55:27 +01:00
ZyX 9a0b970b07 Clear highlight groups on ColorScheme event
Closes #196
Fixes #153
Fixes #194
2013-02-10 13:54:44 +01:00
ZyX 4202bd2ee6 Use escape_hl_* variables for prompts deriving from ShellRenderer
This is faster then super() calls and also more convenient.
Fixes #142 just as well
Conflicts:
	powerline/renderers/bash_prompt.py
	powerline/renderers/ipython.py
	powerline/renderers/shell.py
	powerline/renderers/zsh_prompt.py
2013-02-10 13:54:15 +01:00
ZyX a6b3bc93ab Don’t mess with hl()+contents
What does hl() mean? It looks like “highlight an empty string”, but is actually
“reset highlight style”. In addition if you are writing “hl()” function for new
renderer you need to care about “contents” variable (in two places!: None for
super() call and (contents or u'') after super() call) though function is
actually doing nothing with it. It is just inconvenient.
2013-02-10 13:53:18 +01:00
Kim Silkebækken 2caa136f26 Add docs for all segments 2013-02-08 17:35:15 +01:00
Kim Silkebækken b599761ae6 Work around missing vim module when generating sphinx docs
Horrible solution, should be fixed asap.
2013-02-08 17:35:07 +01:00
Kim Silkebækken 55ad48f0e6 Update sphinx configuration 2013-02-08 17:32:23 +01:00
Kim Silkebækken 6dc81ab855 Use functools.wraps on memoize decorator 2013-02-08 17:13:37 +01:00
Kim Silkebækken d386ae71fd Add modified_buffers segment
This segment returns a comma-separated list of modified buffers. The
segment is not enabled by default.

Closes #173.
2013-02-08 16:20:26 +01:00
ZyX 5399265135 Add note about zpython branch
TODO: To be removed after (if) zsh maintainers accept the patch.

Refs #104.
2013-02-08 14:43:32 +01:00
Kim Silkebækken 907e85931b Fix vim plugin path in Arch Linux packages 2013-02-08 14:40:46 +01:00
Kim Silkebækken 323a838511 Fix math error in humanize_bytes
Closes #175.
2013-02-07 13:48:36 +01:00
Kim Silkebækken 4e4a2b2ef8 Add tips & tricks to the docs
Closes #182.
2013-02-07 12:32:34 +01:00
Kim Silkebækken 8b8de32be9 Improve vim plugin loading
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.
2013-02-07 12:14:15 +01:00
Kim Silkebækken c2e7124da0 Fix statusline highlighting after leaving a cmdwin
Because vim doesn't trigger any autocmds after leaving a cmdwin the
statusline in the window the user returned to from the cmdwin would be
highlighted as non-current even if it should have been current.

This issue is resolved by storing the last current window ID in a script
variable, and when leaving the cmdwin we show the last current window as
current instead of detecting it after the WinEnter autocmd has been
triggered (which doesn't happen after leaving a cmdwin).

Closes #184.
2013-02-06 13:18:49 +01:00
ZyX 2e5b9383a5 Properly escape color codes in bash
Closes #177.
Closes #179.
2013-02-06 09:15:13 +01:00
Kim Silkebækken 4fa17f6ff5 Catch more errors in weather segment 2013-02-06 09:14:17 +01:00
Kim Silkebækken 9a95d738d5 Fix e-mail segment UTF-8 issues
Closes #178.
2013-02-06 09:14:17 +01:00
Kim Silkebækken c8d4e58a93 Add repository_status vim segment
Split segment highlighting compared to the file_vcs_status segment is
missing.

Refs #173.
2013-02-06 09:14:17 +01:00
Kim Silkebækken 5cc265affd Fix repo.status() functions 2013-02-06 09:14:17 +01:00
Kim Silkebækken e3ce4adc3d Fix UTF-8 encoding issue with weather segment
Closes #172.
2013-02-06 09:14:03 +01:00
Kim Silkebækken 56e661b21b Handle more request errors in common segments 2013-02-06 08:51:47 +01:00
Kim Silkebækken 184dac1bff Add solarized support for shell exit status segments
Closes #165.
2013-02-05 13:48:33 +01:00
ZyX 6f69322024 Add support for zsh/zpython
Closes #163.
2013-02-05 12:00:03 +01:00
Kim Silkebækken b99e9cb074 Revert "Make 'powerline' a namespace package"
This reverts commit 57bd0af272.
2013-02-04 13:04:17 +01:00
ZyX 7a25ab1d53 Fix “'NoneType' object is not iterable” error
Fixes #158
2013-02-04 00:19:04 +04:00
Kim Silkebækken 57bd0af272 Make 'powerline' a namespace package
This will allow third-party plugins to use the 'powerline' namespace for
contributed segments.

Refs #3.
2013-02-03 16:27:30 +01:00
Kim Silkebækken 7e14a84cc9 Add cmus player to now_playing segment
Closes #162.
2013-02-01 22:35:01 +01:00
Kim Silkebækken def7a1e82e Update now_playing methods to use common formatting methods 2013-02-01 22:33:24 +01:00
Kim Silkebækken e8ebb07662 Add common player conversion methods 2013-02-01 22:33:07 +01:00
Kim Silkebækken ea32006715 Fix Unicode issues with mail segment 2013-02-01 22:32:39 +01:00
Kim Silkebækken 4cda38e214 Remove support for persistent memoization
A different form of persistent memoization should be reimplemented later.

Refs #159.
2013-02-01 22:04:35 +01:00
Kim Silkebækken 260e40a544 Replace spaces *before* highlighting contents
The previous change obviously didn't work for renderers like the Pango
markup renderer since the highlighting code uses regular spaces and not
no-break spaces. Now spaces are replaced in the contents and dividers
only, and it's done before highlighting the segment so the added
highlighting code stays untouched.

Refs #113.
2013-02-01 16:45:10 +01:00
Kim Silkebækken bfdb7f8028 Refactor segment rendering
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.
2013-02-01 16:22:08 +01:00
Gaurav Narula cb860ce5d0 Add Rhythmbox to now_playing segment
Closes #155.
2013-01-31 14:23:23 +01:00
Kim Silkebækken 0ad417cc79 Refactor now_playing segment slightly 2013-01-31 10:53:33 +01:00
Kim Silkebækken 5f9b8d5172 Swap quotes in email_alert segment 2013-01-31 10:36:10 +01:00
Kim Silkebækken 91c143bdd0 Update Arch Linux PKGBUILDs 2013-01-31 10:36:10 +01:00
Kim Silkebækken 7fb67e7350 Create now playing segment
The segment currently provides info from mpd or Spotify.
2013-01-31 10:35:21 +01:00
Kim Silkebækken fd5cd92101 Fix rendering of dividers without custom highlight group 2013-01-31 07:51:09 +01:00
Kim Silkebækken 7022b47ed9 Fix updating issue with Qtile widget 2013-01-30 10:53:28 +01:00
Kim Silkebækken 597f67b85a Add Qtile widget 2013-01-30 10:35:01 +01:00
Kim Silkebækken fb929b76cc Fix vim matcher string comparison
Refs 2f361711fe.
2013-01-30 09:54:34 +01:00