2014-01-12 12:19:54 +00:00
|
|
|
var blessed = require('blessed');
|
|
|
|
var screen = blessed.screen({
|
2015-07-22 02:23:57 +00:00
|
|
|
autoPadding: true,
|
|
|
|
warnings: true
|
2014-01-12 12:19:54 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
var tab = blessed.box({
|
|
|
|
parent: screen,
|
|
|
|
top: 2,
|
|
|
|
left: 0,
|
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
scrollable: true,
|
|
|
|
keys: true,
|
|
|
|
vi: true,
|
|
|
|
alwaysScroll: true,
|
|
|
|
scrollbar: {
|
|
|
|
ch: ' '
|
|
|
|
},
|
|
|
|
style: {
|
|
|
|
scrollbar: {
|
|
|
|
inverse: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
tab._.data = blessed.text({
|
|
|
|
parent: tab,
|
|
|
|
top: 0,
|
|
|
|
left: 3,
|
|
|
|
height: 'shrink',
|
|
|
|
width: 'shrink',
|
|
|
|
content: '',
|
|
|
|
tags: true
|
|
|
|
});
|
|
|
|
|
|
|
|
tab._.data.setContent(require('util').inspect(process, null, 6));
|
|
|
|
|
|
|
|
screen.key('q', function() {
|
2015-08-08 04:00:31 +00:00
|
|
|
screen.destroy();
|
2014-01-12 12:19:54 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
screen.render();
|