Commit Graph

1054 Commits

Author SHA1 Message Date
ZyX 050a34bceb Avoid ResourceWarning messages: close stdout 2013-03-17 21:23:26 +04:00
ZyX 84dfac6f8e Avoid using python setup.py test
Closes #295
2013-03-17 21:23:26 +04:00
ZyX f547e8b85f Some fixes for flake8 2013-03-17 21:23:15 +04:00
ZyX 62e731314e Replace memoize with threading where applicable
NOTE: Documentation now gets attached to *classes*, not actual segments. Hiding
      away classes (by changing their names to start with `_`) and/or doing

          self.__doc__ = self.__class__.__doc__

      does not work (hiding classes only hides documentation completely). I am
      not familiar with sphinx enough to say how this should be fixed.

Ref #168
2013-03-17 21:22:33 +04:00
ZyX a4adc92215 Do not import memoize, humanize_bytes and urllib_* in powerline.lib 2013-03-17 21:21:03 +04:00
ZyX 29eccf409b Use psutil module for `user` segment 2013-03-17 13:28:57 +04:00
ZyX 93e41bf2c4 Make psutil.BOOT_TIME fallback for /proc/uptime
Method used with psutil.BOOT_TIME is subject to changes when clock_settime
changes time, /proc/uptime is not.
2013-03-17 13:17:55 +04:00
ZyX f8db46b406 Use proper clock if possible 2013-03-15 19:31:08 +04:00
ZyX abe0b1a647 Add support for .startup and .shutdown methods 2013-03-15 19:31:08 +04:00
ZyX c237e66958 Make file_size segment output buffer size 2013-03-15 19:31:08 +04:00
ZyX 6f679e08aa Refactor powerline.lib.url 2013-03-15 19:31:08 +04:00
ZyX df19981f65 Add tools/generate_gradients.py and tools/colors_find.py
First helps in generating gradients. Usage:

    python tools/generate_gradients.py '[color1, …]' itemnum[ "show"]
where color is either [100, 127, 46] (cterm colors) or ["ff00ff", "feffef"] (RGB
colors)

Second is to determine what name will be better suitable for some RGB color
2013-03-15 19:31:08 +04:00
ZyX 137a415a9b Add .local.vimrc with configuration for the lint checker
Ref #314
2013-03-15 19:31:08 +04:00
Kim Silkebækken d966921f04 Remove contibuting info from docs 2013-03-15 15:23:45 +01:00
Kim Silkebækken edfc090ddb Add initial CONTRIBUTING document
Based on
https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md

Ref #287
2013-03-15 15:23:41 +01:00
Kim Silkebækken c4e618e17c Update authors and contributors list 2013-03-15 14:35:08 +01:00
Kim Silkebækken 2c25a71f2e Merge branch 'fix-solarized-visual-block-color' into develop 2013-03-15 14:19:43 +01:00
Ali B f141574d89 Make vim Visual Block mode orange in Solarized colourscheme.
This makes it consistent with the styles of the other visual modes.
Reference issue #147.
2013-03-15 14:19:35 +01:00
Kim Silkebækken 8cdd12a800 Merge remote-tracking branch 'zyx-i/326-fix-None-handling' into develop 2013-03-15 14:18:03 +01:00
Kim Silkebækken 9f5793c453 Merge branch '324-fix-bzr-branch-name' into develop 2013-03-15 14:17:40 +01:00
Kovid Goyal dda500a673 Only use locally stored bzr branch nickname
Fixes #324 (slow vcs branch segment with bzr checkout)
2013-03-15 14:17:25 +01:00
Kim Silkebækken 747c75c1c4 Merge remote-tracking branch 'zyx-i/fix-322' into develop 2013-03-15 14:15:26 +01:00
Kim Silkebækken 5e71f58b83 Merge branch 'fix-urllib_read' into develop 2013-03-15 14:14:20 +01:00
Kim Silkebækken 24097293e5 Catch all urllib errors in urrlib_read() 2013-03-15 08:32:25 +01:00
ZyX 48470221f0 Make git.Repository.status() also return None
Fixes #326
2013-03-14 20:03:26 +04:00
Kim Silkebækken d015d517ac Merge branch '320-fix-pkgbuilds' into develop 2013-03-13 14:10:00 +01:00
Kim Silkebækken b1b0f2427e Install fonts to OTF instead of TTF in PKGBUILDs
Fixes #320
2013-03-13 14:09:26 +01:00
Kim Silkebækken 8861c7144c Merge remote-tracking branch 'zyx-i/branch-colors' into develop 2013-03-13 13:55:42 +01:00
ZyX e24703dbdd Add status_colors argument to branch segments
Closes #206
2013-03-13 16:51:53 +04:00
ZyX d8c64c5e3a Fix keyword argument name 2013-03-13 07:33:47 +04:00
ZyX 271cfe06b1 Add parameter to disable current and user directories shortening
Fixes #322
2013-03-13 01:01:07 +04:00
Kim Silkebækken 0a5a09db12 Merge branch '307-fix-ambiwidth' into develop 2013-03-12 13:12:28 +01:00
ZyX 1960e8329f Remove useless import 2013-03-12 13:12:14 +01:00
ZyX 6f3703e312 Improve ambiwidth handling, readd additional_escapes
Fixes #307
2013-03-12 13:11:59 +01:00
ZyX 417e823e96 Fix two flake8 errors 2013-03-11 22:24:00 +04:00
ZyX b2b05cb81c Removed underscore_to_camelcase
No need to bother both developers (that need to create class names compatible 
with file name, which is not obvious if not looking into main Powerline class) 
and computer (that needs to recompute class name each time) if it is possible to 
bother only developers (or only computer, but this contributes to higher startup 
times).

