ZyX
f3ce370566
Make cpu_load_percent segment threaded
...
interval=0.5 means that it will block for 0.5 seconds which is bad. With
threading it blocks only the separate thread, and it does not hold
GIL (uses regular time.sleep to wait) in this case which is fine.
interval=0.05 means that it will report almost random value.
interval=None means that (assuming psutil.cpu_percent is called only by this
segment) it will report CPU load percent measured between two
subsequent .cpu_load_percent calls or cpu_load_percent call and
module import. It is used for update method to get immediate
result in case update_first is True.
2013-04-07 18:52:49 +04:00
ZyX
8dcbb031aa
Make IPython renderer shutdown properly
2013-04-07 13:19:20 +04:00
ZyX
66cdb36231
Use xml.sax.saxutils.escape in place of xmlrpclib.escape
...
The latter is not available in python 3
2013-04-07 04:42:36 +04:00
ZyX
6f57a3dd63
Some fixes for flake8
2013-04-07 04:30:51 +04:00
ZyX
b507029741
Replace shell script with python one
2013-04-07 04:23:31 +04:00
ZyX
3c613bc1b7
Use xmlrpclib.escape for escaping in PangoMarkupRenderer
2013-04-07 04:20:35 +04:00
ZyX
2c53378945
Also ignore trailing whitespaces
2013-04-07 04:16:57 +04:00
ZyX
9ce63d1657
Allow non-format messages
2013-04-07 03:24:39 +04:00
ZyX
8cb1538e8e
Normalize modelines
2013-04-07 02:32:29 +04:00
ZyX
25f19596dd
Also ignore E225 like suggested in CONTRIBUTING.rst
2013-04-06 23:14:18 +04:00
ZyX
6212711231
Add forgotten self.updated set
...
Ref #367
2013-04-06 21:23:25 +04:00
ZyX
5b8b3599be
Fix tests on python-2.6
2013-04-06 19:01:59 +04:00
ZyX
b1fecebd53
Some fixes for flake8
2013-04-06 18:56:19 +04:00
ZyX
e68bae6409
Add fixes for flake8 to that stuff
2013-04-06 18:53:16 +04:00
ZyX
42ee82c1de
Update *watcher stuff from @kovidgoyal develop branch
2013-04-06 18:48:04 +04:00
ZyX
b17dab0cd4
Handle removed files
2013-04-06 18:30:33 +04:00
ZyX
d1d05c9dcf
Add support for reloading configuration in the main thread
2013-04-06 18:09:45 +04:00
ZyX
296107d68e
Improve lint number (interval and priority) checks
2013-04-06 18:07:30 +04:00
ZyX
88865b1145
Defer create_renderer (and thus thread creation) until .render call
...
May fix problem discussed in #397
Also fix documentation for Powerline.render().
2013-04-06 17:18:59 +04:00
ZyX
af2f8f588b
Replace MultiClientWatcher and Powerline threads with ConfigLoader
...
Also
- move file opening and parsing to ConfigLoader
- add interval configuration
2013-04-06 17:18:25 +04:00
ZyX
f0e5f43d48
Make it use existing shutdown events
...
Also adds check to powerline-lint that "args" dictionary does not set
shutdown_event, segment_info or pl keyword arguments, this will lead to problems
2013-04-06 17:17:49 +04:00
ZyX
f45084057a
Remove debugging function
2013-04-06 17:17:49 +04:00
ZyX
b188662844
Move some thread functions to a separate class
2013-04-06 17:17:41 +04:00
ZyX
5534b26bfe
Forbid querying vim from non-main threads in tests
...
Currently tests nothing or almost nothing.
2013-04-06 17:16:55 +04:00
ZyX
0a8e7c0e1e
Add a note about vim-addon-manager
2013-04-06 17:16:55 +04:00
ZyX
63e2942929
Also take tests from @kovidgoyal develop branch
2013-04-06 17:16:55 +04:00
ZyX
47eef9860f
Use different emulate call
...
Ref #389
2013-04-06 17:16:54 +04:00
Kim Silkebækken
2685f61e88
Merge branch 'various-improvements' into develop
2013-04-05 16:22:46 +02:00
Kim Silkebækken
5ff80ee206
Merge branch 'feature/shortened-uptime' into develop
2013-04-05 16:22:38 +02:00
Kovid Goyal
f1286a7bc1
Rename time.py to monotonic.py
...
This makes it possible to run modules in the lib/ directory standalone.
2013-04-05 16:12:25 +02:00
Kovid Goyal
80be4071c9
Disable continuous polling of CPU count in load segment
2013-04-05 16:12:25 +02:00
Kim Silkebækken
0d3559c869
Increase external IP polling interval to 5 minutes
2013-04-05 15:44:38 +02:00
Kim Silkebækken
17065b4c7e
Add timeout to thread join calls to avoid deadlocks
2013-04-05 15:44:01 +02:00
Kim Silkebækken
dc1e646308
Merge remote-tracking branch 'zyx-i/fix-391' into develop
2013-04-04 14:49:50 +02:00
ZyX
e599691c52
Update only if segment_info is not None
2013-04-03 23:19:35 +04:00
ZyX
878255aff0
Make Tmux and PangoMarkup Renderers merge arguments like shell one
...
For PangoMarkup it is pretty useless currently (segment_info does not contain
anything useful).
Note: this does its job by replacing default behavior.
Source of issue: previous default used either segment_info argument (containing
{"args": args, "environ": os.environ}) or default segment_info, shell renderer
merged default segment_info with .render() argument. Now segment_info is merged
by default and old behavior moved to vim renderer which is the only one that is
designed to use this.
Fixes #391
2013-04-03 23:09:40 +04:00
Kim Silkebækken
2d9110b5f1
Update tests
2013-04-03 14:23:20 +02:00
Kim Silkebækken
cde7669251
Add parameters to shorten uptime display
...
Ref #316
2013-04-03 14:22:37 +02:00
Kim Silkebækken
05016c1f4d
Merge remote-tracking branch 'zyx-i/dividers' into develop
2013-04-03 08:05:30 +02:00
ZyX
9bd5b3ac37
Fix problems with tests
2013-04-03 09:11:43 +04:00
ZyX
ea1e45def4
Fix typo
...
Fixes #387
2013-04-03 08:51:44 +04:00
ZyX
577a1c0c79
Exchange if and with cr_kwargs_lock
2013-04-03 07:41:48 +04:00
ZyX
2a0e601995
Lock create_renderer_kwargs separately from configs
2013-04-03 07:38:53 +04:00
ZyX
33d32498b9
Do not use create_renderer from a separate thread
...
Also moves functions from tests.test_config_reload to tests.lib.config_mock
Using create_renderer for vim results in vim access from a separate thread.
2013-04-03 06:33:56 +04:00
ZyX
b990c920e9
Use clear_events, do not assert.
2013-04-03 06:02:14 +04:00
ZyX
de47b76a06
Add more assertAccessEvents
...
May fix travis build
2013-04-02 19:23:12 +04:00
ZyX
691efbfc9b
Also do the same for `last_pipe_status`
2013-04-02 19:06:05 +04:00
ZyX
4e5bd54f79
Fix cwd segment, add use_path_separator option
...
cwd segment was not drawing inner separators because of new default for
multisegment functions. use_path_separator was added because current variant
looks bad for my taste.
2013-04-02 19:01:03 +04:00
Kim Silkebækken
fd9af0617e
Merge remote-tracking branch 'zyx-i/fix-379' into develop
2013-04-02 16:50:20 +02:00
ZyX
b47c2fae15
Pass the correct value to _get_user
...
Fixes #379
2013-04-02 18:40:30 +04:00