About not obvious: when you look into zsh_prompt.py and see only 
ZshPromptRenderer name you only think that powerline upstream is following 
strict code style. You don’t think there is a technical reason for such naming, 
like you don’t think there is technical reason for having blank lines. When you 
look into zsh_prompt.py and see `renderer = ZshPromptRenderer` it is obvious 
that there is technical reason for writing code this way because new variable is 
never used in the module itself.
2013-03-11 22:22:18 +04:00
ZyX 696478593d Move some functions out of classes
No need to have static methods that are not supposed to be overridden and that 
do not benefit from `self' argument they do not receive
2013-03-11 22:13:43 +04:00
ZyX 2c445a9356 Add more tests to test_configuration
Dynamic configuration tests. Purpose: make sure that default configuration does 
not throw. Tests catch only very trivial problems (like missing imports after
refactoring)
2013-03-11 22:09:34 +04:00
Kim Silkebækken 89204d2a7b Merge remote-tracking branch 'zyx-i/fix-278-powerline-lint' into develop 2013-03-11 16:24:35 +01:00
ZyX fe6f1bf4d5 Handle AttributeError also when importing segment function 2013-03-11 19:19:55 +04:00
ZyX 1ef1ad7cfe Add missing import 2013-03-11 19:19:42 +04:00
ZyX 24d662c823 Make lint more error-prone
Target: report as much errors as possible in a single run without failure
2013-03-11 19:19:28 +04:00
ZyX 9dc69d91ad Make Reader also produce MarkedError, remove JSONError 2013-03-11 19:19:09 +04:00
ZyX 49ad855eb5 Rename YAMLError to JSONError and MarkedYAMLError to MarkedError 2013-03-11 19:18:53 +04:00
ZyX 5da848fa4a Some fixes for flake8 2013-03-11 19:18:53 +04:00
ZyX 3fd1215091 Some changes to make it work in non-python2.7 2013-03-11 19:18:53 +04:00
ZyX f75bb9e65b Make parser less restrictive and able to report problems 2013-03-11 19:18:53 +04:00
ZyX d27f7a0411 Add most configuration checks
Changes:

- Add main configuration, colors.json, almost full themes and colorschemes
  checks
- Make powerline.lint.check return whether it had problems
- Make powerline-lint fail if .check reported problems
- Make tests run powerline-lint
- Add the script to the list of the installed scripts

Fixes #278
2013-03-11 19:17:18 +04:00
ZyX 287a88f473 Add JSON parser producing marked values
Ref #278
2013-03-11 19:14:35 +04:00
ZyX 5b11feac73 Make some functions be more convenient for use in lint checker 2013-03-11 19:12:32 +04:00